Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 May 1995 00:41:34 +0800 (CST)
From:      Brian Tao <taob@gate.sinica.edu.tw>
To:        Paul Richards <paul@isl.cf.ac.uk>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: alias ( secondary IP ) for Ethernet Ifaces in FreeBSD
Message-ID:  <Pine.BSI.3.91.950521003354.15569J-100000@leo>
In-Reply-To: <199505201627.RAA29572@isl.cf.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 20 May 1995, Paul Richards wrote:
> 
> which will set your broadcast address to 131.251.122.1 which is wrong. I'd
> also like to be able to treat an alias as a separate interface and do
> things like
> 
> ifconfig lnc0:1

    I like this format too.  Makes getting at each numbered interface
much easier than remembering IP addresses and looking through netstat.

> You need to specify a netmask for the aliases so that the routing code can
> distinguish between them, you can access the aliases from the host then.

    I've been using the usual 0xffffff00 netmask for all my local
machines on the same C-class subnet.  Do I need to specify something
different for the aliases?  This is what I get on host leo, initially
with one IP address assigned to it (140.109.40.249).  I want to add
140.109.40.238 to it:

# netstat -i
Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll
ed1   1500  <Link>00.00.e8.cb.cd.58      3916567     1  2536025    11 584527
ed1   1500  140.109.40  leo              3916567     1  2536025    11 584527
lp0*  1500  <Link>                             0     0        0     0     0
lo0   16384 <Link>                            67     0       67     0     0
lo0   16384 your-net    localhost             67     0       67     0     0

# ping 140.109.40.238
PING 140.109.40.238 (140.109.40.238): 56 data bytes
^C
--- 140.109.40.238 ping statistics ---
6 packets transmitted, 0 packets received, 100% packet loss

# ifconfig ed1 inet 140.109.40.238 netmask 0xffffff00 alias
ifconfig: ioctl (SIOCAIFADDR): File exists

# netstat -i
Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll
ed1   1500  <Link>00.00.e8.cb.cd.58      3916601     1  2536043    11 584527
ed1   1500  140.109.40  leo              3916601     1  2536043    11 584527
ed1   1500  140.109.40  140.109.40.238   3916601     1  2536043    11 584527
lp0*  1500  <Link>                             0     0        0     0     0
lo0   16384 <Link>                            67     0       67     0     0
lo0   16384 your-net    localhost             67     0       67     0     0

# ping 140.109.40.238
PING 140.109.40.238 (140.109.40.238): 56 data bytes
ping: sendto: Host is down
ping: wrote 140.109.40.238 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 140.109.40.238 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 140.109.40.238 64 chars, ret=-1
^C
--- 140.109.40.238 ping statistics ---
6 packets transmitted, 0 packets received, 100% packet loss

# rsh aries ping 140.109.40.238
PING 140.109.40.238 (140.109.40.238): 56 data bytes
64 bytes from 140.109.40.238: icmp_seq=0 ttl=255 time=2.967 ms
64 bytes from 140.109.40.238: icmp_seq=1 ttl=255 time=1.633 ms
64 bytes from 140.109.40.238: icmp_seq=2 ttl=255 time=1.440 ms
64 bytes from 140.109.40.238: icmp_seq=3 ttl=255 time=1.373 ms
^C
--- 140.109.40.238 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.373/1.853/2.967 ms


    Do I need to restrict my netmask more?
-- 
Brian ("Though this be madness, yet there is method in't") Tao
taob@gate.sinica.edu.tw <-- work ........ play --> taob@io.org




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.91.950521003354.15569J-100000>