Date: Sat, 31 Aug 2002 22:56:32 -0400 From: "BSD" <bsdquestions@connect1.ca> To: "'Matthew Emmerton'" <matt@gsicomp.on.ca>, "'Jorge Mario G.'" <murcielako@yahoo.com>, <freebsd-questions@FreeBSD.ORG> Subject: RE: Problems with IP aliasing Message-ID: <000601c25163$2d5c6fc0$0701a8c0@silver> In-Reply-To: <001501c24fd1$be6e1600$1200a8c0@gsicomp.on.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
The only time an Alias IP can have a subnet other then a 32 bit mask subnet is when it is the first IP of that new subnet. In your example, you have 192.168.0.2 and you created an alias 192.168.10.1 with a 24 bit subnet mask. That is allowed because it is different subnet then 192.168.0.1. When you try to create the second IP on the same subnet you got the error creating it until you give it the subnet mask of all 255. -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG] On Behalf Of Matthew Emmerton Sent: Thursday, August 29, 2002 11:03 PM To: Jorge Mario G.; freebsd-questions@FreeBSD.ORG Subject: Re: Problems with IP aliasing > HI > I'm trying to create IP aliases of the ip 192.168.0.2 > so i create the alias 192.168.10.1 with no problems > this way: > > ifconfig xl0 inet 192.168.10.1 netmask 255.255.255.0 > alias > [root@gator:/usr]# ifconfig > xl0: > flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu > 1500 > inet 192.168.0.2 netmask 0xffffff00 broadcast > 192.168.0.255 > inet 192.168.10.1 netmask 0xffffff00 broadcast > 192.168.10.255 > ether 00:10:5a:07:da:30 > media: Ethernet autoselect (100baseTX > <full-duplex>) > status: active > > > [root@gator:/usr/ports/mail/squirrelmail]# ping > 192.168.10.1 > PING 192.168.10.1 (192.168.10.1): 56 data bytes > 64 bytes from 192.168.10.1: icmp_seq=0 ttl=64 > time=0.080 ms > 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 > time=0.044 ms > the alias is there and working > > then i tried: > [root@gator:~]# ifconfig xl0 inet 192.168.10.2 netmask > 255.255.255.0 alias > ifconfig: ioctl (SIOCAIFADDR): File exists > [root@gator:~]# > > any ideas why??? > thank ifconfig xl0 inet 192.168.10.2 netmask 255.255.255.255 alias Aliases must be created with a 255.255.255.255 (0xffffffff) netmask. See 'man ifconfig' for details. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000601c25163$2d5c6fc0$0701a8c0>