Systems and Network Management Network Troubleshooting Tools 1 Background In the lecture we have looked at various techniques for using common tools to make measurements of network conditions. Here we get some practice with some of these techniques. 2 2.1 Procedure Measuring throughput with ttcp, ping 1. Choose a partner. 2. Use the ttcp program to measure throughput between your machines. Take several measurements. Take turns in being the client (ttcp -r -s) and server (ttcp -t -s ip-address ). Remember to start the client first. ttcp gives throughput in bytes per second. Record the throughput measurements here in bits per second, indicating whether you were the client or server. i 3. Ping your partner with two different sized packets. Do this a number of times. Calculate the throughput between your machines. Pl − Ps T P = 16 × bits per second tl − ts where: Pl Ps tl ts Do your calculations here: i = large packet size = small packet size = ping time for larger packet = ping time for smaller packet Nick Urbanik ver. 1.6 Network Troubleshooting Tools Systems and Network Management 2 How does this compare with your measurements using ttcp? Explain discrepancies. Try big packets: ping -s 8872 gw 4. Use the method described in the lectures (using ping) to measure the bandwidth between the gateway and nickpc.tyict.vtc.edu.hk. The formula is: T P = 16 × where: Pl Ps t1l t1s t2l t2s = l arge packet size = small packet size = ping time for l arger packet to the near link = ping time for smaller packet to the near link = ping time for l arger packet to the far link = ping time for smaller packet to the far link Pl − Ps t2l − t2s − t1l + t1s bits per second Do your calculations here: i 5. Compare the ping times to the gateway and to nickpc. Do they surprise you? Explain what you see. 2.2 Ethereal and DHCP 1. Start up ethereal: $ ethereal & 2. Choose Capture → Start Nick Urbanik ver. 1.6 Network Troubleshooting Tools Systems and Network Management DHCPREQUEST/ DHCPNAK INIT−REBOOT broadcast Boot before lease expires 3 INIT Boot after lease expires DHCPDISCOVER/ DHCPOFFER broadcast No response from server, lease expired Has been offered an address SELECTING DHCPACK broadcast REBINDING At T2, begin broadcasting requests to all DHCP servers DHCPREQUEST/ DHCPACK client request broadcast DHCPACK unicast DHCPREQUEST/ DHCPACK broadcast server response broadcast DHCPREQUEST BOUND Has IP address DHCPREQUEST unicast RENEWING At T1, renew using unicasts Figure 1: A state diagram showing states of a dhcp client. Note that T is the lease time, T 1 = T , T 2 = 7T . See also table 1 on the following page from 2 8 the dhcp rfc 2131 (available in full at /home/nfs/ietf/rcf/rfc2131.txt), which sumarises dhcp messages. 3. For the Filter, enter: port 67 or port 68 4. Select (turn on) the check box item Update list of packets in real time, but make sure that the item Enable network name resolution is turned off. OK , and 5. Click on  © wait until you have captured at least 20 packets, preferably more. 6. Examine the exchanges between the dhcp servers and clients. Expand the + for the Bootstrap Protocol. Note that the transaction ID is the same for a dhcp session between client and server. 7. Figure 1 shows the states that a dhcp client passes through. Examine this together with the data from ethereal. 8. List the ip addresses of dhcp server(s). See table 1 on the following page for the i messages that come from servers. . . . . . . . . . . . . . . . . . . . 9. List the ip addresses of some clients that were successfully given an address: i  ¨ i 10. Which port do clients use? i 11. Which port do servers use? ......................... ........................ 12. What is the lease time? (Examine the Bootp Flags in the DHCPACK message) i ..................................................... ver. 1.6 Nick Urbanik Network Troubleshooting Tools Systems and Network Management 4 13. Can you see any unauthorised dhcp servers? (These will be any server that is not i ictlab!) ........................................... 14. Identify a path through the state diagram in figure 1 on the page before that you can see from your ethereal data. You can recognise a session by its transaction ID. Examine the Bootstrap Protocol section in the middle pane of the ethereal window. i 15. List the ip addresses of any clients that were denied a requested address; can you see why? i Message Use DHCPDISCOVER — Client broadcast to locate available servers. DHCPOFFER DHCPREQUEST — Server to client in response to DHCPDISCOVER with offer of configuration parameters. — Client message to servers either (a) requesting offered parameters from one server and implicitly declining offers from all others, (b) confirming correctness of previously allocated address after, e.g., system reboot, or (c) extending the lease on a particular network address. — Server to client with configuration parameters, including committed network address. — Server to client indicating client’s notion of network address is incorrect (e.g., client has moved to new subnet) or client’s lease as expired — Client to server indicating network address is already in use. — Client to server relinquishing network address and cancelling remaining lease. — Client to server, asking only for local configuration parameters; client already has externally configured network address. DHCPACK DHCPNAK DHCPDECLINE DHCPRELEASE DHCPINFORM Table 1: DHCP Messages: this is “table 2” from rfc 2131; the rfc is available in full from ictlab at /home/nfs/ietf/rcf/rfc2131.txt. Nick Urbanik ver. 1.6