Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!www.nntp.primenet.com!nntp.primenet.com!news.sgi.com!news.msfc.nasa.gov!newsfeed.internetmci.com!news.jb.com!news From: Michelle Brownsworth <michellb@ordata.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: 2.1.5 ifconfig placement Date: 23 Sep 1996 21:57:00 GMT Organization: Internet Access Services Lines: 92 Message-ID: <52713c$h2@news.jb.com> NNTP-Posting-Host: random10.ordata.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.1N (Macintosh; I; 68K) X-URL: news:comp.unix.bsd.freebsd.misc When configuring the network interface with multiple IP addresses for virtual hosts, where are the additional ifconfigs supposed to reside? Originally, I tried adding them in sysconfig, as below: /etc/sysconfig network_interfaces="lo0 ed1" ifconfig_lo0="inet localhost" ifconfig_ed1="inet 206.100.174.191 netmask 255.255.255.0" # Virtual hosts ifconfig_ed1="inet alias 206.100.174.209 netmask 0xffffffff" # virtual1.com ifconfig_ed1="inet alias 206.100.174.210 netmask 0xffffffff" # virtual2.com Seems reasonable, right? Only problem is, it doesn't work. The routine in the netstart script that processes the ifconfig_ed1 lines from sysconfig is apparently not set up to handle the additional ifconfigs--none of the routes to virtual hosts are added on startup. What I ended up doing was adding the virtual host ifconfigs in netstart itself, following the network interface loop, which seemed to work well: /etc/netstart # Set up all the network interfaces, calling startup scripts if needed for ifn in ${network_interfaces}; do if [ -e /etc/start_if.${ifn} ]; then . /etc/start_if.${ifn} ${ifn} fi eval ifconfig_args=\$ifconfig_${ifn} ifconfig ${ifn} ${ifconfig_args} ifconfig ${ifn} done # Configure interface for virtual hosts echo 'configuring virtual hosts...' ifconfig ed1 inet alias 206.100.174.209 netmask 0xffffffff # virtual1.com ifconfig ed1 inet alias 206.100.174.210 netmask 0xffffffff # virtual2.com Under 2.1, during startup the ifconfigs were reassuringly echoed to the console and everything was copacetic. But... I upgraded to 2.1.5 last Friday and noted that the ifconfigs from netstart are no longer echoed to the console on startup. It makes me sort of nervous, although the routes to hosts seem to be added fine, but why aren't they echoed as before? Nevertheless, it causes me to wonder whether doing the ifconfigs in netstart itself is the recommended method. After all, the netstart file has the following admonition: # Note that almost all the user-configurable behavior is no longer in # this file, but rather in /etc/sysconfig. Please check this file # first before contemplating any changes here. If you do need to change # this file for some reason, we would like to know about it. The above leads me to believe that the ifconfigs should be in sysconfig, after all, or perhaps in one of the startup scripts mentioned in the netstart above. I've looked, but I can't seem to find any documentation that covers this topic. While we're on the subject of the 2.1.5 sysconfig file, it seems to be changed somewhat from 2.1's sysconfig. For example, I didn't see a "route_loopback=..." line, as was present in 2.1's, but I added it anyway. In fact, I pasted the following three lines (after the comments) from my 2.1 sysconfig file: # Set to the list of route add lines for this host. You must have a # route_${static_routes} line for each static route listed here (unless # static_routes is set to "" - do NOT use ``NO'' to denote a lack of static # routes!). # #static_routes="foo multicast" #route_foo="woofo woofo-gw" static_routes="multicast loopback" route_multicast="224.0.0.0 -netmask 0xf0000000 -interface ${hostname}" route_loopback="${hostname} localhost" In particular, was shoe-horning in the route_loopback line a mistake? One last puzzling thing, and this may be totally unrelated, but maybe not: On startup, only the last eight (out of twenty) of my virtuals' named primary zone loaded messages seem to be echoed to the console: named[87]: primary zone "virtual11.com" loaded (serial 96091200) However, name service is working fine for all of 'em. Just another strange thing that's happening under 2.1.5 that didn't happen under 2.1. (And I'm very confident that my named.boot and zone files are kosher.) Again, despite the above-mentioned anomalies, everything seems to be working okay. But when things suddenly start behaving differently than before, it tends to knaw at me; I need to know why. Any enlightenment would be much appreciated. [brow furrowed, scratching head] \\ichelle