View Full Version : 2nd NIC can't ping
powereds
2005-07-22, 03:19 AM CDT
hi all,
im a linux newbie and i desperately need help. i have an fc4 box here running smoothly until i recently added another nic-eth1(Intel 82557/8/9 ethernet pro 100). it can't ping to other pcs in my network. when i issue ping command to my xp box, it display an error "Destination Host Unreachable" when i fact it is the one im using now. in my fc4 box im using a firestarter firewall. i want to use two nics coz i want to test configure fc4 box with squid/dhcp/nat/ipmasq.
thanks in advance.
eds
kg4cbk
2005-07-22, 09:38 AM CDT
You will need to post more info on how you are setting things up.
/sbin/ifconfig -a
netstat -rn
powereds
2005-07-22, 10:46 PM CDT
hi,
below is the result.
[root@stentz ~]# /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:B0:D0:2D:47:D9
inet addr:192.168.11.70 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::2b0:d0ff:fe2d:47d9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:458 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:105013 (102.5 KiB) TX bytes:14487 (14.1 KiB)
Interrupt:5 Base address:0xec00
eth1 Link encap:Ethernet HWaddr 00:A0:C9:29:4B:8E
inet addr:192.168.11.69 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:c9ff:fe29:4b8e/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
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:1793 errors:0 dropped:0 overruns:0 frame:0
TX packets:1793 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2419834 (2.3 MiB) TX bytes:2419834 (2.3 MiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@stentz ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth0
[root@stentz ~]#
please help.
thanks,
eds
kg4cbk
2005-07-23, 07:58 AM CDT
This is a common error. If you want to use two NICs on the same LAN you need to lookup details on bonding the interfaces together.
The way you have it configured now will not work as you expect. You have both interfaces in the same subnet. The reason this will not work is that your routing table wants to send all packets going to the local LAN out interface eth0. You can see this in the routing table (netstat -rn). You have two route to 192.168.11.0 out interface eth0 and eth1.
For setting up a firewall/proxy server you will want to configure the two interfaces in two different subnets. You will need to enable routing on the box so packets will be allowed to pass from one interface to the other. As part of that process you will use iptables to NAT packets as they pass through the system.
Hopefully that is clear.
rayyes
2005-07-23, 08:11 AM CDT
read up on Chapter 3 of the linux home networking tutorial (which is an excellent resource and must read for anyone dealing with linux networks):
http://www.linuxhomenetworking.com/linux-hn/network-linux.htm#_Toc91165269
powereds
2005-07-24, 02:36 AM CDT
thank you very much kg4cbk and rayyes. your replies are very helpful to people like who are still new to linux.
once again, thank you.
eds
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.