ilab Lab 3 Dynamic Routing Static Routing TCP/ IP ISO/ OSI - - PowerPoint PPT Presentation

ilab
SMART_READER_LITE
LIVE PREVIEW

ilab Lab 3 Dynamic Routing Static Routing TCP/ IP ISO/ OSI - - PowerPoint PPT Presentation

Lehrstuhl fr Netzarchitekturen und Netzdienste Institut fr Informatik Technische Universitt Mnchen ilab Lab 3 Dynamic Routing Static Routing TCP/ IP ISO/ OSI Concepts, Hardware, Software Minicom Application Application


slide-1
SLIDE 1

Lehrstuhl für Netzarchitekturen und Netzdienste

Institut für Informatik Technische Universität München

ilab

Lab 3 Dynamic Routing

slide-2
SLIDE 2

2 ilab: Dynamic Routing

Static Routing

Ciscorouter, IPv4, ICMP, ARP

Session Presentation Application Physical Datalink Network Transport Network Transport Application Host-to-Net TCP/ IP ISO/ OSI

Concepts, Hardware, Software

  • 1. Setup - static routing
  • 2. The routing table
  • 3. The default gateway
  • 4. Packet forwarding
  • 5. Further configuring of the Cisco router
  • 6. Checking if everything is set up correctly
  • 7. Watching the packets travel
  • 8. One more interesting experiment...
  • 9. Suggestions/ complaints
  • 10. Please remove the Cables

Minicom

slide-3
SLIDE 3

3 ilab: Dynamic Routing

Dynamic Routing

RIP, OSPF, BGP Session Presentation Application Physical Datalink Network Transport Network Transport Application Host-to-Net TCP/ IP ISO/ OSI

Concepts, Hardware, Software

  • 1. Setup - Dynamic routing
  • 2. RIP (Cisco/ Linux)

2.4. What did RIP do? 2.5. Changing the setup a little... 2.6. Configuring the serial link 2.7. RIP done.

  • 3. OSPF (without/ with areas)

3.3. Distance values 3.6. Compare: OSPF with and without areas 3.7. Ad-/ Disadvantages of OSPF area routing 3.8. Inspecting OSPF packets

  • 4. BGP

4.1. Autonomous systems Cisco Serial Link

Zebra

slide-4
SLIDE 4

4 ilab: Dynamic Routing

Routing – Problem definition

Given: Graph

Main problem:

  • How to determine the shortest

path tree in order to forward packets to their destination

Subproblems:

  • 1. Information gathering - which information do we need
  • 2. Path calculation
  • 3. Forwarding – how does a node decide?
  • Based on its routing table

Routing algorithms solve subproblems 1 and 2

A E D C B F

2 2 1 3 1 1 2 5 3 5

slide-5
SLIDE 5

5 ilab: Dynamic Routing

Distance Vector Routing

Approach

Information gathering

  • Neighboring nodes share their

routing information (destination, costs)

Path calculation

  • Distance table is updates if routing information

has changed

  • e.g. costs have changed

Outcome

  • Update routing table if the best (least expensive) entry in distance table has

changed

Properties

distributed – each nodes only shared information with its neighbor

Iterative - algorithm terminates after all information has been exchanged

A E D C B F

2 2 1 3 1 1 2 5 3 5

B costs 2 C costs 4 D costs 1 E costs 2 F costs 4 A costs 1 B costs 2 C costs 3 E costs 1 F costs 3

?

slide-6
SLIDE 6

6 ilab: Dynamic Routing

Distance Table

D () A B C D A 1 7 6 4 B 15 8 9 11 D 5 5 4 2

E

Costs to destination via

7 8 1 2 1 2

A B C D E

D (Y,Z)

X Distance from X to Y via Z c(X,Z) + min {D (Y,w)}

Z

= =

D (C,D)

E

c(E,D) + min {D (C,w)}

D w

=

= 2+2 = 4

Loop!

Example

Distance table contains unwanted routes

  • Loops result in endlessly circulating packets (until the TTL field expires)

D (C,A)

E

c(E,A) + min {D (C,w)}

A w

=

= 1+5 = 6

slide-7
SLIDE 7

7 ilab: Dynamic Routing

Distance table -> Routing table D () A B C D A 1 7 6 4 B 15 8 9 11 D 5 5 4 2

E costs via

A B C D A,1 D,5 D,4 D,2

Exit link, costs

Distance table

  • f E

Routing table

  • f E
slide-8
SLIDE 8

8 ilab: Dynamic Routing

Changes of the topology and of costs

 Rule:  good news travels fast  bad news travels slowly - “count to infinity” problem!

X

1 4 50 60

etc.

Y Z

slide-9
SLIDE 9

9 ilab: Dynamic Routing

Split Horizon with poison reverse, path vector

 Split-Horizon

  • Update messages of node A to D do not contain routes to nodes, which A

would route via D

 Poison Reverse

  • Cost entry for such nodes is set to infinity
  • Eliminates short loops

 Path vector routing

  • Similar to distance vector protocol
  • In order to avoid the count to infinity problem, nodes also include path

information in their update messages

A E D C B F

2 2 1 3 1 1 2 5 3 5

B costs 2 C costs ∞ D costs ∞ E costs ∞ F costs ∞

slide-10
SLIDE 10

10 ilab: Dynamic Routing

Link-State Routing

Approach

Information gathering

  • Nodes are aware of the network

topology due to the broadcasting of link properties

Path calculation

  • Each node calculates its own shortest

path tree (itself being the root of the tree)

  • Algorithm used:

Dijkstra or Bellman-Ford

  • Derive routing table from shortest

path tree

Result: Routing table

A E D C B F

2 2 1 3 1 1 2 5 3 5

Flooding

A E D C B F

2 1 1 2 1

Shortest Path tree B B C-F D to via

slide-11
SLIDE 11

11 ilab: Dynamic Routing

Algorithm of Dijkstra

1.

INPUT

2.

Q : set of all nodes

3.

a : node

4.

OUTPUT

5.

d : distance for each node

6.

p : predecessor of each node in shortest-path tree

7.

BEGIN

8.

FOR all nodes v DO d[v]=inf; ENDFOR

9.

d[a]=0;

10.

p[a]=null;

11.

N={a}; // MinHeap regarding d[]

12.

WHILE N.notEmpty() DO

13.

v = N.popMinimum();

14.

FOR all nodes u adjacent to v DO

15.

IF d[u] > d[v]+c(v,u) THEN

16.

d[u] = d[v]+c(v,u);

17.

p[u] = v;

18.

N.addOrUpdate(u);

19.

ENDIF

20.

ENDFOR

21.

ENDWHILE

22.

END

Notation:

  • c(i,j): costs from node I to node j
  • d(v): distance from root a to v in the shortest

path tree

  • p(v): Vorgänger von v im Kürzesten-Wege-

Baum

A E D C B F

2 2 1 3 1 1 2 5 3 5

Complexity: O(n2), n being the number of nodes

slide-12
SLIDE 12

12 ilab: Dynamic Routing

Erstellen der Routing-Tabelle

 Erstellen der Routing-Tabelle aus dem Kürzeste-Wege-Baum  Wünschenswert ist es, nicht jedes Ziel einzeln eintragen zu müssen,

sondern Bereiche zusammenfassen zu können.

  • siehe hierarchische Struktur der IP-Adressen

A E D C B F

2 2 1 3 1 1 2 5 3 5 Ziel Nächster Hop B B CDEF D

slide-13
SLIDE 13

13 ilab: Dynamic Routing

Forward-Search Algorithm

 In practice, nodes use a forward search alogorithm based on the

  • riginal algorithm of Dijkstra

 All nodes flood the network with their Link State Packets (LSP)  Nodes maintain a tentative and a confirmed list and calculate the

routing table directly after receiving the LSPs A C B

2 4 1 8 3

D

slide-14
SLIDE 14

14 ilab: Dynamic Routing

Example for node D

Step 1 2 3 4 5 6 7 confirmed (D,0,-) (D,0,-) (D,0,-) (A,1,A) (D,0,-) (A,1,A) (D,0,-) (A,1,A) (B,3,A) (D,0,-) (A,1,A) (B,3,A) (D,0,-) (A,1,A) (B,3,A) (C,6,A) tentativ (A,1,A) (B,4,B) (C,8,C) (B,4,B) (C,8,C) (B,3,A) (C,8,C) (C,8,C) (C,6,A) Notes Read LSP of D populate tentative list Add the least expensive entry to the confirmed list (here A) Read its LSP and update the entries (here: path to B) Add the least expensive entry to the confirmed list Read its LSP and update the entries (here: route to C) Add the least expensive entry to the confirmed list

A C B

2 4 1 8 3

D

slide-15
SLIDE 15

15 ilab: Dynamic Routing

Routing in the internet

slide-16
SLIDE 16

16 ilab: Dynamic Routing

Internet: autonomous systems

AS X AS A AS D AS Z AS B AS C

Inter-AS- connection

Border Router Autonomous System X

AS X

Stub-AS Multihomed AS

Transittraffic

slide-17
SLIDE 17

17 ilab: Dynamic Routing

Dynamic routing in the internet

 Autonomous System (AS):

Networks under one administrative organization

 Interior Gateway (IG):

Internal routers of an AS

 Exterior Gateway (EG):

Border routers Core Network EG EG IG IG IG IG

AS AS

IG

Interior Gateway Protocols (IGP) Exterior Gateway Protocols (EGP) Routing in the internet

  • Exterior Gateway Protocol (EGP) - outdated
  • Border Gateway Protocol (BGP)
  • Routing Information Protocol (RIP)
  • Open Shortest Path First (OSPF)
slide-18
SLIDE 18

18 ilab: Dynamic Routing

Routing hierarchy – protocols

 Intra-Domain-Routing:

  • OSPF (Open Shortest Path First)
  • IAB recommended protocol
  • „Link State“ protocol
  • RIP (Routing Information Protocol) – for small networks
  • Less robust (routing loops)
  • Slower reaction on link changes
  • Distance vector protocol
  • IGRP: Interior Gateway Routing Protocol (Cisco propr.)

 Inter-Domain-Routing:

  • BGP (Border Gateway Protocol)
  • Path vector protocol
  • BGP Version 4 (BGP4) also supports Classless Inter-Domain Routing

(CIDR)

slide-19
SLIDE 19

19 ilab: Dynamic Routing

RIP ( Routing Information Protocol)

Distance-Vektor-Verfahren

since 1982 in BSD-UNIX

Metric: # of Hops (max = 15 Hops)

Distance vectors: updates/advertisements are sent every 30s via UDP

Each advertisement contains routes to max. 25 destination networks

Link declared unreachable after 180s without an update

  • Routes via this neighbor are considered invalid
  • New advertisements have to be sent to all neighboring nodes
  • Sende neue Advertisements zu den Nachbarn
  • Neighbors also send new advertisements on changes
  • Poison-Reverse to avoid loops (infinity = 16 hops)
slide-20
SLIDE 20

20 ilab: Dynamic Routing

OSPF (Open Shortest Path First)

 Link-State-Verfahren

OSPF-Advertisement beinhaltet einen Eintrag pro Nachbarrouter

Advertisements werden an ganzes AS geflutet

Sicherheit: alle OSPF-Messages authentisiert, über TCP-Verbindung

unterstützt Multiple-same-cost-Pfade

Für jeden Link, multiple Kostenmetriken abhängig vom TOS (Linkkosten zum Beispiel abhängig davon, ob Best-Effort oder Realtime-Verkehr)

Integrierte Unterstützung von Uni- und Multicast:

  • Multicast OSPF (MOSPF) basiert auf gleicher Topologie-Datenbank wie

OSPF

Hierarchisches OSPF für große AS.

slide-21
SLIDE 21

21 ilab: Dynamic Routing

Hierarchical OSPF

slide-22
SLIDE 22

22 ilab: Dynamic Routing

Inter-AS-Routing

slide-23
SLIDE 23

23 ilab: Dynamic Routing

BGP

 BGP (Border Gateway Protocol):  Standard protocol in the internet  Path-Vector-Protocol:

  • Similar to distance vector
  • Each border gateway broadcasts its neighbors the entire path

(sequence of AS numbers)

 Neighbors decide based on policies and costs which path to use

slide-24
SLIDE 24

24 ilab: Dynamic Routing

Intra- vs. Inter-AS-Routing

 Policy:

  • Inter-AS: Each administrator wants to control which traffic is routed

through the network

  • Intra-AS: no need for policies

 Scalablity:

  • Hierarchical routing reduces the size of the routing tables and the traffic

needed for exchanging routing information

 Performance:

  • Intra-AS: focusses on performance
  • Inter-AS: policies often more important than performance