Sunteți pe pagina 1din 95

Network device and configuration

Chapter-04
Routers

Baessa K.

Mettu University
Faculty of Engineering and Technology
Department of Information Technology

May 26, 2019


Baessa K. (Mettu University) 04 Routers May 26, 2019 1 / 96
Lecture Topics : #
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 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.)

Baessa K. (Mettu University) 04 Routers May 26, 2019 4 / 96


Introduction

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

Router as a Computer III


• Examples of interface types:
• Ethernet / fast Ethernet interfaces – high speed LAN links
• Serial interfaces – low speed WAN links
• Management interfaces – for local (out-of-band) or remote
(in-band) connections

Common types of router interfaces:


• Fastethernet
• Serial
• DSL
• ISDN
• Cable
• Console
• Auxiliary (AUX)

Baessa K. (Mettu University) 04 Routers May 26, 2019 6 / 96


Router Basic Configuration

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

Configure Devices and Apply Addresses I


• When designing a new network or mapping an existing network the
following information is required:
• Topology drawing that Illustrates physical connectivity
• Address table that provides the following information
• Device name
• Interfaces used
• IP addresses
• Default gateway

Baessa K. (Mettu University) 04 Routers May 26, 2019 8 / 96


Router Basic Configuration

Configure Devices and Apply Addresses II

• Router name - Host name should be unique


• Banner - Banner should warn against unauthorized use
• Passwords - Use strong passwords
• Interface configuration:
• Specify interface type (S0/0/0 – S0/0 – FA0 – FA0/0, etc.)
• Assign IP address and subnet mask
• If this is a DCE serial interface, issue clock rate command
• A description (purpose) of the interface
• Issue the no shutdown command

Baessa K. (Mettu University) 04 Routers May 26, 2019 9 / 96


Router Basic Configuration

Routing Table Structure I

• The Routing Table is stored in RAM and includes:


• Directly connected networks
• A directly connected network is a network that is directly attached to
one of the router interfaces
• Remotely connected networks
• A remote network is a network that is not directly connected to the
router and can only be reached by sending the packet to another router
• Detailed information
• about the networks include source of information, network address and
subnet mask, and IP address of next-hop router

Baessa K. (Mettu University) 04 Routers May 26, 2019 10 / 96


Router Basic Configuration

Routing Table Structure II

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

Baessa K. (Mettu University) 04 Routers May 26, 2019 11 / 96


Router Basic Configuration

Routing Table Structure III

Three Routing Table Principles


• Every router makes its decisions alone, based on the information
found in its routing table
• Different routing tables may contain different route information
• A routing table can tell how to get to a destination but not how to
get back

Baessa K. (Mettu University) 04 Routers May 26, 2019 12 / 96


Router Basic Configuration

Router Paths and Packet Switching I

• Internet Protocol (IP) Packet format contains fields that provide


information about the packet and the sending and receiving hosts
• Important fields are:
• Destination IP address
• Source IP address
• Precedence and type of service
• Version and TTL
• Packet length
• IP header length

Baessa K. (Mettu University) 04 Routers May 26, 2019 13 / 96


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 14 / 96
DHCP

Dynamic Host Configuration Protocol (DHCP) I


• Dynamic Host Configuration Protocol (DHCP) is a client/server
protocol that automatically provides an Internet Protocol (IP) host
with its IP address and other related configuration information such
as the subnet mask and default gateway.
• DHCP allows hosts to obtain required TCP/IP configuration
information from a DHCP server.

Baessa K. (Mettu University) 04 Routers May 26, 2019 15 / 96


DHCP

Dynamic Host Configuration Protocol (DHCP) II


Why use DHCP?
• Every device on a TCP/IP-based network must have a unique unicast
IP address to access the network and its resources.
• Without DHCP, IP addresses for new computers or computers that are
moved from one subnet to another must be configured manually; IP
addresses for computers that are removed from the network must be
manually reclaimed.
• With DHCP, this entire process is automated and managed centrally.
• The DHCP server maintains a pool of IP addresses and leases an
address to any DHCP-enabled client when it starts up on the network.

Baessa K. (Mettu University) 04 Routers May 26, 2019 16 / 96


DHCP

Dynamic Host Configuration Protocol (DHCP) III


• The DHCP server stores the configuration information in a database
that includes:
• Valid TCP/IP configuration parameters for all clients on the network.
• Valid IP addresses, maintained in a pool for assignment to clients, as
well as excluded addresses.
• Reserved IP addresses associated with particular DHCP clients. This
allows consistent assignment of a single IP address to a single DHCP
client.

Baessa K. (Mettu University) 04 Routers May 26, 2019 17 / 96


DHCP

Dynamic Host Configuration Protocol (DHCP) IV


Benefits of DHCP
• Reliable IP address configuration. DHCP minimizes configuration
errors caused by manual IP address configuration, such as
typographical errors, or address conflicts caused by the assignment of
an IP address to more than one computer at the same time.
• Reduced IP address conflicts: Each connected device must have an IP
address
• Automation of IP address administration: Without DHCP, network
administrators would need to assign and revoke addresses manually.
• Efficient change management: The use of DHCP makes it very simple
to change addresses, scopes or endpoints.

Baessa K. (Mettu University) 04 Routers May 26, 2019 18 / 96


DHCP

Dynamic Host Configuration Protocol (DHCP) V


Components of DHCP
• DHCP server
• A networked device running the DCHP service that holds IP addresses
and related configuration information.
• This is most typically a server or a router but could be anything that
acts as a host, such as an SD-WAN appliance.
• DHCP client
• The endpoint that receives configuration information from a DHCP
server.
• This can be a computer, mobile device, IoT endpoint or anything else
that requires connectivity to the network.
• IP address pool
• The range of addresses that are available to DHCP clients.
• Addresses are typically handed out sequentially from lowest to highest.
• Subnet:
• IP networks can be partitioned into segments known as subnets.
• Subnets help keep networks manageable.

Baessa K. (Mettu University) 04 Routers May 26, 2019 19 / 96


DHCP

Dynamic Host Configuration Protocol (DHCP) VI

• Lease:
• The length of time for which a DHCP client holds the IP address
information.
• When a lease expires, the client must renew it.

Baessa K. (Mettu University) 04 Routers May 26, 2019 20 / 96


Introduction to Routing and Packet Forwarding

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

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)

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 is the process of moving packets from one network to


another network using routers.
• Routers don’t really care about hosts–they only care about networks
and the best path to each network
• A routing protocol is used by routers to dynamically find all the
networks in the internetwork and to ensure that all routers have the
same routing table.
• Basically, a routing protocol determines the path of a packet through
an internetwork.
• Examples of routing protocols are RIP, RIPv2, EIGRP, and OSPF.
• A routed protocol can be used to send user data (packets) through
the established enterprise.

Baessa K. (Mettu University) 04 Routers May 26, 2019 23 / 96


Introduction to Routing and Packet Forwarding Routing Basics

IP Routing II

• Routed protocols are assigned to an interface and determine the


method of packet delivery.
• Examples of routed protocols are IP and IPv6.
• To be able to route packets, a router must know, at a minimum, the
following:
• Destination address
• Neighbor routers from which it can learn about remote networks.
• Possible routes to all remote networks
• The best route to each remote network
• How to maintain and verify routing information
• The router learns about remote networks from neighbor routers or
from an administrator.
• The router then builds a routing table (a map of the internetwork)
that describes how to find the remote networks.

Baessa K. (Mettu University) 04 Routers May 26, 2019 24 / 96


Introduction to Routing and Packet Forwarding Routing Basics

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 26 / 96


Introduction to Routing and Packet Forwarding Routing Basics

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:

Baessa K. (Mettu University) 04 Routers May 26, 2019 27 / 96


Introduction to Routing and Packet Forwarding Routing Basics

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 28 / 96


Introduction to Routing and Packet Forwarding Routing Basics

Types of Routing

Types of routing
• Static routing
• Default routing
• Dynamic routing

Baessa K. (Mettu University) 04 Routers May 26, 2019 29 / 96


Introduction to Routing and Packet Forwarding Static routing

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)

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 31 / 96


Introduction to Routing and Packet Forwarding Static routing

Static routing II

Example
• Router(config)#ip route 172.16.3.0 255.255.255.0 192.168.2.4

• The ip route command tells us simply that it is a static route.


• 172.16.3.0 is the remote network we want to send packets to.
• 255.255.255.0 is the mask of the remote network.
• 192.168.2.4 is the next hop, or router, we will send packets to.

Baessa K. (Mettu University) 04 Routers May 26, 2019 32 / 96


Introduction to Routing and Packet Forwarding Default Routing

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)

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 34 / 96


Introduction to Routing and Packet Forwarding Default Routing

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 35 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

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)

Routing
6 Baessa K. (MettuProtocols
University) Metrics 04 Routers May 26, 2019 36 / 96
Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols I

• Dynamic routing is when protocols are used to find networks and


update routing tables on routers.
• True, this is easier than using static or default routing, but it’ll cost
you in terms of router CPU processes and bandwidth on the network
links.
• A routing protocol defines the set of rules used by a router when it
communicates routing information between neighbor routers.

Function(s) of Dynamic Routing Protocols


• Dynamically share information between routers
• Automatically update routing table when topology changes
• Determine best path to a destination

Baessa K. (Mettu University) 04 Routers May 26, 2019 37 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols II

The purpose of a Dynamic Routing Protocol is to:


• Discover remote networks
• Maintain up-to-date routing information
• Choose the best path to destination networks
• Find a new best path if the current path is no longer available

Baessa K. (Mettu University) 04 Routers May 26, 2019 38 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols III

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

• Dynamic Routing Protocols are grouped according to characteristics.


• Two types of routing protocols are used in internetworks:
1 interior gateway protocols (IGPs)
2 exterior gateway protocols (EGPs)

Baessa K. (Mettu University) 04 Routers May 26, 2019 39 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols IV

Baessa K. (Mettu University) 04 Routers May 26, 2019 40 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols V


• IGPs are used to exchange routing information with routers in the
same autonomous system (AS).
• An AS is a collection of networks under a common administrative
domain, which basically means that all routers sharing the same
routing table information are in the same AS.
• EGPs are used to communicate between ASes.
• An example of an EGP is Border Gateway Protocol (BGP)

Baessa K. (Mettu University) 04 Routers May 26, 2019 41 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols VI


Administrative Distances
• The administrative distance (AD) is used to rate the trustworthiness of
routing information received on a router from a neighbor router.
• An administrative distance is an integer from 0 to 255, where 0 is the
most trusted and 255 means no traffic will be passed via this route.
• If a router receives two updates listing the same remote network, the
first thing the router checks is the AD.
• If one of the advertised routes has a lower AD than the other, then the
route with the lowest AD will be placed in the routing table.
• If both advertised routes to the same network have the same AD, then
routing protocol metrics (such as hop count or bandwidth of the lines)
will be used to find the best path to the remote network.
• The advertised route with the lowest metric will be placed in the
routing table.
• But if both advertised routes have the same AD as well as the same
metrics, then the routing protocol will load-balance to the remote
network (which means that it sends packets down each link).
Baessa K. (Mettu University) 04 Routers May 26, 2019 42 / 96
Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols VII

Figure: The default ADs that a Cisco router uses to decide which route to
take to a remote network.

• If a network is directly connected, the router will always use the


interface connected to the network.

Baessa K. (Mettu University) 04 Routers May 26, 2019 43 / 96


Introduction to Routing and Packet Forwarding Dynamic routing

Dynamic Routing Protocols VIII

• 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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 44 / 96


Interior Gateway Protocols (IGP)

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

2 Router Basic Configuration

3 DHCP

4 Introduction to Routing and Packet Forwarding

5 Interior Gateway Protocols (IGP)


Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols

6 Routing Protocols Metrics


Baessa K. (Mettu University) 04 Routers May 26, 2019 46 / 96
Interior Gateway Protocols (IGP) Distance Vector Routing Protocols

Distance Vector Routing Protocols I

• The distance-vector protocols find the best path to a remote network


by judging distance.
• Each time a packet goes through a router, that’s called a hop.
• The route with the least number of hops to the network is determined
to be the best route.
• The vector indicates the direction to the remote network.
• Both RIP and IGRP are distance-vector routing protocols.
• They send the entire routing table to directly connected neighbors.

Baessa K. (Mettu University) 04 Routers May 26, 2019 47 / 96


Interior Gateway Protocols (IGP) Link State Routing Protocols

Outline

1 Introduction

2 Router Basic Configuration

3 DHCP

4 Introduction to Routing and Packet Forwarding

5 Interior Gateway Protocols (IGP)


Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols

6 Routing Protocols Metrics


Baessa K. (Mettu University) 04 Routers May 26, 2019 48 / 96
Interior Gateway Protocols (IGP) Link State Routing Protocols

Link State Routing Protocols

• In link-state protocols, also called shortest-path-first protocols, the


routers each create three separate tables.
• One of these tables keeps track of directly attached neighbors, one
determines the topology of the entire internetwork, and one is used as
the routing table.
• Link-state routers know more about the internetwork than any
distance-vector routing protocol.
• OSPF is an IP routing protocol that is completely link state
• Link-state protocols send updates containing the state of their own
links to all other routers on the network.

Baessa K. (Mettu University) 04 Routers May 26, 2019 49 / 96


Interior Gateway Protocols (IGP) Hybrid Protocols

Outline

1 Introduction

2 Router Basic Configuration

3 DHCP

4 Introduction to Routing and Packet Forwarding

5 Interior Gateway Protocols (IGP)


Distance Vector Routing Protocols
Link State Routing Protocols
Hybrid Protocols

6 Routing Protocols Metrics


Baessa K. (Mettu University) 04 Routers May 26, 2019 50 / 96
Interior Gateway Protocols (IGP) Hybrid Protocols

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 51 / 96


Routing Protocols Metrics

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

Routing Protocols Metrics I

Metric
• A value used by a routing protocol to determine which routes are
better than others

• Common Metrics used in IP routing protocols


• Bandwidth
• Cost
• Delay
• Hop count
• Load
• Reliability

Baessa K. (Mettu University) 04 Routers May 26, 2019 53 / 96


Routing Protocols Metrics

Routing Protocols Metrics II

Baessa K. (Mettu University) 04 Routers May 26, 2019 54 / 96


Routing Protocols Metrics

Routing Protocols Metrics III

Baessa K. (Mettu University) 04 Routers May 26, 2019 55 / 96


Routing Protocols Metrics

Routing Protocols Metrics IV

• Metric used by each routing protocol:


• RIP → hop count
• IGRP and EIGRP → Bandwidth (by default), Delay (by default), Load,
Reliability IS-IS and OSPF → Cost, Bandwidth (Cisco’s
implementation)

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

Baessa K. (Mettu University) 04 Routers May 26, 2019 56 / 96


Routing Protocols Metrics

Routing Protocols Metrics V

Baessa K. (Mettu University) 04 Routers May 26, 2019 57 / 96


Distance Vector Routing Protocols

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

Distance Vector Routing Protocols I


• 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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 59 / 96


Distance Vector Routing Protocols

Distance Vector Routing Protocols II

• 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

Baessa K. (Mettu University) 04 Routers May 26, 2019 60 / 96


Distance Vector Routing Protocols

Distance Vector Routing Protocols III

Examples of Distance Vector routing protocols


• Routing Information Protocol (RIP)
• Interior Gateway Routing Protocol (IGRP)
• Enhanced Interior Gateway Routing Protocol (EIGRP)

The Meaning of Distance Vector


• A router using distance vector routing protocols knows 2 things:
• Distance to final destination
• Vector, or direction, traffic should be directed (which interface to send
out)

Baessa K. (Mettu University) 04 Routers May 26, 2019 61 / 96


Distance Vector Routing Protocols

Distance Vector Routing Protocols IV


Characteristics of Distance Vector routing protocols
• Periodic updates
• Neighbors
• Broadcast updates
• Entire routing table is included with routing update

Baessa K. (Mettu University) 04 Routers May 26, 2019 62 / 96


Distance Vector Routing Protocols RIP

Outline

1 Introduction

2 Router Basic Configuration

3 DHCP

4 Introduction to Routing and Packet Forwarding

5 Interior Gateway Protocols (IGP)

6 Routing Protocols Metrics

7 Distance Vector Routing Protocols


RIP
Baessa K. (Mettu University) 04 Routers May 26, 2019 63 / 96
Distance Vector Routing Protocols RIP

RIP I

• Routing Information Protocol (RIP) is a classful,true distance-vector


routing protocol.
• RIP sends the complete routing table out to all active interfaces every
30 seconds.
• RIP only uses hop count to determine the best way to a remote
network,
• It has a maximum allowable hop count of 15 by default, meaning that
16 is deemed unreachable.
• RIP works well in small networks, but it’s inefficient on large networks
with slow WAN links or on networks with a large number of routers
installed

Baessa K. (Mettu University) 04 Routers May 26, 2019 64 / 96


Distance Vector Routing Protocols RIP

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

• IP addresses initially divided into classes


• Class A
• Class B
• Class C
• RIP is a classful routing protocol
• Does not send subnet masks in routing updates

Baessa K. (Mettu University) 04 Routers May 26, 2019 65 / 96


Distance Vector Routing Protocols RIP

RIP III

• Administrative Distance
• RIP’s default administrative distance is 120

Baessa K. (Mettu University) 04 Routers May 26, 2019 66 / 96


Distance Vector Routing Protocols RIP

Basic RIPv1 Configuration I

Enabling RIP
• type router rip at the global configuration prompt
• Prompt will look like
1 R1 ( config - router ) #

Baessa K. (Mettu University) 04 Routers May 26, 2019 67 / 96


Distance Vector Routing Protocols RIP

Basic RIPv1 Configuration II

• The network command:


• Enables RIP on all interfaces that are in this network
• Advertises this network in RIP updates sent to other routers every 30
seconds

Baessa K. (Mettu University) 04 Routers May 26, 2019 68 / 96


Distance Vector Routing Protocols RIP

Verification and Troubleshooting I

• To verify and troubleshoot routing, use the following commands:


• show ip route
• show ip protocols
• shows you the routing protocols that are configured on your router.
• debug ip rip
• Displays RIP routing updates when they happen
• sends routing updates as they are sent and received on the router to
the console session.
• If you are telnetted into the router, you’ll need to use the terminal
monitor command to be able to receive the output from the debug
commands.

Baessa K. (Mettu University) 04 Routers May 26, 2019 69 / 96


Distance Vector Routing Protocols RIP

Verification and Troubleshooting II

The passive interface command


• prevents a router from sending updates through an interface
• Example
1 Router ( config - router ) # passive - interface Serial 0/0

Baessa K. (Mettu University) 04 Routers May 26, 2019 70 / 96


Distance Vector Routing Protocols RIP

Automatic Summarization I

• RIP Automatically summarizes classful subnetworks into their major


IP network address
Advantages of automatic summarization
• The size of routing updates is reduced
• Single routes are used to represent multiple routes which results in faster
lookups in the routing table.

Disadvantage of Automatic Summarization


• Does NOT support discontiguous networks

Baessa K. (Mettu University) 04 Routers May 26, 2019 71 / 96


Distance Vector Routing Protocols RIP

Automatic Summarization II

• Both R1 and R3 have subnets from the 172.30.0.0/16 major network,


but R2 does not
• To disable RIP routing use the following command
1 R1 ( config ) # no router rip

Baessa K. (Mettu University) 04 Routers May 26, 2019 72 / 96


Distance Vector Routing Protocols RIP

Summary I

• RIP characteristics include:


• Classful, distance vector routing protocol
• The Metric is Hop Count
• Does not support VLSM or discontiguous subnets
• Updates every 30 seconds
• Rip messages are encapsulated in a UDP segment with source and
destination ports of 520

Baessa K. (Mettu University) 04 Routers May 26, 2019 73 / 96


Distance Vector Routing Protocols RIP

Summary II

Baessa K. (Mettu University) 04 Routers May 26, 2019 74 / 96


Link state Routing

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

2 Router Basic Configuration

3 DHCP

4 Introduction to Routing and Packet Forwarding

5 Interior Gateway Protocols (IGP)

6 Routing Protocols Metrics

7 Distance Vector Routing Protocols

Baessa K. (Mettu University) 04 Routers May 26, 2019 76 / 96


Link state Routing OSPF

OSPF Basics

• Open Shortest Path First (OSPF) is an open standard routing


protocol that’s been implemented by a wide variety of network
vendors, including Cisco.
• OSPF works by using the Dijkstra algorithm.
• First, a shortest path tree is constructed, and then the routing table is
populated with the resulting best paths.
• OSPF converges quickly, although perhaps not as quickly as EIGRP,
and it supports multiple, equal-cost routes to the same destination.
• Like EIGRP, it does support both IP and IPv6 routed protocols.

Baessa K. (Mettu University) 04 Routers May 26, 2019 77 / 96


Link state Routing OSPF

OSPF Basics I

• OSPF provides the following features:


• Consists of areas and autonomous systems
• Minimizes routing update traffic
• Allows scalability
• Supports VLSM/CIDR
• Has unlimited hop count
• Allows multi-vendor deployment (open standard)

Baessa K. (Mettu University) 04 Routers May 26, 2019 78 / 96


Link state Routing OSPF

OSPF Basics II

Baessa K. (Mettu University) 04 Routers May 26, 2019 79 / 96


Link state Routing OSPF

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

Baessa K. (Mettu University) 04 Routers May 26, 2019 80 / 96


Link state Routing OSPF

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 81 / 96


Link state Routing OSPF

OSPF Terminology III

• 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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 82 / 96


Link state Routing OSPF

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)

Baessa K. (Mettu University) 04 Routers May 26, 2019 83 / 96


Link state Routing OSPF

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.

Baessa K. (Mettu University) 04 Routers May 26, 2019 84 / 96


Link state Routing OSPF

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!

Baessa K. (Mettu University) 04 Routers May 26, 2019 85 / 96


Link state Routing OSPF

SPF Tree Calculation I

• Within an area, each router calculates the best/shortest path to every


network in that same area.
• This calculation is based upon the information collected in the
topology database and an algorithm called shortest path first (SPF).
• Picture each router in an area constructing a tree–much like a family
tree–where the router is the root and all other networks are arranged
along the branches and leaves.
• This is the shortest path tree used by the router to insert routes into
the routing table.
• It’s important to understand that this tree contains only networks
that exist in the same area as the router itself does.
• If a router has interfaces in multiple areas, then separate trees will be
constructed for each area.

Baessa K. (Mettu University) 04 Routers May 26, 2019 86 / 96


Link state Routing OSPF

SPF Tree Calculation II


• One of the key criteria considered during the route selection process
of the SPF algorithm is the metric or cost of each potential path to a
network.
• But this SPF calculation doesn’t apply to routes from other areas.
• OSPF uses a metric referred to as cost.
• A cost is associated with every outgoing interface included in an SPF
tree.
• The cost of the entire path is the sum of the costs of the outgoing
inter-faces along the path.
• Because cost is an arbitrary value as defined in RFC 2338, Cisco had
to implement its own method of calculating the cost for each
OSPF-enabled interface.
• Cisco uses a simple equation of 108 bandwidth.
• The bandwidth is the configured bandwidth for the interface.
Baessa K. (Mettu University) 04 Routers May 26, 2019 87 / 96
Link state Routing OSPF

SPF Tree Calculation III

• Using this rule, a 100Mbps Fast Ethernet interface would have a


default OSPF cost of 1 and a 10Mbps Ethernet interface would have
a cost of 10.

Baessa K. (Mettu University) 04 Routers May 26, 2019 88 / 96


Hybrid Routing Protocols

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

2 Router Basic Configuration

3 DHCP

4 Introduction to Routing and Packet Forwarding

5 Interior Gateway Protocols (IGP)

6 Routing Protocols Metrics

7 Distance Vector Routing Protocols

Baessa K. (Mettu University) 04 Routers May 26, 2019 90 / 96


NAT and PAT

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

S-ar putea să vă placă și