On Fri, Jan 05, 2007 at 10:46:49AM -0500, Dan Williams wrote:
On Fri, 2007-01-05 at 15:54 +0100, Olivier Galibert wrote:
> - eth0 has a static IP in 192.44.78/24, DNS, gw, etc, and also has a
> static route allowing to use the interface for 192.168.87.0/24 using
> its static IP which is not in 192.168.*
Can you explain the configuration for these in a bit more detail? So in
this example, eth0 has a static IP and DNS, gw, etc are _also_ in the
same 192.44.78/24 network. But you've added a route that pushes traffic
for the 192.168.87.0/24 network over eth0 (which has no IP address in
that network range), correct?
Yep. These are the desktop boxes, which want to be able to talk to
the boxes on the internal network.
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:08:74:a8:7c:f8 brd ff:ff:ff:ff:ff:ff
inet 192.44.78.23/24 brd 192.44.78.255 scope global eth0
inet6 fe80::208:74ff:fea8:7cf8/64 scope link
valid_lft forever preferred_lft forever
192.168.87.0/24 dev eth0 scope link
192.44.78.0/24 dev eth0 proto kernel scope link src 192.44.78.23
169.254.0.0/16 dev eth0 scope link
default via 192.44.78.22 dev eth0
> - eth0 has a static IP in 192.44.78/24, DNS, gw. eth1 has an IP
in
> 192.168.87/24.
I think the config would cover that, no? Each interface can obviously
have different IP settings (addr, mask, bcast). DNS is a bit different
because the order of resolvers in resolv.conf determines some of the
behavior, even if the routing rules determine which interface the
requests against a particular server actually go out on.
Yeah, it's globally more standard. It was to show that it's not a
given every interface has dns/nis/etc. These are the servers which
are connected to both networks equally.
Note btw that the internal network has a (friggin' fast) secondary NIS
server, and the configuration is broadcast. So most of the times
these boxes use the NIS server on eth1 rather than eth0.
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:30:48:5a:c3:ee brd ff:ff:ff:ff:ff:ff
inet 192.44.78.93/24 brd 192.44.78.255 scope global eth0
inet6 fe80::230:48ff:fe5a:c3ee/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:30:48:5a:c3:ef brd ff:ff:ff:ff:ff:ff
inet 192.168.87.89/24 brd 192.168.87.255 scope global eth1
inet6 fe80::230:48ff:fe5a:c3ef/64 scope link
valid_lft forever preferred_lft forever
192.168.87.0/24 dev eth1 proto kernel scope link src 192.168.87.89
192.44.78.0/24 dev eth0 proto kernel scope link src 192.44.78.93
169.254.0.0/16 dev eth1 scope link
224.0.0.0/4 dev eth1 scope link
default via 192.44.78.22 dev eth0
What does the output of /sbin/route -n look like for this case?
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.87.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.44.78.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
224.0.0.0 0.0.0.0 240.0.0.0 U 0 0 0 eth1
0.0.0.0 192.44.78.22 0.0.0.0 UG 0 0 0 eth0
> - eth0 and eth1 have the same static IP in 192.168.87/24, eth1
has the
> route for 192.168.87/24, eth0 has only a route for 192.44.78/24.
I'm not sure the configuration mentioned above excludes this
possibility, can you be more specific on how you couldn't configure your
interfaces this way in the proposed config structure? (keeping in mind
that gateway should be handled differently than the config structure
says)
I'm not sure it doesn't, I'm not sure it does, but the orthogonality
between address and route is interesting. These are the internal
boxes, with no gw access (they're not routable anyway).
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:14:5e:86:81:58 brd ff:ff:ff:ff:ff:ff
inet 192.168.87.171/24 brd 192.168.87.255 scope global eth0
inet6 fe80::214:5eff:fe86:8158/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:14:5e:86:81:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.87.171/24 scope global eth1
inet6 fe80::214:5eff:fe86:8159/64 scope link
valid_lft forever preferred_lft forever
192.168.87.0/24 dev eth1 proto kernel scope link src 192.168.87.171
192.44.78.0/24 dev eth0 scope link
169.254.0.0/16 dev eth1 scope link
224.0.0.0/4 dev eth1 scope link
OG.