Networks and Networking AICT003-3-2 Routing
Networks and Networking AICT003-3-2 Routing
AICT003-3-2
Routing
Learning Outcomes
At the end of this lecture YOU should be
able to:
Understand and explain the concept of routing
Explain the basic routing protocols
Differentiate between Static and Dynamic
Routing
Delivery
The network layer supervises the handling of
the packets by the underlying physical
networks. We define this handling as the
delivery of a packet.
Routing
Routing is the process of moving data across network
segments toward its final destination.
Routers receive frames of data, de-encapsulate the layer
three packet, examine the network layer packet header,
determine the next hop of the packet, package the
packet into a new data frame and transmit the new
frame.
Routing is a key feature of the Internet involves two
basic activities
Enables messages to pass from one computer to
another
Analyzes a routing table to determine the best path.
Forwarding
Forwarding means to place the packet in its
route to its destination.
Forwarding requires a host or a router to
have a routing table.
When a host has a packet to send or when a
router has received a packet to be forwarded,
it looks at this table to find the route to the
final destination.
Routing Table
Hosts and routers decide where to send packets by
looking up the destination address in their routing
table.
A routing table consists of a series of destination
networks, the address of the local router that
provides service to the destination network, and a
cost associated with the route.
The cost is used to determine the best route in the
event that there are multiple routes to the
destination available.
Routing tables are protocol specific with different
layer three protocols adding different fields to the
routing table.
Routing Table
Routing Table
Source source of routing information
C connected
R - RIP
Netmask
172.16.20.0
255.255.255.0
172.16.30.0
255.255.255.0
172.16.40.0
255.255.255.0
172.16.30.1
172.16.30.0
172.16.30.2
Beta
172.16.20.0
172.16.40.0
Alpha
Iota
172.16.20.2
172.16.20.1
Delta
172.16.40.2
172.16.40.1
Supernetting (Aggregation)
Each branch-office has a /24 netmask (up to 254 hosts)
This router tells the core (advertises) that it can reach 192.168.16.0/22
i.e., all four subnets require only a single routing table entry
Branch-Office
Networks
192.168.18.0/24
192.168.19.0/24
Enterprise Core
Network
192.168.17.0/24
192.168.16.0/24
Third Octet
in Decimal in Binary
16
00010000
17
00010001
18
00010010
19
00010011
Classful Routes
Classful Subnetting
Requirements
All router interfaces within the same network must have the
same subnet mask (Fixed-length subnet masking)
This approach may not fully utilize available allocation of host
addresses
All subnets of the same major network must be contiguous
Supernetting (Aggregation)
Network administrator assigned network numbers 172.16.0.0 through 172.19.0.0 to networks in a branch office.
Classless Subnetting
Requirements
Distribution routers
advertise /22
IPv6 to IPv4
Advertises
Core
advertise
/20 /20
Routing
Static routing
Calculated beforehand, offline
Default routing
If I dont recognize the destination, just send
the packet to Router X
Routing Protocols
A routing table can be either static or dynamic.
A static table is one with manual entries by the
network administrator.
A dynamic table is one that is updated
automatically when there is a change
somewhere in the Internet.
A routing protocol is a combination of rules
and procedures that lets routers in the Internet
inform each other of changes.
Static Routing
The routing table is constructed in every router (Putting in the
entries for every network that could be a destination).
Static routes are unchangeable as the paths are fixed (added to the
routing table using a command)
Static routes can be used when: Small internetwork which seldom change and has no redundant
link
Small branch offices where each can be reached with only one
possible path
Forward packets to hosts in Internet and not to the enterprise
network.
s0
172.16.20.2
172.16.40.1
172.16.40.2
Router B
s0
s0
s1
Router C
e0
e0
e0
172.16.10.1
172.16.30.1
172.16.50.1
Host A
172.16.10.2
Host B
172.16.30.2
Host C
172.16.50.2
s0
172.16.20.2
172.16.40.1
172.16.40.2
Router B
s0
s0
s1
Router C
e0
e0
e0
172.16.10.1
172.16.30.1
172.16.50.1
Host A
172.16.10.2
Host B
172.16.30.2
Host C
172.16.50.2
s0
172.16.20.2
172.16.40.1
Router B
s0
s1
172.16.40.2
s0
Router C
e0
e0
e0
172.16.10.1
172.16.30.1
172.16.50.1
Host A
172.16.10.2
Host B
172.16.30.2
Host C
172.16.50.2
Static Routing
Advantages of static routing include:
Low Processor Overhead
Dont calculate best path
need less processor power and less memory
No Bandwidth Utilization
No updating each other with static routes
Secure Operation
Less vulnerable to attack as dont accept updates
Dont send updates to untrusted source
Predictability
Administrator precisely control paths selection
Static Routing
Disadvantages of static routing include:
High Maintenance Configuration
Configure routes manually
Complex network requires high maintenance
No adaptability
Not fault tolerant
When there is a change in the network or a failure occurs
between two statically defined nodes, traffic will not be rerouted.
packets will have to wait for the failure to be repaired or the static
route to be updated by the administrator before being
transmitted.
Most requests will time out (ultimately failing) before these repairs
can be made.
Routing Configuration
It is essential that each router operates using the same routing
table, but how can multiple copies of a common table be kept up
to date?
This requires a separate exchange of messages between
neighbouring routers so that each can advise others when
something changes
Routing Protocols
They all have the same general goal:
To share network reachability information among routers
Convergence is the process of agreement, by all routers, on
optimal routes.
Routing update messages stimulate recalculation of optimal
routes and eventually cause all routers to agree
Routing algorithms that converge slowly can cause routing loops
or network outages
This is very important when routes between networks change
frequently or unpredictably
This is less important when routes are stable
Routing: Metrics
Metric: the determining factor used by a routing algorithm
to decide which route to a network is better than another
The lower the cost, the more likely the interface is to be
used to forward data traffic.
Cost is often an arbitrary value defined by the protocol
or administrator
for example, on a Cisco router, OSPF cost defaults to
100,000,000 divided by the bandwidth for the interface,
so a 100-Mbps Ethernet interface has a cost of 1.
Routing Protocols
Distance-Vector protocols
Each router maintains a table that lists known networks, direction
(vector) and distance (metric) to each network
Each router periodically (every 30 seconds, for example) transmits
the routing table via a broadcast that reaches all other routers on
the local segments
Routers update their routing table, if necessary, based on received
broadcasts
Link State Protocols
Each router maintains a complete topological map (database) of
entire network, separate from the routing table (forwarding table)
A router that detects a change creates a link-state advertisement
(LSA) and sends it to neighbors, who propagate the change to their
neighbors
Routers update their topological database if necessary
Routing
Table
Routing
Table
Routing
Table
D
Routing
Table
Routing
Update
Link State
Database
Routing
Table
A
D
AS
AS
BGP
OSPF
RIP
Routers
A router is a special type of computer. It has the same basic components as a
standard desktop PC. However, routers are designed to perform some very specific
functions. Just as computers need operating systems to run software applications,
routers need the Internetwork Operating System software (IOS) to run configuration
files. These configuration files contain the instructions and parameters that control
the flow of traffic in and out of the routers. The many parts of a router are shown
below:
ROM
Read-Only Memory
ROM has the following characteristics and
functions:
Maintains instructions for power-on self
test (POST) diagnostics
Stores bootstrap program and basic
operating system software
Mini IOS
RAM
Random Access Memory, also called dynamic RAM
(DRAM)
RAM has the following characteristics and functions:
Stores routing tables
Holds ARP cache
Performs packet buffering (shared RAM)
Provides temporary memory for the configuration
file of
the router while the router is powered on
Loses content when router is powered down or
restarted
NVRAM
Non-Volatile RAM
NVRAM has the following characteristics and
functions:
Provides storage for the startup configuration
file
Retains content when router is powered down
or
restarted
Configuration Register 16 bit register which
decides boot sequence
Flash
Flash memory has the following characteristics
and functions:
Holds the operating system image (IOS)
Allows software to be updated without
removing and replacing chips on the
processor
Retains content when router is powered
down or restarted
Can store multiple versions of IOS software
Interfaces
Interfaces have the following characteristics and
functions:
Connect router to network for frame entry and exit
Can be on the motherboard or on a separate
module
Types of interfaces:
Ethernet
Fast Ethernet
Serial
ISDN BRI
Loopback
Console
Router Interfaces
Router Connection
1. Connect the light-blue console cable to the light-blue port labeled CONSOLE on the rear panel of
the router.
2. Connect the other end of the light-blue console cable to an RJ-45 adapter.
Use either the RJ-45-to-DB-9 adapter or the RJ-45-to-DB-25 adapter, depending on your local
terminal or PC.
3. Attach the adapter to a serial port on a terminal or PC running emulation software to allow router
configuration.
Hostname Command
Configuration Commands
Interface Commands
Interface Commands
Q&A