November 23, 2024, 05:07:03 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: 2 network card problem  (Read 7936 times)

Offline sardok

  • Linux Noob !
  • *
  • Posts: 4
2 network card problem
« 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

Offline sardok

  • Linux Noob !
  • *
  • Posts: 4
2 network card problem
« Reply #1 on: August 18, 2005, 08:00:52 AM »
oh my dist is Debian Sarge

Offline ratish

  • New Member
  • Posts: 2
Re: 2 network card problem
« Reply #2 on: August 18, 2005, 09:42:00 AM »
hi,

U can add a static route for your eth1 gateway.    
using  "route add -net <network addr> netmask <netmask> gw <gw Addr>"


Ratish.

Offline sardok

  • Linux Noob !
  • *
  • Posts: 4
2 network card problem
« Reply #3 on: August 18, 2005, 10:43:32 AM »
hmm so this gateway only serves for eth1 ?
thank you

Offline ratish

  • New Member
  • Posts: 2
2 network card problem
« Reply #4 on: August 19, 2005, 05:08:35 AM »
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.

Offline sardok

  • Linux Noob !
  • *
  • Posts: 4
2 network card problem
« Reply #5 on: August 19, 2005, 11:26:01 AM »
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