Date: Mon, 29 Apr 1996 16:34:42 -0600 From: rjb@intac.com To: questions@freebsd.ORG Subject: Porting if_vif.c to FreeBSD 2.0.5... Message-ID: <v01510100adaae46a1ea0@[198.6.114.59]>
next in thread | raw e-mail | index | archive | help
Has anyone had any experience porting John Ionnidis's vif (virtural interface) code to FreeBSD? I'm running an NCSA 1.5 web server under FBSD 2.0.5 and wish to create virtual hosts for individual domains. After downloading the vif.info code from NCSA's home page I successfully compiled a new kernel from the code in vif.info. I'm ready to try the new kernel, however, not sure how to use the ifconfig and route commands as per Mr. Ionnidis's examples. Since sysconfig handles the inet config and routing indirectly I'm thinking /etc/netstart might have to be edited. Here's a snippet from Mr. Ionnidis's overview: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "Let's say your primary inferface's IP address is 198.3.2.1, and you also want it to respond to addresses 198.4.3.2 and 198.5.4.3 (note that these are three distinct class C addresses in three distinct class C nets). Here are the ifconfigs: ifconfig le0 198.3.2.1 up -trailers # config primary interface ifconfig vif0 198.4.3.2 up # config first virtual interface route delete net 198.4.3 198.4.3.2 # delete spurious route route add host 198.4.3.2 198.4.3.2 0 # add route for this i/f ifconfig vif0 198.5.4.3 up # config first virtual interface route delete net 198.5.4 198.5.4.3 # delete spurious route route add host 198.5.4.3 198.5.4.3 0 # add route for this i/f The route deletes are needed because the ifconfig creates a default route to the interface's network, which can cause problems; all that's needed is the (host) route to the interface's address. Now, get le0's ethernet address (say, 8:0:20:3:2:1), and add the following static ARP entries: arp -s 198.4.3.2 8:0:20:3:2:1 pub arp -s 198.5.4.3 8:0:20:3:2:1 pub This will cause any ARP requests for the VIF addresses to be replied with your machine's ethernet address." ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Basically I need to know how to write the above into /etc/sysconfig or edit /etc/netstart. Any suggestions? Thanx
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01510100adaae46a1ea0>