Documente Academic
Documente Profesional
Documente Cultură
Chapter-04
Routers
Baessa K.
Mettu University
Faculty of Engineering and Technology
Department of Information Technology
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 2 / 96
Introduction
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 3 / 96
Introduction
Router as a Computer I
• Routers have many of the same hardware and software components
that are found in other computers including:
• CPU
• RAM
• ROM
• Operating System
• Routers are generally considered to be the network center
• Routers have two main types of connections:
• WAN connections (e.g. connection to ISP)
• LAN connections (e.g. Ethernet, Token Ring, FDDI, etc.)
Router as a Computer II
• Router components and their functions:
• CPU
• Executes operating system instructions
• Random access memory (RAM)
• Contains the Running or Active configuration. RAM contents lost when
power is off
• Read-only memory (ROM)
• Holds diagnostic software used when router is powered up. Stores the
router’s bootstrap program.
• Non-volatile RAM (NVRAM)
• Stores Startup (aka Backup) configuration. Contents are NOT lost
when power is off
• Flash memory
• Contains the operating system (Cisco IOS)
• Interfaces
• There exist multiple physical interfaces for network and management
connectivity.
Baessa K. (Mettu University) 04 Routers May 26, 2019 5 / 96
Introduction
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 7 / 96
Router Basic Configuration
Router interfaces
• When a router’s interface is configured with an IP address and subnet
mask, that interface becomes a host on that network
• Each router interface is a member of a different network
• Activate interfaces using the no shutdown command
• In order for static and dynamic routes to exist in routing table you
must have directly connected networks
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 14 / 96
DHCP
• Lease:
• The length of time for which a DHCP client holds the IP address
information.
• When a lease expires, the client must renew it.
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 21 / 96
Introduction to Routing and Packet Forwarding Routing Basics
Outline
1 Introduction
3 DHCP
Routing
6 Baessa K. (MettuProtocols
University) Metrics 04 Routers May 26, 2019 22 / 96
Introduction to Routing and Packet Forwarding Routing Basics
IP Routing I
IP Routing II
IP Routing III
• If a network is directly connected, then the router already knows how
to get to it.
• If a network isn’t directly connected to the router, the router must
use one of two ways to learn how to get to the remote network:
• static routing, meaning that someone must hand-type all network
locations into the routing.
• dynamic routing.
dynamic routing
• a protocol on one router communicates with the same protocol
running on neighbor routers.
• The routers then update each other about all the networks they know
about and place this information into the routing table.
• If a change occurs in the network, the dynamic routing protocols
automatically inform all routers about the event.
Baessa K. (Mettu University) 04 Routers May 26, 2019 25 / 96
Introduction to Routing and Packet Forwarding Routing Basics
IP Routing IV
Static routing
• the administrator is responsible for updating all changes by hand into
all routers.
• Typically, in a large network, a combination of both dynamic and
static routing is used.
IP Routing V
• By using the command show ip route, we can see the routing table
(map of the internet- work) that Lab A uses to make forwarding
decisions:
IP Routing VI
• The C in the routing table output means that the networks listed are
”directly connected” and until we add a routing protocol-something
like RIP, EIGRP, etc.
Types of Routing
Types of routing
• Static routing
• Default routing
• Dynamic routing
Outline
1 Introduction
3 DHCP
Routing
6 Baessa K. (MettuProtocols
University) Metrics 04 Routers May 26, 2019 30 / 96
Introduction to Routing and Packet Forwarding Static routing
Static routing I
• Static routing occurs when you manually add routes in each router’s
routing table.
• There are pros and cons to static routing, but that’s true for all
routing processes.
ip route [destination network] [mask] [next-hop address
• This list describes each command in the string:
• ip route : The command used to create the static route.
• destination network : The network you’re placing in the routing table.
• mask : The subnet mask being used on the network.
• next-hop address: The address of the next-hop router that will receive
the packet and forward it to the remote network.
Static routing II
Example
• Router(config)#ip route 172.16.3.0 255.255.255.0 192.168.2.4
Outline
1 Introduction
3 DHCP
Routing
6 Baessa K. (MettuProtocols
University) Metrics 04 Routers May 26, 2019 33 / 96
Introduction to Routing and Packet Forwarding Default Routing
Default Routing I
• We use default routing to send packets with a remote destination
network not in the routing table to the next-hop router.
• You should only use default routing on stub networks–those with only
one exit path out of the network.
• To configure a default route, you use wildcards in the network address
and mask locations of a static route.
Default Routing II
• Even so, there s one more command you must be aware of when
using default routes: the ip classless command.
• All Cisco routers are classful routers, meaning they expect a default
subnet mask on each interface of the router.
• When a router receives a packet for a destination subnet that’s not in
the routing table, it will drop the packet by default.
• If you’re using default routing, you must use the ip classless command
because it is possible that no remote subnets will be in the routing
table.
Outline
1 Introduction
3 DHCP
Routing
6 Baessa K. (MettuProtocols
University) Metrics 04 Routers May 26, 2019 36 / 96
Introduction to Routing and Packet Forwarding Dynamic routing
Static vs Dynamic
• Advantages of static routing
• It can backup multiple interfaces/networks on a router
• Easy to configure
• No extra resources are needed
• More secure
• Disadvantages of static routing
• Network changes require manual reconfiguration
• Does not scale well in large topologies
Figure: The default ADs that a Cisco router uses to decide which route to
take to a remote network.
• If you configure a static route, the router will then believe that route
over any other learned routes.
• You can change the administrative distance of static routes, but by
default, they have an AD of 1.
• In our static route configuration, the AD of each route is set at 150 or
151.
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 45 / 96
Interior Gateway Protocols (IGP) Distance Vector Routing Protocols
Outline
1 Introduction
3 DHCP
Outline
1 Introduction
3 DHCP
Outline
1 Introduction
3 DHCP
Hybrid protocols I
• use aspects of both distance vector and link state for example, EIGRP.
• The distance-vector routing algorithm passes complete routing table
contents to neighboring routers, which then combine the received
routing table entries with their own routing tables to complete the
router’s routing table.
• This is called routing by rumor, because a router receiving an update
from a neighbor router believes the information about remote
networks without actually finding out for itself.
• It’s possible to have a network that has multiple links to the same
remote network, and if that’s the case, the administrative distance of
each received update is checked first.
• If the AD is the same, the protocol will have to use other metrics to
determine the best path to use to that remote network.
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 52 / 96
Routing Protocols Metrics
Metric
• A value used by a routing protocol to determine which routes are
better than others
Metric vs AD
• Purpose of a Metric
• It’s a calculated value used to determine the best path (lowest cost) to
a destination
• Purpose of Administrative Distance (AD)
• It’s a numeric value that specifies the preference of a particular route
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 58 / 96
Distance Vector Routing Protocols
• RIP uses only hop count to determine the best path to a network.
• If RIP finds more than one link with the same hop count to the same
remote network, it will automatically perform a round-robin load
balancing.
• RIP can perform load balancing for up to six equal-cost links (four by
default).
• However, a problem with this type of routing metric arises when the
two links to a remote network are different bandwidths but the same
hop count
Outline
1 Introduction
3 DHCP
RIP I
RIP II
RIP Operation
• RIP uses 2 message types
• Request message
• Sent out on startup by each RIP enabled interface
• Requests all RIP enabled neighbors to send routing
• Response message
• Sent to requesting router containing routing table
RIP III
• Administrative Distance
• RIP’s default administrative distance is 120
Enabling RIP
• type router rip at the global configuration prompt
• Prompt will look like
1 R1 ( config - router ) #
Automatic Summarization I
Automatic Summarization II
Summary I
Summary II
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 75 / 96
Link state Routing OSPF
Outline
1 Introduction
3 DHCP
OSPF Basics
OSPF Basics I
OSPF Basics II
OSPF Terminology I
• Link
• A link is a network or router interface assigned to any given network.
• When an interface is added to the OSPF process, it’s considered by
OSPF to be a link.
• This link, or interface, will have state information associated with it
(up or down) as well as one or more IP addresses.
• Router ID
• Router ID The Router ID (RID) is an IP address used to identify the
router.
• Cisco chooses the Router ID by using the highest IP address of all
configured loopback interfaces.
• If no loop-back interfaces are configured with addresses, OSPF will
choose the highest IP address of all active physical interfaces.
• Neighbor
OSPF Terminology II
• Neighbors are two or more routers that have an interface on a common
network, such as two routers connected on a point-to-point serial link.
• Adjacency
• An adjacency is a relationship between two OSPF routers that permits
the direct exchange of route updates.
• OSPF is really picky about sharing routing information–unlike EIGRP,
which directly shares routes with all of its neighbors.
• Instead, OSPF directly shares routes only with neighbors that have also
established adjacencies.
• And not all neighbors will become adjacent–this depends upon both
the type of network and the configuration of the routers.
• Hello protocol
• The OSPF Hello protocol provides dynamic neighbor discovery and
maintains neighbor relationships.
• Hello packets and Link State Advertisements (LSAs) build and maintain
the topological database. Hello packets are addressed to 224.0.0.5.
• Neighborship database
• The neighborship database is a list of all OSPF routers for which Hello
packets have been seen.
• A variety of details, including the Router ID and state, are maintained
on each router in the neighborship database.
• Topological database
• The topological database contains information from all of the Link
State Advertisement packets that have been received for an area.
• The router uses the information from the topology database as input
into the Dijkstra algorithm that computes the shortest path to every
network.
• Link State Advertisement
• A Link State Advertisement (LSA) is an OSPF data packet containing
link-state and routing information that’s shared among OSPF routers.
OSPF Terminology IV
• There are different types of LSA packets, and I’ll go into these shortly.
An OSPF router will exchange LSA packets only with routers to which
it has established adjacencies.
• Designated router
• A Designated Router (DR) is elected whenever OSPF routers are
connected to the same multi-access network.
• Cisco likes to call these ”broadcast” networks, but really, they are
networks that have multiple recipients. Try not to confuse multi-access
with multipoint, which can be easy to do sometimes.
• To minimize the number of adjacencies formed, a DR is chosen
(elected) to disseminate/receive routing information to/from the
remaining routers on the broadcast network or link.
• This ensures that their topology tables are synchronized.
• All routers on the shared network will establish adjacencies with the
DR and backup designated router (BDR)
OSPF Terminology V
• The election is won by the router with the highest priority, and the
Router ID is used as a tiebreaker if the priority of more than one router
turns out to be the same.
• Backup designated router
• A Backup Designated Router (BDR) is a hot standby for the DR on
multi-access links (remember that Cisco sometimes likes to call these
”broadcast” networks).
• The BDR receives all routing updates from OSPF adjacent routers but
doesn’t flood LSA updates.
• OSPF areas
• An OSPF area is a grouping of contiguous networks and routers.
• All routers in the same area share a common Area ID.
• Because a router can be a member of more than one area at a time,
the Area ID is associated with specific interfaces on the router.
• This would allow some interfaces to belong to area 1 while the
remaining interfaces can belong to area 0.
OSPF Terminology VI
• All of the routers within the same area have the same topology table.
• When configuring OSPF, you’ve got to remember that there must be
an area 0 and that this is typically configured on the routers that
connect to the backbone of the network.
• Areas also play a role in establishing a hierarchical network
organization–something that really enhances the scalability of OSPF!
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 89 / 96
Hybrid Routing Protocols Enhanced IGRP (EIGRP)
Outline
1 Introduction
3 DHCP
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 91 / 96
PPP
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 92 / 96
Frame Relay
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 93 / 96
Router on the stick
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 94 / 96
IGRP
Outline
1 Introduction
2 Router Basic Configuration
3 DHCP
4 Introduction to Routing and Packet Forwarding
Routing Basics
Static routing
Default Routing
Dynamic routing
5 Interior Gateway Protocols (IGP)
Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols
6 Routing Protocols Metrics
7 Distance Vector Routing Protocols
RIP
8 Link state Routing
BaessaOSPF
K. (Mettu University) 04 Routers May 26, 2019 95 / 96