About this list Date view Thread view Subject view Author view Attachment view

From: Bjoern Steinbrink (bjoern.steinbrink_at_isp4p.net)
Date: Sun 26 Sep 2004 - 21:42:56 BST

On So, 2004-09-26 at 19:14, Gilles wrote:
> > > iface dummy0 inet static
> > > address
> > > netmask
> > > broadcast
> > > gateway
> > >
> > > But, when the interface is brought up, there is an error message:
> > >
> > > SIOCADDRT: Network is unreachable
> > > Failed to bring up dummy0.
> >
> > ifup fails if any of the calls fails, in this case the route call fails,
> > probably you didn't bring up the interface that makes
> > reachable _before_ you bring up dummy0
> I don't know in which order the interfaces are supposed to be brought up, but
> in this case "eth0" ("br0", actually) comes before dummy0 in the file.
> Also, now all interfaces are configured, I just ran
> ifconfig dummy0 down
> then
> ifup dummy0
> and the result is the same.

Oops, I mixed up interfaces and aliases. What ifup tries to do is to set
a default route for packets originating from dummy0 (so that they would
actually leave through dummy0, for each and every target address). The
problem is, that dummy0 can't 'directly' reach since this
address does not belong dummy0's subnet. This will therefore always

I didn't test the behaviour on a brigded setup, but probably the same
applies, since IIRC the routing table is only used for packets actually
leaving the host.

> > > I'm still confused, because I don't understand why routing just works (but
> > > probably not as I expect)!
> >
> > outgoing packages just take the interface that offers a route to the
> > destination, the gateway entry in your /etc/network/interfaces is not
> > necessary, packages 'originating from dummy0' will go through eth0
> > anyways, if they're going to, for example,
> > Within the host no routing occurs, routing just decides through which
> > interface a packet is sent out (and through which gateway).
> >
> > hmm... i guess that also explains the stuff below, right?
> >
> Yes probably, but my original question was: Is it possible to have a virtual
> network (i.e. inside the host) that is an "exact" image of a physical one (i.e.
> one for which the host would have been the gateway)?
> In the latter case, "eth0" on the host ( would be connected to
> the other machine (, and would have, say, "eth1" connected to the
> subnet for which it would be the gateway (with address
> No machine on the physical subnet would "see" the other nic of its
> gateway, whereas here, the vserver (on the virtual sees both
> interfaces: "dummy0" (which, I imagined, is the equivalent of the physical "eth1")
> and "eth0", the interface to the other network. Why?

Because there is no separate routing for the vserver. The routing
happens inside the (shared) kernel. Even if you can't see the interface
in the vserver, it is still available for routing. Also, the fact that
no routing occurs on the local host means that packages which would need
to go to eth0 from dummy0, are simply handled as if they came from eth0
(probably i'm leaving out some details here, but in general this
applies). Therefore no packets actually leave through dummy0, it's
either eth0 for outgoing traffic or lo for traffic that's stays on the


Vserver mailing list

About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sun 26 Sep 2004 - 21:43:18 BST by hypermail 2.1.3