Click to See Complete Forum and Search --> : installed 2nd nic, blew up my routing table, need some help :)


zen0n
02-14-2003, 12:45 PM
I just installed a second nic into my box, all went well until I noticed the routing table. The default gateway was to the secondary nic and now nothing would resolve. I removed the default gateway and this is what I'm left with.


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
172.19.1.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo


The 172.19.1 network is on eth0 and is my nat'd internet connection which should be the default route for all packets. I'm not sure how to do this tho :)

I would also like to set a rule that all traffic for the 192.168.0 net goes out on eth1.

what route commands do I need to use? I tried toute add default gw eth0 but that didn't work

zen0n

DMR
02-14-2003, 05:40 PM
Since you're setting up a router, you need to look into iptables and masquerading. Read this (http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/ipmasq-background2.1.html) to get the full effect.

:)

zen0n
02-14-2003, 10:08 PM
[QUOTE]Originally posted by DMR
Since you're setting up a router, you need to look into iptables and masquerading. Read this (http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/ipmasq-background2.1.html) to get the full effect.

:) [/QUOTE

actually, I am not trying to setup nat. Let me explain what I am doing. My box which previously had the 172.19.1.x ip is already a client on a nat'ed network. I have setup a separate box with an ip of 192.168.0.1 that I want to connect to the 172 box but keep them on a separate net. Which is why I added the second nic. So I don't want any type of forwarding going on, just one box connected to 2 networks.

zen0n