Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mel.aone.net.au!palms.znet.net.au!nigel
From: nigel@znet.net.au (Nigel Gorry)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Two devices with same IP
Date: Sat, 23 Nov 1996 15:16:23
Organization: Zed.Net Internet Services
Lines: 34
Message-ID: <nigel.25.000F465B@znet.net.au>
References: <56ltqk$nhv@csugrad.cs.vt.edu> <56lvvc$62f$1@gail.ripco.com> <574f3l$2s4@anorak.utell.net>
NNTP-Posting-Host: palms.znet.net.au
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
>In article <nigel.20.0000C75A@znet.net.au>,
> nigel@znet.net.au (Nigel Gorry) writes:
>:
>: An ifconfig -a on my machine show that I have the same IP address for both my
>: NIC and PPP interfaces. This works as a router with the default route being
>: via the remote side of the PPP link.
>:
>: ed0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>: inet 203.61.202.20 netmask 0xfffffff0 broadcast 203.61.202.31
>: lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>: inet 127.0.0.1 netmask 0xff000000
>: tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
>: inet 203.61.202.20 --> 203.61.202.1 netmask 0xffffff00
>I don't get this. First, how come you're broadcasting on an address outside
>of your network on ed0 ? ed0's netmask says that the allowable range is
>203.61.202.{16-23} !
I'm not - the subnet is 203.61.202.{16-31} netmask of 255.255.255.240
(0xfffffff0)
>If the above machine sends a packet to 203.61.202.{16-19,21-22} (assuming
>that 203.61.202.16 is your net address and 203.61.202.23 is your *real*
>broadcast address, how does your kernel know which of ed0 and tun0 to send
>the packet ?
because tun0 is a Point-to-Point link, so it will only send packets over tun0
that are destined for the remote end.
Therefore my routing table is such:
203.61.202.16/28 --> ed0
203.61.202.1 --> tun0
default --> 203.61.202.1 (via tun0)