Networking Forums

Networking Forums > Computer Networking > Linux Networking > Can't ping by hostname from Fedora Core 5

Reply
Thread Tools Display Modes

Can't ping by hostname from Fedora Core 5

 
 
PostName06@aol.com
Guest
Posts: n/a

 
      04-11-2006, 07:51 PM
Dear Newsgroup,

I would appreciate any help you can give me about how to properly
configure networking under Fedora Core 5. My trouble is that I am
unable to ping by hostname.

My setup is fairly simple. I have small peer-to-peer local network
with two computers. Each has an ethernet card and connects to a hub.
One computer runs Win2000, has the unimaginative name of win2k, and
has been assigned the static IP address 192.168.0.32. The other
computer runs Linux, currently Fedora Core 5, is named srlinux, and
has a static IP address of 192.168.0.35.

>From win2k, I can ping srlinux by either hostname or IP address. But

from srlinux, I can only ping win2k by IP address. My guess is that I
corrupted some configuration file while trying to configure samba.
But I just can't see where I went wrong.

I've included the contents of the following config files and commands
below and will be glad to provide any others that will help pinpoint
the trouble.

/etc/hosts
/etc/host.conf
/etc/resolv.conf
/etc/sysconfig/network
/etc/sysconfig/networking/devices/ifcfg-eth0
ifconfig
netstat -r
ping
uname -a

Thanks in advance for any help you can give.

Best regards, Wendy Tucker



$cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
198.168.0.32 win2k srwin2k
198.168.0.35 srlinux fc5

$cat /etc/host.conf
order hosts

/etc/resolv.conf is empty

$cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=srlinux

$cat /etc/sysconfig/networking/devices/ifcfg-eth0
# MYSON Technology Inc SURECOM EP-320X-S 100/10M Ethernet PCI Adapter
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.0.255
HWADDR=00:02:2A:C0:3B:F7
IPADDR=192.168.0.35
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
GATEWAY=192.168.0.32
TYPE=Ethernet

$ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:2A:C0:3B:F7
inet addr:192.168.0.35 Bcast:192.168.0.255
Mask:255.255.255.0
inet6 addr: fe80::202:2aff:fec0:3bf7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3546 (3.4 KiB) TX bytes:3114 (3.0 KiB)
Interrupt:11 Base address:0xdc00

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:2478 errors:0 dropped:0 overruns:0 frame:0
TX packets:2478 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3943869 (3.7 MiB) TX bytes:3943869 (3.7 MiB)


$netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window
irtt Iface
192.168.0.0 * 255.255.255.0 U 0 0
0 eth0
169.254.0.0 * 255.255.0.0 U 0 0
0 eth0
default 192.168.0.32 0.0.0.0 UG 0 0
0 eth0

$ping 192.168.0.32
PING 192.168.0.32 (192.168.0.32) 56(84) bytes of data.
64 bytes from 192.168.0.32: icmp_seq=1 ttl=128 time=0.365 ms
64 bytes from 192.168.0.32: icmp_seq=2 ttl=128 time=0.338 ms
64 bytes from 192.168.0.32: icmp_seq=3 ttl=128 time=0.364 ms
64 bytes from 192.168.0.32: icmp_seq=4 ttl=128 time=0.361 ms

--- 192.168.0.32 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.338/0.357/0.365/0.011 ms

$ping win2k
PING win2k (198.168.0.32) 56(84) bytes of data.

--- win2k ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2010ms

$uname -a
Linux srlinux 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686
i686 i386 GNU/Linux

 
Reply With Quote
 
 
 
 
noEMA
Guest
Posts: n/a

 
      04-12-2006, 02:17 AM
On Tue, 11 Apr 2006 12:51:40 -0700, PostName06 wrote:

> Dear Newsgroup,
>
> I would appreciate any help you can give me about how to properly
> configure networking under Fedora Core 5. My trouble is that I am unable
> to ping by hostname.
>
> My setup is fairly simple. I have small peer-to-peer local network with
> two computers. Each has an ethernet card and connects to a hub. One
> computer runs Win2000, has the unimaginative name of win2k, and has been
> assigned the static IP address 192.168.0.32. The other computer runs
> Linux, currently Fedora Core 5, is named srlinux, and has a static IP
> address of 192.168.0.35.
>
>>From win2k, I can ping srlinux by either hostname or IP address. But

> from srlinux, I can only ping win2k by IP address. My guess is that I
> corrupted some configuration file while trying to configure samba. But I
> just can't see where I went wrong.
>
> I've included the contents of the following config files and commands
> below and will be glad to provide any others that will help pinpoint the
> trouble.
>
> /etc/hosts
> /etc/host.conf
> /etc/resolv.conf
> /etc/sysconfig/network
> /etc/sysconfig/networking/devices/ifcfg-eth0 ifconfig
> netstat -r
> ping
> uname -a
>
> Thanks in advance for any help you can give.
>
> Best regards, Wendy Tucker
>
>
>
> $cat /etc/hosts
> 127.0.0.1 localhost.localdomain localhost
> 198.168.0.32 win2k srwin2k
> 198.168.0.35 srlinux fc5

================================================== ==============
1 ) I believe your IP addresses are in the 192.168.x.y range.
It shows here 198.168.x.y
That's one reason it's tough to resolve.
2 ) The file instead should look like this :
Meaning that the 2 names column should be the same as you
do not have a valid domain name.

EXAMPLE
127.0.0.1 localhost.localdomain localhost
192.168.1.10 foo.mydomain.org foo
192.168.1.13 bar.mydomain.org bar
192.168.0.32 win2k win2k
192.168.0.35 srlinux srlinux
================================================== ===============
>
> $cat /etc/host.conf
> order hosts
>
> /etc/resolv.conf is empty

===============================================
DNS server are the resolvers of Internet names.
Showing no server in resolv.conf and in host.conf
mean that ou can only resolve host name contained in
the /etc/hosts file.
===============================================

>
> $cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=srlinux
>
> $cat /etc/sysconfig/networking/devices/ifcfg-eth0 # MYSON Technology Inc
> SURECOM EP-320X-S 100/10M Ethernet PCI Adapter DEVICE=eth0
> BOOTPROTO=none
> BROADCAST=192.168.0.255
> HWADDR=00:02:2A:C0:3B:F7
> IPADDR=192.168.0.35
> NETMASK=255.255.255.0
> NETWORK=192.168.0.0
> ONBOOT=yes
> GATEWAY=192.168.0.32
> TYPE=Ethernet
>
> $ifconfig
> eth0 Link encap:Ethernet HWaddr 00:02:2A:C0:3B:F7
> inet addr:192.168.0.35 Bcast:192.168.0.255
> Mask:255.255.255.0
> inet6 addr: fe80::202:2aff:fec0:3bf7/64 Scope:Link UP BROADCAST
> RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25 errors:0
> dropped:0 overruns:0 frame:0 TX packets:27 errors:0 dropped:0
> overruns:0 carrier:0 collisions:0 txqueuelen:1000
> RX bytes:3546 (3.4 KiB) TX bytes:3114 (3.0 KiB) Interrupt:11
> Base address:0xdc00
>
> 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:2478
> errors:0 dropped:0 overruns:0 frame:0 TX packets:2478 errors:0
> dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0
> RX bytes:3943869 (3.7 MiB) TX bytes:3943869 (3.7 MiB)
>
>

============================================
Fine looking everything OK...
============================================
> $netstat -r
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
> 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
> default 192.168.0.32 0.0.0.0 UG 0 0 0 eth0
>

============================================
Fine looking everything OK...
============================================

> $ping 192.168.0.32
> PING 192.168.0.32 (192.168.0.32) 56(84) bytes of data. 64 bytes from
> 192.168.0.32: icmp_seq=1 ttl=128 time=0.365 ms 64 bytes from 192.168.0.32:
> icmp_seq=2 ttl=128 time=0.338 ms 64 bytes from 192.168.0.32: icmp_seq=3
> ttl=128 time=0.364 ms 64 bytes from 192.168.0.32: icmp_seq=4 ttl=128
> time=0.361 ms
>
> --- 192.168.0.32 ping statistics ---
> 4 packets transmitted, 4 received, 0% packet loss, time 2998ms rtt
> min/avg/max/mdev = 0.338/0.357/0.365/0.011 ms
>
> $ping win2k
> PING win2k (198.168.0.32) 56(84) bytes of data.
>
> --- win2k ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 2010ms
>
> $uname -a
> Linux srlinux 2.6.15-1.2054_FC5 #1 Tue Mar 14 15:48:33 EST 2006 i686 i686
> i386 GNU/Linux


================================================== ==========================
With the few modifications to the /etc/hosts file, things should go better.

Once modifications are done, there is some chances that you may have to
restart the networking service.
That can be done as user root with the following command :

/sbin/service network restart


Well, I hope it help...
Oh, And by the way Enjoy your linux box

================================================== =======================
 
Reply With Quote
 
PostName06@aol.com
Guest
Posts: n/a

 
      04-12-2006, 03:49 PM
Thank you! Correcting the IP address in /etc/hosts did the trick.
Without your help I would have spent all week seeing what I meant
to type instead of what I actually did type.

Thanks again, Wendy

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 9 and atm Mathias Koerber Linux Networking 0 07-16-2008 08:39 AM
Fedora Core 6 cannot ping WinXP LAN lucren3@gmail.com Linux Networking 6 06-10-2007 03:40 PM
Fedora Core 4 Networking: Ping DNS problem TrevorAdams@gmail.com Linux Networking 2 02-28-2006 04:00 AM
Dialin on Fedora Core 4? harold@hallikainen.com Linux Networking 2 12-25-2005 10:30 PM
Strange SSH halting problem between Fedora Core 2/Fedora Core 3 Jonathan Abbey Linux Networking 4 12-03-2004 05:00 PM



1 2 3 4 5 6 7 8 9 10 11