Networking Play-pen

Home

Figure 1 : play-pen rack

The play-pen rack came about from the recent building reorganisation i.e. the Maths department moving in. This forced the department to have a hard look at space, or the lack of it, soooo as a result we had a clear out. In the process of tidying i found an old 19-inch server rack and a collection of old switches. These are really old, 100Mbit old :). However, in many respects age and speed does not matter if you are a student trying to learn how to build and configure a network. What you need is time and equipment you can have a play with e.g. layer-3 switches, routers and PCs. This gives students the chance to develop that CV with this knowledge etc, hence the play-pen.

Note 2026: if you are taking SYS2 make sure you have watched the lectures 4a, 4b and 5. Also, do practicals 7 and 8. You need a good working knowledge of how the IP protocol works before configuring these router/switches. An understanding the ethernet protocol is also useful i.e. MAC addresses etc.

In SYS2 (NET) students use a dumb layer-2 switch. A layer-3 switch is a switch with a little bit of router mixed into its DNA. Like any switch their primary function is to connect hosts together i.e. to create your Local Area Network (LAN). However, in larger networks its useful if some of our switches can do a bit of routing, that can support more advanced functionality VLANs etc. Larger networks can be considered to be made up of three layers as shown in figure 2. These networks will typical contain:


Figure 2 : network hierarchy

Sooo, i managed to find seven HP switches: 1 x ProCurve 2610-24, 4 x ProCurve 2524, 1 x ProCurve 4104gl and 1 x ProCurve 4108gl. Then someone donated some Cisco switches and routers: 1 x Cisco 1721 router, 1 x Catalyst 2950 switch and 2 x Catalyst 2960 switches. Note, there are also other donated routers and switches (available in side cupboards), but these were the only ones i could fit into the rack, as shown in figure 3.



Figure 3 : network switches + router

In addition to these switches there are also two PCs to act hosts on this network: playpen-1 and playpen-2. Alternatively, this rack can be connected to the SYS2 network and accessed from the lab's PCs, but be careful multiple admins, updating this equipment at the same time is perhaps not the best idea. However, if the worst does happen and things stop working, don't worry you are only a power cycle or a factory reset away from a fix :). The name of each switch and PC is shown in figure 4. Confess, do need to find the manual to figure out what the buttons do on the KVM i.e. what buttons select between PC playpen-1 (Q3 buttons) and PC playpen-2 (Q2 buttons), at the moment i'm randomly pressing buttons until it works :). The keyboard is an old PS2 keyboard with integrated roller-ball as the "mouse", works ok, as typically you will only be using the PC to run terminals.





Figure 4 : PCs, KVM and keyboard

Each switch and router also has a name as shown in figure 5. Unlike the "dumb" layer-2 switches used in the Pi-systems, these switches are managed switches i.e. layer-3 switches, each having an IP address so that the network admin can remotely manage these devices, or monitor network traffic etc. The Cisco router has multiple IP addresses as it is used to route packets between VLANs, as we shall see in a later example. The PC also have multiple IP addresses as they have multiple NICs. Playpen-1 has one on-motherboard NIC and five USB-2-Ethernet adapters. Playpen-2 has two on-motherboard NICs.

Note, still messing around setup PC playpen machines.

PC-Playpen-1 : 192.168.200.1   eno1
               10.0.20.2       enp3S0
               10.0.30.2       enp5S0

PC-Playpen-2 : 192.168.200.2   eno1
               10.0.0.1        enp3S0
               10.0.10.254     enp3S0
               10.0.20.254     enx806d973cdd88
               10.0.30.254     enx806d973cdeb9
               10.0.40.254     enx806d973ce0c4
               10.0.50.254     enx806d973ce098

HP-Switch-1 : 192.168.200.3
HP-Switch-2 : 192.168.200.4
HP-Switch-3 : 192.168.200.5
HP-Switch-4 : 192.168.200.6
HP-Switch-5 : 192.168.200.7
HP-Switch-6 : 192.168.200.8
HP-Switch-7 : 192.168.200.9

Cisco-Router-1 : 10.0.10.1   10.0.20.1   10.0.30.1   10.0.40.1   10.0.50.1
Cisco-Switch-1 : 10.0.0.4
Cisco-Switch-2 : 10.0.0.5
Cisco-Switch-3 : 10.0.0.6



Figure 5 : Switches and router

To save some energy/money, to be a little more Green and save some turtles, these switches are turned off when not in use. When you want to have a play with these PCs/routers/switches you will mostly likely need to switch them on. This is done using the big red switches at the back of the rack, as shown in figure 6. When finished just turn off the router and switches, no need to shut them down, but prob best to shutdown the PCs before you turn these off, as they have old mechanical HDD.

Figure 6 : Power switches

For more information on these switches and router see below:

Unlike the networks we have seen in the lab, a real-world network needs to consider reliability and availability issues. Therefore, in these types of network you will typically see redundant network devices and connections. Now, if any one network device, or cable should fail, a user can still connect to a network resource via a redundant path. In addition to this a real-world network may need to duplicated network connections to meet bandwidth requirements. Link aggregation protocols can be used to split network traffic across multiple connections e.g. ten 1Gbps links can be combined to form a virtual 10Gbps link. Note, this type of functionality is not supported on our simple layer-2 switch used in your Pi base system, we need a layer-3 switch :).

To mange the rack router/switches you can use the PCs in the play-pen: playpen-1 and playpen-2, shown in figure 4. Username: student, Password: 12345678, as always in SYS2 there are only two passwords :). Alternatively, connect your Pi base system to the lab network using the GREEN network cable, SSH into a Pi, then follow the steps below / shown in figure 7.

Note 2026, you can also telnet into PC playpen-2, IP address 192.168.200.2. This will then allow you to access the 10.X.X.X networks used by the Cisco router/switches. The password for the Cisco router/switches is 12345678, the management password for the HP-switches is also 12345678, user password is 12345.







Figure 7 : switch, user command line interface

When logged in you will see an operator prompt: "HP-Switch-1 >", this will vary depending on the switch accessed, but the key point to note is the ">" symbol, this indicates you are running an operator terminal i.e. you can can not modify the switches configuration in this mode. Press the "?" key, this will list the commands you can run, other useful keys listed below. Remember is that this is not a terminal, you can not run Linux type commands.

?                Lists command you can run.
<command> ?      Lists the parameters you can enter for the selected command.
<TAB>            Pressing TAB does the same i.e. lists options / auto-complete.
/                Return to the root i.e. top, directory.
/<directory>     Change directory i.e. each directory contains different commands / files
show <file>      Display contents of file in a directory e.g. show mac-address.
                 Note, on some routers/switches use print

You can switch from the command line interface to a menu based interface by using the "menu" command, which is a lot easier to use, as shown in figure 8.



Figure 8 : switch, menu interface

Using the normal operator terminal you can now view useful info regarding the switches status and the amount to network traffic going through each network port, as shown in figure 9.







Figure 9 : switch, menus/options

To change the switches configuration you need to switch into admin/manager mode. You can either do this by initially logging into the switch using the manager password: 12345678, or from the operator terminal running the command: enable, and entering the password: 12345678, as shown in figure 10. You can exit manger mode by running the command: exit. Note, when in manager mode the terminal prompt is changed from a ">" to "#".

Figure 10 : admin/manager mode

Again, you can switch from the command line interface, to a menu interface by running the command: menu, as shown in figure 11. As admin you have a lot more options/power :).

Figure 11 : admin/manager menu

You can access all the switches functionality via this command line interface, however, I do confess I always forget the syntax, therefore, on the HP switches I tend to cheat and use the menu option. Using the menu interface i configured each switch with its assigned name and IP address (as previously listed). The default setup of these switches is shown in figure 12.

Figure 12 : HP switch default setup

To get you started on your journey to becoming a network engineer try the following task:

Task : telnet into HP-Switch-1, enter management mode and run the menu command. Can you identify what ports use copper or fibre cables i.e. can you identify the Ethernet standard used by each port? Repeat for HP-Switch-2. Some useful links:

Figure 13 : fibre connectors, SC (left) and LC (right)

VLANS

If you want to move into networking as a career, then a key topic area not covered in the SYS2 module is Virtual Local Area Networks (VLAN). This is a core concept that most real-world networks are built upon. A VLAN divides a single physical network into multiple isolated logical networks, allowing a network designer to isolate hosts on different networks, BUT, still use the same physical cables/switches i.e. shared hardware, but no reduction in security.

Figure 14 : ethernet header (top), dot1q ethernet header (bottom)

To support these types of networks your routers/switches need to support VLAN tagging, IEEE 802.1Q, or dot1Q for short. This adds an extra field to your ethernet headers, a 4-byte tag containing a VLAN ID, as shown in figure 14, allowing up to 4,094 VLANs. Note, VLAN0 and VLAN4095 are reserved. Now only hosts with the same VLAN ID can communicate i.e. they may be on the same switch, but they are isolated on different broadcast domains. To do this, the switch ports are setup as: Access, or Trunk ports. Access ports carry traffic for a specific VLAN, whilst trunk ports carry tagged frames for multiple VLANs i.e. between switches or routers. Therefore, the switch port you plug a host into determines what VLAN that host will be on. Only hosts on the same VLAN can talk to each other i.e. VLANs isolate Layer 2 broadcast domains. If you wish to communicate across different VLANs you need a router, or a Layer 3 switch i.e. exactly the same ideas used to route packets between different subnets, but rather than being physical wires they are virtual.

Note, confess i have never done any VLAN stuff, my home network is built on the philosophy if a little hardware is good, then more is better e.g. one 5GHz access point (AP), three 2.4GHz APs, five routers (isp-provided, mikrotik, or Raspberry-Pi), four dumb 100Mb layer2-switches and two 1Gb layer3-switches. Is this the best network design, probably not, could it be improved/simplified using VLAN, probably yes, will i be redesigning it, no, it works :).

To show VLANs in action i have created an example network using the Cisco router and switches in the playpen. Confess it is a bit of a "bad" example, but i was limited by the hardware a little. Note, as this is my first VLAN based network, there are probably things that could be better, however, i think it shows VLANs in action. Sooo, for the moment the network i would like to build is shown in figure 15.

Figure 15 : example network

In this example we have five separate networks: Management, Users, Servers, Printers and Guests. All of these hosts could be placed on the same network, but you would loose all control e.g. you could not stop guests (untrusted hosts) from accessing your servers containing your confidential secrets etc. Placing each network resource on a separate network allows the router to decide how can access what e.g. using routing/firewall rules etc. We could now build this network as shown, but you would need at least four physical switches to implement the networks for: Users, Servers, Printers and Guests. Also, unless all of these hosts are in the same room, you will need separate cabling for each network, or additional switches in each room. This all adds to the cost and complexity of the network. Sooo, this is were VLANs come in, we can now use the same cables/switches to safely carry network packets for different networks i.e. we no longer need separate hardware, isolation is achieved through VLANs.

Figure 16 : example network using VLANs

Note, links between the core switch and the two access switches use the link aggregation protocol, which bundles multiple parallel network connections into a single logical link called a Link Aggregation Group (LAG), increasing link bandwidth and reliability i.e. the logical links are made from four 100Mbit links, creating a 400Mbit link and allowing up to three links (cables) to fail without losing connection.

The PC playpen-2 has Ubuntu desktop installed on it and has two onboard ethernet adapters en0 and enp3s0, plus four USB-to-ethernet adaptors. These networks/routes are shown in figure 17, their setup is defined in /etc/netplam/01-netconfig.yaml, shown below:

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      addresses:
        - 192.168.200.2/16
    enp3s0:
      dhcp4: no
      addresses:
        - 10.0.0.1/24
        - 10.0.10.254/24  
      routes:
        - to: default
          via: 10.0.10.1
    enx806d973cdd88:
      dhcp4: no
      addresses:
        - 10.0.20.254/24
    enx806d973cdeb9:
      dhcp4: no
      addresses:
        - 10.0.30.254/24
    enx806d973ce0c4:
      dhcp4: no
      addresses:
        - 10.0.40.254/24
    enx806d973ce098:
      dhcp4: no
      addresses:
        - 10.0.50.254/24

Figure 17 : playpen-2 networks/routes

The enp3s0 NIC has two IP addresses, no strong reason for setting things up this way except for a shortage of USB-2-ethernet adapters, but wanted to manage switches on VLAN1 and the router on VLAN10, just to be different. Could have managed all of these devices on VLAN1 to make things simpler. The Cisco 1721 router handles the inter-VLAN routing, acting as the default gateway for all the VLAN networks. PC playpen-2 does not have an internet connection, sooo, had to manually download the debs to install some extra services. From a Linux box with an internet connection ran:

sudo apt-get update
sudo apt-get install --download-only -y chrony openssh-server tzdata-legacy vsftpd telnetd telnet
cp /var/cache/apt/archives/*.deb .

sudo apt-get install --download-only -y telnetd telnet
cp /var/cache/apt/archives/*.deb .

Then using a USB stick copy these files onto playpen-2, storing in folder ubuntu24-debs. Using chrony as the NTP server, to set the time on the router/switches, openssh for remote access and vsftp so that the router/switches can backup their configs. However, before you can install chrony you need to remove the default systemd-timesynd service, as shown below:

sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
sudo apt-get remove systemd-timesyncd

Then install the packages and configure the configuration files.

sudo dpkg -i *.deb

update: /etc/inetd.conf
uncomment the telnet line
sudo systemctl restart inetutils-inetd   (needed a reboot)

update: /etc/chrony/chrony.conf
allow 10.0.0.0/8
allow 192.168.0.0/16
local stratum 10
server 192.168.100.1 iburst prefer

update: /etc/vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO

sudo systemctl enable --now ssh
sudo systemctl enable --now chrony
sudo systemctl enable --now vsftpd

# Verify OK commands
chronyc tracking
chronyc sources -v
chronyc clients

Finally, to allow the PC to forward packets between the different networks:

update: /etc/sysctl.d/99-ip-forward.conf
net.ipv4.ip_forward = 1

To configure the Cisco 1721 router i used the commands below. These setup NTP, HTTP and TELNET on the router, next the ethernet interface is enabled and the different VLANs.

enable
configure terminal

hostname Cisco-Router-1

! setup NTP client
ntp server 10.0.10.254 prefer
clock timezone GMT 0

! setup usernames and passwords
enable secret 12345678
username admin privilege 15 secret 12345678
ip http server
ip http authentication local

ip ftp username student
ip ftp password 12345678

! enable telnet
line vty 0 15
password 12345678
login
transport input telnet
exit

! Enable the physical interface first
interface FastEthernet0
no shutdown
exit

! VLAN 10 (Management)
interface FastEthernet0.10
encapsulation dot1Q 10
ip address 10.0.10.1 255.255.255.0
exit

! VLAN 20 (Users)
interface FastEthernet0.20
encapsulation dot1Q 20
ip address 10.0.20.1 255.255.255.0
exit

! VLAN 30 (Servers)
interface FastEthernet0.30
encapsulation dot1Q 30
ip address 10.0.30.1 255.255.255.0
exit

! VLAN 40 (Printers)
interface FastEthernet0.40
encapsulation dot1Q 40
ip address 10.0.40.1 255.255.255.0
exit

! VLAN 50 (Guests)
interface FastEthernet0.50
encapsulation dot1Q 50
ip address 10.0.50.1 255.255.255.0
exit

write memory

Cisco-Switch-1 (Cisco 2950) is the core switch, the distribution switch that joins together the two access switches: Cisco-Switch-2 and Cisco-Switch-3. The core switch ports are:

To configure the Cisco 2950 switch i used the commands below. The switches management IP is: 10.0.0.4.

enable
configure terminal

hostname Cisco-Switch-1

! setup NTP client
ntp server 10.0.10.254 prefer
clock timezone GMT 0
exit

! setup usernames and passwords
enable secret 12345678
username admin privilege 15 secret 12345678
ip http server
ip http authentication local

ip ftp username student
ip ftp password 12345678

! enable telnet
line vty 0 15
password 12345678
login
transport input telnet
exit

! Setup VLAN1 IP
interface vlan 1
ip address 10.0.0.4 255.255.255.0
no shutdown
exit
ip default-gateway 10.0.0.1

! Create the 5 VLANs
vlan 10
name Management
vlan 20
name Users
vlan 30
name Servers
vlan 40
name Printers
vlan 50
name Guest
exit

! Configure Trunk port connecting to the PC
interface FastEthernet0/24
switchport mode trunk
no shutdown
exit

! Configure Trunk port connecting to the Router
interface FastEthernet0/23
switchport mode trunk
no shutdown
exit

! link to Switch 2
interface range FastEthernet0/1 - 4
channel-group 1 mode active
switchport mode trunk
no shutdown
exit

! link to Switch 3
interface range FastEthernet0/5 - 8
channel-group 2 mode active
switchport mode trunk
no shutdown
exit

! Management port : 
interface FastEthernet0/9
switchport mode access
switchport access vlan 10
no shutdown
exit

! User port : 
interface FastEthernet0/10
switchport mode access
switchport access vlan 20
no shutdown
exit

! Server port : 
interface FastEthernet0/11
switchport mode access
switchport access vlan 30
no shutdown
exit

! Printer ports : 
interface FastEthernet0/12
switchport mode access
switchport access vlan 40
no shutdown
exit

! Guest ports : 
interface FastEthernet0/13
switchport mode access
switchport access vlan 50
no shutdown
exit

end
write memory

The first access switch: Cisco-Switch-2 (Cisco 2960) ports are:

To configure the Cisco 2960 switch i used the commands below. The switches management IP is: 10.0.0.5.

enable
configure terminal

hostname Cisco-Switch-2  

! setup NTP client
ntp server 10.0.10.254 prefer
clock timezone GMT 0
exit

! setup usernames and passwords
enable secret 12345678
username admin privilege 15 secret 12345678
ip http server
ip http authentication local

ip ftp username student
ip ftp password 12345678

! enable telnet
line vty 0 15
password 12345678
login
transport input telnet
exit

! Setup VLAN1 IP
interface vlan 1
ip address 10.0.0.5 255.255.255.0
no shutdown
exit
ip default-gateway 10.0.0.1

! Create the same 5 VLANs on all switches
vlan 10
 name Management
vlan 20
 name Users
vlan 30
 name Servers
vlan 40
 name Printers
vlan 50
 name Guest
exit

! link to Switch 1
interface range FastEthernet0/1 - 4
channel-group 1 mode active
switchport mode trunk
no shutdown
exit

! Management ports : 
interface range FastEthernet0/5 - 12
switchport mode access
switchport access vlan 10
no shutdown
exit

! User ports : 
interface range FastEthernet0/13 - 20
switchport mode access
switchport access vlan 20
no shutdown
exit

! Server ports : 
interface range FastEthernet0/21 - 28
switchport mode access
switchport access vlan 30
no shutdown
exit

! Printer ports : 
interface range FastEthernet0/29 - 36
switchport mode access
switchport access vlan 40
no shutdown
exit

! Guest ports : 
interface range FastEthernet0/37 - 44
switchport mode access
switchport access vlan 50
no shutdown
exit

! Ports 44 to 48 VLAN1

end
write memory

The second access switch: Cisco-Switch-3 (Cisco 2960) ports are:

To configure the Cisco 2960 switch i used the commands below (basically the same as the Cisco-Switch-2). The switches management IP is: 10.0.0.6.

enable
configure terminal

hostname Cisco-Switch-3  

! setup NTP client
ntp server 10.0.10.254 prefer
clock timezone GMT 0
exit

! setup usernames and passwords
enable secret 12345678
username admin privilege 15 secret 12345678
ip http server
ip http authentication local

ip ftp username student
ip ftp password 12345678

! enable telnet
line vty 0 15
password 12345678
login
transport input telnet
exit

! Setup VLAN1 IP
interface vlan 1
ip address 10.0.0.6 255.255.255.0
no shutdown
exit
ip default-gateway 10.0.0.1

! Create the same 5 VLANs on all switches
vlan 10
 name Management
vlan 20
 name Users
vlan 30
 name Servers
vlan 40
 name Printers
vlan 50
 name Guest
exit

! link to Switch 1
interface range FastEthernet0/1 - 4
channel-group 2 mode active
switchport mode trunk
no shutdown
exit

! Management ports : 
interface range FastEthernet0/5 - 12
switchport mode access
switchport access vlan 10
no shutdown
exit

! User ports : 
interface range FastEthernet0/13 - 20
switchport mode access
switchport access vlan 20
no shutdown
exit

! Server ports : 
interface range FastEthernet0/21 - 28
switchport mode access
switchport access vlan 30
no shutdown
exit

! Printer ports : 
interface range FastEthernet0/29 - 36
switchport mode access
switchport access vlan 40
no shutdown
exit

! Guest ports : 
interface range FastEthernet0/37 - 44
switchport mode access
switchport access vlan 50
no shutdown
exit

! Ports 45 to 48 VLAN1

end
write memory

The golden rule of networking: label your cables. Networking always results in a big pile of cables, so if you can't see both ends of the cable, label them :). In the rack i have labelled the key cables as shown in figure 18.

Figure 18 : key network cables

Task : using telnet examine the setup of the Cisco switches/router, password is 12345678. Try out some of the useful Cisco commands listed below, remember to enter management mode by using the command: enable, when prompted enter the password 12345678, you should then see the prompt changes to a "#".

show interfaces status
show interfaces trunk
show vlan brief
show ntp status
show ntp associations
show clock
show running-config

Hosts on the network e.g. users, printers, servers etc, connect to the network using the access layer switches, using the Cisco 2960 switches. The key point to remember is that each port is assigned to a VLAN, therefore in this example the 48 ports are virtually divided into six logical switches + a LAG trunk, isolating network traffic on each VLAN. Port VLAN assignment is shown in figure 19.

Figure 19 : Cisco 2960 front panel

Task : plug the following cables into the specified switch/port:

Figure 20 : Example network 2

Can you see how this creates the virtual network shown in figure 20? If you are happy you understand why, log into PC playpen2 and open a terminal, then test if the following "pings" work. Can you see why some work and some do not :).

Note, the Cisco switches perform checks before allowing new connection onto a network, spanning tree protocol, to ensure that you do not create a broadcast storm. This can take 30 seconds, sooo you will need to wait for the status light above the socket you plugged a cable into to change from Orange to Green.

WORK IN PROGRESS : NEED TO FINISH

Creative Commons Licence

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Contact email: mike@simplecpudesign.com

Back