Docsity

Computer Networks I: Lecture 14 - Routing Algorithms and ICMP Security Issues - Prof. Patr, Study notes of Computer Systems Networking and Telecommunications

Partial preview of the text

Download Computer Networks I: Lecture 14 - Routing Algorithms and ICMP Security Issues - Prof. Patr and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity!

CS 3251 - Computer Networks I

Tech

CS 3251- Computer

Networks 1:

Routing Algorithms

Professor Patrick Traynor

Lecture 14

CS 3251 - Computer Networks I Tech Announcements

Unannounced learning experience:

‣ You have 5 mins to answer 2 questions.

Project 2 due in one week

‣ How is it coming along?

‣ You will need to demo this work for the TA.

Homework 3 will be posted on Tuesday

‣ Keep an eye on the website.

CS 3251 - Computer Networks I Tech Chapter 4: Network Layer

    1. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 What’s inside a router
  • 4.4 IP: Internet Protocol ‣ (^) Datagram format ‣ (^) IPv4 addressing ‣ (^) ICMP ‣ (^) IPv - 4.5 Routing algorithms ‣ Link state ‣ Distance Vector ‣ Hierarchical routing - 4.6 Routing in the Internet ‣ RIP ‣ OSPF ‣ BGP - 4.7 Broadcast and multicast routing

CS 3251 - Computer Networks I Tech 1 2 3 0111 value in arriving packet’s header routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 Interplay between routing, forwarding

CS 3251 - Computer Networks I Tech Graph abstraction: costs

  • c(x,x’) = cost of link (x,x’)
    • e.g., c(w,z) = 5
  • cost could always be 1, or inversely related to bandwidth, or inversely related to congestion Cost of path (x 1 , x 2 , x 3 ,…, xp) = c(x 1 ,x 2 ) + c(x 2 ,x 3 ) + … + c(xp-1,xp) Question: What’s the least-cost path between u and z? Routing algorithm: algorithm that finds least-cost path u x^ y v w z 2 2 1 3 1 1 2 5 3 5

CS 3251 - Computer Networks I Tech What are the costs?

We will speak very generally about the idea of “link

cost”. Some potential examples include:

‣ Bandwidth/Speed

‣ Physical Length

‣ Monetary Cost

‣ Policy Configurations

CS 3251 - Computer Networks I Tech Chapter 4: Network Layer

    1. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 What’s inside a router
  • 4.4 IP: Internet Protocol ‣ (^) Datagram format ‣ (^) IPv4 addressing ‣ (^) ICMP ‣ (^) IPv - 4.5 Routing algorithms ‣ Link state ‣ Distance Vector ‣ Hierarchical routing - 4.6 Routing in the Internet ‣ RIP ‣ OSPF ‣ BGP - 4.7 Broadcast and multicast routing

CS 3251 - Computer Networks I Tech A Link-State Routing Algorithm Dijkstra’s algorithm

  • net topology, link costs known to all nodes ‣ (^) accomplished via “link state broadcast” ‣ (^) all nodes have same info
  • computes least cost paths from one node (‘source”) to all other nodes ‣ (^) gives forwarding table for that node
  • iterative: after k iterations, know least cost path to k dest.’s Notation: - c(x,y): link cost from node x to y; = ∞ if not direct neighbors - D(v): current value of cost of path from source to dest. v - p(v): predecessor node along path from source to v - N': set of nodes whose least cost path definitively known

CS 3251 - Computer Networks I Tech Dijsktra’s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N'

CS 3251 - Computer Networks I Tech Dijkstra’s algorithm: example

Step

N'

u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u 2,u 2,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y u x^ y v w z 2 2 1 3 1 1 2 5 3 5

CS 3251 - Computer Networks I Tech Dijkstra’s algorithm: example

Step

N'

u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u 2,u 2,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y u x^ y v w z 2 2 1 3 1 1 2 5 3 5

CS 3251 - Computer Networks I Tech Dijkstra’s algorithm: example

Step

N'

u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u 2,u 2,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y u x^ y v w z 2 2 1 3 1 1 2 5 3 5

CS 3251 - Computer Networks I Tech Dijkstra’s algorithm: example

Step

N'

u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u 2,u 2,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y u x^ y v w z 2 2 1 3 1 1 2 5 3 5

CS 3251 - Computer Networks I Tech Dijkstra’s algorithm: example (2) Resulting shortest-path tree from u: v x y w z (u,v) (u,x) (u,x) (u,x) (u,x) destination link Resulting forwarding table in u: u x^ y v w z