Troubleshooting Network Connectivity

Download Report

Transcript Troubleshooting Network Connectivity

Troubleshooting
Network Connectivity
Module 7
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice
Network Troubleshooting Tools Overview
Several network troubleshooting tools are included with HP-UX, including:
•
•
•
•
•
•
•
H3065S F.00
lanscan
lanadmin
linkloop
arp
ping
netstat
nslookup
(HP-specific tool)
(HP-specific tool)
(HP-specific tool)
(BSD)
(public domain)
(BSD)
(BSD)
© 2005 Hewlett-Packard Development Company, L.P.
2
Potential Network Connectivity Problems
• LAN terminators are not connected properly.
• The LAN interface is not powered up.
• The LAN interface has the wrong IP address.
• The subnet mask is incorrect.
• The same IP address is used by another system.
• The routing table is configured incorrectly.
• The router is down.
• The LAN cable is defective.
• The LAN segment is too long.
• The /etc/hosts file is configured incorrectly.
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
3
The lanscan Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
7
6
5
4
3
2
1
• The lanscan command lists information for all LAN interface cards on the system.
• Example:
# lanscan
Hardware Station
Path
Address
8/16/6
0x0060B0A39825
8/20/5/1 0x0060B058A8C6
H3065S F.00
Crd
In#
0
1
Hdw
State
UP
UP
Net-Interface
NamePPA
lan0 snap0
lan1 snap1
NM
ID
1
2
© 2005 Hewlett-Packard Development Company, L.P.
MAC
Type
ETHER
ETHER
HP-DLPI
Support
Yes
Yes
DLPI
Mjr#
119
119
4
The linkloop Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
7
6
5
4
3
2
1
Application
Presentation
Session
Transport
Networking
Data Link
Physical
7
6
5
4
3
2
1
• The linkloop command tests layer 2 connectivity.
• The linkloop command succeeds even if the client or server’s IP address is misconfigured
• Example:
# linkloop 0x0060b007c179
Link connectivity to LAN station: 0x0060b007c179
-- OK
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
5
The lanadmin Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
7
6
5
4
3
2
1
• The lanadmin command is an HPUX-only LAN diagnostic tool available
• The lanadmin command may be used to:
•
•
•
•
•
H3065S F.00
reset the LAN interface card
change the maximum packet size for the LAN card
change the speed setting of the LAN card
display driver statistics for the LAN card
reset the driver statistics to zero for the LAN card
© 2005 Hewlett-Packard Development Company, L.P.
6
Example lanadmin
# lanadmin
LOCAL AREA NETWORK ONLINE ADMINISTRATION, Version 1.0
Wed, Aug 12,1998 23:03:30
Copyright 1994 Hewlett Packard Company.
All rights are reserved.
lan
menu
quit
terse
verbose
=
=
=
=
=
LAN Interface Administration
Display this menu
Terminate the Administration
Do not display command menu
Display command menu
Enter command: lan
LAN Interface test mode. LAN Interface PPA Number = 0
clear
display
end
menu
ppa
quit
reset
=
=
=
=
=
=
=
Clear statistics registers
Display LAN Interface status and statistics registers
End LAN Interface Administration, return to Test Selection
Display this menu
PPA Number of the LAN Interface
Terminate the Administration, return to shell
Reset LAN Interface to execute its selftest
Enter command: display
. . .
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
7
The arp Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
• ARP is the address resolution protocol.
• The arp command is used to display and modify entries in the ARP table.
• Options which modify the ARP table require root privilege.
• Example:
# /usr/sbin/arp -a
frank (192.6.30.1) at 0:60:b0:7:4c:4d ether
beverly (192.6.30.5) at 0:60:b0:7:c1:79 ether
jeff (192.6.30.4) at 0:60:b0:7:e1:12 ether
bill (192.6.30.2) at 0:60:b0:7:7e:69 ether
larry (192.6.30.3) at 0:60:b0:7:e1:a2 ether
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
8
The ping Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
7
6
5
4
3
2
1
Application
Presentation
Session
Transport
Networking
Data Link
Physical
7
6
5
4
3
2
1
• The ping command tests IP connectivity to a remote system.
• Example
# ping bill
PING 192.6.30.2: 64 byte packets
64 bytes from 192.6.30.2: icmp_seq=0. time=223. ms
64 bytes from 192.6.30.2: icmp_seq=1. time=43. ms
----bill PING Statistics---2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 43/158/223
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
9
The netstat -i Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
• The netstat -i command displays a LAN interface status report.
• The netstat -in command displays IPs instead of hostnames.
• An asterisk (*) in the output indicates the interface is down.
• Example:
# netstat -i
Name Mtu Network
lo0
4136 127.0.0.0
lan0 1500 192.6.30.0
H3065S F.00
Address
localhost
bill
Ipkts
838
160952
© 2005 Hewlett-Packard Development Company, L.P.
Opkts
838
111715
10
The netstat -r Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
• The netstat -r command displays all routes defined in the route table.
• The netstat -rn command displays IP addresses instead of hostnames.
• Example:
# netstat -rn
Routing tables
Destination
Gateway
127.0.0.1
127.0.0.1
192.6.30.2
192.6.30.2
192.6.30.0
192.6.30.2
127.0.0.0
127.0.0.1
default
192.6.30.1
H3065S F.00
Flags
UH
UH
U
U
UG
Refs
0
0
2
0
0
Interface
lo0
lan0
lan0
lo0
lan0
© 2005 Hewlett-Packard Development Company, L.P.
Pmtu
4136
4136
1500
4136
1500
11
The nslookup Command
Application
Presentation
Session
Transport
Networking
Data Link
Physical
• The nslookup command resolves hostnames to IP addresses.
• The nslookup command is useful for identifying problems with /etc/hosts.
• Example:
# nslookup mickie
Using /etc/hosts on:
bill
Name:
mickie
Address: 192.6.30.3
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
12
Lab
activity
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
13
H3065S F.00
© 2005 Hewlett-Packard Development Company, L.P.
14