W2·A1 — Dedicated links
Time: 20 min
Needs: three OL9 PC nodes
GNS3 project: w02-a1-dedicated-links
Info
Times listed are approximate and provided as timing guidelines only. Take as much time as you need to complete the activity.
Question
One cable is enough to connect two nodes.
How many dedicated cables do you need to connect three nodes?
Build it
- Drag three OL9 PC nodes on to the canvas. Name them
H1,H2, andH3 - Run a cable between each pair
- Did that work?
What just happened
- Currently each node is configured with a single network interface, which means it can only take one cable
- A network interface card is the most fundamental network device. It is what makes a node a node, i.e., the component that enables a host to talk on a network.
- Each network interface supports one and only one physical connection.
Do this - fix it
- Right-click each host, go to Configure -> Network -> Adapters and set the number of adapters to 2.
- Run a cable between each pair of nodes.
H1Ethernet0 -H2Ethernet0,H1Ethernet1 -H3Ethernet0,H2Ethernet1 -H3Ethernet1 - Start all three and click on the icon in the main toolbar to access the nodes' consoles.
On H1, log in as root, then:
nmcli con mod 'System eth0' con-name eth0 \
ipv4.method manual ipv4.addresses 192.168.10.1/24
nmcli con up eth0
nmcli con mod 'Wired connection 1' con-name eth1 \
ipv4.method manual ipv4.addresses 192.168.20.1/24
nmcli con up eth1
Do the same for H2 and H3:
H2: eth0 = 192.168.10.2/24, eth1 = 192.168.30.2/24H3: eth0 = 192.168.20.3/24, eth1 = 192.168.30.3/24
On H1:
ping -c1 192.168.10.2
ping -c1 192.168.20.3
On H2:
ping -c1 192.168.10.1
ping -c1 192.168.30.3
On H3:
ping -c1 192.168.20.1
ping -c1 192.168.30.2
What just happened
- You needed three links to connect three nodes
- How many links would you need to connect 4, 5, 6, 10 nodes?
- Each connection necessitated its own pair of interfaces and a distinct IP range (192.168.10.x, 192.168.20.x, 192.168.30.x)
Do this - try to eavesdrop
Start a capture on H2- H3 link.
On H1:
ping -c1 192.168.10.2
ping -c1 192.168.20.3
What just happened
- Even though
H1talked to bothH2andH3, Wireshark heard nothing - Each conversation is private, i.e., seen only by the interfaces involved in the conversation.
- This is essentially what a mesh topology is.
- A full mesh topology requires \(n(n - 1) / 2\) links to connect
nnodes
Record
| Value | |
|---|---|
| # of dedicated links for 3 nodes | |
| # of interfaces required on each node | |
| # of IP addresses required on each node | |
| # of links required to connect 4, 5, and 10 nodes | |
Can H2 hear the conversation between H1 and H3 |
If it went wrong
| Symptom | Cause | Fix |
|---|---|---|
| Cannot attach cable to node | too few interfaces | Configure -> Network -> Adapters |
ping fails |
address mismatch | ensure each pair of interfaces on the connection have matching subnets |
nmcli fails |
not enough permissions | log in as root or use sudo |