[Techtalk] Networking question: Linking two public subnets via a pair
of virtual interfaces.
Mary
mary-linuxchix at puzzling.org
Wed Apr 16 03:34:35 EST 2003
OK, I've just been allocated a /29 subnet. I've re-written these as 10.
addresses to disguise my IPs (although it's not impossible to find out
what they are of course), but these are two public subnets I'm talking
about. The external subnet is our upstream.
The intention is to route the internal subnet using a single router.
Obviously I do not intend to use NAT, since all machines on the internal
subnet have a public IP.
The situation:
The internal network is 10.0.0.224/29 (network 10.0.0.224, netmask
255.255.255.248, broadcast 10.0.0.231).
The external network is 10.0.0.188/30 (network 10.0.0.188, netmask
255.255.255.252, broadcast 10.0.0.191). The external network represents
an ADSL connection - 10.0.0.190 is an ethernet interface on my side of
the ADSL connection, 10.0.0.189 is a gateway on the other side of the
ADSL connection, at the exchange.
The router has two virtual interfaces: eth0 and eth0:0. eth0 is
10.0.0.190 (on the external) and its gateway is 10.0.0.189. eth0:0 is
10.0.0.225 (on the internal).
The router is meant to route traffic between 10.0.0.224/29 and
10.0.0.188/30. The router has only one physical interface (eth0), and
all hosts are plugged into a hub. The ADSL modem is also plugged into
the hub.
The router's route table looks like:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.188 0.0.0.0 255.255.255.252 U 0 0 0 eth0
10.0.0.224 0.0.0.0 255.255.255.248 U 0 0 0 eth0
0.0.0.0 10.0.0.189 0.0.0.0 UG 0 0 0 eth0
Host 10.0.0.226 is on the internal subnet. Its route table looks like:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.224 0.0.0.0 255.255.255.248 U 0 0 0 eth0
0.0.0.0 10.0.0.225 0.0.0.0 UG 0 0 0 eth0
[that is, its gateway is 10.0.0.225, the router's internal virtual
interface].
This host (10.0.0.226) can ping 10.0.0.225.
The router itself can connect to the external subnet. But the internal
host, 10.0.0.226 can ping 10.0.0.190 (the router's external interface)
but not 10.0.0.189 (the gateway on the other side of the ADSL
connection).
Our current theory is that the kernel on the router is not bothering to
forward the packets, since they're both ultimately going over eth0, and
is therefore not forwarding them to the modem's ARP address.
-Mary
More information about the Techtalk
mailing list