Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Mar 2005 11:55:44 -0500
From:      "Jason D. Montgomery" <jason@atgi.com>
To:        "Jerry McAllister" <jerrymc@clunix.cl.msu.edu>
Cc:        Ted Mittelstaedt <tedm@toybox.placo.com>
Subject:   RE: Documentation Error?
Message-ID:  <5C6F478A90E6034BBDCF6D754D7850BC66F12D@DERRIDA.atgi.com>

next in thread | raw e-mail | index | archive | help
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=3D"inet 192.168.20.2 netmask 255.255.255.0"
ifconfig_xl0_alias0=3D"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=3D"inet 192.168.20.2 netmask 255.255.255.0"
ifconfig_xl0_alias0=3D"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.=20

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@ns2.atgi.com:/usr/obj/usr/src/sys/NS2  i386

later,
jason
-----Original Message-----
From: Chris Hodgins [mailto:chodgins@cis.strath.ac.uk]=20
Sent: Tuesday, March 01, 2005 11:39 AM
To: Jerry McAllister
Cc: Ted Mittelstaedt; questions@freebsd.org; Jason D. Montgomery
Subject: Re: Documentation Error?

Jerry McAllister wrote:
>>owner-freebsd-questions@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=3D"inet 10.1.1.1 netmask 255.255.255.0"
>>>ifconfig_fxp0_alias0=3D"inet 10.1.1.2 netmask 255.255.255.255"
>>>
>>>Shouldn't it be this instead?
>>>
>>>ifconfig_fxp0=3D"inet 10.1.1.1 netmask 255.255.255.0"
>>>ifconfig_fxp0_alias0=3D"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"
>=20
>=20
> 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.
>=20
> ////jerry
>=20
>=20
>>Ted
>>
>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe@freebsd.org"
>=20

man rc.conf and search for "network_interfaces".  The reason it still=20
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5C6F478A90E6034BBDCF6D754D7850BC66F12D>