LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-08-2005, 01:00 AM   #1
banner
Member
 
Registered: Mar 2005
Posts: 49

Rep: Reputation: 15
How to ping gateway and dns server


I am new to linux i am currently using fedora and i would like to know how to ping my gateway to see why i cannot get to the internet . I have two network cards , i have etho and a pci wirleses card attached as eth1. i am currently trying to connect to my internet throuth my wirless pci card . i always seem to get the error, can not connect to the site.

i would like some help on this please, p.s i haven my routing table and other information which might be able to solve the problem if that might be any help to any body.


root@bangde ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.4 0.0.0.0 UG 0 0 0 eth0
[root@bangde ~]#


oot@bangde ~]# ifconfig

eth0 Link encap:Ethernet HWaddr 00:0B:6A4:71:C5

inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:63702915 errors:0 dropped:0 overruns:0 frame:0

TX packets:63817569 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:387379296 (369.4 MiB) TX bytes:1717498752 (1.5 GiB)

Interrupt:11 Base address:0xe00



eth1 Link encap:Ethernet HWaddr 00:04:E2A:82:80

inet addr:192.168.1.105 Bcast:255.255.255.255 Mask:255.255.255.0

inet6 addr: fe80::204:e2ff:feda:8280/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:2253 errors:0 dropped:0 overruns:0 frame:0

TX packets:24 errors:4 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:234447 (228.9 KiB) TX bytes:2208 (2.1 KiB)



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:27889 errors:0 dropped:0 overruns:0 frame:0

TX packets:27889 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:6423048 (6.1 MiB) TX bytes:6423048 (6.1 MiB)



[root@bangde ~]#
 
Old 05-08-2005, 01:38 AM   #2
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: SuSE 8.2, Slackware current, OpenBSD 3.5-3.8, Fedora Core 2
Posts: 400

Rep: Reputation: 30
Well, the first thing I noticed was that the routing table is currently set up for eth0 and not eth1 (your wireless card). How are you starting the eth1 interface? I personally start my wireless card by setting the access point, channel, etc. using the "iwconfig" command. Once those are set, since my AP uses DHCP, I bring up eth1 by issuing "dhcpcd eth1". When you issue the "route" command, you should see entries pertaining to eth1, not eth0. Also, after bringing eth1 up, you may want to check the contents of /etc/resolv.conf to make sure that the correct DNS servers are listed so that you will be able to get DNS resolution.
 
Old 05-08-2005, 06:43 AM   #3
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
ifconfig
eth0 Link encap:Ethernet HWaddr xxxxxxxxxxxxxxxxxx
inet addr:192.168.2.101 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: xxxxxxxxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4712 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:2780080 (2.6 Mb)
Interrupt:11

irda0 Link encap:IrLAP HWaddr xxxxxxxxxx
UP RUNNING NOARP MTU:2048 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:703822 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:8
RX bytes:0 (0.0 b) TX bytes:10456784 (9.9 Mb)

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:131468 errors:0 dropped:0 overruns:0 frame:0
TX packets:131468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17752592 (16.9 Mb) TX bytes:17752592 (16.9 Mb)

vmnet1 Link encap:Ethernet HWaddr xxxxxxxxxxxxxxxxxxxxxxxx
inet addr:172.16.90.1 Bcast:172.16.90.255 Mask:255.255.255.0
inet6 addr: xxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:881 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vmnet8 Link encap:Ethernet HWaddr xxxxxxxxxxxxxxxxxxx
inet addr:172.16.157.1 Bcast:172.16.157.255 Mask:255.255.255.0
inet6 addr:xxxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST RUNNING 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)

wlan0 Link encap:Ethernet HWaddr xxxxxxxxxxxxxxx
inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: xxxxxxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1412 Metric:1
RX packets:258546 errors:0 dropped:0 overruns:0 frame:0
TX packets:190425 errors:3 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:118434985 (112.9 Mb) TX bytes:19604642 (18.6 Mb)




# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
172.16.90.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
172.16.157.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0



# cat /etc/resolv.conf
search mynetwork.net
nameserver 192.168.0.1




# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=2.80 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=2.09 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=2.36 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 2.094/2.420/2.802/0.294 ms
 
Old 05-08-2005, 06:49 AM   #4
n0xvb
Member
 
Registered: Sep 2004
Location: 127.0.0.1
Distribution: Slackware 13; openSUSE 11.2
Posts: 255

Rep: Reputation: 32
Re: How to ping gateway and dns server

Quote:
Originally posted by banner

eth0 Link encap:Ethernet HWaddr 00:0B:6A4:71:C5
inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:63702915 errors:0 dropped:0 overruns:0 frame:0
TX packets:63817569 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:387379296 (369.4 MiB) TX bytes:1717498752 (1.5 GiB)
Interrupt:11 Base address:0xe00

eth1 Link encap:Ethernet HWaddr 00:04:E2A:82:80
inet addr:192.168.1.105 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::204:e2ff:feda:8280/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2253 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:4 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:234447 (228.9 KiB) TX bytes:2208 (2.1 KiB)

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:27889 errors:0 dropped:0 overruns:0 frame:0
TX packets:27889 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6423048 (6.1 MiB) TX bytes:6423048 (6.1 MiB)
The other thing I see right off the bat is that you have eth0 and eth1 on the same network with the same metric. Do you have other devices connected to eth0? If not I would try to disable that device or change the IP address. (Or you can change the metric for eth1 to something other than zero.)

You do want to add a route entry for eth1 and make that the default route.

[edit] Oh yeah, you should ask your question with a single post, not multiple: http://www.linuxquestions.org/questi...hreadid=320910
[/edit]

Last edited by n0xvb; 05-08-2005 at 06:54 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
DHCP, Gateway and DNS server depam Linux - Networking 3 10-05-2005 08:33 PM
Traceroute, Ping, Domain Name Server (DNS) Lookup, WHOIS, and DNS Records Lookup netoknet General 1 05-09-2005 04:43 AM
Can ping the gateway but not the DNS or the Internet. boyish Linux - Networking 3 04-20-2005 05:20 AM
can't ping DNs server crtek Linux - Networking 3 01-14-2005 09:31 AM
Why I cannot ping to DNS server hvan Linux - Networking 5 11-21-2003 05:22 PM


All times are GMT -5. The time now is 04:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration