LAB 7-10

advertisement
LAB 7
Troubleshooting and Configuring Network Components
Objective:





Understanding ARP an ARP command
Testing connectivity (more on ping command)
Tracing routes (tracert command)
Displaying and modifying routing table (route command)
Collect statistics (netstat)
A: ARP and ARP command
ARP
Short for Address Resolution Protocol, ARP is a protocol used with the IP
protocol for mapping a 32-bit Internet Protocol address (IP address) to a MAC
address that is recognized in the local network. Once recognized, the server or
networking device returns a response containing the required address.
The protocol is primarily 2 steps
 At first, the host/router having an IP address while being unaware of the
physical address of this IP address sends a broadcasting packet on the
network that is received by all hosts/routers. The sent packet (ARP
packet request) contains information about the IP and physical addresses
of the requesting host/router in addition to the IP address of the target
network device. All network devices except the target host/router drop
the ARP packet.
 Having the ARP packet analyzed by the target network device, this
target device responds by sending ARP packet reply to the requesting
network device (unicast reply). In it's reply, the MAC address of the
target is included.
 The requesting host analyzes the response, gets the MAC address and
associates it with the target IP in its ARP tables (IP-to-Physical address
translation tables).
ARP command
This command displays, adds and removes ARP information from network
devices.
Syntax
ARP -s inet_addr eth_adr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr]
-a
Displays current ARP entries by interrogating the current protocol
data. If inet_addr is specified, the IP and Physical addresses for only
the specified computer are displayed. If more than one network
interface uses ARP, entries for each ARP table are displayed.
-g
Same as –a
inet_addr Specifies an Internet address.
-N if addr Displays the ARP entries for the network interface specified by
if_addr.
-d
Deletes the host specified by inet_addr.
-s
Adds the host and associates the Internet address inet_addr with the
Physical address eth_addr. The Physical address is given as 6
hexadecimal bytes seperated by hyphens.
eth_addr Specifies a physical address
if_addr
If present, this specifies the Internet address of the interface whose
address translation table should be modified. If not present, the
first applicable interface will be used.
Step 1 : Information about the ARP command
From the start menu choose run > cmd > type arp /? . What do you get?
__________________________________________
The use of "/? " following DOS commands gives help information about this command,
this help include the syntax, command options and examples. This command option ( /?
)s hall give you the help screen with information summarized to you in the background
above. Make sure that you understand the different command options. Also include a
screen shot of the result.
Step 2 : Displaying ARP table contents
Write down the arp entries in the table? What command shall you use?
__________________________________________
Notice that the command (ARP -a [inet_addr] [-N if_addr] ) Displays current ARP
entries by interrogating the current protocol data. If inet_addr is specified, the IP and
physical addresses for only the specified computer are displayed. If more than one
network interface uses ARP, entries for each ARP table are displayed.
Step 3 : Adding static entries to ARP tables
Enter a static address to the table 192.168.0.1 00:dd:0:0a:85:00 .
The command (ARP -s inet_addr eth_adr [if_addr]) adds the host and associates
the Internet address inet_addr with the Physical address eth_addr. The
Physical address is given as 6 hexadecimal bytes separated by hyphens.
Write down the arp entries in table? What command did you use?
__________________________________________
Step 4 : Deleting entries from ARP tables
Delete this arp entry? What command did you use? (refer to the help screen on ARP)
Display (show screen shot) the ARP entries?.
Step 5: Dynamical ARP entries
Before communicating with any other host an ARP entry shall be available for this
device or the router and is usually obtained dynamically.
Ping any host (ping host) on the same network (a host belonging to your colleague
setting next to you).
Display the ARP table entries after this operation and compare to previous entries.
What does the new entry represent?
__________________________________________
B: More on the uses of Ping command
Step 6: Pinging WWW
You have used the ping command with IP addresses, however you can use host
names and www location names.
Use the ping command to ping www.yahoo.com, was it successful?
Use the ping command to ping www.asu.edu.jo , was it successful?
Compare the average round trip time in each case.
__________________________________________
Step 7 : Changing Ping default packet length in bytes
You can start by using "/?" option to obtain help on the different options and how
you may change defaults (e.g default buffer=32 bytes, Default number of echo
requests=4)
Use ping but change the packet size (send buffer size) to 52, ping yahoo site again, was it
successful? What command you used? . Insert a screen shot
__________________________________________
Use ping but increase the number of repetitions to 10, ping yahoo site again, was it
successful? What command you used?. Insert a screen shot
__________________________________________
C: Tracing routes
The TRACERT (Trace Route) command is a route-tracing utility used to determine the
path that an IP packet has taken to reach a destination. You can run this utility by typing
tracert IPAddress or tracert HostName at the command prompt.
TRACERT syntax:
tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Obtain help on tracert ( tracert /?) and make sure understand the different command
options. You will use some of them in the following steps.
Step 8
Use tracert to display the result of the trace the following IP addresses/Host Names, how
many hops did it take in each case?
 any host in the same lab.
__________________________________________
 The Default Gateway.
__________________________________________
 The ASU university site (www.asu.edu.jo)
__________________________________________
 www.addustour.com
__________________________________________
 www.yahoo.com
__________________________________________
Step 9
Try to change the number of hops allowed to 5. What command option shall you use?..
Repeat trace route to yahoo site (tracert www.yahoo.com).
what is the last ip address you got?
(Don't forget to insert a screen shot)
__________________________________________
D: The "netstat" command
netstat (network statistics) is a command-line tool that displays active TCP connections,
ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4
statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6,
ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters,
netstat displays active TCP connections. Obtain help on the command (using "netstat
/?") then attempt to use the correct command options to satisfy the following
requirements:
There are 4 columns in the windows netstat output, these are Protocol, Local Address,
Foreign Address and State. The foreign address is just the IP address ( or hostname ) of
another machine which you have a connection to. So, if you're browsing google.com for
example and quickly do a netstat, you should see an entry in there ending in a
"google.com" address followed by ":http" or ":80".
Obtain help on the command (using "netstat /?") then attempt to use the correct
command options to satisfy the following requirements:
Step 10
Use the netstat command to display the active routes? List the routes?
__________________________________________
Step 11
Use the netstat command to display the Ethernet statistics? List the statistics?
__________________________________________
Step 12
List all the protocols and the ports (all connections and listening ports) and what is the
status of the ports?
__________________________________________
Step 13
Type netstat –ano?
Refer to the help information and explain what will this command do?.
List the information?
__________________________________________
E: Manipulating network routing tables: The route command
You will now use the route command to print, add, delete and modify a route entry in the
local IP routing table.
The syntax of the route command follows:
route [-f] [-p] [command [destination] [mask subnetmask]
[gateway] [metric costmetric]]
Get a DOS help screen on this command (route /?) where the definitions of all above
command options are given. Notice also the examples given. Then attempt to use the
correct command options to satisfy the following requirements:
Step 14 : printing route table entries
Use the route command to display the active routes. Are they different than step 9?
__________________________________________
You can also use wild cards (* ?) to print a subset of the table entries, the * replaces
a set of characters while the ? replaces only one number.
Use the * wild card to print all route entries starting with 19
__________________________________________
Step 15 : Adding routes using the "route ADD "
To configure a route manually the syntax shall (at least) contain
route ADD [destination] [mask subnetmask] [gateway]
e.g. To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0 and
the next hop address of 10.27.0.1, type:
route add 10.41.0.0 mask 255.255.0.0 192.168.1.131
Manually configure a route (to the destination 10.41.0.0 with the subnet mask of
255.255.0.0 ) using appropriate gateway? Write down the parameters?
__________________________________________
Step 16
Display the routing table? Is the route entered in the previous step in the table?
__________________________________________
Step 17
Delete the route? What command did you use? make sure that this route is deleted?
__________________________________________
Questions:
1- Refer to your text book or any appropriate reference and give a complete
description of the ARP protocol with full description of the ARP packet request
and ARP reply.
2- Refer to the ARP help screen and write down the full command to be used in the
following cases
a. To display ARP enry (IP address and Physical address) about a network
device with IP address 192.168.3.61
__________________________________________
b. To delete ARP entry corresponding to IP address 220.0.0.161
__________________________________________
c. To add a static ARP entry of IP address 220.0.0.160 and MAC address
00-50-04-62-F7-23 .
__________________________________________
d. Assume that in the previous step, there were 2 NICs on the host, one having
IP address 192.168.0.243 1 and the second one having 192.168.1.6, and the
static entry must be added to the ARP table of the second one.
__________________________________________
3- Refer to the netstat help screen and write down the full command to be used in the
following cases
a. To display both the Ethernet statistics and the statistics for all protocols
__________________________________________
b. To display the statistics for only the TCP and UDP protocols
__________________________________________
4- Refer to the ping help screen and write down the full command to be used in the
following cases
a. To C record the root for hops
__________________________________________
b. To ping www.ju.edu.jo and specifies 10 second wait time (Timeout)
__________________________________________
c. To keep pinging (sending echo request) the location www.ju.edu.jo untl
interrupted (using CTRL C).
__________________________________________
d. To ping 192.168.1.66 with 128 bits of data
__________________________________________
e. To ping 192.168.1.66 with 20 echo requests
__________________________________________
5- Refer to the route help screen and write down the full command to be used in the
following cases
a. To add a route to the destination 10.41.0.0 with the subnet mask of
255.255.0.0, the next hop address of 10.27.0.1, and the cost metric of 7.
__________________________________________
b. To change the next hop address of the route with the destination of
10.41.0.0 and the subnet mask of 255.255.0.0 from 10.27.0.1 to
10.27.0.25
__________________________________________
c. To add a persistent route to the destination 10.41.0.0 with the subnet mask
of 255.255.0.0 and the next hop address of 10.27.0.1
__________________________________________
d. To delete all routes in the IP routing table that begin with 10., type:
________________________________________
Bibliography
1. Help on route command
http://www.cisco.com/en/US/products/sw/custcosw/ps1001/products_tech_not
e09186a0080150baf.shtml
http://technet.microsoft.com/en-us/library/bb490991.aspx
2. Help on tracert command
http://support.microsoft.com/kb/162326
3. Help on netstat command
http://technet.microsoft.com/en-us/library/bb490947.aspx
4. General Help on all command line interface commands
http://technet.microsoft.com/en-us/library/bb490890.aspx
Download