* Re: Difference between dummy and loopback interfaces [not found] <e414a6f2.0212082318.71702ff9@posting.google.com> @ 2002-12-09 8:49 ` Peter T. Breuer 2002-12-10 10:31 ` John Bradford 0 siblings, 1 reply; 3+ messages in thread From: Peter T. Breuer @ 2002-12-09 8:49 UTC (permalink / raw) To: Andy Trap; +Cc: linux-kernel In article <e414a6f2.0212082318.71702ff9@posting.google.com> you wrote: > I have read this. But the description leaves the following questions > unanswered: > 1. How this is any different than configuring the IP address of vlite > (72.16.1.65) on the loopback interface. It's very different. RH's parctice of configuring the loopback device as something other than (in addition to) localhost (no domain!) is just plain broken, as umpteen administrators will tell you. localhost is in the root domain, and nowhere else, netwise. > 2. The implementation of dummy_xmit() unconditionally drops every packet > sent to it which suggests that intra-node communication can never > occur over a dummy interface. The loopback interface on the other > hand queues packets sent to it on the receive queue (allowing intra- > node communication even when the dialup line is down) > I can't think of a condition where a dummy device is useful (other than > for simulating a blackhole device which sucks every packet sent to it). The dummy device is conventionally used to provide a separate interface that can be used to bind the hostname to when there is no real nic in the box to bind it to (binding it to loopback being a no no). One ususally does if-down ppp0, for example, with a few lines in that brings up the hostname on dummy0. When ppp comes up, the hostname may be bound to the ppp0 connection, but personally I prefer t leave it stable. "a stable binding point" for the hostname is another use for dummy0, when the configuration is dynamic, such as in a failover cluster. Peter ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Difference between dummy and loopback interfaces 2002-12-09 8:49 ` Difference between dummy and loopback interfaces Peter T. Breuer @ 2002-12-10 10:31 ` John Bradford 2002-12-16 7:02 ` Rob Landley 0 siblings, 1 reply; 3+ messages in thread From: John Bradford @ 2002-12-10 10:31 UTC (permalink / raw) To: Peter T. Breuer; +Cc: ahtraps, linux-kernel > > I can't think of a condition where a dummy device is useful (other than > > for simulating a blackhole device which sucks every packet sent to it). > > The dummy device is conventionally used to provide a separate interface > that can be used to bind the hostname to when there is no real nic in > the box to bind it to (binding it to loopback being a no no). Slackware binds the hostname to 127.0.0.1 by default. As pointed out in comments in the /etc/hosts file, it is technically incorrect, but it does work, and it's fine on a non-networked machine. John. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Difference between dummy and loopback interfaces 2002-12-10 10:31 ` John Bradford @ 2002-12-16 7:02 ` Rob Landley 0 siblings, 0 replies; 3+ messages in thread From: Rob Landley @ 2002-12-16 7:02 UTC (permalink / raw) To: John Bradford, Peter T. Breuer; +Cc: ahtraps, linux-kernel On Tuesday 10 December 2002 10:31, John Bradford wrote: > > > I can't think of a condition where a dummy device is useful (other than > > > for simulating a blackhole device which sucks every packet sent to it). > > > > The dummy device is conventionally used to provide a separate interface > > that can be used to bind the hostname to when there is no real nic in > > the box to bind it to (binding it to loopback being a no no). > > Slackware binds the hostname to 127.0.0.1 by default. As pointed out > in comments in the /etc/hosts file, it is technically incorrect, but > it does work, and it's fine on a non-networked machine. > > John. Um, random aside: You can attach firewall rules to a dummy0 interface that you can't attach to and alias of lo. I don't remember exactly what failed (it was a while ago), but when I tried to "ifconfig lo:1 10.0.0.1 netmask 255.255.255.0" and then attach a boatload of firewall rules to it, it got confused. (It had something against -j DNAT in the OUTPUT table, if I recall. I was also having trouble getting packets originating from the loopback interface to route outside of the box. But again, this was a while ago, so I don't remember exactly what was wrong. It was a roll-your-own VPN solution that was designed for a machine with 2 network cards acting as a gateway, but needed to run on a box that had just one network card yet wanted to participate in the VPN...) Moving over to the dummy interface instead of loopback made it all work. Loopback really isn't designed to do anything but bounce packets off of 127.0.0.1 for local delivery. It's optimized for that. The dummy interface is more generic. Rob (On the other hand, "ifconfig dummy0 down" doesn't actually remove its ip from the routing table under 2.4, last I checked. Annoying, that. You've got to ifconfig it to something else to make it stop receiving packets, even though it's down! I hit that a LOT in testing, sshing to my own box when I didn't mean to, and then wondering what the heck was going wrong...) -- penguicon.sf.net - A combination Linux Expo and Science Fiction Convention with GOHs Terry Pratchett, Eric Raymond, Pete Abrams, Illiad & CmdrTaco. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-12-18 17:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <e414a6f2.0212082318.71702ff9@posting.google.com>
2002-12-09 8:49 ` Difference between dummy and loopback interfaces Peter T. Breuer
2002-12-10 10:31 ` John Bradford
2002-12-16 7:02 ` Rob Landley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox