Lab2

advertisement
91-414 Data Communication II
91.414 Data Communications LAB 2
Sources: Mastering Networks, Liebeherr & Zarki
Computer Networking, Kurose & Ross
SET UP
See Lab2
ARP
- Use arp -a. Note: The typical lifetime of an arp cache is about 2 minutes.
- Delete all arp entries.
- Start ethereal.
- Issue ping PC1 -> PC2
Using arp and ethereal, answer the following and include in your lab report.
1. What is destination MAC address of arp request?
2. What are the different values of the type field in the ethernet headers you observed?
3. Discuss how arp gets the MAC address for IP address 10.0.1.12.
4. What are the MAC addresses of PC1, PC2, PC3, and PC4?
5. When you telnet to an IP address that doesn't exist, what does arp do?
NETSTAT
7. What do the following commands do:
netstat -in
netstat -rn
netstat -i
netstat -an
netstat -tar
netstat -uan
netstat -s
netstat -a
8. What are the network interfaces of PC1 and what is the MTU for each?
9. How many IP datagrams, ICMP messages, UDP datagrams, and TCP segments has
PC1 since its last reboot?
IFCONFIG
Change the IP address of an interface:
Use the ifconfig command to modify the IP address of eth0 interface of PC4.
- On PC4, run ifconfig -a and save the output.
- Change the IP address of interface eth0 of PC4 to 10.0.1.11/24
- Run ifconfig -a again and save the output.
10. Attach the saved files to your report and explain the fields of the
ifconfig output.
91-414 Data Communication II
DUPLICATE IP ADDRESSES
- Delete all entries in the ARP cache on all PCs.
- Run ethereal on PC3 and capture network traffic to and from the duplicate
IP address 10.0.1.11.
- On PC3, start a telnet session to the duplicate address 10.0.1.11 and login as
root.
- Once you have logged in, issue the command hostname.
- Inspect the arp cache of PC3. Stop ethereal. Look at the captured packets.
11. Explain why the telnet session was established or not to the host with the
duplicate address. Use the arp cache and the captured packets to support
your explanation.
12. Was the telnet password sent encrypted or in the clear?
- RESET THE IP ADDRESS OF PC4 TO 10.0.1.14/24!!!!
STATIC MAPPING OF ADDRESSES AND HOST NAMES
The systems are not using the Domain Name System yet. Use /etc/hosts to resolve
names. All Internet hosts used to have to sync up their /etc/hosts files.
- Look at /etc/hosts on PC1. Ping PC2 from PC1 two ways: ping 10.0.1.12
ping PC2.
- Edit /etc/hosts on PC1 to include a mapping for the name PC2 and ping PC2.
- REMOVE THE CHANGE YOU MADE TO etc/hosts!!!
13. Explain why a static mapping of names and IP addresses is impractical when
there are a large number of hosts.
14. What will be the result of host name resolution when multiple IP addresses
are associated with the same name in the /etc/hosts file?
TEARDOWN
See Lab2.
LAB REPORT
Submit the report as hard copy, on a floppy, or via email.
Answer questions 1 through 14 and include files where indicated.
Download