Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Network Troublshooting => General Networking Support in Linux => Topic started by: sardok on August 18, 2005, 07:59:22 AM
-
hi !
i have a 2 ethernet cards in my server. eth0 is integrated to the main board and eth1 is an 3com pci ethernet card. im using eth0 for my internal LAN as a dhcp server. it has an ip 192.168.14.2 and there is many vlans on same network and i have to see 192.168.15.2 , 192.168.16.2 , 192.168.17.2. normall i can ping them all. my second card (eth1) is for me, it has public ip xxx.243.27.110 and im using it for ssh connection. when i install eth1, my server has 2 default gateways according to netstat -rn . so i think it causes a problem, i think my ssh packet sometimes got lost while choosing the gateway in my server. how can i use my server as with 1 gateway. if i disable eth0 `s gateway, the other vlans cant see me and also i cant see other vlans. if i disable eth1`s gateway, i can not connect my server via ssh, what can i do?
thanks
-
oh my dist is Debian Sarge
-
hi,
U can add a static route for your eth1 gateway.
using "route add -net <network addr> netmask <netmask> gw <gw Addr>"
Ratish.
-
hmm so this gateway only serves for eth1 ?
thank you
-
U can specify any of the gateway and the corresponding network.
in this case its better if u specify a static route for the known networks (for lan) and let the default gateways point for the eth1's gateway.
-
can you write down a sample netstat -rn output,
mine is like this;
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
xxx.243.27.104 xxx.243.27.105 255.255.255.248 UG 0 0 0 eth0
xxx.243.27.104 0.0.0.0 255.255.255.248 U 0 0 0 eth0
192.168.14.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.14.1 0.0.0.0 UG 0 0 0 eth1
and doesnt help me :/ still cant connect via eth0