Portal Home > Knowledgebase > Articles Database > Linux CentOS 6.3 two NIC cards don't get along
Linux CentOS 6.3 two NIC cards don't get along
Posted by Sfed, 09-29-2012, 05:01 PM |
I used to have CentOS 6.2 version and everything running okay on previous server. This one doesn't want to work.
I cannot get two Network Interface Cards work on same time.
I have set up eth0 and eth1
Subnet, 80.79.113.1/29
IP addresses allowed 80.79.113.1 - 80.79.113.6
Subnet Mask 255.255.255.248
GateWay 80.79.113.6
# system-config-network
I have here two NICS shown.
dns conf, picture: https://tmpdmp.com/i/ac858a9aac226b3e/c18188d49c8c56ef
eth0, picture: https://tmpdmp.com/i/782c38fcb26dc9c6/a36d5c967fd6dd07
eth1, picture: https://tmpdmp.com/i/fd8d85d0f88c35e7/0dfea4f8fe380d88
Tried,
# cd /etc/udev/rules.d/
# rm -Rf 70-persistent-net.rules
# reboot
//
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=80.79.113.7
IPADDR=80.79.113.2
NETMASK=255.255.255.248
ONBOOT=yes
TYPE=Ethernet
HWADDR=00:e0:81:b3:20:7c
DNS2=80.79.18.244
DNS1=80.79.0.1
IPV6INIT=no
USERCTL=no
GATEWAY=80.79.113.6
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
BROADCAST=80.79.113.7
IPADDR=80.79.113.3
NETMASK=255.255.255.248
ONBOOT=yes
TYPE=Ethernet
HWADDR=00:e0:81:b3:20:7d
DNS2=80.79.18.244
DNS1=80.79.0.1
IPV6INIT=no
USERCTL=no
GATEWAY=80.79.113.6
I can ping them, in server itself by local.
# ping 80.79.113.2
PING 80.79.113.2 (80.79.113.2) 56(84) bytes of data.
64 bytes from 80.79.113.2: icmp_seq=1 ttl=64 time=0.044 ms
64 bytes from 80.79.113.2: icmp_seq=2 ttl=64 time=0.013 ms
64 bytes from 80.79.113.2: icmp_seq=3 ttl=64 time=0.011 ms
64 bytes from 80.79.113.2: icmp_seq=4 ttl=64 time=0.012 ms
PING 80.79.113.3 (80.79.113.3) 56(84) bytes of data.
64 bytes from 80.79.113.3: icmp_seq=1 ttl=64 time=0.067 ms
64 bytes from 80.79.113.3: icmp_seq=2 ttl=64 time=0.013 ms
64 bytes from 80.79.113.3: icmp_seq=3 ttl=64 time=0.012 ms
64 bytes from 80.79.113.3: icmp_seq=4 ttl=64 time=0.020 ms
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:81:B3:20:7C
inet addr:80.79.113.2 Bcast:80.79.113.7 Mask:255.255.255.248
inet6 addr: fe80::2e0:81ff:feb3:207c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:287622 errors:0 dropped:0 overruns:0 frame:0
TX packets:449849 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25971376 (24.7 MiB) TX bytes:586193348 (559.0 MiB)
Interrupt:18 Memory:dc420000-dc440000
eth1 Link encap:Ethernet HWaddr 00:E0:81:B3:20:7D
inet addr:80.79.113.3 Bcast:80.79.113.7 Mask:255.255.255.248
inet6 addr: fe80::2e0:81ff:feb3:207d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2882 errors:0 dropped:0 overruns:0 frame:0
TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:221147 (215.9 KiB) TX bytes:12840 (12.5 KiB)
Interrupt:19 Memory:dc460000-dc480000
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:42593 errors:0 dropped:0 overruns:0 frame:0
TX packets:42593 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:67459432 (64.3 MiB) TX bytes:67459432 (64.3 MiB)
If I stop eth0 then eth1 will go instead of it online and 80.79.113.3 is reachable.
When I start eth0 then 80.79.113.2 is reachable but other one not from outside world. in localhost they are both pingable
|
Posted by rcs, 09-29-2012, 06:40 PM |
if eth0 is up then connection to that network will go from the router to that interface, since the ip 80.79.113.3 is not on that interface, it won't be reached.
|
Posted by Steven, 09-29-2012, 08:51 PM |
It appears you need to use bonding..
http://www.how2centos.com/centos-6-channel-bonding/
|
Posted by Sfed, 09-30-2012, 01:59 AM |
What do you mean by that? There are TWO different Network Interface Cards. ETH0 has 80.79.113.2 and ETH1 has 80.79.113.3 why doesn't ETH1 start through 80.79.113.3 and only 80.79.113.2 is online until it get's cut off NIC2 will not go online.
Can you clarify what this would make better? Would two interfaces (eth0 & eth1) start using both their own network card or only one network card?
|
Posted by Sfed, 09-30-2012, 08:22 AM |
Case solved, Thumbs Up to Steven ! Thanks mate
|
Add to Favourites Print this Article
Also Read