Computer communications
networks —–
Practical exercises
Exercise 1.
a) PC1 starts sending data to PC2. PC1 already knows PC2. Based on the information in the diagram above, complete the headers of the frames in the tables below.
Part of the frame header sent by PC1 destination source
00 :11 :22 :34 :56 :11
00 :11 :22 :34 :56 :22
00 :11 :22 :34 :56 :11
Part of the frame header sent by PC2 to answer PC1 destination source
00 :11 :22 :34 :56 :11
00 :11 :22 :34 :56 :22
00 :11 :22 :34 :56 :22
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 1
Exercise 2.
a) Install the Wireshark app and start listening on the network interface connected to
b) Open a terminal and execute the following command: ping 180.76.76.76
c) What protocol does the ping command use ? ipv4
d) What is the hardware address of the network card that is pinging? Filter all data
regarding this protocol. 48:a9:8a:25:9a:23
e) What is the hardware address of the network card on the local network that receives
the ping? 4c:d5:77:ef:02:23
f) How are the different network layers and protocols used represented with WireShark?
Application->lCMP;network->IPV4; datalink->MAC;Presentation->Hex_32bytes g) What is the type of PDU sent over the network? What is its structure? ICMP;Type->Code->(check number)->content
Exercise 3.
Hexadecimal :
Exercise 4.
a) Create an account on https://www.netacad.com/ then download and install the Packet Tracer tool
b) Define and configure the network with Packet Tracer
The data below was captured with the Wireshark tool.
a) Which PDU does the data correspond to?ICMP
b) What are the MAC and IP addresses of the network card sending the data?
MAC:b7:49:31:eb:c1:32 IP:c0:a8:01:1f
c) What is the MAC address of the destination network card? 11:dc:5d:d7:a1:f2
d) What is the IP address of the destination network card? c0:a8:01;01
0000 11dc5dd7a1f2b74931ebc13208004500 0010 003c6e17000080014939c0a8011fc0a8 0020 01 01 08 00 4d 07 00 01 00 54 61 62 63 64 65 66 0030 6768696a6b6c6d6e6f70717273747576 0040 77616263646566676869
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 2
c) For each computer, click once on the computer to bring up the window below, then open a terminal:
d) For each computer, complete the table below using the following command from the terminal: ipconfig /all
Host name MAC address IP address
00-02-16-c0-cd-30
00-d0-ff-21-31-17
10.0.5.2/24
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 3
10.0.5.1/24
e) Where is information about other computers on the network saved on a computer? MAC
f) Where is information about other computers on the network saved on a switch? MAC
g) Reproduce and complete the table below for each computer using the following
command in the terminal: arp -a
Host name :
MAC address IP address
00-d0-ff-21-31-17
192.168.2.2
h) In the PC0 terminal, execute the following command: ping 10.0.5.2 What is the result of this command?
What is the use of this command?
i) Repeat question g). What do you notice?
j) Click on the switch to display the following window:
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 4
k) Remplir le tableau ci-dessous en utilisant depuis le terminal du commutateur la commande suivante : show mac-address-table
MAC address Port
00-01-c7-a4-85-34
00-02-16-c1-1e-9a
Fa0/2 Fa0/1
Exercise 5.
a) Define and configure the network below with Packet Tracer
b) Use the appropriate command to test connectivity between:
• PC0 and PC2
d) Does PC2 know PC3? Why? How to check?
ping 10.0.5.3 No
e) Propose a solution so that: • PC1 can know PC2
• PC2 can know PC1
command prompt
in the same networks 通过配置交换机
by configuring the switch
ping 10.0.5.2
ping 10.0.5.3
• PC1 and PC3
c) Does PC0 know PC1? Why? How to check? Reply from 10.0.5.1: bytes=32 time=9ms TTL=
Pinging 10.0.5.1 with 32 bytes of data: ping 10.0.5.1 yes 128
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 5
Exercise 6.
a) Define the network below with Packet Tracer by specifying an IP address and subnet mask for each PC.
Reply from 192.168.1.3: bytes=32 time=9ms TTL=128
Reply from 192.168.1.2: bytes=32 time=8ms TTL=128
Reply from 192.168.1.4: bytes=32 time=8ms TTL=128
this time different? all pc can communicate with each other
b) Test connectivity between:
• PC1 and PC3 • PC1 and PC2 • PC3 and PC4
What do you notice?
c) Configure the network according to these instructions: • PC1 and PC3 on VLAN 2
• PC2 and PC4 on VLAN 3
d) Test connectivity between: • PC1 and PC3
• PC1 and PC2
• PC3 and PC4 What do you notice?
pc1 and pc3 can communicate with each other because
they are on the same VLAN.
pc1 and pc2 can not
pc3 and pc4 can not
Exercice 4) VLAN
a) i) Define the network below with Packet Tracer by specifying an IP address and a
subnet mask for each PC ii) Ping between:
• PC1 and PC3
• PC1 and PC2
• PC3 and PC4 What do you see?
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 6
Programming Help, Add QQ: 749389476
Exercise 8.
For each question, detail the calculations to obtain:
• the network address • the number of addresses assignable to hosts in the subnet
Exercise 7.
a) Create the network below with Packet Tracer by defining the different VLAN
use same vlan can connect with each other
b) Use the appropriate command to check connectivity between A and B. What do you
c) Use the appropriate command to check connectivity between E and D. What do you
they can communicate each other
they can communicate each other
d) Use the appropriate command to check connectivity between C and F. What do you
they can not communicate each other
ping 196.128.1.5
ping 196.128.1.4
ping 196.128.1.7
a) 71.43.253.17/24
b) 122.17.234.119/16 • the range of IP addresses that can be used to assign an IP address to a
c) 137.194.164.17/19
d) 10.0.1.1/30
e) 10.0.1.5/30
f) 100.10.10.100/10
network card • the broadcast address
a)2^8-2 71.43.253 to71.43.253.254 71.43.253.255 b)2^16-2 122.17.0.1 to 122.17.255.254 122.17.255.255 c)2^13-2 137.194.160.1to137.194.191.254 137.1994.191.255 d)2^2-2 10.0.1.1to10.0.1.2 10.0.1.3
e)2^2-2 10.0.1.5to10.0.1.6 10.0.1.7
f)2^22-2 100.0.0.1to100.63.255.254 100.63.255.255
1)71.43.253.0 将IP地址和子网掩码转换为二进制。 01000111.00101011.11111101.00010001 在IP地址和子网掩码之间执行按位AND运算。 11111111.11111111.11111111.00000000 将结果转换回十进制。 01000111.00101011.11111101.00000000 2)对于/24子网,有2^(32-24) = 2^8 = 256个地址。 (71.43.253.0) 减去网络地址和广播地址,256 – 2 = 254个地址可
分配给主机 3)起始IP地址71.43.253.1结束IP地址71.43.253.254 4)广播地址:71.43.253.255
CS Help, Email: tutorcs@163.com
Exercise 9.
For each question, detail the calculations to find the subnet mask used to obtain the requested subnets:
a) network 20.10.5.0 : subnets containing 10 hosts
b) network 20.10.5.0 : subnets containing 25 hosts
c) network 20.10.5.0 : subnets containing 40 hosts
Exercise 10.
10 hosts require 4 bits (2^4 = 16 > 10)
32 – 4 = 28 bits for the subnet.
a.255.255.255.240
b.255.255.255.224
c.255.255.255.192
a) PC1 starts sending data to PC2. PC1 does not know Router1 and Router1 does not know PC2. The cells in the second and third row of the table below represent Protocol Data Unit headers. Using the information shown on the network, complete the tables for each step:
• the sending process from PC1 to PC2 • the response process from PC2 to PC1
10.0.1.254
00 :11 :22 :34 :56 :14
MAC destination MAC source IP destination
00:11:22:34:56:22 00:11:22:34:56:11 10.0.2.1
b) The headers mentioned in question a) refer to which PDUs?
c) Once the data has been exchanged between PC1 and PC2, do PC1 and PC2 know each
no,they kown each other by route
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 8
10.0.2.254
00 :11 :22 :34 :56 :24
00 :11 :22 :34 :56 :11
00 :11 :22 :34 :56 :22
Exercise 11.
a) PC1 starts sending data to PC2. PC1 does not know Router1, Router1 know Router 2 but Router2 does not know PC2. The cells in the second and third row of the table below represent Protocol Data Unit headers. Using the information shown on the network, complete the tables for each step:
• the sending process from PC1 to PC2 • the response process from PC2 to PC1
10.0.1.254
00 :11 :22 :34 :56 :14
10.0.3.254
00 :11 :22 :34 :56 :34
00 :11 :22 :34 :56 :11
10.0.3.253
00 :11 :22 :34 :56 :33
10.0.2.254
00 :11 :22 :34 :56 :24
00 :11 :22 :34 :56 :22
MAC destination MAC source IP destination
00:11:22:34:56:14 00:11:22:34:56:11 10.0.1.254 00:11:22:34:56:22 00:11:22:34:56:34 10.0.2.1
Exercise 12.
10.0.3.254
For each question, you must complete the following table and configure the network with Packet Tracer (use the 2911 router):
Name IP address Subnet mask (byte)
Network Gateway /
Subnet Mask address Next hop (CIDR)
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 9
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 10
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 11
Exercise 13.
a) Determine common network address for Router 2 and Router 3
b) Complete IP addresses for Router 0 and Router 1
c) Configure the network with Packet Tracer (use the 2911 router) by applying the principles of route aggregation
Exercise 14.
a) Propose a network addressing plan by completing the following table
Name IP address Subnet mask (byte)
Network Subnet Mask address
Gateway / Next hop
b) Configure the network with Packet Tracer (network interfaces and routing tables)
c) What routes can be aggregated?
d) Configure the network with Packet Tracer (network interfaces and routing tables) applying the principles of route aggregation.
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 12
Exercise 15.
a) Identify the IP address of your computer
b) Nmap is a port scanner. It allows to identify on a machine connected to a network
the open ports, the installed services, … Nmap is as well used by security experts to audit the security of a system as by hackers to identify possible open doors. Download and install version 7.92 of nmap.
c) Using the nmap tool, list all the open ports on your machine.
d) Netcat is a tool for generating TCP or UDP connections. It is included in the nmap
Read the documentation and find the options to create a server running locally in TCP mode using the ncat command (netcat tool) without specifying a port.
e) What is the port used by this server in TCP mode?
f) Wireshark is a tool that captures and analyses network traffic on an interface.
Download and install Wireshark.
g) To create a local TCP client connection to the server in TCP mode, also use the ncat
command with the appropriate parameters and options.
h) Stop the TCP connection.
Start capturing network traffic on the appropriate network interface. Repeat question h).
Stop capturing network traffic.
i) By analysing the captured data, reproduce the TCP handshake diagram between the TCP client and the TCP server.
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 13
j) What is the TTL value for the first data transmission? Why?
k) What is the TTL value for the last data transmission? Why?
Exercise 15.
a) PC1 initiates a TCP connection with PC2.
Represent with a diagram the handshake of the connection process.
b) Represent with a diagram the scenario below:
• PC1 sends a first segment.
• PC1 sends a second segment.
• PC1 sends a third segment.
• The connection is broken between PC1 and PC2
• The connection is re-established between PC1 and PC2
• PC1 sends a fourth segment.
• PC1 ends the connection with PC2
Computer Communication Networks | Institut franco-chinois DGUT-CNAM | Yacine Benchaïb | 14
Programming Help