LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-19-2004, 11:17 PM   #1
ropbo
LQ Newbie
 
Registered: Aug 2004
Location: Vancouver, Canada
Posts: 5

Rep: Reputation: 0
DHCP ok but can't ping


Hi all,

I'm newbie to Linux and that's my first post.

First I tried to find any other posts on the same issue, googled it around for a while but haven't found anything that could've helped me so, here I am.

I have the following scenario ( simple one by the way ):

10.0.0.0---(eth1).Linux Box.(eth0) ---216.x.y.0

I hoop up my Powerbook to eth1 ( inside adapter ) and get an IP from the DHCP. Fine.

Problem is: I can't ping it. Odd. And I can't ping my laptop from the Linux box.

I also tried to ssh it ( that's my only TCP port open - 22 ) because firstly I suspected there was something blocking ICMP packets and stuff, but also got : "host is down" or something ( don't remember exactly )


Some tests from my box:


g4:~ rodrigo$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000


en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::20d:93ff:fec3:7a74 prefixlen 64 scopeid 0x4
inet 10.0.0.10 netmask 0xffffff00 broadcast 10.0.0.255
ether 00:0d:93:c3:7a:74
media: autoselect (10baseT/UTP <half-duplex>) status: active



g4:~ rodrigo$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
ping: sendto: Host is down
ping: wrote 10.0.0.1 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 10.0.0.1 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 10.0.0.1 64 chars, ret=-1
ping: sendto: Host is down


g4:~ rodrigo$ arp -a
? (10.0.0.1) at (incomplete) on en0 [ethernet]
? (10.0.0.255) at ff:ff:ff:ff:ff:ff on en0 [ethernet]


g4:~ rodrigo$ ping 10.0.0.255
PING 10.0.0.255 (10.0.0.255): 56 data bytes
64 bytes from 10.0.0.10: icmp_seq=0 ttl=64 time=0.204 ms
64 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=16.544 ms (DUP!)
64 bytes from 10.0.0.10: icmp_seq=1 ttl=64 time=0.215 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=255 time=1.652 ms (DUP!)


Duplicated packets ... weird ...


g4:~ rodrigo$ arp -a
? (10.0.0.1) at (incomplete) on en0 [ethernet]
? (10.0.0.255) at ff:ff:ff:ff:ff:ff on en0 [ethernet]

I also tried with a Windows box and got the same results.


From the Linux box ( the server ):

Linux debian 2.4.18 #4 SMP Tue Aug 17 04:42:59 PDT 2004 i586 unknown


debian:/home/rodrigo# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
216.x.y.0 * 255.255.255.128 U 0 0 0 eth0
10.0.0.0 * 255.255.255.0 U 0 0 0 eth1
default 216-x-y-1.ip 0.0.0.0 UG 0 0 0 eth0


The interesting thing is that before I upgrade the kernel from 2.2.x to 2.4.18, I could ping. After the upgrade, not anymore.


.config that I used to compile the new kernel ( skipped some parts ):


# Networking options
#
CONFIG_PACKET=m
CONFIG_PACKET_MMAP=y
CONFIG_NETLINK_DEV=m
CONFIG_NETFILTER=y
CONFIG_NETFILTER_DEBUG=y
CONFIG_FILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
CONFIG_SYN_COOKIES=y



# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_IRC=m
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
# CONFIG_IP_NF_MATCH_TOS is not set
# CONFIG_IP_NF_MATCH_AH_ESP is not set
# CONFIG_IP_NF_MATCH_LENGTH is not set
# CONFIG_IP_NF_MATCH_TTL is not set
CONFIG_IP_NF_MATCH_TCPMSS=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_UNCLEAN=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
# CONFIG_IP_NF_TARGET_MIRROR is not set
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y


CONFIG_IP_NF_TARGET_MASQUERADE=m
# CONFIG_IP_NF_TARGET_REDIRECT is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_NAT_IRC=m
CONFIG_IP_NF_NAT_FTP=m
CONFIG_IP_NF_MANGLE=m
# CONFIG_IP_NF_TARGET_TOS is not set
CONFIG_IP_NF_TARGET_MARK=m
CONFIG_IP_NF_TARGET_LOG=m
# CONFIG_IP_NF_TARGET_ULOG is not set
CONFIG_IP_NF_TARGET_TCPMSS=m
CONFIG_IP_NF_COMPAT_IPCHAINS=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_COMPAT_IPFWADM=m
CONFIG_IP_NF_NAT_NEEDED=y
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set


Tried to ping my box from the Linux box. Nothing.

debian:/home/rodrigo# arp -n -i eth1
Address HWtype HWaddress Flags Mask iFace
10.0.0.10 ether 00:0D:93:C3:7A:74 C eth1


debian:/home/rodrigo# arp -a -i eth1
? ( 10.0.0.10 ) at 00:0D:93:C3:7A:74 [ether] on eth1

Sorry for the long email.

Any ideas ?

Rodrigo Otavio Paes de Barros Otaviano
 
Old 08-20-2004, 12:04 AM   #2
joesmack
LQ Newbie
 
Registered: May 2004
Location: Kingston On
Distribution: Debian Unstable
Posts: 7

Rep: Reputation: 0
Your inet for en0 is 10.0.0.10 so why are you pinging 10.0.0.1?
 
Old 08-20-2004, 12:06 AM   #3
ropbo
LQ Newbie
 
Registered: Aug 2004
Location: Vancouver, Canada
Posts: 5

Original Poster
Rep: Reputation: 0
my box -> 10.0.0.10
linux box -> 10.0.0.1

I'm trying to ping the Linux box from my laptop and get nothing. I also tried to ping my laptop from the server. Got nothing as well.

Rodrigo Otavio Paes de Barros Otaviano
 
Old 09-05-2004, 10:11 PM   #4
Lentil
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
I have a very similar problem.

I did a basic install using the Debian-woody stable dist, which installs the 2.2.20 kernel.

With this kernel, DHCP and networking work perfectly. Ping, web, router displays the box as connected... etc.

I installed a new custom kernal based on the 2.4.19 source in the stable dist (added sound and removed other stuff).

Now, the DHCP does not appear to be working. I believe I did not include DHCP in the kernel, my understanding is that normally this is handled by the software after the kernel boots. Pinging localhost still works (duh!).

If I configure eth0 manually using a static address and netmask (using ifconfig) and setup a default route to my router (which is the DHCP server), networking works as expected. My router does not display the box as connected.

I checked my /etc/network/interfaces:

Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

dhcp-client package is installed. dhcpd (server) is NOT installed although I'm trying that now just in case it matters.

The 'NIC' is a mobo-builtin Intel jobber (i82557).

Last edited by Lentil; 09-05-2004 at 10:13 PM.
 
Old 09-05-2004, 10:31 PM   #5
ropbo
LQ Newbie
 
Registered: Aug 2004
Location: Vancouver, Canada
Posts: 5

Original Poster
Rep: Reputation: 0
Hum, in my case the DHCP server was working after the upgrade and the client was ditching IPs normally but I couldn't ping the gateway. Very weird situation.

But I got it solved. The problem was my Intel EtherExpress 16. So I replaced with a 3Com and it worked like a charm.

In your case, you may want to use /etc/default/dhcp to declare the interface dhcpd should listen to. /etc/init.d/dhcp reads this file first.

Rodrigo Otavio Paes de Barros Otaviano
 
Old 09-06-2004, 08:37 AM   #6
Lentil
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
I don't have a file at /etc/defaults/dhcp

I was looking in the /var/log/syslog and noticed that for 2.2.20-idepci the DHCP client runs correctly.

For my 2.4.19 kernel, I'm getting an error that says 'make sure that CONFIG_PACKET and CONFIG_FILTER' are defined in your kernel'

CONFIG_PACKET=y

but

CONFIG_FILTER is not set

So let me try that.
 
Old 09-06-2004, 10:02 AM   #7
Lentil
LQ Newbie
 
Registered: Sep 2004
Posts: 6

Rep: Reputation: 0
That did the trick.

The description provided in make xconfig doesn't imply that this should be required for DHCP... but that did the trick.

Now on to my soundcard debugging...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless card gets IP (dhcp) but can't ping hamish Linux - Wireless Networking 6 03-10-2009 02:11 PM
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 10:54 AM
Cant ping external ip addresses from DHCP clients!!! debloxie Linux - Networking 17 01-24-2004 03:00 AM
DHCP and missing PING echoking Slackware 6 09-03-2003 04:57 PM
I get all my DHCP details through, but can't ping the server palpatine Linux - Networking 0 01-17-2002 06:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration