Documentation Error?
Jason D. Montgomery
jason at atgi.com
Tue Mar 1 16:55:46 GMT 2005
Odd. I'm no guru, so it may just be my lack of understanding...
I had this in my rc.config file to setup an alias on a NIC:
ifconfig_xl0="inet 192.168.20.2 netmask 255.255.255.0"
ifconfig_xl0_alias0="inet 192.168.20.3 netmask 255.255.255.255"
And the alias'd address would NOT load at boot time. Couldn't get it to
work.
But when I changed it to this, it worked just fine:
ifconfig_xl0="inet 192.168.20.2 netmask 255.255.255.0"
ifconfig_xl0_alias0="alias 192.168.20.3 netmask 255.255.255.255"
The ifconfig command wouldn't work either until I replaced alias with
inet on the command line.
Am I just missing something else?
FYI:
# uname -a
FreeBSD ns2.atgi.com 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #0: Fri Dec
5 15:13:58 EST 2003 root at ns2.atgi.com:/usr/obj/usr/src/sys/NS2 i386
later,
jason
-----Original Message-----
From: Chris Hodgins [mailto:chodgins at cis.strath.ac.uk]
Sent: Tuesday, March 01, 2005 11:39 AM
To: Jerry McAllister
Cc: Ted Mittelstaedt; questions at freebsd.org; Jason D. Montgomery
Subject: Re: Documentation Error?
Jerry McAllister wrote:
>>owner-freebsd-questions at freebsd.org wrote:
>>
>>>http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/confi
>>>gtuning-v irtual-hosts.html
>>>
>>>states that adding a virtual address is done in rc.conf like this:
>>>
>>>ifconfig_fxp0="inet 10.1.1.1 netmask 255.255.255.0"
>>>ifconfig_fxp0_alias0="inet 10.1.1.2 netmask 255.255.255.255"
>>>
>>>Shouldn't it be this instead?
>>>
>>>ifconfig_fxp0="inet 10.1.1.1 netmask 255.255.255.0"
>>>ifconfig_fxp0_alias0="alias 10.1.1.2 netmask 255.255.255.255"
>>
>>No. The actual command to make one is:
>>
>>ifconfig fxp0 inet 10.1.1.2 netmask 255.255.255.255 alias
>>
>>So you do need to pass the "inet" to ifconfig. The _alias0 makes
>>the script pass the trailing "alias"
>
>
> Hmmmm, So what is happening when no 'inet' is in the string?
> It seems to work fine. Is something still not right and just
> waiting to explode? We have lots of servers configured that way.
>
> ////jerry
>
>
>>Ted
>>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe at freebsd.org"
>
man rc.conf and search for "network_interfaces". The reason it still
works is that if you do a simple test with your ifconfig both:
ifconfig wi0 192.168.0.6
ifconfig wi0 inet 192.168.0.6
....work as you would expect.
HTH
Chris
More information about the freebsd-questions
mailing list