0% found this document useful (0 votes)
3 views12 pages

4 Routers Eng

The lab focuses on configuring IP networks through a hands-on exercise involving two scenarios over four sessions. Students will complete milestones that include connecting PCs via routers, configuring static and dynamic routes, and utilizing specific software tools. The lab emphasizes individual assessment, safety regulations, and proper use of resources for network design and implementation.
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)
3 views12 pages

4 Routers Eng

The lab focuses on configuring IP networks through a hands-on exercise involving two scenarios over four sessions. Students will complete milestones that include connecting PCs via routers, configuring static and dynamic routes, and utilizing specific software tools. The lab emphasizes individual assessment, safety regulations, and proper use of resources for network design and implementation.
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

Universidad Carlos III de Madrid

Telematic Engineering Department

Computer Networks
Routers lab:
IP network configuration

Bachelor in Computer Science

Foto de Marvin Meyer en Unsplash


1. Objective

The main objective of this lab is to consolidate the basic concepts acquired in class on the
configuration of an IP communications network by means of a network design,
implementation, and deployment exercise that students will carry out with their laptops in
class over the course of four sessions.

The exercise is divided into two scenarios that will be accomplished while progressing through
three independently graded milestones (one milestone in the first scenario and two milestones
in the second). The milestones are delivered as they are reached, without the need to deliver
any particular milestone on any particular day of the lab sessions, but students can deliver any
milestone on any of the four days available.

In the first scenario, students will work with a simple network in which they will have to connect
two PCs through two routers. To do so, they will have to familiarise themselves with the
GNU/Linux working environment of the PCs and with the Linksys WRT54GS routers (all these
devices are virtualised in the working environment) and configure both the IP addresses and
the corresponding static routes (Milestone 1).

In the second scenario, the network configuration designed in the addressing exercise (Ld) will
be used. Initially, the equipment will be configured in an IP network with redundant static routes
(Milestone 2) and then, the RIP routing protocol will be enabled to configure the routes
dynamically (Milestone 3).

Computer Networks – Routers lab


1
1.1. Software
The software to be used in the lab (Lightning) is provided in a virtual machine that students can
download ([Link] and launch locally using VirtualBox
(installation instructions are included at the end of this document). Alternatively, the Virtual
Classroom of the Department of Telematics Engineering ([Link] can
be used through a browser, for which it will be necessary to open an account in that laboratory
in advance (details to open the account are included in Aula Global). In case you use Aula Virtual
it will not be possible to save the current progress.

If VirtualBox is not supported in your computer, you may be able to install and run in on other
hypervisor software. Consult Aula Global for alternatives

Computer Networks – Routers lab


2
2. Lab rules
− Carefully read the laboratory text completely before starting.
− The laboratory is assessed individually or in couples with the verification of the three
milestones that are conveniently indicated in the statement. In case the lab is done in
couples it is mandatory for all the members to be present during the assessment.

Milestone XX (x points)

The parts of the statement in this format indicate the milestones of the practice. Please advise
the teacher in class to validate them as they are completed.

− It is necessary to download and install the virtual machine of the lab BEFORE THE
LABORATORY SESSIONS. No support will be given about installation during these sessions.
o If you have not installed the practice software, you can use the Virtual Classroom of
the Department of Telematics Engineering (see details in Aula Global) as long as you
have previously opened an account in the laboratory (see details in Aula Global).
o If you have not installed the software and have not opened a lab account in the
Department, you will not be able to do the lab.
− It is recommended that you review labs safety instructions before the session:
[Link]
− It is reminded that according to the BOEL of the University Carlos III of Madrid of 21 July
2017 on "Social Responsibility and Equality on the Legal Regime and Disciplinary Procedure
applicable to students of the University Carlos III of Madrid in the processes of academic
evaluation" ([Link] the following are considered minor
offences, among others::
o Copying from another student's assessment test with or without the consent of the
latter.
o Facilitating the copying of exam papers by another student.
o Plagiarising work submitted for continuous assessment.
− As stipulated in these regulations, the sanction may be:
o Loss of the subject that is the object of the incident during the course in which the
offence was committed. The subject will be graded as FAIL in the ordinary and
extraordinary exams with loss of enrolment rights and without the right to
dispensation or cancellation.

Computer Networks – Routers lab


3
3. References and documentation for the lab

Linksys WRT54GS user manual

− [Link] (alternatively you can use the


link available in Aula Global in the practice section).
− In the terminal of each router you can type ? to access the list of commands available at any
time.

PCs Linux configuration help

− GNU/Linux manual pages are accessible from the terminal of PCs by running man
<command> (for example man ip)
− Red Hat IP command cheat sheet:
[Link] rh_ip_command_cheatsheet.pdf

Lightning official manual (only Spanish)

− [Link]

Recover a terminal closed by mistake

− From the main terminal (the one used to start lightning) run:
o lightning newtty <nombre del equipo cuyo terminal se ha cerrado, e.g. PCA, PCB,
RA, RB…>

Computer Networks – Routers lab


4
4. PART 1 – Basic interconnection
This part of the lab consists of the deployment and configuration of a small network scenario.
The architecture of the network scenario to be built and configured is shown in Figure 1.

Figure 1 – Interconnection diagram (part 1)

4.1. Part 1 - Instructions


1. Initial steps.

Start the virtual machine either by loading it from VirtualBox if you have installed it locally
(the most advisable) or from the Virtual Classroom of the Department (in the latter case, after
entering a virtual desktop, open a terminal and run rysca_virt.sh start). The first time you start
Lightning, it is advisable to run lightning update twice consecutively in a terminal. Then load
the scenario by running lightning start RSC/S16_scenario_1.

a. Wait for the scenario to be configured.


b. You will see the figure of the topology that has been configured and also different
terminals that open automatically to configure each of the machines in the scenario
(hosts and routers).
c. Now you can work with the topology as if you were in the lab with the physical machines
(PCs and Linksys WRT54GS routers), using the same configuration commands that are
used on the real machines.
d. If you want to stop the created scenario run the following command in the terminal:
lightning stop
NOTE: this command stops the execution and you will lose all your configurations.
e. If you don't want to lose the work done when you finish, don't turn off the virtual machine,
but when you close the virtual machine window click on the option: "Save the machine
state". This is only valid if you have installed the virtual machine locally.

Computer Networks – Routers lab


5
2. Initial configurations

a. Remove the IP addresses of interfaces eth0.0 to eth0.4 and wlan0 from routers RA and
RB. Do NOT modify the ‘lo’ interface configuration.
b. Check if PCA and PCB already have default IP addresses and, if so, remove them. Assign
an IP address to the eth1 interface of the PCA connected to Network A (this address
must belong to the range 172.16.A.0/25, where A indicates the last two digits of its NIA).
To configure the IP address of a network interface in Linux, use the ip command. This
command has an online help that you can access from a terminal by typing man ip).
c. Assign an IP address to the Router A interface connected to Network A (this IP address
must belong to the range assigned to Network A, i.e., 172.16.A.0/25). Refer to the
router's manual to find out how to configure addresses in the router.
d. Verify that connectivity exists between PCA and RA using the ping command (from the
PC and/or the router).
Note: When executing the ping command from a PC, you can decide how many packets
to send with the -c switch. ping -c4 <ip_address> will send four packets to <ip address>.

3. "Interconnect" routers A and B, via their Ethernet connections.

a. Assign IP addresses to the router interfaces used to interconnect the routers. These IP
addresses must belong to the subnet shown in the figure ([Link]/30).
b. Verify that there is connectivity between the two routers, using the router's ping
command.
c. Assign an IP address to the interface of Router B belonging to Network B (this address
must belong to the range assigned to Network B, i.e. 172.16.B.0/25, where B will simply
be A+1).
d. Configure on both routers the necessary entries in their routing tables so that Router A
can reach Network B and vice versa. Refer to the router's manual to find out how to
statically configure IP routes on the router.
e. Configure in the PC belonging to Network A the necessary entries in its routing table in
order to be able to reach Network B. Use the ip route command to do this.
f. Make the necessary configurations on the PCB (IP address and routes) so that it is
connected to the network.
g. Execute a ping from the PCA to the PCB.
h. Check the route followed by the IP packets, using the traceroute command (use the '-n'
switch so that no attempt is made to translate IP addresses to host names and the
command is therefore executed more quickly).
traceroute -n <ip address>

Milestone 1 (5 points)

Check the connectivity between networks A and B in the scenario by pinging between
PCA and PCB. Verify with the traceroute command the interfaces traversed by the packets
going from PCA to PCB.

Once this has been achieved, contact the teachers in class to validate the milestone.

Computer Networks – Routers lab


6
5. Part 2 – IP network configuration
In this part, the IP network corresponding to the one specified in the addressing exercise must
be constructed and configured.

The logical architecture of this scenario can be seen in Figure 2. This scenario corresponds to
the network topology of a specific branch office. Assign addresses to the network based on the
results of the addressing exercise.

Figure 2 – Interconnection diagram (part 2)

Computer Networks – Routers lab


7
The design requirements for the scenario shown in Figure 2 are summarised below:

− For the branch office, it has the address range 10.0.X.0/24, where 'X' indicates the last two
digits of its NIA.
− The backbone network interconnecting the branches is assigned the range [Link].0/24.
− Linksys WRT54GS routers with 5 LAN (Ethernet) interfaces will be used.
− Each branch office has several rooms, namely Office 1, Office 2 and the room where the
various servers used by the branch office are housed. Due to the nature of the different tasks
carried out in each of these rooms, it is necessary to have separate networks in each of them.
The link between the various networks is as shown in the diagram in Figure 2. This diagram
provides some redundancy in the event of link failures/breakages. Take this redundancy into
account when designing the necessary routing tables in the routers.
− The Office 1 network should be able to accommodate up to 100 connected end devices
(PCs, printers, etc.).
− The Office 2 network must be able to accommodate up to 25 connected end devices (PCs,
printers, etc.).
− The server network must be able to host up to 10 connected end devices.
− Addresses must also be assigned for the different networks used to interconnect the
different routers.
− The address allocation has to be optimised in such a way that the assigned prefixes are as
specific as possible to accommodate the desired equipment.

With regard to the RIP protocol, used in milestone 3, remember the following criteria:

− RIP should not be used on links where there are no RIP-enabled neighbours.
− Identify the information available to routers at the beginning of time (from the point of view
of RIP protocol operation). This information will be the information exchanged with RIP
speaking neighbours.
− You must be able to reach the router in office 100 from your office. To do this you will need
to properly configure the eth0.1 interface of router R4.

Computer Networks – Routers lab


8
5.1. Part 2 – Instructions
1. Start the virtual machine (either by loading it from VirtualBox if you have installed it locally
or from the Department's Virtual Classroom) and load the scenario by running lightning start
RYSCA/p_encam_a in a terminal.

2. As in the previous part, start by removing the default addresses of the ethx.y and wlan0
interfaces of the routers.

3. Assign IP addresses to the interface of the routers (R1, R2 and R3) and to the hosts (hstOfi1
and hstOfi2). Verify that connectivity exists between the PCs hstOfi1, hstOfi2 and the routers
R1 and R2 using, for example, the ping command.

4. "Interconnect" routers R1, R2 and R3 with each other as shown in the figure. Assign IP
addresses to each of the point-to-point networks created to interconnect the routers.

5. Configure the necessary static routes on R1, R2, R3 and on the PCs connected to the
different networks, to ensure full connectivity between all the subnets formed. Check that
there is connectivity between the different subnets using, for example, the ping command.
Also check that the route followed by the packets is correct, using the traceroute command
(both from the routers and from the PCs).

6. "Connect" R4 and configure the necessary routes on all computers to ensure the
connectivity of the overall scenario (R100 already has an IP address configured, but it will be
necessary to configure the corresponding entry(s) in the routing table).

7. Configure, in routers R1, R2 and R3, the necessary additional backup routes so that if any of
the links between R1, R2 and R3 are broken, global connectivity in the scenario is not lost.
Use the shutdown interface configuration command to disable the interfaces of each of the
two routers connected to the link whose communication you want to break (if you have
doubts about this point, consult your teacher).

Milestone 2 (12,5 points)

Check that you have IP connectivity from any router or PC to the rest of the equipment in
the scenario and that the route followed by the packets is optimal by ping and traceroute.

Perform a traceroute from hstOfi1 to R100 and verify if it follows the route through R1-R2
or R1-R3. Run a ping between hstOfi1 and R100 and do not stop it. While the ping is
running, disconnect the interfaces of the routers of the triangle used by the previous ping
(either R1-R2 or R1-R3).

Verify that global connectivity is maintained despite a communication drop on the R1-R2-
R3 triangle and verify with a traceroute that the alternate route is taken.

Once this has been achieved, contact the faculty in class to validate the milestone.

Computer Networks – Routers lab


9
8. Remove the static routes previously configured on the routers or restart the scenario by first
stopping it by running lightning stop on a terminal to clear all configurations (in the latter
case you will not have to remove the routes but you will have to reconfigure the IP
addresses).

9. You will now proceed to configure the RIP routing protocol. Enable and properly configure
the RIP dynamic routing protocol on the router interfaces where it is needed (note that RIP
should not be used on links where there are no neighbouring routers that have RIP protocol
enabled).

10. Verify, using the router's routing table display commands, that the routing protocol is
working as expected.

11. You can simulate disconnecting the cable interconnecting two routers by running the
following command from the Lightning terminal (or by opening a new terminal on the virtual
machine): sudo ip link set down dev <link>_br (for instance, "sudo ip link set down dev
R1_R2_br").

a. Check that after disconnecting a link, communication is properly restored after a


reconvergence time.

Milestone 3 (7,5 points)

Check that you have IP connectivity from any router or PC to the rest of the equipment in
the scenario. In particular, check that you have connectivity between hstOfi1 and R100 and
that the route followed by the packets is optimal by ping and traceroute.

Verify that the RIP protocol is working properly by using the routing table display
commands available on the equipment.

Run a ping between hstOfi1 and R100 and do not stop it. With the ping running,
disconnect the cable between the routers used by the previous ping so that you can see
the ping packets stop arriving at the destination.

Verify that by waiting the appropriate reconvergence time, the ping automatically resumes
operation and the packets make the correct path.

Re-establish the disconnected link and verify that the ping is now back on the shortest path.

Once this has been achieved, contact the teacher in class to validate the milestone.

Computer Networks – Routers lab


10
ANNEX I – VM installation (check Aula Global for more details)

1. Download VirtualBox in your system ([Link]) and install it.


a. VirtualBox version 7.0.18 or above is recommended.
b. Optionally install the VirtualBox Extension Pack too (also from [Link]).
2. Download the Lighting VM that includes a virtual version of the physical routers lab,
Lightning (OVA file around 4 GB):
a. [Link]
b. Login ‘student’, password ‘5tud3nt’. It has superuser (root) capacity with the
command sudo and the same password.
3. Installing the VM
a. Start VirtualBox
b. Double-click into the VM (.ova file) that you want to install.
c. Tick into ‘restart the MAC address of the network cards’ or 'Generate new MAC
addresses for all network adapters'.
c. Click ‘Import’ to proceed with the installation.
d. You can remove the downloaded image if you want since VirtualBox has already
made a copy of the required information.
e. Depending on your laptop, you may need to increase in VB the number of number
of CPUs used or the video memory.
f. Note:
i. Windows 10 and 11 users can download the VM to be used with Hyper-V if the
VirtualBox version is not working for you:
[Link]
ii. macOS users with an Intel CPU can use the UTM program as an alternate
hypervisor. If, on the other hand, the computer has Apple hardware, the only
way to run the Virtual Lab is with UTM. If you use UTM, follow the instructions
published in Aula Global.
4. Inside the VM
a. To start the VM
a. Click on ‘start’ to initialize the VM
b. To close the VM
- To close the VM always do it inside the guest system, selecting ‘System ->
Shut Down’ in the VM menu.
- Another alternative is to use the VirtualBox ‘File’ -> ‘Shut Down’ -> ‘Save the
machine state’. This is basically ‘hibernating’ the system (you will need extra
hard disk space to do it).
c. Install Guest Additions (GA) into the VM. Guest additions allow you to access features
such as copy and paste between your host and guest OS, share folders between the
two, have the desktop resize properly by resizing the window, share the mouse
between the virtual machine and the host without explicitly capturing it, and more
interesting usability features. In order to do this:
- Start the VM
- In the virtual machine's VirtualBox menu (the menu that appears above the
top of the virtual machine window when it is running) select ‘Devices’ and
‘insert Guest Additions CD image’ and follow the instructions (in case no
instructions are shown, in a terminal type “sudo bash
/media/cdrom/[Link]” and follow the instructions).

Computer Networks – Routers lab


11

You might also like