Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!uwm.edu!cs.utexas.edu!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.utell.net (Brian Somers) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Two devices with same IP Date: 19 Nov 1996 13:40:14 -0000 Organization: Coverform Ltd. Lines: 43 Sender: brian@awfulhak.demon.co.uk Message-ID: <56sdbu$2ed@anorak.utell.net> References: <56ltqk$nhv@csugrad.cs.vt.edu> Reply-To: brian%anorak.coverform.lan@awfulhak.demon.co.uk NNTP-Posting-Host: anorak.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 <56ltqk$nhv@csugrad.cs.vt.edu>, jagnew@csugrad.cs.vt.edu (H. Jared Agnew) writes: : I have a friend that uses Redhat-4.0. He was giving me flac about the fact : that FreeBSD will not allow the same IP on more than one device. I talked : to a few friends and they told me that this was because haveing two devices : with the same IP is against TCP/IP standards or something. If anyone knows : where I could read more about this could you please post. Maybe a FAQ or : RFC??? Thanks There are two questions here. 1. Can two devices have the same IP. Yes, as long as they can't "see" eachother. It's fine for my home machine's LAN card to be called 10.0.1.1 as well as someone elses home machine's LAN card - they can't see eachother. In a similar way, it's fine to have a PPP interface with the same IP as a NIC interface - but see question two. If they get to see eachother, routing falls in a heap. 2. Can two interfaces have the same IP. Yes, as long as at most one of them has a netmask that isn't 0xffffffff, otherwise internal routing fails. Interestingly enough, in 2.2-SNAP, ifconfig moans with a kernel printf about another interface already having the IP that you've given it as an arg. I think this is because the routing table is using the IP as a unique index. From a "purist" point of view, I'd tend to think that the same IP shouldn't really be allowed on two different interfaces, after all, how can the kernel figure out where to send a packet destined for that IP. In practice, the last thing that you "ifconfig" with that IP is what the kernel uses for "outgoing" packets, and all interfaces "ifconfig"d with the IP can receive an "incomming" packet. -- Brian <brian%anorak.coverform.lan@awfulhak.demon.co.uk> <http://www.awfulhak.demon.co.uk/> Don't _EVER_ lose your sense of humour.... .