Adding a second IP to network interface

Adding a second IP to network interface

Post by Maziar Aflatou » Sun, 30 Mar 2003 02:43:52



I'm trying to add a second ip my network interface and it doesn't work. Here
is the part in my rc.conf

defaultrouter="10.0.0.1"
hostname="bsdtest1.corp.mysite.com"
ifconfig_xl0="inet 10.0.10.44  netmask 255.255.0.0"
ifconfig_xl0_alias0="inet 10.0.10.45 netmask 0xffff0000"

and also I have tried

ifconfig_xl0_alias0="inet 10.0.10.45 netmask 255.255.0.0"

Any idea?

Thank you
Maz.

 
 
 

Adding a second IP to network interface

Post by Aaron Baughe » Sun, 30 Mar 2003 05:26:38



> I'm trying to add a second ip my network interface and it doesn't
> work. Here is the part in my rc.conf
> ifconfig_xl0_alias0="inet 10.0.10.45 netmask 0xffff0000"

Set the netmask on your secondary addresses to 0xffffffff.

--
Aaron


 
 
 

Adding a second IP to network interface

Post by Dang Huyn » Sun, 30 Mar 2003 05:53:53


This is my partial rc.conf under /etc directory

ifconfig_xl0="inet 192.168.1.100 netmask 255.255.255.0"
defaultrouter="192.168.1.1"

ifconfig_xl0_alias0="inet 192.168.1.101 netmask 255.255.255.255"
ifconfig_xl0_alias1="inet 192.168.1.102 netmask 255.255.255.255"

If I want to add another IP 192.168.1.103 from command line, try this as
root:

#ifconfig xl0 add 192.168.1.103 netmask 255.255.255.255

Hope that help you.

Dang Huynh


Quote:> I'm trying to add a second ip my network interface and it doesn't work.
Here
> is the part in my rc.conf

> defaultrouter="10.0.0.1"
> hostname="bsdtest1.corp.mysite.com"
> ifconfig_xl0="inet 10.0.10.44  netmask 255.255.0.0"
> ifconfig_xl0_alias0="inet 10.0.10.45 netmask 0xffff0000"

> and also I have tried

> ifconfig_xl0_alias0="inet 10.0.10.45 netmask 255.255.0.0"

> Any idea?

> Thank you
> Maz.

 
 
 

Adding a second IP to network interface

Post by Maziar Aflatou » Sun, 30 Mar 2003 06:39:57


Thank you! that did it... I was using the same netmask as the one in my
ifconfig_xl0


> This is my partial rc.conf under /etc directory

> ifconfig_xl0="inet 192.168.1.100 netmask 255.255.255.0"
> defaultrouter="192.168.1.1"

> ifconfig_xl0_alias0="inet 192.168.1.101 netmask 255.255.255.255"
> ifconfig_xl0_alias1="inet 192.168.1.102 netmask 255.255.255.255"

> If I want to add another IP 192.168.1.103 from command line, try this as
> root:

> #ifconfig xl0 add 192.168.1.103 netmask 255.255.255.255

> Hope that help you.

> Dang Huynh



> > I'm trying to add a second ip my network interface and it doesn't work.
> Here
> > is the part in my rc.conf

> > defaultrouter="10.0.0.1"
> > hostname="bsdtest1.corp.mysite.com"
> > ifconfig_xl0="inet 10.0.10.44  netmask 255.255.0.0"
> > ifconfig_xl0_alias0="inet 10.0.10.45 netmask 0xffff0000"

> > and also I have tried

> > ifconfig_xl0_alias0="inet 10.0.10.45 netmask 255.255.0.0"

> > Any idea?

> > Thank you
> > Maz.

 
 
 

Adding a second IP to network interface

Post by Mina Nagui » Sun, 30 Mar 2003 17:48:17


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Thank you! that did it... I was using the same netmask as the one in my
> ifconfig_xl0

"man ifconfig" specifically states not to do that !

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+hV3ReS99pGMif6wRAqMzAKChV25ytFwQjXPj4E/xG0ZyTLLXswCgnIBh
0cYdu10MuBM5sNeMPYdvnI4=
=XSZV
-----END PGP SIGNATURE-----

 
 
 

Adding a second IP to network interface

Post by Ralph Huntingto » Tue, 01 Apr 2003 09:30:58


Quote:> > Thank you! that did it... I was using the same netmask
as the one in my
> > ifconfig_xl0

> "man ifconfig" specifically states not to do that !

It used to work doing it that way, but not since 4.7, I
believe.
 
 
 

Adding a second IP to network interface

Post by Bill Vermilli » Tue, 01 Apr 2003 12:55:30




>> > Thank you! that did it... I was using the same netmask
>as the one in my
>> > ifconfig_xl0
>> "man ifconfig" specifically states not to do that !
>It used to work doing it that way, but not since 4.7, I
>believe.

My 4.7 with about 100+ IPs on the same card works the same as it
did in all previous versions.

--