blunt
2nd December 2007, 19:49
I have two ethernet cards, both connected to the same router. I wanted one of the cards to have IP 192.168.1.10 (eth0) and the other to have 192.168.2.10 (eth1). I can access the server through ssh with both IPs, but if I turn off my eth0 (ifdown) I cannot access the server even with the IP of eth1. I don't understand why...
I will leave my ifconfig output as well as my route output.
[root@server ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:FC:3B:B8:44
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe3b:b844/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:951393 errors:0 dropped:0 overruns:0 frame:0
TX packets:738669 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:704824230 (672.1 MiB) TX bytes:128870361 (122.9 MiB)
Interrupt:217
eth1 Link encap:Ethernet HWaddr 00:13:D4:B9:FF:98
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::213:d4ff:feb9:ff98/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4814 errors:0 dropped:0 overruns:0 frame:0
TX packets:368 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:397021 (387.7 KiB) TX bytes:18264 (17.8 KiB)
Interrupt:225 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:729329 errors:0 dropped:0 overruns:0 frame:0
TX packets:729329 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:289483959 (276.0 MiB) TX bytes:289483959 (276.0 MiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:208930 errors:0 dropped:0 overruns:0 frame:0
TX packets:232110 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22217125 (21.1 MiB) TX bytes:95662039 (91.2 MiB)
[root@server ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.102 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
192.168.1.101 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Any hel is appreciated...
thank you
I will leave my ifconfig output as well as my route output.
[root@server ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:FC:3B:B8:44
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe3b:b844/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:951393 errors:0 dropped:0 overruns:0 frame:0
TX packets:738669 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:704824230 (672.1 MiB) TX bytes:128870361 (122.9 MiB)
Interrupt:217
eth1 Link encap:Ethernet HWaddr 00:13:D4:B9:FF:98
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::213:d4ff:feb9:ff98/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4814 errors:0 dropped:0 overruns:0 frame:0
TX packets:368 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:397021 (387.7 KiB) TX bytes:18264 (17.8 KiB)
Interrupt:225 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:729329 errors:0 dropped:0 overruns:0 frame:0
TX packets:729329 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:289483959 (276.0 MiB) TX bytes:289483959 (276.0 MiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:208930 errors:0 dropped:0 overruns:0 frame:0
TX packets:232110 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22217125 (21.1 MiB) TX bytes:95662039 (91.2 MiB)
[root@server ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.102 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
192.168.1.101 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Any hel is appreciated...
thank you