62
Routing Protocols:RIP, OSPF, and BGP Amitava Nag Assistant Professor [email protected] April 11, 2012 Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 1 / 23

Routing

Embed Size (px)

Citation preview

Page 1: Routing

Routing Protocols:RIP, OSPF, and BGP

Amitava Nag

Assistant Professor

[email protected]

April 11, 2012

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 1 / 23

Page 2: Routing

What is routing?

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 2 / 23

Page 3: Routing

What is routing?

Finding a path to a destination address

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 2 / 23

Page 4: Routing

What is routing?

Finding a path to a destination address

Routing is performed for many kinds of networks, including thetelephone network (Circuit switching) , electronic data networks (suchas the Internet).

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 2 / 23

Page 5: Routing

What is routing?

Finding a path to a destination address

Routing is performed for many kinds of networks, including thetelephone network (Circuit switching) , electronic data networks (suchas the Internet).

In computer networking a Routing table, or Routing Information Base(RIB), is a data structure in the form of a table-like object

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 2 / 23

Page 6: Routing

What is routing?

Finding a path to a destination address

Routing is performed for many kinds of networks, including thetelephone network (Circuit switching) , electronic data networks (suchas the Internet).

In computer networking a Routing table, or Routing Information Base(RIB), is a data structure in the form of a table-like object

A Routing table is stored either in a router or a networked computerthat lists the routes to particular network destinations.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 2 / 23

Page 7: Routing

What is routing?

Finding a path to a destination address

Routing is performed for many kinds of networks, including thetelephone network (Circuit switching) , electronic data networks (suchas the Internet).

In computer networking a Routing table, or Routing Information Base(RIB), is a data structure in the form of a table-like object

A Routing table is stored either in a router or a networked computerthat lists the routes to particular network destinations.

The routing table contains information about the topology of thenetwork immediately around it.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 2 / 23

Page 8: Routing

Common Fields Of Routing Table

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 3 / 23

Page 9: Routing

IP Routing Basics

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 4 / 23

Page 10: Routing

Static or Dynamic

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 11: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 12: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manually

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 13: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manuallyFixes routes at boot time

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 14: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manuallyFixes routes at boot timeUseful only for simplest cases

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 15: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manuallyFixes routes at boot timeUseful only for simplest cases

2 Dynamic Routing - A routing protocol is ”trying” to find the best wayto a given destination

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 16: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manuallyFixes routes at boot timeUseful only for simplest cases

2 Dynamic Routing - A routing protocol is ”trying” to find the best wayto a given destination

entries are learned by routing protocols

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 17: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manuallyFixes routes at boot timeUseful only for simplest cases

2 Dynamic Routing - A routing protocol is ”trying” to find the best wayto a given destination

entries are learned by routing protocolsTable initialized at boot time

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 18: Routing

Static or Dynamic

1 Static routing - YOU are defining the way packets are going

Entries are configured manuallyFixes routes at boot timeUseful only for simplest cases

2 Dynamic Routing - A routing protocol is ”trying” to find the best wayto a given destination

entries are learned by routing protocolsTable initialized at boot timeNecessary in large internets

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 5 / 23

Page 19: Routing

INTRA- AND INTERDOMAIN ROUTING

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 6 / 23

Page 20: Routing

INTRA- AND INTERDOMAIN ROUTING

An Autonomous system(AS) is a group of networks and routers underthe authority of a single administration.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 6 / 23

Page 21: Routing

INTRA- AND INTERDOMAIN ROUTING

An Autonomous system(AS) is a group of networks and routers underthe authority of a single administration.

Routing inside an autonomous system is referred to as intradomainrouting.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 6 / 23

Page 22: Routing

INTRA- AND INTERDOMAIN ROUTING

An Autonomous system(AS) is a group of networks and routers underthe authority of a single administration.

Routing inside an autonomous system is referred to as intradomainrouting.

Routing between autonomous systems is referred to as interdomainrouting.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 6 / 23

Page 23: Routing

Autonomous systems

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 7 / 23

Page 24: Routing

Popular routing protocols

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 8 / 23

Page 25: Routing

Intradomain (Intra-AS) Routing

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 9 / 23

Page 26: Routing

Intradomain (Intra-AS) Routing

also known as Interior Gateway Protocols (IGP)

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 9 / 23

Page 27: Routing

Intradomain (Intra-AS) Routing

also known as Interior Gateway Protocols (IGP)

most common Intradomain routing protocols:

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 9 / 23

Page 28: Routing

Intradomain (Intra-AS) Routing

also known as Interior Gateway Protocols (IGP)

most common Intradomain routing protocols:

RIP: Routing Information Protocol

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 9 / 23

Page 29: Routing

Intradomain (Intra-AS) Routing

also known as Interior Gateway Protocols (IGP)

most common Intradomain routing protocols:

RIP: Routing Information ProtocolOSPF: Open Shortest Path First

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 9 / 23

Page 30: Routing

Intradomain (Intra-AS) Routing

also known as Interior Gateway Protocols (IGP)

most common Intradomain routing protocols:

RIP: Routing Information ProtocolOSPF: Open Shortest Path FirstIGRP: Interior Gateway Routing Protocol (Cisco proprietary)

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 9 / 23

Page 31: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 32: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 33: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 34: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

After powering-up each router only knows about directly attachednetworks

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 35: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

After powering-up each router only knows about directly attachednetworks

Routing table is sent periodically to all neighbour-routers

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 36: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

After powering-up each router only knows about directly attachednetworks

Routing table is sent periodically to all neighbour-routers

Received updates are examined, changes are adopted in own routingtable

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 37: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

After powering-up each router only knows about directly attachednetworks

Routing table is sent periodically to all neighbour-routers

Received updates are examined, changes are adopted in own routingtable

Metric information (originally) is number of hops

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 38: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

After powering-up each router only knows about directly attachednetworks

Routing table is sent periodically to all neighbour-routers

Received updates are examined, changes are adopted in own routingtable

Metric information (originally) is number of hops

Use ”Bellman-Ford” algorithm

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 39: Routing

DISTANCE VECTOR ROUTING

In distance vector routing,

The least cost route between any two nodes(routers) is the route withminimum distance.

Each router maintains a vector (table) of minimum distances to everynode

After powering-up each router only knows about directly attachednetworks

Routing table is sent periodically to all neighbour-routers

Received updates are examined, changes are adopted in own routingtable

Metric information (originally) is number of hops

Use ”Bellman-Ford” algorithm

Examples: RIP, RIPv2, IGRP (Cisco)

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 10 / 23

Page 40: Routing

Initialization of tables in distance vector routing

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 11 / 23

Page 41: Routing

Updating in distance vector routing

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 12 / 23

Page 42: Routing

Distance vector routing tables

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 13 / 23

Page 43: Routing

Two-node instability

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 14 / 23

Page 44: Routing

Count to infinity

In this example we see what would happen if network link between router xand router A crashes. Immediately, router A has no more informationabout this net. What would happen if router B sends a routing updatenow?Now router A receives a routing update from router B including reachability information about router x. Because router A has no informationabout router x, A adds this information in his routing table and continuoussending his normal routing updates to router B, hereby increasing the hopcount by 1.Either router A or router B has information about the router x, bothrouter will increase the hop count by 1 every routing update. Count toinfinity occurs. Now Update packets are caught in a routing loop.

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 15 / 23

Page 45: Routing

Example: Two-node instability

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 16 / 23

Page 46: Routing

Example: Two-node instability

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 17 / 23

Page 47: Routing

Split Horizon

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 18 / 23

Page 48: Routing

Split Horizon

A router will not send information about routes through an interfaceover which the router has learned about those routes - Exactly THISis split horizon

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 18 / 23

Page 49: Routing

Split Horizon

A router will not send information about routes through an interfaceover which the router has learned about those routes - Exactly THISis split horizon

Idea: ”Don’t tell neighbor of routes that you learned from thisneighbor”

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 18 / 23

Page 50: Routing

Split Horizon

A router will not send information about routes through an interfaceover which the router has learned about those routes - Exactly THISis split horizon

Idea: ”Don’t tell neighbor of routes that you learned from thisneighbor”

That’s what humans (almost) always do: Don’t tell me what I’ve toldyou !

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 18 / 23

Page 51: Routing

Split Horizon

A router will not send information about routes through an interfaceover which the router has learned about those routes - Exactly THISis split horizon

Idea: ”Don’t tell neighbor of routes that you learned from thisneighbor”

That’s what humans (almost) always do: Don’t tell me what I’ve toldyou !Cannot 100

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 18 / 23

Page 52: Routing

Split Horizon with Poison Reverse

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 19 / 23

Page 53: Routing

Split Horizon with Poison Reverse

Declare learned routes as unreachable

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 19 / 23

Page 54: Routing

Split Horizon with Poison Reverse

Declare learned routes as unreachable

”Bad news is better than no news at all”

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 19 / 23

Page 55: Routing

Split Horizon with Poison Reverse

Declare learned routes as unreachable

”Bad news is better than no news at all”

Stops potential loops due to corrupted routing updates

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 19 / 23

Page 56: Routing

Example: Split Horizon With Poison Reverse

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 20 / 23

Page 57: Routing

Link State Routing

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 21 / 23

Page 58: Routing

Link State Routing

Each node in the domain has the entire topology of the domain

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 21 / 23

Page 59: Routing

Link State Routing

Each node in the domain has the entire topology of the domain

the node can use Dijkstras algorithm to build a routing table

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 21 / 23

Page 60: Routing

Link State Routing

Each node in the domain has the entire topology of the domain

the node can use Dijkstras algorithm to build a routing table

link-state: each router exchanges information about itsneighborhood with all routers in the network when there is a change

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 21 / 23

Page 61: Routing

Concept of Link State Routing

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 22 / 23

Page 62: Routing

The End

Amitava Nag (Academy of Technology) Routing Protocols April 11, 2012 23 / 23