ECE/CS 372 - PowerPoint PPT Presentation

1 / 80
About This Presentation
Title:

ECE/CS 372

Description:

Lecture 13 Announcements: Chapter 4, : * Acknowledgement: s drawn heavily from Kurose & Ross – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 81
Provided by: JimKurosea381
Category:
Tags: ece | elastic | graph | matching

less

Transcript and Presenter's Notes

Title: ECE/CS 372


1
ECE/CS 372 introduction to computer
networksLecture 13
  • Announcements

Acknowledgement slides drawn heavily from Kurose
Ross
2
Network layer
  • network layer protocols run at
  • end systems
  • routers
  • Sender side
  • get segments from transport layer
  • encapsulates segments into IP datagrams
  • router examines header fields in all IP datagrams
  • Receiver side
  • delivers segments to transport layer

3
Interplay between routing and forwarding
  • routing algorithm constructs routing tables
  • forwarding table a lookup table for figuring out
    output port for each input pkt
  • forwarding process move pkts from input to
    output

1
2
3
Destination
  • routing process find route taken by packets from
    source to dest.

4
Two Key Network-Layer Functions
  • analogy
  • routing process of planning trip from source to
    dest
  • forwarding process of getting through single
    interchange
  • forwarding move packets from routers input to
    appropriate router output
  • routing determine route taken by packets from
    source to dest.
  • routing algorithms

5
Network service model
Q What services are needed/offered to transport
datagrams from sender to receiver?
  • Example services for a flow of datagrams
  • In-order
  • in-order datagram delivery
  • Throughput
  • guaranteed minimum bandwidth to flow
  • Jitter delay
  • restrictions on changes in inter-packet spacing
  • Example services for individual datagrams
  • Reliability
  • Guaranteed delivery
  • End-to-end delay
  • guaranteed delivery within 40 msec delay

6
Network layer connection and connection-less
services
  • Network-layer versus transport-layer services
  • datagram network provides network-layer
    connectionless service
  • Virtual Circuit (VC) network provides
    network-layer connection service

Transport layer Network layer
Service Process to process Host to host
Choice Reliable (TCP) and unreliable (UDP) Unreliable only (Best effort)
Implementation Edge (Hosts) Core (routers)
7
Datagram or VC network why?
  • Datagram
  • data exchange among computers (Internet)
  • elastic service, no strict timing req.
  • smart end systems (computers)
  • can adapt, perform control, error recovery
  • simple inside network, complexity at edge
  • many link types
  • different characteristics
  • uniform service difficult
  • Virtual Circuit (VC)
  • evolved from telephony
  • voice conversation
  • strict timing, reliability requirements
  • need for guaranteed service
  • dumb end systems
  • telephones
  • complexity inside network

8
Datagram networks
  • no call setup at network layer
  • no state about end-to-end connections is kept in
    routers
  • no network-level concept of connection
  • packets forwarded using dest. host address
  • packets (same source-dest pair) may take
    different paths

1. Send data
2. Receive data
9
Forwarding table
4 billion possible entries
Destination Address Range
Link
Interface 11001000 00010111 00010000
00000000
through
0 11001000
00010111 00010111 11111111 11001000
00010111 00011000 00000000
through
1
11001000 00010111 00011000 11111111
11001000 00010111 00011001 00000000
through

2 11001000 00010111 00011111 11111111
otherwise

3
10
Longest prefix matching
Prefix Match
Link Interface
11001000 00010111 00010
0 11001000 00010111
00011000 1
11001000 00010111 00011
2
otherwise
3
Examples
Which interface?
DA 11001000 00010111 00010110 10100001
Which interface?
DA 11001000 00010111 00011000 10101010
11
Chapter 4 Network Layer
  • Introduction
  • IP Internet Protocol
  • IPv4 addressing
  • NAT, IPv6
  • Routing algorithms
  • Link state
  • Distance Vector
  • Routing in the Internet
  • RIP, OSPF, BGP

12
The Internet Network layer
  • Host, router network layer functions

Transport layer TCP, UDP
Network layer
Link layer
physical layer
13
IP Fragmentation Reassembly
  • network links have MTU (max.transfer size) -
    largest possible link-level frame.
  • different link types, different MTUs
  • large IP datagram divided (fragmented) within
    net
  • one datagram becomes several datagrams
  • reassembled only at final destination
  • IP header bits used to identify, order related
    fragments

fragmentation in one large datagram out 3
smaller datagrams
reassembly
14
IP Fragmentation Reassembly (ctd)
  • Example
  • 4000 byte datagram
  • 20 (header) 3980 (data)
  • MTU 1500 bytes

15
IP Fragmentation Reassembly (ctd)
  • Example
  • 4000 byte datagram
  • 20 (header) 3980 (data)
  • MTU 1500 bytes

1480 bytes in data field
offset 1480/8
1040 20 (header) 1020 (data) 1020 (data) 3980
1480 -1480
16
IP Addressing introduction
  • IP address 32-bit identifier for
  • host,
  • router interface
  • interface connection between host/router and
    physical link
  • multiple interfaces per router
  • one interface per host
  • one IP address per interface

17
Subnets
  • IP address
  • subnet part (higher bits)
  • host part (lower bits)
  • Whats a subnet ?
  • device interfaces with same subnet part of IP
    address
  • can physically reach each other without
    intervening router

network consisting of 3 subnets
18
Subnets
  • Recipe
  • To determine the subnets, detach each interface
    from its host or router, creating islands of
    isolated networks. Each isolated network is
    called a subnet.

Subnet mask /24
19
Subnets
223.1.1.2
  • How many?

223.1.1.1
223.1.1.4
223.1.1.3
223.1.7.0
223.1.9.2
223.1.9.1
223.1.7.1
223.1.8.0
223.1.8.1
223.1.2.6
223.1.3.27
223.1.2.1
223.1.2.2
223.1.3.2
223.1.3.1
20
IP addressing CIDR
  • Classful addressing A, B, C
  • A /8
  • B /16
  • C /24
  • CIDR Classless InterDomain Routing
  • subnet portion of address of arbitrary length
  • address format a.b.c.d/x, where x is bits in
    subnet portion of address
  • (only 28 subnets, but 224 hosts per subnet)
  • (216 subnets, and 216 hosts per subnet)
  • (224 subnets, but only 28 hosts per subnet)

21
IP addresses how to get one?
  • Q How does host get IP address?
  • hard-coded by system admin in a file
  • DHCP Dynamic Host Configuration Protocol
  • dynamically get IP address from as server when
    joining the network
  • IP address can be reused by other hosts if
    released
  • Can renew IP addresses if stayed connected

22
DHCP client-server scenario
223.1.2.1
DHCP

223.1.1.1
server

223.1.1.2
223.1.2.9
223.1.1.4
223.1.2.2
arriving DHCP client needs address in
this network
223.1.1.3
223.1.3.27

223.1.3.2
223.1.3.1

23
IP addresses how to get one?
  • Q How does network get subnet part of IP addr?
  • A gets allocated portion of its provider ISPs
    address space

ISP's block 11001000 00010111 00010000
00000000 200.23.16.0/20 Organization 0
11001000 00010111 00010000 00000000
200.23.16.0/23 Organization 1 11001000
00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100
00000000 200.23.20.0/23 ...
..
. . Organization 7
11001000 00010111 00011110 00000000
200.23.30.0/23
24
IP addressing the last word...
  • Q How does an ISP get block of addresses?
  • A ICANN Internet Corporation for Assigned
  • Names and Numbers
  • allocates addresses
  • manages DNS
  • assigns domain names, resolves disputes

25
ECE/CS 372 introduction to computer
networksLecture 14
  • Announcements
  • Lab 4 is posted and is due next Wednesday

Acknowledgement slides drawn heavily from Kurose
Ross
26
Example
  • Three subnets
  • All interfaces in all these subnets are required
    to have prefix 223.1.13.0/24
  • Subnet 1 is required to support 125 interfaces
  • Subnet 2 3 are each required to support 60
    interfaces
  • Question
  • Provide 3 network addresses in the form
    a.b.c.d/x
  • 1 , 2 and 3

27
Chapter 4 Network Layer
  • Introduction
  • IP Internet Protocol
  • IPv4 addressing
  • NAT, IPv6
  • Routing algorithms
  • Link state
  • Distance Vector
  • Routing in the Internet
  • RIP, OSPF, BGP

28
NAT Network Address Translation
rest of Internet
local network (e.g., home network) 10.0.0/24
10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
Datagrams with source or destination in this
network have 10.0.0/24 address for source,
destination (as usual)
All datagrams leaving local network have same
single source NAT IP address 138.76.29.7, differe
nt source port numbers
29
NAT Network Address Translation
  • Motivation
  • local network uses just one IP address as far as
    outside world is concerned
  • range of addresses not needed from ISP just one
    IP address for all devices
  • can change addresses of devices in local network
    without notifying outside world
  • can change ISP without changing addresses of
    devices in local network
  • devices inside local net not explicitly
    addressable, visible by outside world (a security
    plus).

30
NAT Network Address Translation
NAT translation table WAN side addr LAN
side addr
138.76.29.7, 5001 10.0.0.1, 3345

10.0.0.1
10.0.0.4
10.0.0.2
138.76.29.7
10.0.0.3
4 NAT router changes datagram dest addr
from 138.76.29.7, 5001 to 10.0.0.1, 3345
3 Reply arrives dest. address 138.76.29.7,
5001
31
IPv6
  • Initial motivation
  • 32-bit address space soon to be completely
    allocated.
  • Additional motivation
  • header changes to facilitate QoS
  • Major changes from IPv4
  • Fragmentation no longer allowed drop packet if
    too big send an ICMP msg back
  • Checksum removed to reduce processing time
    already done at transport and link layers

32
Transition From IPv4 To IPv6
  • Can all routers be upgraded simultaneously ??
  • Answer it cant no flag days
  • Analogy (IP for Internet) (foundation
    for House)
  • To change the foundation, you need to tear down
    the house!!
  • Solution
  • gradually incorporate IPv6 (may take few years)
  • How will the network operate with mixed IPv4 and
    IPv6 routers?
  • Tunneling??

33
Tunneling
D
C
What is the problem here?
  • Be aware that
  • IPv6 nodes have both IPv4 IPv6 addresses
  • Nodes know which nodes are IPv4 and which ones
    are IPv6 (use for e.g. DNS)

Why cant B just send an IPv4 packet to C ?
Problem D wont be able to send an IPv6 packet
to E? Why?
A-to-B IPv6
34
Tunneling
tunnel
Logical view
IPv6
IPv6
IPv6
IPv6
Physical view
IPv6
IPv6
IPv6
IPv6
IPv4
IPv4
  • Be aware that
  • IPv6 nodes have both IPv4 IPv6 addresses
  • Nodes know which nodes are IPv4 and which one are
    IPv6 (use for e.g. DNS)

A-to-B IPv6
35
Chapter 4 Network Layer
  • Introduction
  • IP Internet Protocol
  • IPv4 addressing
  • NAT, IPv6
  • Routing algorithms
  • Link state
  • Distance Vector
  • Routing in the Internet
  • RIP, OSPF, BGP

36
Routing versus forwarding
37
Graph abstraction
Graph G (N,E) N set of routers u, v, w,
x, y, z E set of links (u,v), (u,x),
(v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z)
38
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 (x1, x2, x3,, xp) c(x1,x2)
c(x2,x3) c(xp-1,xp)
Question Whats the least-cost path between u
and z ?
The routing algorithms job is to find this
least-cost path
39
Chapter 4 Network Layer
  • Introduction
  • IP Internet Protocol
  • IPv4 addressing
  • NAT, IPv6
  • Routing algorithms
  • Link state
  • Distance Vector
  • Routing in the Internet
  • RIP, OSPF, BGP

40
A Link-State Routing Algorithm
  • Dijkstras algorithm
  • Each node computes least cost paths from it to
    all other nodes
  • Each node knows entire net topology, all link
    costs
  • Each node broadcasts link state of its
    neighbors only, but to all
  • iterative after k iterations, know least cost
    path to k dest.s
  • Notation
  • c(x,y) link cost from node x to y 8 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

41
Dijkstras algorithm example
D(v),p(v) 2,u
D(x),p(x) 1,u
Step 0 1 2 3 4 5
D(w),p(w) 5,u
D(y),p(y) 8
N' u
D(z),p(z) 8
\N -
1 Initialization 2 N' u 3 for all
nodes b 4 if b adjacent to u 5
then D(b) c(u,b) 6 else D(b) 8
42
Dijkstras algorithm example
D(v),p(v) 2,u 2,u
D(x),p(x) 1,u
Step 0 1 2 3 4 5
D(w),p(w) 5,u 4,x
D(y),p(y) 8 2,x
N' u ux
D(z),p(z) 8
\N - vwy
  • 8 Loop
  • find c not in N' such that D(c) is a minimum
  • 10 add c to N'
  • 11 update D(b) for all b adjacent to c not in
    N'
  • 12 D(b) min( D(b), D(c) c(c,b) )
  • 15 until all nodes in N'

43
Dijkstras algorithm example
D(v),p(v) 2,u 2,u 2,u
D(x),p(x) 1,u
Step 0 1 2 3 4 5
D(w),p(w) 5,u 4,x 3,y
D(y),p(y) 8 2,x
N' u ux uxy
D(z),p(z) 8 8 4,y
\N - vwy wz
  • 8 Loop
  • find c not in N' such that D(c) is a minimum
  • 10 add c to N'
  • 11 update D(b) for all b adjacent to c not in
    N'
  • 12 D(b) min( D(b), D(c) c(c,b) )
  • 15 until all nodes in N'

44
Dijkstras algorithm example
D(v),p(v) 2,u 2,u 2,u
D(x),p(x) 1,u
Step 0 1 2 3 4 5
D(w),p(w) 5,u 4,x 3,y 3,y
D(y),p(y) 8 2,x
N' u ux uxy uxyv
D(z),p(z) 8 8 4,y 4,y
\N - vwy wz w
  • 8 Loop
  • find c not in N' such that D(c) is a minimum
  • 10 add c to N'
  • 11 update D(b) for all b adjacent to c not in
    N'
  • 12 D(b) min( D(b), D(c) c(c,b) )
  • 15 until all nodes in N'

45
Dijkstras algorithm example
D(v),p(v) 2,u 2,u 2,u
D(x),p(x) 1,u
Step 0 1 2 3 4 5
D(w),p(w) 5,u 4,x 3,y 3,y
D(y),p(y) 8 2,x
N' u ux uxy uxyv uxyvw
D(z),p(z) 8 8 4,y 4,y 4,y
\N - vwy wz w z
  • 8 Loop
  • find c not in N' such that D(c) is a minimum
  • 10 add c to N'
  • 11 update D(b) for all b adjacent to c not in
    N'
  • 12 D(b) min( D(b), D(c) c(c,b) )
  • 15 until all nodes in N'

46
Dijkstras algorithm example
D(v),p(v) 2,u 2,u 2,u
D(x),p(x) 1,u
Step 0 1 2 3 4 5
D(w),p(w) 5,u 4,x 3,y 3,y
D(y),p(y) 8 2,x
D(z),p(z) 8 8 4,y 4,y 4,y
\N - vwy wz w z -
N' u ux uxy uxyv uxyvw uxyvwz
  • 8 Loop
  • find c not in N' such that D(c) is a minimum
  • 10 add c to N'
  • 11 update D(b) for all b adjacent to c not in
    N'
  • 12 D(b) min( D(b), D(c) c(c,b) )
  • 15 until all nodes in N'

47
Dijkstras Algorithm
1 Initialization 2 N' a 3 for all
nodes b 4 if b adjacent to a 5
then D(b) c(a,b) 6 else D(b) 8 7 8
Loop 9 find c not in N' such that D(c) is a
minimum 10 add c to N' 11 update D(b) for
all b adjacent to c and not in N' 12
D(b) min( D(b), D(c) c(c,b) ) 13 / new
cost to b is either old cost to b or known 14
shortest path cost to c plus cost from c to b /
15 until all nodes in N'
48
Dijkstras algorithm example
Resulting shortest-path tree from u
  • To remember !
  • Each node must have complete knowledge of entire
    network
  • Broadcast all link states
  • Each node constructs its own table

Resulting forwarding table in u
49
Dijkstras algorithm, discussion
  • Algorithm complexity n nodes
  • each iteration need to check all nodes, w, not
    in N
  • n(n1)/2 comparisons O(n2)
  • Oscillations possible
  • e.g., link cost amount of carried traffic
  • Here D, C, and B all send to A

50
ECE/CS 372 introduction to computer
networksLecture 15
  • Announcements
  • HW3 is posted and is due next Thursday
  • Lab 4 is posted and is due next Thursday

Acknowledgement slides drawn heavily from Kurose
Ross
51
Chapter 4 Network Layer
  • Introduction
  • IP Internet Protocol
  • IPv4 addressing
  • NAT, IPv6
  • Routing algorithms
  • Link state
  • Distance Vector
  • Routing in the Internet
  • RIP, OSPF, BGP

52
Distance Vector Algorithm
  • Bellman-Ford Equation (dynamic programming)
  • Define
  • du(z) cost of least-cost path from u to z
  • Then
  • du(z) min c(u,a) da(z)
  • where min is taken over all neighbors a of u

a
53
Bellman-Ford example
Clearly, dv(z) 5, dx(z) 3, dw(z) 3
B-F equation says
du(z) min c(u,v) dv(z),
c(u,x) dx(z), c(u,w)
dw(z) min 2 5,
1 3, 5 3 4
Node that achieves minimum is next hop in
shortest path ? forwarding table
54
Distance Vector (DV) Algorithm
  • Node x knows cost to each neighbor v c(x,v)
  • Node x estimates least cost Dx(y) from it to each
    node y
  • Node x maintains DV Dx Dx(y) y ? N for all
    nodes
  • Node x also maintains its neighbors DV
  • For each neighbor v, x maintains Dv Dv(y) y
    ? N

55
Distance vector (DV) algorithm
  • Basic idea
  • Each node periodically sends its own distance
    vector estimate to neighbors
  • When a node x receives new DV estimate from
    neighbor, it updates its own DV using B-F
    equation

Dx(y) ? minvc(x,v) Dv(y) for each node y ?
N
  • The estimate Dx(y) will eventually converge to
    the actual least cost after a number of
    iterations

56
Distance Vector (DV) Algorithm
  • Iterative, asynchronous each local iteration
    caused by
  • local link cost change
  • DV update message from neighbor
  • Distributed
  • each node notifies neighbors only when its DV
    changes
  • neighbors then notify their neighbors if necessary

Each node
57
w x y z
cost to
node w table
0 8 3 8
from
y
8 8 8 8
w x y z
cost to
8 0 2 1
node x table
y
8 8 8 8
from
z
8 8 8 8
3
w x y z
cost to
5
2
3 2 0 5
node y table
w
8 8 8 8
1
x
8 8 8 8
from
z
8 8 8 8
w x y z
cost to
8 1 5 0
node z table
x
8 8 8 8
from
y
8 8 8 8
time
Initialization
58
w x y z
w x y z
cost to
cost to
node w table
0 8 3 8
0 8 3 8
from
from
y
y
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
8 0 2 1
8 0 2 1
node x table
y
y
3 2 0 5
8 8 8 8
from
from
z
z
8 8 8 8
8 8 8 8
3
w x y z
cost to
w x y z
cost to
5
2
3 2 0 5
3 2 0 5
node y table
w
w
8 8 8 8
8 8 8 8
1
x
x
8 8 8 8
from
8 8 8 8
from
z
z
8 8 8 8
8 8 8 8
y broadcasts DV to its neighbors x,w,z
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 8 8 8
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
59
w x y z
w x y z
cost to
cost to
node w table
0 8 3 8
0 8 3 8
from
from
y
y
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
8 0 2 1
8 0 2 1
node x table
y
y
3 2 0 5
8 8 8 8
from
from
z
z
8 8 8 8
8 8 8 8
3
w x y z
cost to
w x y z
cost to
5
2
3 2 0 5
3 2 0 5
node y table
w
w
0 8 3 8
8 8 8 8
1
x
x
8 8 8 8
from
8 8 8 8
from
z
z
8 8 8 8
8 8 8 8
w broadcasts DV to its neighbors y
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 8 8 8
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
60
w x y z
w x y z
cost to
cost to
node w table
0 8 3 8
0 8 3 8
from
from
y
y
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
8 0 2 1
8 0 2 1
node x table
y
y
3 2 0 5
8 8 8 8
from
from
z
z
8 8 8 8
8 8 8 8
3
w x y z
cost to
w x y z
cost to
5
2
3 2 0 5
3 2 0 5
node y table
w
w
0 8 3 8
8 8 8 8
1
x
x
8 0 2 1
from
8 8 8 8
from
z
z
8 8 8 8
8 8 8 8
x broadcasts DV to its neighbors y,z
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 0 2 1
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
61
w x y z
w x y z
cost to
cost to
node w table
0 8 3 8
0 8 3 8
from
from
y
y
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
8 0 2 1
8 0 2 1
node x table
y
y
3 2 0 5
8 8 8 8
from
from
z
z
8 8 8 8
8 1 5 0
w x y z
cost to
w x y z
cost to
3 2 0 5
3 2 0 5
node y table
w
w
0 8 3 8
8 8 8 8
x
x
8 0 2 1
from
8 8 8 8
from
z
z
8 8 8 8
8 1 5 0
z broadcasts DV to its neighbors x,y
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 0 2 1
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
62
w x y z
w x y z
cost to
cost to
node w table
0 8 3 8
0 8 3 8
from
from
y
y
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
8 0 2 1
8 0 2 1
node x table
y
y
3 2 0 5
8 8 8 8
from
from
z
z
8 8 8 8
8 1 5 0
w x y z
cost to
w x y z
cost to
3 2 0 5
3 2 0 5
node y table
w
w
0 8 3 8
8 8 8 8
x
x
8 0 2 1
from
8 8 8 8
from
z
z
8 8 8 8
8 1 5 0
All neighbor DV broadcasts are done
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 0 2 1
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
63
w x y z
w x y z
w x y z
cost to
cost to
cost to
node w table
0 8 3 8
0 5 3 8
0 8 3 8
from
from
from
y
y
y
3 2 0 5
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
8 0 2 1
8 0 2 1
node x table
y
y
3 2 0 5
8 8 8 8
from
from
z
z
8 8 8 8
8 1 5 0
w x y z
cost to
w x y z
cost to
3 2 0 5
3 2 0 5
node y table
w
w
0 8 3 8
8 8 8 8
x
x
8 0 2 1
from
8 8 8 8
from
z
z
8 8 8 8
8 1 5 0
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 0 2 1
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
Update
64
w x y z
w x y z
w x y z
cost to
cost to
cost to
node w table
0 8 3 8
0 5 3 8
0 8 3 8
from
from
from
y
y
y
3 2 0 5
3 2 0 5
8 8 8 8
w x y z
cost to
w x y z
cost to
w x y z
cost to
8 0 2 1
5 0 2 1
8 0 2 1
node x table
y
y
y
3 2 0 5
3 2 0 5
8 8 8 8
from
from
from
z
z
z
8 8 8 8
8 1 5 0
8 1 5 0
w x y z
cost to
w x y z
cost to
3 2 0 5
3 2 0 5
node y table
w
w
0 8 3 8
8 8 8 8
x
x
8 0 2 1
from
8 8 8 8
from
z
z
8 8 8 8
8 1 5 0
w x y z
cost to
w x y z
cost to
8 1 5 0
8 1 5 0
node z table
x
x
8 0 2 1
8 8 8 8
from
from
y
y
3 2 0 5
8 8 8 8
time
Initialization
Exchange
Update
65
Distance Vector link cost changes
  • See what happens when link cost changes
  • node detects local link cost change
  • updates routing info, recalculates distance
    vector
  • if DV changes, notify neighbors

At time t0, y detects the link-cost change,
updates its DV, and informs its neighbors. New
Dy(x) minc(y,x), c(y,z)Dz(x) min1,151
good news travels fast
At time t1, z receives the update from y and
updates its DV. It computes a new least cost to
x and sends its neighbors its DV. New Dz(x)
minc(z,x), c(z,y)Dy(x) min5,11 2
At time t2, y receives zs update and updates its
DV. New Dy(x) minc(y,x), c(y,z)Dz(x)
min1,121 (no change!) ys least costs do
not change and hence y does not send any
message to z.
66
Distance Vector link cost changes
  • Suppose link cost changes from 4 to 60
  • Initially Dy(x) 4 and Dz(x) 5 (focus on
    distance from y z to x)
  • Node y
  • detects the change, computes its DV
  • what is the new Dy(x) ?
  • Dy(x) minc(y,x), c(y,z)Dz(x)
    min60,156
  • sends its new DV to z
  • Node z
  • receives the update from y w/ new Dy(x) 6
  • computes its DV. What is the new Dz(x) ?
  • Dz(x) minc(z,x), c(z,y)Dy(x)
    min50,167
  • sends its new DV to y
  • Node y
  • receives the update from z w/ new Dz(x) 7
  • computes its DV. what is the new Dy(x) ?
  • Dy(x) minc(y,x), c(y,z)Dz(x)
    min60,178
  • sends its new DV to z again

1
4
50
Can you guess what will happen?
67
Distance Vector link cost changes
routing loop problem y reaches x thru z z
reaches x thru y
count to infinity problem! 44 iterations before
algorithm stabilizes Imagine what happens if
c(z,x) has cost of 10000 instead of 50 ! and
c(y,x) changes from 4 to 10010
Solution Poisoned reverse If z routes via y to
get to x, z tells y its (zs) distance to x is
infinite (so y wont route to x via z)
68
Comparison of LS and DV algorithms
  • Message complexity
  • LS with n nodes, E links, O(nE) msgs sent
  • each link info should be sent to each node
  • DV exchange between neighbors only
  • Speed of Convergence
  • LS computation grows at O(n2)
  • (n-1) (n-2) 1 n(n1)/2
  • may have oscillations
  • DV computation grows at O(n3)
  • iterated n times at most, each iter. done for
    n-1 nodes, and for each node minimization must
    be taken at most over n-1 alternatives
  • may be routing loops and count-to-infinity problem

69
Chapter 4 Network Layer
  • Introduction
  • IP Internet Protocol
  • IPv4 addressing
  • NAT, IPv6
  • Routing algorithms
  • Link state
  • Distance Vector
  • Routing in the Internet
  • RIP, OSPF, BGP

70
Routing in Internet Hierarchical Routing
  • Our routing study thus far - idealization
  • all routers identical
  • network flat
  • not true in practice
  • scale with 200 million destinations
  • cant store all dests in routing tables!
  • routing table exchange would swamp links!
  • administrative autonomy
  • internet network of networks
  • each network admin may want to control routing in
    its own network

71
Hierarchical Routing
  • aggregate routers into regions, autonomous
    systems (AS)

72
Hierarchical Routing
  • Inter-AS routing
  • Use inter-AS routing to route across ASes
  • Across different ASes, routing protocol must be
    agreed upon
  • Intra-AS routing
  • routers in same AS run same routing protocol
  • routers in different AS can run different
    intra-AS routing protocol

73
Routing in the Internet protocols
  • Intra-AS routing protocols
  • also known as Interior Gateway Protocols (IGP)
  • most common Intra-AS routing protocols
  • RIP Routing Information Protocol
  • OSPF Open Shortest Path First
  • IGRP Interior Gateway Routing Protocol (Cisco
    proprietary)
  • Inter-AS routing protocols
  • BGP (Border Gateway Protocol)

74
RIP ( Routing Information Protocol)
  • Uses Distance Vector routing
  • distance vectors exchanged among neighbors every
    30 sec via Response Message (also called
    advertisement)
  • each advertisement list of up to 25 destination
    nets within AS

75
RIP Example
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2 z B 7
x -- 1 . . ....
Routing table in D
76
RIP Example
Dest Next hops w - 1 x -
1 z C 4 . ...
Advertisement from A to D
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2 z B 7
x -- 1 . . ....
Routing table in D
77
RIP Example
Dest Next hops w - 1 x -
1 z C 4 . ...
Advertisement from A to D
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2 z B
A 7 5 x -- 1 . . ....
Routing table in D
78
RIP Link Failure and Recovery
  • If no advertisement heard after 180 sec --gt
    neighbor/link will be declared dead
  • new advertisements sent to neighbors
  • neighbors in turn send out new advertisements (if
    tables changed)
  • link failure info quickly propagates to entire
    net
  • poison reverse used to prevent ping-pong loops
    (infinite distance 16 hops)

79
OSPF (Open Shortest Path First)
  • open publicly available
  • uses Link State algorithm i.e., Dijkstras
    algorithm
  • advertisements disseminated to entire AS via
    flooding
  • OSPF messages carried directly over IP (rather
    than TCP or UDP

80
Internet inter-AS routing BGP
  • BGP (Border Gateway Protocol) the de facto
    standard
  • BGP provides each AS a means to
  • Obtain subnet reachability information from
    neighboring ASs.
  • Propagate reachability information to all
    AS-internal routers.
  • Determine good routes to subnets based on
    reachability information and policy.

81
Why different Intra- and Inter-AS routing ?
  • Policy
  • Inter-AS admin wants control over how its
    traffic routed, who routes through its net.
  • Intra-AS single admin, so no policy decisions
    needed
  • Scale
  • hierarchical routing saves table size, reduced
    update traffic
  • Performance
  • Intra-AS can focus on performance
  • Inter-AS policy may dominate over performance
Write a Comment
User Comments (0)
About PowerShow.com