LinuxQuestions.org
Review your favorite Linux distribution.
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 04-11-2014, 03:41 PM   #1
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 565

Rep: Reputation: Disabled
How to troubleshoot networking


I wasted about 24 hours trying to implement a wireless network. Actually, it wasn't really wasted as I learned more about Linux than I ever knew.

Turned out that to enable wlan0, I first had to turn eth0 off.

That being said, in hindsight, what would have been the best way to troubleshoot why a Linux box isn't communicating on a network? What questions should I have asked on this forum to allow others to provide help?
 
Old 04-12-2014, 01:13 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,617

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
Quote:
That being said, in hindsight, what would have been the best way to troubleshoot why a Linux box isn't communicating on a network? What questions should I have asked on this forum to allow others to provide help?


Would have been more specific if all simple debugging information was gathered, analyzed, and from the finding make a specified post title. Using 'dmesg' or 'message.log' or everything available at /var/log folder.

Well anyway, post title is a matter of taste. This is merely taken from my simple experience.

Good luck.
 
Old 04-12-2014, 07:34 AM   #3
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 565

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by malekmustaq View Post
Would have been more specific if all simple debugging information was gathered, analyzed, and from the finding make a specified post title. Using 'dmesg' or 'message.log' or everything available at /var/log folder.
Thanks malemustaq,

It appears that I don't have a message.log. With Centos, would /var/message/messages be the equivalent? I looked through it, and it did not appear to indicate any issues.

I also ran "dmesg" as well as looked at /var/log/dmesg, and did not see any clues, but only when I connected a mouse or USB or the like.

As for as "everything available at /var/log", any specific logs that would be most telling?
 
Old 04-12-2014, 12:01 PM   #4
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Its a huge subject. As a standard practice, you should troubleshoot according to OSI model. Most of the problem will occur in Application-Layer, and this layer is the hardest to troubleshoot. It all depends on box-to-box and the packages that are installed on it. You should have the knowledge on how to setup network in the chosen distro first.

But before starting to hunt for problem, you should first make sure rest of the OSI layers are trouble-free. I will just give you quick rundown of step. Google is your buddy.

1 Physical Layer
Check Network card is detected:
Code:
# ethtool eth0 | grep 'Link'
	Link detected: yes
Ensure physical address in config file is what this says:
Code:
# ethtool -P eth0
Permanent address: 00:00:00:00:00:00
2 Data-Link Layer
Check for arp broadcast. The IP address of at least one system should be listed. If there are no systems listed, there is a problem at the physical layer (above):
Code:
# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.1              ether   00:00:00:00:00:00   C                     eth0
server.example.com       ether   52:54:00:9a:00:00   C                     virbr0
tester.example.com       ether   52:54:00:55:00:00   C                     virbr0
Check for dropped packets. ERR, DRP and OVR should be zero:
Code:
# netstat -i
Kernel Interface table
Iface       MTU Met    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500   0     8443      0      0      0     2135      0      0      0 BMRU
eth1       1500   0        1      0      0      0       91      0      0      0 BMRU
lo        16436   0        4      0      0      0        4      0      0      0 LRU
The default Message Transmit Unit (MTU) setting is 1500. If the MTU is set to something other than 1500, the network may run slowly. To set the MTU to a default of 1500:
Code:
# ifconfig eth0 | grep MTU
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

# ifconfig eth0 mtu 1500
3 Network Layer
Determine if the default gateway is correct:
Code:
# route -n | grep '^0.0.0.0'
0.0.0.0         192.168.1.1   0.0.0.0         UG    0      0        0 eth0
Use ping to determine communication:
Code:
# ping 127.0.0.1 - This is the loopback address. If you canít ping yourself, then there is something wrong with the TCP/IP protocol stack on your computer.
# ping 192.168.1.75 - Other machine within network.
# ping 192.168.1.1 - to router.
# ping google.com - to outside world.
4 Transport Layer
Track the route packets taken from your machine on their way to a given host and find the miscreant gateway/hops/routers that are discarding your packets (if there are any):
Code:
# traceroute www.linuxquestions.org
traceroute to www.linuxquestions.org (75.126.162.205), 30 hops max, 60 byte packets
 1  192.168.1.1 (192.168.1.1)  1.277 ms  1.806 ms  2.279 ms
 2  117.192.160.1 (117.192.160.1)  31.217 ms  33.085 ms  36.554 ms
 3  218.248.160.166 (218.248.160.166)  38.535 ms  40.385 ms  42.842 ms
 4  218.248.236.229 (218.248.236.229)  47.827 ms  51.768 ms  52.414 ms
 5  218.248.236.230 (218.248.236.230)  54.952 ms  56.634 ms  59.057 ms
 6  59.163.206.177.static.chennai.vsnl.net.in (59.163.206.177)  90.696 ms 125.17.12.53 (125.17.12.53)  47.855 ms 59.163.206.173.static.chennai.vsnl.net.in (59.163.206.173)  64.615 ms
 7  172.29.251.33 (172.29.251.33)  67.785 ms  74.525 ms  77.280 ms
 8  any2ix.coresite.com (206.72.210.131)  274.910 ms ix-2-0-3-1331.tcore1.HK2-Hong-Kong.as6453.net (116.0.67.121)  301.517 ms  304.366 ms
 9  ae19.bbr01.eq01.dal03.networklayer.com (173.192.18.140)  330.338 ms softlayer1-10G.hkix.net (202.40.161.241)  137.285 ms ae19.bbr01.eq01.dal03.networklayer.com (173.192.18.140)  337.322 ms
10  ae0.bbr02.eq01.tok01.networklayer.com (50.97.18.166)  188.925 ms  194.952 ms  201.365 ms
11  ae7.bbr01.eq01.tok01.networklayer.com (50.97.18.162)  191.085 ms po1.fcr02.sr04.dal01.networklayer.com (66.228.118.178)  265.796 ms  269.042 ms
12  ae2.bbr02.eq01.sjc02.networklayer.com (50.97.18.160)  251.532 ms  259.777 ms  257.024 ms
13  ae0.bbr02.cs01.lax01.networklayer.com (173.192.18.151)  282.212 ms www.linuxquestions.org (75.126.162.205)  313.661 ms ae0.bbr02.cs01.lax01.networklayer.com (173.192.18.151)  287.765 ms
5 Session Layer & 6 Presentation Layer
Issues rarely occur at the session and presentation layers.

7 Application Layer
The application layer is where the client-server issues fall. This includes SMTP, POP3, HTTP, FTP, etc. As i have already told this topic is huge and start from how to setup network. Google for everything... .
 
2 members found this post helpful.
Old 04-12-2014, 12:15 PM   #5
NotionCommotion
Member
 
Registered: Aug 2012
Posts: 565

Original Poster
Rep: Reputation: Disabled
Thank you mddesai,

This is going to take me a bit to digest before I have any intelligent followup questions to ask
 
  


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
Can't troubleshoot wireless! randalleg Linux From Scratch 4 06-19-2011 03:23 AM
audio troubleshoot Upendra Pratap Singh Linux - Newbie 4 05-11-2011 07:40 PM
Troubleshoot Syslog-ng BarrMinou Linux - Server 1 02-17-2011 12:28 PM
Troubleshoot Grub hareeshsr12 Linux - Server 2 06-03-2010 01:58 AM
please help me troubleshoot my printer stupid_guy Mandriva 2 03-09-2004 07:56 PM


All times are GMT -5. The time now is 10:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration