0% found this document useful (0 votes)
58 views58 pages

Networks and Networking AICT003-3-2 Routing

This document discusses routing and routing protocols. It begins by defining routing as the process of moving data across network segments towards its destination. It then explains key routing concepts such as forwarding, routing tables, and static versus dynamic routing. The document discusses routing protocols in detail, including interior and exterior gateway protocols. It explains static routing and its advantages of low overhead but disadvantages of high maintenance and lack of adaptability. Finally, it covers dynamic routing and how routing information is sourced through automatic exchange between routers.

Uploaded by

yoges_0695
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views58 pages

Networks and Networking AICT003-3-2 Routing

This document discusses routing and routing protocols. It begins by defining routing as the process of moving data across network segments towards its destination. It then explains key routing concepts such as forwarding, routing tables, and static versus dynamic routing. The document discusses routing protocols in detail, including interior and exterior gateway protocols. It explains static routing and its advantages of low overhead but disadvantages of high maintenance and lack of adaptability. Finally, it covers dynamic routing and how routing information is sourced through automatic exchange between routers.

Uploaded by

yoges_0695
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Networks and Networking

AICT003-3-2
Routing

Topics and Structure of the


lesson
Basic Routing Protocols
Types of 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

Key Terms you must be able to


use:
If you have mastered this topic, you should be
able to use the following terms correctly in your
assignments and exams:
Forwarding
Routing
Routing Table
Interior Gateway Protocols
Exterior Gateway Protocols
Static Routing
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

Subnet/Mask define the IP address of a


network or a subnet
Out Int outgoing interface, informs router
which interface to send the packets
Next-Hop next-hop router, address of the
router where the packets need to be
forwarded

This network has 3 subnets


The routing table actually has
both the IP address and
the netmask
You cannot tell what
subnet an address
belongs to without
knowing the netmask!
Network

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

Routing & Subnets


Each entry in the router forwarding database corresponds to
a 32-bit address and a 32-bit mask
Contiguous subnet mask: no 1 bit appears to the right of
any 0 bit
Packet contains a 32-bit destination address
The router must find the entry with the mask with the most
ones that matches the destination address
longest matching address prefix algorithm can be used
to efficiently find the proper database entry for
forwarding
Remember: Routers can be general hosts or specialised machines

Supernetting (Aggregation)
Each branch-office has a /24 netmask (up to 254 hosts)

Move prefix boundary to the left

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

Classless Routing Versus


Classful Routing

Route Summarization (Aggregation)


When advertising routes into another major network,
classful routing protocols automatically summarize
subnets.
They only advertise a route to a Class A, B, or C
network, instead of routes to subnets.
Because classful routers and hosts do not understand
nonlocal prefix lengths and subnets, there is no reason
to advertise information about prefix lengths.
The automatic summarization into a major class
network has some disadvantages; for example,
discontiguous subnets are not supported.

Classful Routes

Subnetwork routes are shared by devices


within the same network
Summary routes are exchanged between
foreign networks
Summary routes are automatically created at
Class A, B, and C network boundaries

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

Route Summarization (Aggregation)


Classless routing protocols advertise a route and a prefix
length.
If addresses are assigned in a hierarchical fashion, a
classless routing protocol can be configured to aggregate
subnets into one route, thus reducing routing overhead.
It is also important to summarize (aggregate) routes on an
enterprise network.
Route summarization reduces the size of routing tables,
which minimizes bandwidth consumption and processing on
routers.
Route summarization also means that problems within one
area of the network do not tend to spread to other areas.

Supernetting (Aggregation)

Network administrator assigned network numbers 172.16.0.0 through 172.19.0.0 to networks in a branch office.

Move prefix boundary to the left


Branch office router advertises 172.16.0.0/14
the router is saying, "Route packets to me if the destination has the first 14
bits set to 172.16." The router is reporting a route to all networks where the
first 14 bits are equal to 10101100 000100 in binary.

Classless Subnetting
Requirements

Router interfaces within the same network can have


different subnet masks
Variable-length subnet masking (VLSM) is supported
This approach maximizes allocation of available host
addresses

Access layer routers advertise /24

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

Dynamic routing protocol


Distance-vector algorithms
Link-state algorithms

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.

Static Routing: Example


172.16.20.1
Router A

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

RouterA(config) #ip route 172.16.50.0 255.255.255.0 172.16.20.2


Send packets for subnet 50 to 172.16.20.2 (Router B)

Default Routing: Example


172.16.20.1
Router A

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

RouterA(config) #ip route 0.0.0.0 0.0.0.0 172.16.20.2


If its not local, send it to 172.16.20.2 (Router B)

Host C
172.16.50.2

Also Note: Contiguous Subnets


172.16.20.1
Router A

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

We talked about this before: Contiguous subnets make aggregation easier

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.

Sources of Routing Information


Dynamic
A process that automatically exchanges information about
available routes
Uses metrics to determine the best path to a destination
network
The routing protocol must be configured on each router
Bandwidth is consumed as routing updates are transmitted
between routers
Router CPU is used to process, send, and receive routing
information
Routing table maintained by routing process

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

Solution: Routing Protocols

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.

Many different metrics are used in routing algorithms.


Some routing algorithms base route selection on a
combination of multiple metrics, resulting in the
calculation of a single hybrid metric.

Standard Routing Protocols


Interior routing protocols, used within an autonomous system

RIP, EIGRP Standard Distance Vector Protocols


OSPF, IS-IS Standard Link State Protocols
Exterior routing protocol, used between autonomous systems

BGP a class by itself

Autonomous system (two definitions that are often used):


A set of routers that presents a common routing policy to the
internetwork
A network or set of networks that are under the administrative control
of a single entity

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

Distance Vector: routers


broadcast their
routing tables to
adjacent neighbors at
periodic intervals.

Link-State: routers send link state advertisements to adjacent


neighbors when connectivity changes, and each router
recalculates its picture of the topology of the network
Link-State
Advertisement
(LSA)

Link State
Database

Routing
Table

A
D

Shortest Path Tree

Standard Distance Vector Protocols:


RIP & EIGRP
RIP: Routing Information Protocol Version 3 RFC 1058
Chooses network path based on distance (hops or Netdelay)
distances are added up for each subnet in the system to form a
complete routing table
EIGRP: Enhanced Inter-Gateway Routing Protocol patented by Cisco
Chooses network path based on some combination of measured
round-trip delay for transfer of data, smallest bandwidth, channel
capacity, reliability of the path (by default bandwidth and delay)
RIP limited to 15 hops, EIGRP can scale to thousands of routers

Standard Link-State Protocols:


OSPF & IS-IS
Operate in a hierarchy to support large collections of networks
autonomous systems can be divided into areas connected
by a backbone
OSPF - Open Shortest Path First: RFC 2328
open means open standard
IS-IS - ISO 10589: Intermediate System-to-Intermediate System
Routeing information exchange protocol for use in conjunction with the
Protocol for providing the connectionless-mode network service

similar in operation to OSPF although somewhat more


flexible, efficient, and scalable (i.e., more complex!)

Border Gateway Protocol (BGP)


Used on the Internet among large ISPs and major companies
Exterior routing protocol, used between autonomous systems
Distance vector protocol, but transmits an ordered list of
intermediate points (autonomous systems) rather than a hop-count
Assumes some local algorithm to take this information, add
policy rules (e.g., next hop, administrative weights, local
preference, origin of the route), and output a single number
State of the art: BGP4 (RFCxxxx) + MPLS (RFCxxxx)

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:

Router Memory Components


ROM
- Read Only Memory
Bootstrap/POST
FLASH Memory- IOS Images are kept here
- Erasable reprogrammable ROM
- Contents are kept on Power down
or reload
RAM

- Random Access memory


- Routing Tables
- Running Configuration
- Contents are lost on reboot

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

Is a type of electronically erasable,


programmable ROM (EEPROM)

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

Example of cisco router

Router Interfaces

The console port is a management port used to provide out-of-band access to


the router. It is used for the initial configuration of the router, monitoring, and
disaster recovery procedures.
To connect to the console port, a rollover cable and a RJ-45 to DB-9 adapter are
used to connect a PC. Cisco supplies the necessary adapter to connect to the
console port.

Router Connection

To connect the PC to a router:

Configure terminal emulation software on the PC for:


The appropriate com port
9600 baud
8 data bits
No parity
1 stop bit
No flow control

Connect the RJ-45 connector of the rollover cable to the


router console port.

Connect the other end of the rollover cable to the RJ-45 to


DB-9 adapter.

Attach the female DB-9 adapter to a PC.

Connect the Console Cable

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

Router Internal Components

Internal Components of a 2600 Router

Question and Answer Session

Q&A

You might also like