Yeah, that's what I figured out...after an hour of staring at the routing table, I said "Hmmm...where's the route for this other network? Oh, there isn't one?"
ip route add 172.16.1.0/24 via 192.168.1.254 dev eth0
Got the job done for me. Thanks for the reply though!!
-Lucas
On 5/23/05, [email protected] [email protected] wrote:
your one and only default route is for any traffic that does not have a specific route set to follow. So, if you want certain traffic to go out a specific interface, you must create static routes in your table.
examples:
# route add -net 192.168.5.0 netmask 255.255.255.0 eth0 netmask can be left out since 192.168 is a Class C by default.
# route add -host 192.168.6.6 eth0
that's it.
James Riley, CISSP
sirsky [email protected] Sent by: [email protected]
05/23/2005 11:24 AM
Please respond to sirsky [email protected]
To List - KCLUG [email protected]
cc
Subject Linux Routing Default Gateways
I'm having a problem getting proper default gateways set up on my Gentoo server...here's the scenario:
Linux Server with 2 ethernet interfaces.
eth0: 192.168.1.0 (internal) eth1: 172.16.0.0 (dmz)
Here is my current routing table:
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.5 172.16.0.0/16 dev eth1 proto kernel scope link src 172.16.0.2 127.0.0.0/8 via 127.0.0.1 dev lo scope link default via 172.16.0.254 dev eth1 metric 1
I guess, what I need to know, is how do I set up my routing tables so that traffic coming and going along eth0 uses the default gateway of 192.168.1.254 and traffic coming and going along eth1 uses the default gateway of 172.16.0.254?
I can easily set up a 'default gateway', but I can only do one...so traffic coming in on 192.168.1.5 is still going out via 172.16.0.254...
I have a Windows 2003 server already working in this configuration...here is it's routing table:
Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 172.16.0.254 172.16.0.3 10 0.0.0.0 0.0.0.0 192.168.230.254 192.168.230.3 10 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 172.16.0.0 255.255.255.0 172.16.0.3 172.16.0.3 10 172.16.0.3 255.255.255.255 127.0.0.1 127.0.0.1 10 172.16.255.255 255.255.255.255 172.16.0.3 172.16.0.3 10 192.168.230.0 255.255.255.0 192.168.230.3 192.168.230.3 10 192.168.230.3 255.255.255.255 127.0.0.1 127.0.0.1 10 192.168.230.255 255.255.255.255 192.168.230.3 192.168.230.3 10 224.0.0.0 240.0.0.0 172.16.0.3 172.16.0.3 10 224.0.0.0 240.0.0.0 192.168.230.3 192.168.230.3 10 255.255.255.255 255.255.255.255 172.16.0.3 172.16.0.3 1 255.255.255.255 255.255.255.255 192.168.230.3 192.168.230.3 1 Default Gateway: 172.16.0.254
Any help would be greatly appreciated...I'd really like to get this 2003 server out and this new Linux server in it's place...
Thanks,
-Lucas _______________________________________________ Kclug mailing list [email protected] http://kclug.org/mailman/listinfo/kclug
This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorized use under applicable law. If you are not the intended recipient of this e-mail, you are hereby notified that any use, dissemination, or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please return the material received to the sender and delete all copies from your system.