Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail From: brian@anorak.coverform.lan (Brian Somers) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Two devices with same IP Date: 23 Nov 1996 22:46:47 -0000 Organization: Coverform Ltd. Lines: 49 Sender: brian@awfulhak.demon.co.uk Message-ID: <577usn$15g@anorak.coverform.lan> References: <56ltqk$nhv@csugrad.cs.vt.edu> <56lvvc$62f$1@gail.ripco.com> <574f3l$2s4@anorak.utell.net> <nigel.25.000F465B@znet.net.au> Reply-To: brian%anorak.coverform.lan@awfulhak.demon.co.uk NNTP-Posting-Host: localhost.coverform.lan X-NNTP-Posting-Host: awfulhak.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 In article <nigel.25.000F465B@znet.net.au>, nigel@znet.net.au (Nigel Gorry) writes: >>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) I'll learn to count one day :) >>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) Ah, well that's my original point. Your tun0 device (IMO) should have a netmask of 0xffffffff. A looser netmask says that I can reach additional machines directly down that interface - which doesn't really make sense down a point-to-point type interface. -- Brian <brian%anorak.coverform.lan@awfulhak.demon.co.uk> <http://www.awfulhak.demon.co.uk/> Don't _EVER_ lose your sense of humour.... .