0% found this document useful (0 votes)
24 views3 pages

Exercise Sheet 7: Communication Systems Exercises

This document outlines an exercise focused on configuring the Border Gateway Protocol (BGP) using Containerlab for network emulation, along with traffic generation and monitoring using iperf3 and sFlow-RT. It includes detailed steps for setting up the environment, verifying BGP configurations, generating traffic, and optional tasks involving tshark and Edgeshark for deeper analysis. Key Containerlab commands for deploying, inspecting, and managing the network topology are also provided.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views3 pages

Exercise Sheet 7: Communication Systems Exercises

This document outlines an exercise focused on configuring the Border Gateway Protocol (BGP) using Containerlab for network emulation, along with traffic generation and monitoring using iperf3 and sFlow-RT. It includes detailed steps for setting up the environment, verifying BGP configurations, generating traffic, and optional tasks involving tshark and Edgeshark for deeper analysis. Key Containerlab commands for deploying, inspecting, and managing the network topology are also provided.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Communication Systems Exercises

Exercise Sheet 7
Container-based emulation

The aim of this exercise is to configure the Border Gateway Protocol (BGP), generate network
traffic between PCs, and monitor the resulting traffic. This will involve using Containerlab
as a container-based network emulation tool, iperf3 open-source tool to generate traffic, and
sFlow-RT for traffic monitoring and analysis (refer to the lab diagram below).

Spine1 Spine2

eth2 eth1

eth1 eth2

eth1 eth2

Leaf1 eth2 eth1 Leaf2

eth3
AS:65001 eth3

eth1
AS:65002 eth1

AS:65012

h1 sFlow-RT h2

Figure 1: Lab configuration

1
Exercise 7.1: Configuration of the YML file
1. Check if containerlab is already installed on your local PC using containerlab version,
if not, this can be done with the following commands:

• echo "deb [trusted=yes] [Link] /" | sudo tee


-a /etc/apt/[Link].d/[Link] - to add the NetDevOps repos-
itory to your sources list.
• sudo apt update && sudo apt install containerlab - to update the package
list and install Containerlab.

2. Review the two files lab7 [Link] and [Link] located in the containerlab directory
within your home folder. Carefully read through and complete any missing values
marked with the word TODO in the first file.
3. To run and view the lab7 [Link] file using Containerlab, execute the following com-
mands:
• sudo containerlab deploy -t lab7 [Link] ./[Link] - to deploy the topol-
ogy.
• sudo containerlab graph -t lab7 [Link] - to generate the Containerlab topol-
ogy graph.
• sudo ./[Link] clab-clos3 - to upload the topology to sFlowRT.
4. Use the docker exec -it clab-clos3-DEVICE COMMAND to execute commands
on the created containers.

Exercise 7.2: Ensure BGP configuration


To test and troubleshoot BGP running on a Linux router, you can use the command vtysh
-c "COMMAND". Execute commands such as:
• show ip bgp [summary] - to display a summary of BGP routes.

• show ip route - to show the routing table.


• show bgp neighbors - to check the status of BGP neighbors.
Use the documentation on the given website (see footnote) to get an overview of further BGP
troubleshooting commands1 .

Exercise 7.3: Generate and monitor network traffic


1. Generate and send traffic between h1 and h2 using iperf3 to evaluate network perfor-
mance. Ensure that h2 is already running as an iperf3 server, which can be confirmed
with the ps aux command.

2. Use sFlow-RT to monitor the traffic between h1 and h2, analyzing performance metrics
such as bandwidth, latency, and packet loss. This will provide real-time insights and a
comprehensive view of the network’s behavior.

Exercise 7.4: Tshark and Edgeshark (Optional)


1. Check the OS release of any of the running containers by running the following cat
/etc/os-release. What linux distribution is installed?
2. Base on a right answer for the previous question, install tshark as a command-line
network protocol analyzer using the following commands:
1 [Link]

2
• apk update - to update the package list.
• apk add tshark - to install the ‘tshark‘ network protocol analyzer.

3. Run the following command to capture the traffic from one of the interfaces
• tshark -i eth1 -Y "bgp" - to capture and filter BGP traffic on the ‘eth1‘ net-
work interface.
What BGP messages did you find? Why are they being exchanged between BGP peers?

4. Stop the running capture, remove the filter, and use the -w [Link] option to save the
captured file. Then, copy it to the bind directory using cp [Link] /BIND DIRECTORY.
Run sudo chmod 777 [Link] on your local bind directory to give yourself permis-
sion to open the pcap file using Wireshark.
5. Conduct research on how Edgeshark can be utilized as a GUI-based tool for monitoring
and visualizing network traffic between Docker containers.

Important Containerlab Commands

• sudo containerlab deploy -t lab7 [Link]


Description: Deploys the BGP lab defined in the lab7 [Link] file, setting
up the network topology as specified.
• sudo containerlab graph -t lab7 [Link]
Description: Generates a graphical representation of the BGP lab topology
defined in lab7 [Link].
• sudo containerlab inspect -t lab7 [Link]
Description: Provides detailed information about the deployed network, in-
cluding status, container names, and IP addresses.
• sudo containerlab save -t lab7 [Link]
Description: Saves the current state of the containers, allowing you to preserve
the configuration and status of your lab.

• sudo containerlab destroy -t lab7 [Link]


Description: Tears down and removes the network topology defined in the
lab7 [Link] file, stopping and removing all associated containers.

You might also like