petrozavodsk state university, alex moschevikin, 2003

25
Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES IP routing protocols Interior Routing Protocols RIP, RIP2 (Routing Information Protocol) HELLO (not used at the moment) IS-IS (Intermediate System to Intermediate System) IGRP (Interior Gateway Routing Protocol) OSPF (Open Shortest Path First) Exterior Routing Protocols EGP (Exterior Gateway Protocol) BGP (Border Gateway Protocol) Rev. 1.01 / 15.01.2007

Upload: alaula

Post on 28-Jan-2016

57 views

Category:

Documents


0 download

DESCRIPTION

IP routing protocols. Interior Routing Protocols RIP, RIP2 (Routing Information Protocol) HELLO (not used at the moment) IS-IS ( Intermediate System to Intermediate System ) IGRP ( Interior Gateway Routing Protocol ) OSPF ( Open Shortest Path First ) Exterior Routing Protocols - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

IP routing protocols

•Interior Routing Protocols

RIP, RIP2 (Routing Information Protocol)

HELLO (not used at the moment)

IS-IS (Intermediate System to Intermediate System)

IGRP (Interior Gateway Routing Protocol)

OSPF (Open Shortest Path First)

•Exterior Routing Protocols

EGP (Exterior Gateway Protocol)

BGP (Border Gateway Protocol)Rev. 1.01 / 15.01.2007

Page 2: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

IP routing and OSI RM

APPLICATION

PRESENTATION

SESSION

TRANSPORT

NETWORK

DATA LINK

PHYSICAL

Layer 7

Layer 6

Layer 5

Layer 4

Layer 3

Layer 2

Layer 1

TCP

IP

Physical

TCP/IP OSI/RM

IP routing information

IP routing

Page 3: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

First IP router at ARPANET

Interface Message ProcessorBolt, Beranek and Newman, Inc., United

States

The Interface Message Processor (IMP) was the first packet router for the ARPANET, the predecessor of today’s Internet. Inside was a Honeywell 516 minicomputer with only 6,000 words of software to monitor network status and gather statistics. The first ARPANET transmission occurred between the University of California in Los Angeles and Stanford Research Institute in Menlo Park, California, at 22:30 PST on October 29, 1969.

Speed:520,833 Add/sMemory Size:12KCost:$82,200

IMP development teamc. 1965

Page 4: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

IP routing Ethernet-based scheme

routing tablenet gateway if194.0.1.0 Eth0194.0.4.0 Eth1194.0.8.0 194.0.8.128 ppp0Default ppp0

IP router 1

194.0.4.1

194.0.1.1

194.0.8.1

defaultgateway

194.0.1.1

Source

194.0.1.100

Destination

194.0.32.4

routing table194.0.8.0 ppp0194.0.32.0 Eth1

IP router 2

194.0.8.128

194.0.32.1

IP datagram194.0.1.100 ==> 194.0.32.4

Source and destination IP addresses remain the same from hop to hop, but MAC addresses are substituted by routers and

correspond to the certain source and destination interfaces in each

LAN

ppp0

Eth1Eth0

Eth1

ppp0

Page 5: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Routing tables

•Routing Tables & static routing •Dynamic routing (inter-domain and intra-domain)

$ /sbin/routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface10.64.64.1 * 255.255.255.255 UH 0 0 0 ppp0172.16.227.0 * 255.255.255.0 U 0 0 0 vmnet8172.16.216.0 * 255.255.255.0 U 0 0 0 vmnet1127.0.0.0 * 255.0.0.0 U 0 0 0 lodefault 10.64.64.1 0.0.0.0 UG 0 0 0 ppp0vmnet* - виртуальные интерфейсы VmWare

Routing tables are used in IP forwarding ("netstat -rn") Routing table may be altered by:

a) ‘route’ command b) routing daemon (eg: ‘routed’) c) ICMP redirect message.

Page 6: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Routing tables

Fields: destination, gateway, flags, metric

Destination: can be a host address or a network address. Subnet mask also present, but implicit for this discussion. If the ‘H’ flag is set, it is the host address.

Gateway: router/next hop IP address. The ‘G’ flag says whether the destination is directly connected (link address & IP address refer to destination), or indirectly connected (link address refers to router’s, IP address refers to destination)

U flag: Is route up ?G: router (indirect vs direct) H flag: host (dest field: host or n/w address?) D & M flags: created/modified by ICMP redirect

Page 7: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Routing tables

c:\>netstat -rn (dial-up access to Electrosvyaz')Active routes:

Net address Mask Gateway Interface Metric 0.0.0.0 0.0.0.0 217.107.59.114 217.107.59.114 1 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 217.107.59.0 255.255.255.0 217.107.59.114 217.107.59.114 1 217.107.59.114 255.255.255.255 127.0.0.1 127.0.0.1 1 217.107.59.255 255.255.255.255 217.107.59.114 217.107.59.114 1 224.0.0.0 224.0.0.0 217.107.59.114 217.107.59.114 1255.255.255.255 255.255.255.255 217.107.59.114 217.107.59.114 1

guess local IP addressActive connections: (after establishing few POP3 sessions)

Name Local address External address Condition TCP 217.107.59.114:1037 194.85.172.211:110 ESTABLISHED TCP 217.107.59.114:1038 195.161.9.73:110 TIME_WAIT TCP 217.107.59.114:1040 195.161.136.3:110 ESTABLISHED TCP 217.107.59.114:1041 217.107.58.235:110 ESTABLISHED TCP 217.107.59.114:1042 194.85.172.129:110 ESTABLISHED

Page 8: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Routing daemons

•irdd daemon implements the Internet Router Discovery (IRD) protocol.

•routed daemon implements version I of the Routing Information Protocol (RIP I) to exchange routing information.

•gated daemon now implements the SNMP Multiplexing (SMUX) protocol, which provides support for the following Simple Network Management Protocol (SNMP) Management Information Bases (MIBs) and EGP, BGP, RIP 2, OSPF as well.

Page 9: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Distance vector vs Link State routing

DISTANCE VECTOR:•Distance vector protocols count the number of devices data must

flow through to reach a destination. Each device is referred to as a 'hop'. Routes with lower hop counts are preferred.

•Very little overhead in terms of processor power and memory.•Algorithm chooses the best route according to the hop count

metric.

LINK STATE:•Link State protocols track the status and connection type (and

therefore speed) of each link, and produce a calculated metric based on these and other factors, including some set by the network administrator.

•more processor power and memory, take longer to converge, and therefore longer to recover from network outages.

Page 10: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Distance vector vs Link State routing

LINK STATEA==>B==>C==>D

100MbEth

100MbEth

10MbEth

128kbISDN

C

D

DISTANCE VECTORA ==> D

A

B

A, B, C, D - routers

100MbEth

100MbEth

10MbEth

128kbISDN

C

DA

B

Page 11: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

RIP

RIP: Routing Information Protocol

Active (routers advertise their route tables) and passive (hosts) devices

Key fields of RIP packet: command, AFI, IP address, metric •Command: request and response. •Address Family Identifier (AFI): 2 for IP. •IP address: subnet masks are not passed => variable

length subnet masks (VSLMs) cannot be supported. The routers have to know apriori what subnet masks are being used. Convention: 255.255.255.0

•Metric: hop count. Max = 16 (“infinity”)

Page 12: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

RIP cont'd

RIP supports both point-to-point & broadcast links, uses port 520 in UDP. Normal mode = broadcast packets => overhead of each station processing it.

Each RIP packet can contain upto 25 addresses. Usually a table can fit inside one packet.

Router advertises its tables to neighbors every 30 s. Route is reinitialized (as 16 or infinity) if no refresh for 180 s, and may be removed later.

Triggered updates: inform neighbors when table changes.

Delay updates to avoid “update storms”.

Page 13: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

RIP problems

Counting-to-infinity problem Simple configuration A->B->C. If C fails, B needs to update and thinks there is a route through A. A needs to update and thinks there is a route through B. No clear solution, except to set infinity to be small (eg 16 in RIP)

Slow convergence after topology change•Due to count to infinity problem•Also information cannot propogate through node until it

recalculates routing info

CA B

Page 14: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

RIP problems

Black-holesIf one node goes broke and advertises route of zero to several key networks, all nodes immediately point to it. General problem in distance-vector methods

How to install a fix in a distributed manner? Require protocol to be “self-stabilizing” I.e even if some nodes are faulty, once they are isolated, the system should quickly return to normal operation

Broadcasts => resources from all nodes Does not support VLSMsNo authentication

Page 15: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

RIPv2 (RIP II)

Provides:

VLSM support (subnet mask in reserved field of RIP packet)

authentication

multicasting (224.0.0.0)

“wire-sharing” by multiple routing domains (reduce the volume of tranferred data of the Internet routing tables due to CIDR)

A

10.0.1.0/26(10.0.1.0-10.0.1.63)

10.0.1.64/26(10.0.1.64-10.0.1.127)

10.0.1.128/25(10.0.1.128-10.0.1.255)

BInternet

info on routing tonet with 24-bit mask

10.0.1.0/24(10.0.1.0-

10.0.1.255) different IP nets,maybe different physical nets

Page 16: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Interior Gateway Routing Protocol

As RIP:•distance vector protocol•routing update messages

Not as RIP:•implemented only in Cisco routers•composite metric, factoring weighted, that is calculated by

mathematical values for internetwork delay, bandwidth, reliability, and load. These constants are expressed as certain metric and administrator can vary it.

•IGRP permits multipath routing (round-robin algorithm of choosing the way of available routes even if they are of not equal metric)

Page 17: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Stability features of IGRP

Holddown: after the break of router other routers begin to exchange information on the changed scheme (triggered). But if at this moment regular routing update will take place (somebody don't know about breakdown) tables will be not correct. Holddowns tell routers to hold down any changes that might affect routes for some period of time. The holddown period usually is calculated to be just greater than the period of time necessary to update the entire network with a routing change. Split-horizon (solving counting to infinity): If A’s route to C is through B, then A advertises C’s route (only to B) as infinity.

C

A B

D

E

triggered

regular

CA B

Page 18: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Stability features of IGRP (cont'd)

Split horizons should prevent routing loops between adjacent routers, butpoison-reverse updates are necessary to defeat larger routing loops. Increases in routing metrics generally indicate routing loops. Poison-reverse updates then are sent to remove the route and place it in holddown. In Cisco's implementation of IGRP, poison-reverse updates are sent if a route metric has increased by a factor of 1.1 or greater.

IGRP timers:update timer frequency of routing update messages (90 seconds)invalid timer route is invalid after … (3 times of update period)hold-time variable specifies the holddown period (invalid+10s)flush timer flushed the route from the routing table (7 times of update)

Page 19: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Open Shortest Path First

Open + SPF (Dijkstra’s algorithm)

OSPF runs directly on top of IP (not over UDP)

Unlike RIP, OSPF can operate with hierarchy. (Autonomous System - common administration and common routing strategy, OSPF - IGP, but is capable of receiving routes from and sending routes to other ASs).

Link State protocol: calls for the sending of link-state advertisements (LSAs) to

all other routers within the same hierarchical areaLSA: attached interfaces, metrics, and other variablesrouters accumulate link-state information and use the SPF

algorithm to calculate the shortest path to each node

Page 20: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Open Shortest Path First

AS can be divided into a number of areas (the same topological database for routers in the same area)

E, F, G - Area Border Routers E, F, G, H - backboneRouter A knows only about routers B and ETwo different types of OSPF routing: intra-area and interarea

routingThe backbone topology is invisible to all intra-area routers, as

are individual area topologies to the backbone

ASarea 1

area 2

area 3E

FA

B

C

DG

H

H1

H2

virtual backbone link

Page 21: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

OSPF algorithm

Each participating router distributes its local state (i.e., the router's usable interfaces and reachable neighbors) to others inside area or backbone

From the topology database, each router constructs a tree of the shortest paths with itself as the root (the route to each destination in the AS)

OSPF chooses the least cost path as the best path

Table of shortest paths = routing table

Key fields of OSPF packet (24 bytes):oType (hello, database description, link-state request and

response, link-state acknowledgement)oRouter ID (source)oSource area ID (0.0.0.0 for backbone)oupper-level data

Page 22: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Additional OSPF features

LSA are sent every 30 minutes

authentication (MD5 algorithm)

equal-cost, multipath routing (round-robin algorithm)

load balancing: distributing traffic equally among routes

routing based on upper-layer type-of-service (TOS) requests (delay, low throughput, and high reliability bits in IP headers)

VLSMs support

Advantages of link state over distance vector:

Faster convergence than distance vector

Easier to discover network topology, troubleshoot network

Can do better source-routing with link-state Type & Quality-of-service routing (multiple route tables) possible

Page 23: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

Border Gateway Protocol

BGP is replacing EGP

routing between ASs

BGP provides a mechanism that allows non-core routers to learn routes from core routers so that they can choose optimal backbone routes

distance vector protocol

keep-alive messages every 30 seconds

BGP uses TCP - reliable delivery

AB

CAS1

AS2AS3

AS5

AS4

BGPBGP BGP

BGP

RIP

RIPIGRP

OSPF, RIP

RIP

Page 24: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

BGP-4 features

Three types of routing:

1.interautonomous system routing

2.intra-autonomous system routing (between two or more BGP routers located within the same autonomous system, ex. in university building)

3.pass-through autonomous system routing (virtual channels)

B

CAS

BGP

BGP

IGP

Page 25: Petrozavodsk State University, Alex Moschevikin, 2003

Petrozavodsk State University, Alex Moschevikin, 2003 NET TECHNOLOGIES

BGP-4 features (cont'd)

AS has the responsibility of advertising reachability info to other ASs.

Received routing info is retained and not inserted into routing table until incremental update.

Routers send only the portion of their routing table that has changed, not the whole table every session.

The best route is chosen on path attributes, for example, administrative preferences based on political, organizational, or security considerations in the routing decisionas well as number of autonomous systems through which the path passes, stability, speed, delay, or cost.