Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COMP304-23A — Advanced Networking & Cyber Security
Assignment 1 - Routing with OSPF
1 Introduction
The goals of this assignment are:
• to improve your understanding of OSPF by using it in a network
• become familiar with the way routers are configured by using an interface
similar to that of a typical router
In this assignment, you will configure the internal routing for your network in
the mini-Internet. The next assignment will follow on from this assignment
and you will connect your network with the network’s of all the students in
your class by configuring external routing. By the end, as a class, you will
have created your own version of the Internet using the real protocols actually
used today on the Internet.
For this assignment, you will configure virtual software routers rather than
physical routing hardware. These routers are running FRRouting. FRRouting
(FRR)1
is a popular routing protocol suite. FRRouting speaks many routing
protocols including OSPF and BGP and installs the routing decisions into the
Linux kernel. It has a management console interface that is similar to Cisco’s
IOS commands. FRRouting is a “real” technology used in real networks (not
just for teaching).
Note: Unlike the labs, this assignment is an individual. Work on your own.
You may discuss the assignment in general terms but do not look at anyone
else’s configuration or show them yours. If you need help, ask the lecturer in
person or by email, or post on Moodle. Please do not post configurations on
Moodle.
1.1 The mini-Internet
You have already accessed mini-Internet for labs, but the information is re peated here. The mini-Internet is a teaching project developed by ETH
Zurich2
. As a student, you are each given your own Autonomous System
(AS) to manage and configure.
The mini-Internet gives you access to several Docker containers. These Docker
containers behave like real hosts, switches, and routers; with the main differ ence being that you cannot reboot or shut them down. All of these networks
run on a single server, mini.cms.waikato.ac.nz. In the second assignment,
you will connect your AS with other students in your class.
1.2 Accessing the mini-Internet
You can access the mini-Internet using the secure shell (ssh) command, you
can access it either from home or the lab. One host within your network is
pre-configured with a secure shell server which is exposed on a unique port
on mini.cms.waikato.ac.nz. Your unique port number is 52000 added to
your AS number. You will receive an individual email with your AS number
and password; it is your responsibility to keep it confidential. Please do not
change this password. If you want to simplify access, please set up an SSH key
instead, details of which are included in the first lab.
1.3 Accessing Routers, Hosts and Switches
Using the ./goto.sh script in the proxy container you can access any router,
host, or switch you wish. You can always see the container you are logged
into by looking at the hostname on the left of your terminal. To exit any
container back to the proxy you can press ctrl+d or type exit. You can log
in to multiple hosts or routers at once, or even the same one twice.
Accessing routers. Access a router using ./goto.sh router.
For example to access the router HAML:
root@gXX-proxy:~# ./goto.sh HAML router
Now you are in the FRRouting CLI on the router HAML. See 2.1 for details
on how to use this interface.
Accessing hosts. Each location shown in Figure 1 has a host attached di rectly to the router. To access the host attached to a router use the command
./goto.sh host. For example to access the NEWY host use:
root@gXX-proxy:~# ./goto.sh NEWY host
Recall for the lab tasks, you could access hosts in the UNIV network as follows:
root@gXX-proxy:~# ./goto.sh UNIV west-1
2
Now you are in a standard Linux shell, where you can run commands like ip
just as you have done in the lab exercises.
Accessing switches. Accessing switches is not required for this course.
However, for completeness, use ./goto.sh UNIV to access a
switch. For example to access the EAST switch use:
root@gXX-proxy:~# ./goto.sh UNIV EAST
Now you are in a standard Linux shell, the switches are running the Open
vSwitch software.
1.4 Backing Up Your Configuration
You can create a backup of the running configuration on your routers using
the ./save_configs.sh command on the proxy host. ./save_configs.sh
will create a folder configs [date] [time] and a zipped version of that folder.
You should keep regular backups of your configuration. You will also need to
submit this zip file as the final version of your configuration.
You can copy this off the proxy host using the scp command. For example on
your home or lab machine run:
scp -P \
[email protected]:.zip ./dst/path/
Note: you supply the port number to scp using the capital ‘-P’ option, rather
than the lowercase ‘-p’ like with ssh. In the command above ‘\’ splits this
long line across two, a terminal will remove the ‘\’ and run the command as
if it was on a single line.
1.5 Mini-Internet Help
If you have problems, please email the lecturer as soon as possible, if you
have any issues accessing your containers or other problems. Also, check the
Assignment section on Moodle for FAQs about this assignment.
1.6 Network Topology
Figure 1 shows your layer 3 network, which your task is to configure in this
assignment. All up you have 8 routers to configure with OSPF. Each router
has a host attached directly to it. In this assignment, you will configure these 8
routers using OSPF to establish full network connectivity between all routers
and hosts. Additionally, there is a DNS server (attached to LOND), this
provides you with forward and reverse DNS name resolution for the links and
3
MEASUREMENT
X.0.199.2/24
DNS
198.0.0.100/24
6
BOST
5
NEWY
7
ATLA
ZURI
8 TRGA
4
3
PARI
HAML
2
Provider 1 (link 2)
Provider 1 (link 1)
Provider 2
Customer 1 (link 2)
Customer 1 (link 1)
Customer 2
IXP
Peer
1
LOND
You have been assigned the network prefix:
X.0.0.0/8
Where X is your AS number and Y is the
location number, for example, NEWY is 5
Router loopback address: X.[150+Y].0.1/32
Each location has a host attached (not shown)
Host network: X.[100+Y].0.0/24
--> host: X.[100+Y].0.1
--> router: X.[100+Y].0.2
Figure 1: The internal layout and address plan of your AS. You have been
assigned an entire /8 to number your network. X.0.0.0/8 where X is the
network number given to you in your email. Each router shown has a host
attached. The addresses and subnets which you should configure for each
interface are shown. In this assignment, you should not configure the external
links shown in blue, leave these interfaces unconfigured.
hosts in your network (based on the numbering shown). Your hosts are pre configured to use this DNS server for commands including traceroute. DNS
will start working once you configure OSPF to share routes and a default route
on each host.
In addition, there is a MEASUREMENT host attached to HAML. You will
use this in the next assignment. This diagram also includes external network
links — such as customers, peers, and the IXP — which you will also use in
the next assignment. For now, you don’t need to worry about them. Once
you configure OSPF in this assignment, it will share the measurement route
throughout the network, this is expected behaviour.
2 Using the Routers
2.1 FRRouting Command Line Interface
You will need to configure FRRouting via its command line interface. It
presents a command line configuration interface similar to that used by other
router vendors such as Cisco or Juniper. One of the goals of this assignment
is to become familiar with an interface like that of a physical router.
You’ll find this interface is similar to using the Linux commands. For example,
instead of using the Linux command:
host# ip addr add 10.0.1.2/24 dev port_BOST
In FRRouting you would run:
router# configure terminal
router(config)# interface port_BOST
router(config-if)# ip address 10.0.1.2/24
When you first open the FRR CLI you begin in enable mode. To make
any changes we first have to enter into configuration mode. This is what
the configure command does. Then we enter the interface that we want
to configure (interface port_BOST). And finally set the IP address. From
here we can type end to return to enable mode. If we wanted to remove
this IP address, we would re-run the command prefixed by no. For example:
router(config-if)# no ip address 10.0.1.2/24
You can get help in the FRRouting CLI at any point by using and ?.
Typing will show you command completion options. And typing ? will
show you the commands available along with help.
Additionally, when in enable mode, you can use show running-config to print
out your configuration at any time.
You will be able to find documentation for FRRouting and OSPF on the web
that will help guide you through configuring FRRouting.
Note: your assignment is different to theirs and has some extra steps not cov ered in that guide.
Also, check the Assignment section on Moodle if you are having trouble.
5
3 Configuring the Networks
This assignment has the following layout. You first demonstrate your ability to
plan the addresses on a small network. You will then configure your network
using the addressing plan provided. You will configure OSPF, and then finally
configure better metrics on your links to reduce the latency of the paths OSPF
selects.
3.1 Keeping Notes
You should keep track of the commands that you use for each step in this
assignment. You’ll find you often will need to come back to them. Also, take
note of any issues you have and submit this along with your configuration. A
full report is not required, these notes do not have to be typed, submitting
photos of handwritten notes is absolutely fine.
Some steps require you to submit evidence; these are highlighted in bold text.
Make sure you include the required information in your submission.
You will find that you are required to enter similar configuration on all of the
routers. You may find it useful to copy-paste the same series of commands
with addresses etc. updated where appropriate.