Skip to content
Extraits de code Groupes Projets

Before start the TP

Install VirtualBox and import the VM image given on Moodle

If you never used a linux terminal, you should read the following tutorial:

You also find some documentations about the tools use on the following links:

TP1: Introduction to network tools and ARP

1. Open a terminal and clone the repository of the TP1

git clone https://forge.uclouvain.be/linfo2147/kathara-labs.git 

after that you should have a folder named kathara-labs in your home directory. You can go to this folder by typing:

cd kathara-labs/tp1-intro

2. Start the Kathara environment

In the TP1 folder you will find the configuration files for the Kathara environment. lab.conf' is the main configuration file for the environment. The *.startup files are the startup scripts for the devices on the network. You don't need to change these files.

This environment emulates a network with this topology:

+-----+     +-----+     +-----+
| PC2 | --- | S1  | --- | PC3 |
+-----+     +-----+     +-----+
              |
              |
              |
            +-----+
            | PC1 |
            +-----+

You can start the environment by typing:

kathara lstart

After that, you should see multiple terminals opened. Each terminal represents a different device in the network.

Question 1: What is a MAC address?

Question 2: How is a MAC address constructed?

Question 3: What is the layer of the OSI model that uses the MAC address?

Question 4: What is the MAC address of PC1?

3. Capture packets with tcpdump on S1

In the terminal of S1, type the following command:

tcpdump -w shared/s1.pcap

This command will capture all the packets that pass through the switch S1 and save them in the file shared/s1.pcap.

4. Show the ARP table of PC1 and PC2

Question 5: What is the role of the ARP protocol?

In the terminal of PC1, type the following command:

ip neigh show

Question 6: What do you see in the ARP table of PC1?

5. Show the S1 Switching Table

In the terminal of S1, type the following command:

bridge fdb show

Question 7: What does a switching table contain and what is its purpose?

Question 8: What do you see in the switching table of S1?

6. Send a ping from PC1 to PC2

In the terminal of PC1, type the following command:

ping 10.0.0.11

Question 9: What do you see in the ARP table of PC1 after sending the ping?

Question 10: What do you see in the switching table of S1 ?

7. Stop the capture on S1

In the terminal of S1, type Ctrl+C to stop the capture.

8. Analyze the capture

Open the file shared/s1.pcap with Wireshark.

Question 11: What do you see in the capture ?

  • What is the source MAC address of the ARP request ?
  • What is the destination MAC address of the ARP request ?
  • What is the source MAC address of the ARP reply ?
  • Draw a sequence diagram of the ARP request and reply

9. Add a IPv4 address to PC3

Question 12: Why do we need an IP address?

Question 13: What is the layer of the OSI model that uses the IP address?

The PC3 has no IP address. Can you add an IP address to PC3 ?

Question 14: What is the command to add an IP address to PC3?

10. Test the connection between PC1 and PC3

Can you ping PC3 from PC1 ?

Question 15: What do you see in the ARP table of PC1 after sending the ping?

11. Add a static ARP entry on PC2 for PC3

You can add a static ARP entry on PC2 for PC3 by typing the following command:

ip neigh add <IP address of PC3> lladdr <MAC address of PC3> dev eth0

Question 16: What is the goal of adding a static ARP entry?

12. Test the connection between PC2 and PC3

Can you ping PC3 from PC2 ?

Question 17: Does this ping require the use of an ARP request?

13. What is the IPv6 address of PC1 ?

Each device in the network has a link-local IPv6 address.

Question 18: what is the difference between a IPv4 address and a IPv6 address ?

Question 19: What is PC1 global IPv6 address ?

Question 20: What is PC1 local IPv6 address and how is it constructed ?

14. Start the capture on S1

In the terminal of S1, type the following command:

tcpdump -w shared/s1.pcap

15. Add a IPv6 address to PC2

The PC2 has no global IPv6 address. Can you add an IPv6 address to PC2 ?

Question 21: What is the command to add an IPv6 address to PC2?

16. Test the connection between PC1 and PC2 in IPv6

Can you ping PC2 from PC1 in IPv6 ?

17. Stop the capture on S1 and analyze the capture

Oppen the file shared/s1.pcap with Wireshark.

Question 22: What do you see in the capture ?

  • What is the type of the ICMPv6 packet ?
  • What is the address of the source and destination of the ICMPv6 packet ?
  • Draw a sequence diagram of the ICMPv6 packet

18. Stop the Kathara environment

You can stop the Kathara environment by typing:

kathara lclean