Date: Tue, 16 May 1995 15:42:11 -0500 (CDT) From: "Eric L. Hernes" <erich@rrnet.com> To: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> Cc: rashid@haven.ios.com, hackers@FreeBSD.org Subject: Re: alias ( secondary IP ) for Ethernet Ifaces in FreeBSD Message-ID: <Pine.3.89.9505161553.A5038-0100000@rrnet.com> In-Reply-To: <199505161914.MAA08933@gndrsh.aac.dev.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 16 May 1995, Rodney W. Grimes wrote: > > > > > > > > On Mon, 15 May 1995, Rashid Karimov. wrote: > > > > > For example , I have ep0 iface and I want to assign the > > > secondary( alias) IP address to it . > > > What command should be issued ? > > > > > > ifconfig ep0 alias 199.199.199.22 > > > > should be > > ifconfig ep0 199.199.199.22 alias > > > > while we're on the subject is there an ``official'' place in /etc/rc* > > that these should go??? > > Can the alias appear on the same command as the ifconfig that brings > the interface up? If so the place to do this is /etc/sysconfig, > ifconfig_ep0="blah blah". I think that they need different ifconfig's here's what I tried... bash$ sudo ifconfig ep0 172.16.0.30 204.124.122.99 alias bash$ ifconfig -au ed0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 204.124.120.30 netmask 0xffffff00 broadcast 204.124.120.255 ether 02:60:8c:dc:5b:e8 lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 (no ep0) bash$ sudo ifconfig ep0 172.16.0.30 alias 204.124.122.99 bash$ ifconfig -au ed0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 204.124.120.30 netmask 0xffffff00 broadcast 204.124.120.255 ether 02:60:8c:dc:5b:e8 lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 (still no ep0, but we've already kind of decided that the position of `alias' isn't important) bash$ sudo ifconfig ep0 172.16.0.30 bash$ sudo ifconfig ep0 204.124.122.99 alias ifconfig: ioctl (SIOCAIFADDR): File exists bash$ netstat -i Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll ed0 1500 <Link>02.60.8c.dc.5b.e8 4565771 256 454861 0 3249 ed0 1500 204.124.120 jake 4565771 256 454861 0 3249 ed0 1500 204.124.121 jake1 4565771 256 454861 0 3249 ed0 1500 204.124.122 204.124.122.30 4565771 256 454861 0 3249 lp0* 1500 <Link> 0 0 0 0 0 ep0 1500 <Link>00.20.af.d3.f3.8c 17684 0 25790 1 0 ep0 1500 172.16 jake0 17684 0 25790 1 0 ep0 1500 204.124.122 204.124.122.99 17684 0 25790 1 0 lo0 16384 <Link> 68 0 68 0 0 lo0 16384 your-net localhost 68 0 68 0 0 now they are there, and i probably should have been doing `netstat -i' all along. ed0 and ep0 both have a few aliases. > If not I'll have to enhance the current handling of ifconfig in > /etc/netstart and /etc/sysconfig to deal with it. > right now i've got the ifconfig stuck into /etc/rc.local but it's ugly. > > -- > Rod Grimes rgrimes@gndrsh.aac.dev.com > Accurate Automation Company Custom computers for FreeBSD > erich. -- erich@rrnet.com erich@lodgenet.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.3.89.9505161553.A5038-0100000>