On Fri, 2008-07-25 at 14:45 -0400, [EMAIL PROTECTED] wrote: > I have a DNS server that I am trying to retire. As you may or may not > know you should always use a A name record, which is also a PTR > record.
> The requirement: > A system must respond on 120.207.9.13 with DNS queries and it must > also respond to 120.207.12.22 its eventual new name. The system name > is server12.cc.gatech.edu on 120.207.12.22 and server9.cc.gatech.edu > on 120.207.9.13. The subnet mask is 255.255.255.0 the gateways are for > server 9 120.207.9.1 and for server12 is 120.207.12.1. Recapping: > Eth0 120.207.12.22 netmask 255.255.255.0 gw 120.207.12.1 > server12.cc.gatech.edu > Eth2 120.207.9.13 netmask 255.255.255.0 gw 120.207.9.1 > server9.cc.gatech.edu > > I ping or nslookup toserver9.cc.gatech.edu and I get server9 > responding if I ping or nslookup to server12.cc.gatech.edu I get > server12 responding anywhere on my network. > Hope this is clear. This works like a charm on Solaris. How do I do > this on Linux? Assuming the information you provided above is the correct my suggestion would be to try a very simple policy based routing table. First I would configure Redhat to simply start up both interfaces but only configure a default gateway on one of the interfaces, probably eth0. That should give you a routing table that looks something like this: Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 120.207.12.22 * 255.255.255.0 U 0 0 0 eth0 120.207.9.13 * 255.255.255.0 U 0 0 0 eth2 default 120.207.12.1 0.0.0.0 UG 0 0 0 eth0 Redhat's scripts add these routes to the "main" route table, which is table 254. You can run "ip route show table main" to see this and, while the format will be different, it should show basically the same as above, something like this: 120.207.12.0/24 dev eth0 proto kernel scope link src 120.207.12.22 120.207.9.0/24 dev eth2 proto kernel scope link src 120.207.9.13 default via 120.207.12.1 dev eth0 Now we can add a new "route table" that has a completely different "default route" for eth2 as follows: #ip route add default via 120.207.9.1 dev eth2 tab 1 #ip rule add from 120.207.9.13/32 tab 1 priority 500 #ip route flush cache This rule basically says that if a packets source address is 120.207.9.13 (eth2) use the default gateway configured for route table 1 (120.207.9.1) rather than the "default gateway" from the "main" route table (table 254). Since packets from clients to the eth2 IP address have to use that same IP for their reply packets, those packets should returns the same way they came. You can test this by using "traceroute -i eth0" and "traceroute -i eth2" which should show the two traceroutes using the different default gateways to access the network. I believe this will work for what you want, however, it should be noted that the server will continue to use 120.207.12.22 for any connections which it initiates (as opposed to incoming connection from clients) and for which you don't specify a source address or interface. That's because, assuming you don't specify a source address or interface, packets will go out of the interface of the default route for the "main" route table. If that works, figure out a way to make it permanent (we usually just put our commands in rc.local but I'm sure there's a better, more appropriate way). Later, Tom _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
