1. Useful for basic troubleshooting
PING:
Features:
1. ability to communicate with hosts using ICMP
a. PING sends ICMP echo-requests
b. PING expects to receive ICMP echo-replies
Task: PING some hosts and evaluate the output
1. ping localhost (127.0.0.1)
2. ping -c 3 localhost - sends 3 ICMP echo-requests
Note: 'ping localhost' performs name resolution using /etc/hosts
/etc/hosts stores static name-to-IP mappings
Note: 127.0.0.0/8 is fully-reserved to the loopback adapter of ALL IPv4 hosts
3. ping -c 3 192.168.75.199
4. ping -c 3 -i 3 192.168.75.199 - delays PINGs to 3 seconds apart
Note: PING defaults to a standard 1-second interval
Note: Firewall(s) may block ICMP traffic, causing PING to fail
TELNET:
Features:
1. Great for basic TCP port diagnosis
Task:
1. Connect to TCP ports on various hosts
a. telnet 192.168.75.100 22
b. telnet www.linuxcbt.com 80
NETSTAT:
Features:
1. Provides network connection information from /proc/net/*
Task:
1. Return useful information for various protocols
a. netstat
b. netstat -a - returns all protocols/sockets
c. netstat -ntlp - returns all TCP LISTENERS without name resolution
d. netstat -nulp - returns all UDP lISTENERS without name resolution
Note: netstat uses /etc/services to translate ports to names
Note: 0.0.0.0:514 - this means that Syslog will accept traffic to any of the defined IP addresses/interfaces on the system
e. netstat -ntp - returns established connections (sockets)
f. netstat -rn - returns the routing table
ARP:
Features:
1. Resolves layer-2 (OSI model) MAC addresses to layer-3 IP addresses
Task:
1. Examine MAC addresses using: ifconfig and arp
a. ifconfig - returns our local MAC addresses
Link encap:Ethernet HWaddr 00:02:B3:98:41:08
b. arp -a - returns MAC to IP mappings
Note: When 2 TCP/IP hosts communicate, ARP is performed to translate the IP address (v6/v4) to a MAC address.
Note: If a one or more routers separate the communicating hosts, then the MAC address of the default router's (gateway's) interface is stored by each client
No comments:
Post a Comment