Portal Home > Knowledgebase > Articles Database > using 2 separate network cards
using 2 separate network cards
Posted by hpham, 11-08-2007, 03:29 AM |
I am setting up an internal network for management only. So, assign an IP for the second NIC, and activate it, but it seems not working. I have tried this
#ifconfig eth1 192.168.2.14 netmask 255.255.255.0 broadcast 192.168.2.255
#ifconfig eth1 up
checking dmesg, it shows the NIC is up
# dmesg
ADDRCONF(NETDEV_UP): eth1: link is not ready
tg3: eth1: Link is up at 100 Mbps, full duplex.
tg3: eth1: Flow control is off for TX and off for RX.
checking routing table seeing the 192.168.2.x routed through eth1
# route -e
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default reserve1.somename 0.0.0.0 UG 0 0 0 eth0
Repeat those steps for other boxes, but when pinging, all return errors
# ping 192.168.2.20
PING 192.168.2.20 (192.168.2.20) 56(84) bytes of data.
From 192.168.2.14 icmp_seq=1 Destination Host Unreachable
From 192.168.2.14 icmp_seq=2 Destination Host Unreachable
From 192.168.2.14 icmp_seq=3 Destination Host Unreachable
Did I do anything wrong?
|
Posted by david510, 11-08-2007, 03:50 AM |
What does the following file contain?
/etc/sysconfig/network-scripts/ifcfg-eth1
|
Posted by hpham, 11-08-2007, 03:53 AM |
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:30:48:8a:88:33
IPADDR=192.168.2.14
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=yes
TYPE=Ethernet
HOSTNAME=my-server-name
|
Posted by david510, 11-08-2007, 03:58 AM |
It should be .20 or .14 ?
|
Posted by hpham, 11-08-2007, 04:06 AM |
It's .14. You can see my IP assigning command above
.20 is IP of another box
|
Posted by TrueHosting, 11-08-2007, 05:09 AM |
Is the other machine on the same VLAN?
If you ping .14 from .20 and run tcpdump on eth1 on .14 do you see any traffic?
|
Posted by hpham, 11-08-2007, 05:27 AM |
Hmm... it might because of the switch then. I saw old config from the old datacenter. Going to reset it, hope it will work
Thank you
|
Posted by TrueHosting, 11-08-2007, 05:45 AM |
Also, Do you have any other machines on the 192.168.2/24 subnet that can ping .20?
If so I bet it's just how the port that .14 is plugged in to is configured.
HTH.
|
Posted by hpham, 11-08-2007, 08:08 AM |
no, all ports could not ping. So went ahead to reset the switch to default value. However, after resetting, I see this message in all boxes, and still cannot ping from a server to each other
device eth1 entered promiscuous mode
device eth1 left promiscuous mode
Any idea why? And how to fix?
|
Posted by TrueHosting, 11-08-2007, 01:44 PM |
Ok, What kind of switch is this?
promiscuous mode means the card is attempting to listen for all the traffic hitting the network card. You'll always see this after running tcpdump.
Can you paste a bit of output from your current switch config? It's difficult to troubleshoot networking issues without more information.
|
Posted by hpham, 11-08-2007, 09:19 PM |
ok, found "promiscuous mode". It's because I was running tcpdump.
for the issue, I have resolved it by using webmin, to add a new *local route*. But still finding the command for doing that. Usually, when adding a route, I use this
# route add -net xx.xx.xx.xx netmask 255.255.255.0 gw xx.xx.xx.xx eth1
but for local route, dont need gateway option. I have tried to use above command without gw, but it's not successful. Do you have any idea why? And which command for using in webmin to create *local route*?
Thank you
|
Posted by TrueHosting, 11-08-2007, 09:32 PM |
Ok
you don't need a route. I'm assuming your just using 192.168.2.0/24 as a private back end between a few servers, and not to get out to the internet, correct?
Also, The route is not needed because .14 and .20 are on the same subnet (255.255.255.0) so you would be able to talk to anything in the range of 192.168.2.1 to 192.168.2.255 without needing a route.
with a 'dumb' switch, you'd just plug in the machines to a couple of ports, and it'd work.
You have some form of a managed switch I'm thinking ( Since your talking about resetting it to defaults )
You need to either put your switch into unmanaged mode, or setup the two ports that your servers are plugged on the same vlan.
And again, running tcpdump on the interface do you see any traffic whatsoever?
And for the sake of troubleshooting, have you tried changing the ethernet cables out with ones that you know work?
|
Posted by hpham, 11-08-2007, 10:15 PM |
yes, it's correct
I thought that too, that's why I was really confused. The switch was working fine with 192.168.1.0/24 range before with all ports on the same vlan.
You need to either put your switch into unmanaged mode, or setup the two ports that your servers are plugged on the same vlan.
before resetting, it returned the ip from the old datacenter. After resetting, it returns the MAC address of the switch I believe
The cables are working fine.
|
Add to Favourites Print this Article
Also Read
Mailman Error (Views: 748)
Lease to own (Views: 705)