Chapter 4 The Network Layer - PowerPoint PPT Presentation

1 / 98
About This Presentation
Title:

Chapter 4 The Network Layer

Description:

Computer Networking A Top-Down Approach Featuring the Internet - Internet Chapter 4 The Network Layer – PowerPoint PPT presentation

Number of Views:421
Avg rating:3.0/5.0
Slides: 99
Provided by: ZZC6
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4 The Network Layer


1
Computer Networking A Top-Down Approach
Featuring the Internet?????-???????Internet??
  • Chapter 4 The Network Layer

2
Introduction
  • Chapter goals
  • understand principles behind network layer
    services
  • routing (path selection)
  • dealing with scale
  • how a router works
  • advanced topics IPv6, mobility
  • instantiation and implementation in the Internet

3
roadmap
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • 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
  • Summary

4
4.1 Network layer introduction
  • Services description
  • Key Network-Layer Functions
  • Routing
  • Forwarding
  • Connection setup
  • Network service model

5
1? Key Network-Layer Functions
4.1 introduction
  • Forwarding
  • move packets from routers input to
    appropriate router output
  • Routing
  • determine the route (path) taken by
    packets from source to dest.
  • routing algorithms

6
1? Key Network-Layer Functions
4.1 introduction
  • Connection setup
  • 3rd important function in some network
    architectures
  • ATM, frame relay, X.25
  • Before datagrams flow, two hosts and intervening
    routers establish virtual connection
  • Routers get involved

7
2? Network service model
4.1 introduction
  • Network and transport layer service
  • Network Layer
  • between two hosts
  • point to point.
  • Transport Layer
  • between two processes
  • end to end.

8
2? Network service model
4.1 introduction
  • Q Whats the service model of the channel
    connecting the transporting layer in the sending
    and receiving hosts?
  • Example services for individual datagrams
  • guaranteed delivery
  • Guaranteed delivery with less than 40 msec delay
  • Example services for a flow of datagrams
  • In-order datagram delivery
  • Guaranteed minimum bandwidth to flow
  • Restrictions on changes in inter-packet spacing
    (delay jitter)

9
2? Network service model
4.1 introduction
Guarantees ?
Network Architecture Internet ATM ATM ATM ATM
Service Model best effort CBR VBR ABR UBR
Congestion feedback no (inferred via
loss) no congestion no congestion yes no
Bandwidth none constant rate guaranteed rate gua
ranteed minimum none
Loss no yes yes no no
Order no yes yes yes yes
Timing no yes yes no no
10
roadmap
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • 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
  • Summary

11
4.2 Virtual circuit and datagram networks
  • Network layer connection and connection-less
    service
  • Virtual-Circuit Networks
  • Datagram Networks
  • Datagram or VC network why?

12
Introduction
4.2 Virtual circuit and datagram networks
  • Datagram network provides network-layer
    connectionless service
  • VC network provides network-layer connection
    service
  • Analogous to the transport-layer services, but
  • Service host-to-host (aka. End to End)
  • No choice network provides one or the other
  • Implementation in the network core

13
1?Virtual-Circuit Networks
4.2 Virtual circuit and datagram networks
  • source-to-dest path behaves much like telephone
    circuit, but there are crucial differences,so
    called virtual circuit rather than circuit.
  • shared or dedicated resource
  • actions along source-to-dest path
  • Router determines the packets path according to
    the information in the packet itself

14
1?Virtual-Circuit Networks
4.2 Virtual circuit and datagram networks
  • call setup for each call before data can flow
  • teardown the connection
  • each packet carries VC identifier (not
    destination host address)
  • every router on source-dest path maintains
    state for each passing connection
  • link, router resources (bandwidth, buffers) may
    be allocated to a VC

15
VC implementation
4.2 Virtual circuit and datagram networks
  • A VC consists of
  • A path from source to destination
  • VC numbers, one number for each link along path
  • Entries in forwarding tables in routers along
    path
  • Packets belonging to a VC carries the VC number.
  • VC number must be changed on each link.
  • VC switching
  • New VC number comes from forwarding table

16
Virtual circuits signaling protocols
4.2 Virtual circuit and datagram networks
  • used to setup, maintain teardown VC
  • used in ATM, frame-relay, X.25
  • not used in todays Internet (packet switching
    networks)

17
2? Datagram Networks
4.2 Virtual circuit and datagram networks
  • no call setup at network layer
  • routers no state about end-to-end connections
  • no network-level concept of connection
  • packets forwarded using destination host address
  • packets between same source-dest pair may take
    different paths

18
Forwarding table of Datagram Net
4.2 Virtual circuit and datagram networks
Destination Address Range
output 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
At most,232 possible entries
19
Longest prefix matching
4.2 Virtual circuit and datagram networks
Prefix Match Link
Interface 11001000 00010111 00010
0 11001000 00010111 00011000
1 11001000 00010111 00011 2
otherwise 3
Examples
DA 11001000 00010111 00010110 10100001
Which interface?
DA 11001000 00010111 00011000 10101010
Which interface?
20
3?Datagram or VC network why?
4.2 Virtual circuit and datagram networks
  • Internet
  • data exchange among computers
  • elastic service, no strict timing req.
  • smart end systems (computers)
  • can adapt, perform control, error recovery
  • simple inside network, complexity at edge
  • End2End argument
  • many link types
  • different characteristics
  • uniform service difficult

21
3? Datagram or VC network why?
4.2 Virtual circuit and datagram networks
  • ATM
  • evolved from telephony for human conversation
  • strict timing, reliability requirements
  • need for guaranteed service
  • dumb end systems
  • telephones
  • complexity inside network

22
roadmap
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • 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
  • Summary

23
4.3 Whats inside a router
  • Router Architecture Overview
  • Router Functions
  • Router Architecture
  • Input Port Functions
  • switching fabric
  • Output Ports Functions

24
Introduction
4.3 Whats inside a router
  • routers two key functions
  • run routing algorithms/protocol (RIP, OSPF, BGP)
  • forwarding datagrams from incoming to outgoing
    link

25
Introduction- Architecture
4.3 Whats inside a router
26
1? Input Port Functions
4.3 Whats inside a router
Physical layer bit-level reception
Data link layer e.g., Ethernet
  • Decentralized switching
  • given datagram dest., lookup output port using
    forwarding table in input port memory
  • goal complete input port processing at line
    speed
  • queuing if datagrams arrive faster than
    forwarding rate into switch fabric

27
2? Switching Fabrics
4.3 Whats inside a router
  • Three types of switching fabrics

28
(1)Switching Via Memory
4.3 Whats inside a router
  • First generation routers
  • traditional computers with switching under direct
    control of CPU
  • packet copied to systems memory
  • speed limited by memory bandwidth (2 bus
    crossings per datagram)

29
(2)Switching Via a Bus
4.3 Whats inside a router
30
Switching Via a Bus
4.3 Whats inside a router
  • datagram from input port memory to output port
    memory via a shared bus
  • bus contention switching speed limited by bus
    bandwidth
  • 1 Gbps bus, Cisco 1900 sufficient speed for
    access and enterprise routers (not regional or
    backbone)

31
(3)Switching Via An Interconnection Network
4.3 Whats inside a router
  • Goal
  • overcome bus bandwidth limitations
  • interconnection nets initially developed to
    connect processors in multiprocessor
  • Advanced design fragmenting datagram into fixed
    length cells, switch cells through the fabric.
  • Cisco 12000 switches Gbps through the
    interconnection network

32
Switching Via An Interconnection Network
4.3 Whats inside a router
33
4?Output Ports
4.3 Whats inside a router
  • Buffering required when datagrams arrive from
    fabric faster than the transmission rate of the
    output link
  • Scheduling discipline chooses among queued
    datagrams for transmission

34
Output port queueing
4.3 Whats inside a router
  • buffering when arrival rate via switch exceeds
    output line speed
  • queueing (delay) and loss due to output port
    buffer overflow!

35
Input Port Queuing
4.3 Whats inside a router
36
Input Port Queuing
4.3 Whats inside a router
  • fabric slower than input ports combined
  • queueing may occur at input queues
  • Head-of-the-Line (HOL) blocking queued datagram
    at front of queue prevents others in queue from
    moving forward
  • queueing delay and loss due to input buffer
    overflow!

37
roadmap
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • 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
  • Summary

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

Transport layer TCP, UDP
Network layer
Link layer
physical layer
39
4.4 IP Internet Protocol
  • Datagram format
  • IPv4 datagram format
  • IP Fragmentation Reassembly
  • IPv4 addressing
  • Introduction
  • Subnets
  • CIDR
  • NAT
  • ICMP
  • IPv6

40
1?IPv4 datagram format
32 bits
4.4 IP Internet Protocol
head. len
type of service
ver
length
fragment offset
flgs
16-bit identifier
time to live
Header checksum
Protocol
32 bit source IP address
32 bit destination IP address
Options (if any)
data (variable length, typically a TCP or UDP
segment)
Protocol 1ICMP 6TCP
17UDP
41
1?IPv4 datagram format
4.4 IP Internet Protocol
  • How much overhead with TCP?
  • 20 bytes headers of TCP Segment
  • 20 bytes headers of IP Datagram
  • 40 bytes app layer overhead

42
IP Fragmentation Reassembly
4.4 IP Internet Protocol
  • network links have MTU (max.transfer unit) -
    largest possible link-level frame.
  • different link types, different MTUs
  • large IP datagram divided into fragments
    (fragmented) within net
  • one datagram becomes several datagrams
  • reassembled only at the final destination
  • IP header bits used to identify, order related
    fragments

43
Fragmentation Flags
32 bits
4.4 IP Internet Protocol
head. len
type of service
ver
length
fragment offset
16-bit identifier
flgs
time to live
Header checksum
Protocol
32 bit source IP address
32 bit destination IP address
Options (if any)
data (variable length, typically a TCP or UDP
segment)
44
IP Fragmentation and Reassembly
4.4 IP Internet Protocol
  • Example
  • 4000 byte datagram
  • 203980
  • MTU 1500 bytes

One large datagram becomes several smaller
datagrams
offset 0
offset 185
1480 bytes in data field
offset 370
offset 1480/8
45
2?IPv4 Addressing Introduction
4.4 IP Internet Protocol
  • IP address 32-bit identifier for interfaces of
    hosts and routers
  • dotted decimal notation
  • 4 bytes

46
(1)Introduction
4.4 IP Internet Protocol
  • interface connection between host/router and
    physical link
  • A router typically have multiple interfaces
  • host may have multiple interfaces
  • IP address associated with each interface

223.1.1.1
223.1.2.9
223.1.1.4
223.1.1.3
47
Subnets
4.4 IP Internet Protocol
  • IP address
  • subnet part (high order bits of IP Address)
  • host part (low order bits of IP Address)
  • Whats a subnet ?
  • device interfaces with same subnet part of IP
    address can physically reach each other without
    intervening router

48
Subnets
223.1.1.0/24
4.4 IP Internet Protocol
  • 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.

223.1.2.0/24
223.1.3.0/24
Subnet mask /24
49
Subnets
223.1.1.2
4.4 IP Internet Protocol
  • How many subnets?

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
50
(2) Classfull IP Addressing
51
(3) CIDR
4.4 IP Internet Protocol
  • 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

52
CIDR and Classfull Addressing
4.4 IP Internet Protocol
53
IP addresses how to get one?
4.4 IP Internet Protocol
  • Q How does host get IP address?
  • hard-coded by system admin in a file
  • Wintel control-panel-gtnetwork-gtconfiguration-gttcp
    /ip-gtproperties
  • UNIX /etc/rc.config
  • DHCP Dynamic Host Configuration Protocol
    dynamically get address from as server
  • plug-and-play
  • (more in next chapter)

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

4.4 IP Internet Protocol
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
55
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
  • Http//www.cnnic.cn
  • China Internet Network Information Center

56
NAT Motivation
4.4 IP Internet Protocol
  • local network uses just one IP address as far as
    outside word is concerned
  • no need to be allocated range of addresses from
    ISP - just one Global IP address is used 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).

57
NAT Network Address Translation
58
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
59
NAT Network Address Translation
4.4 IP Internet Protocol
  • NAT has enjoyed widespread deployment but it is
    controversial.
  • port number is used for addressing processes
  • routers should only process up to layer 3
  • violates end-to-end argument
  • Hosts should be talking directly with each other
  • address shortage should (?) instead be solved by
    IPv6

60
3?ICMP Internet Control Message Protocol
4.4 IP Internet Protocol
  • used by hosts routers to communicate
    network-level information
  • error reporting unreachable host, network, port,
    protocol
  • echo request/reply (used by ping)
  • network-layer above IP
  • ICMP msgs carried in IP datagrams

61
3?ICMP Internet Control Message Protocol
4.4 IP Internet Protocol
Type Code description 0 0 echo
reply (ping) 3 0 dest. network
unreachable 3 1 dest host
unreachable 3 2 dest protocol
unreachable 3 3 dest port
unreachable 3 6 dest network
unknown 3 7 dest host unknown 4
0 source quench (congestion control
- not used) 8 0 echo request
(ping) 9 0 route advertisement 10
0 router discovery 11 0
TTL expired 12 0 bad IP header
62
Traceroute and ICMP
4.4 IP Internet Protocol
  • Source sends a series of UDP segments to dest
  • First has TTL 1
  • Second has TTL2, etc.
  • Unlikely port number
  • When nth datagram arrives to nth router
  • Router discards datagram and sends to source an
    ICMP message (type 11, code 0)
  • Message includes name of router IP address

63
Traceroute and ICMP
4.4 IP Internet Protocol
  • Stopping criterion
  • UDP segment eventually arrives at destination
    host
  • Destination returns ICMP host port unreachable
    packet (type 3, code 3)
  • When source gets this ICMP, stops.

64
4?IPv6RFC 2460
4.4 IP Internet Protocol
  • Initial motivation 32-bit address space soon to
    be completely allocated.
  • Additional motivation
  • header format helps speed processing/ forwarding
  • header changes to facilitate QoS
  • QoS Quality of Service
  • IPv6 is the next generation Internet ?

65
IPv6 Header Format
4.4 IP Internet Protocol
  • Traffic Class identify priority among datagrams
    in flow
  • Flow Label identify datagrams in same flow.
  • (concept offlow not well
    defined).
  • Next header identify upper layer protocol for
    data

66
Other Changes from IPv4
4.4 IP Internet Protocol
67
Other Changes from IPv4
  • no fragmentation allowed
  • streamlined header
  • fixed-length 40 byte header
  • Checksum removed entirely to reduce processing
    time at each hop
  • Options allowed, but outside of header,
    indicated by Next Header field
  • ICMPv6 new version of ICMP (RFC2463)
  • additional message types, e.g. Packet Too Big
  • multicast group management functions

4.4 IP Internet Protocol
68
Transition From IPv4 To IPv6
4.4 IP Internet Protocol
  • Not all routers can be upgraded simultaneous
  • no flag days
  • How will the network operate with mixed IPv4 and
    IPv6 routers?
  • dual-stack
  • Tunneling IPv6 carried as payload in IPv4
    datagram among IPv4 routers

69
Tunneling
4.4 IP Internet Protocol
Logical view
Physical view
IPv6
IPv6
IPv6
IPv6
IPv4
IPv4
70
roadmap
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • 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
  • Summary

71
Routing Algorithms
4.5 Routing algorithms
  • a host is attached directly to one router, the
    default router for the host.
  • whenever host emits a pkt, the pkt is transferred
    to the default router(?)
  • routing a pkt from source to dest is routing the
    pkt from source router to dest router.
  • purpose of routing algorithms is finding a good
    path from possible paths .

72
Routing Algorithm classification
  • Global or decentralized information?
  • Global
  • all routers have complete topology, link cost
    info
  • link state algorithms
  • Decentralized
  • Router only knows physically-connected neighbors,
    link costs to neighbors
  • iterative process of computation, exchange of
    info with neighbors
  • distance vector algorithms

4.5 Routing algorithms
73
Routing Algorithm classification
4.5 Routing algorithms
  • Static or dynamic?
  • Static
  • routes change slowly over time, even no change
  • Dynamic
  • routes change more quickly
  • periodic update
  • in response to link cost changes and topology
    changes

74
Graph abstraction - Topology
Graph G (N,E) N the set of routers u,
v, w, x, y, z E the set of links (u,v),
(u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z),
(y,z)
75
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 ?
76
1?A Link-State Routing Algorithm
  • Dijkstras algorithm
  • net topology and link costs known to all nodes
  • accomplished via link state broadcast
  • all nodes have same info of the network topology
    and link cost
  • 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

4.5 Routing algorithms
77
1?A Link-State Routing Algorithm
4.5 Routing algorithms
  • 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

78
Dijsktras Algorithm
4.5 Routing algorithms
1 Initialization 2 N' u
//the source node is U 3 for all
nodes v 4 if v adjacent to u 5
then D(v) c(u,v) 6 else D(v) 8 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'
79
Dijkstras algorithm example
80
Dijkstras algorithm, discussion
4.5 Routing algorithms
  • Algorithm complexity n nodes( except for source
    node)
  • each iteration need to check all nodes, w, not
    in N
  • n(n1)/2 comparisons O(n2)
  • more efficient implementations possible O(nlog2n)

81
2?Distance Vector Algorithm (1)
4.5 Routing algorithms
  • Distance-Vector Routing Algorithm
  • iterativecontinues until no more info is
    exchanged between neighbors
  • distributed
  • asynchronous no lockstep

82
2?Distance Vector Algorithm (1)
4.5 Routing algorithms
  • Bellman-Ford Equation
  • Define
  • dx(y) cost of least-cost path
    from x to y
  • Then
  • dx(y) minv c(x,v) dv(y)
  • where min is taken over all
    neighbors of x
  • so, v is node set of xs neighbor

83
Distance Vector Algorithm (3)
4.5 Routing algorithms
  • Node x knows cost to each neighbor v c(x,v)
  • Node x maintains distance vector
  • Dx Dx(y) y ? N
  • Node x also maintains its neighbors distance
    vectors
  • For each neighbor v, x maintains Dv Dv(y) y
    ? N

84
Distance vector algorithm (4)
4.5 Routing algorithms
  • 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
  • Under minor, natural conditions, the estimate
    Dx(y) converge the actual least cost dx(y)

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

86
Distance vector algorithm (6)
  • Initialization
  • for all destinations y in N
  • Dx(y) c(x,y) /if y is not a neighbor then
    c(x,y) 8 /
  • for each neighbor w
  • Dw(y) 8 for all destination y in N
  • for each neighbor w
  • send distance vector DxDx(y) y in N to w
  • Loop
  • wait(until I see a link cost change to some
    neighbor w or until I receive a distance vector
    from some neighbor w)
  • for each y in N
  • Dx(y) minvc(x,v)Dv(y)
  • if Dx(y) changed for any destination y
  • send distance vector DxDx(y) y in N to all
    neighbors
  • Forever

87
(No Transcript)
88
Distance Vector link cost changes (8)
Link cost changes
1
4
Dx 0,4,5, Dy 4,0,1 Dz 5,1,0
50
  • At time t0, y detects the link-cost change,
    updates its DV, and informs its neighbors.
  • Dy 1,0,1
  • At time t1, x, z receives the update from y and
    updates its table. It computes a new least cost
    to x and sends its neighbors its DV.
  • Dz(z)0
  • Dz(x)minc(z,y)Dy(x),
    c(z,x)Dx(x)min11,500 2
  • Dz(y)minc(z,y)Dy(y), c(z,x)Dx(y)
    min10,504 1
  • Dz 2,1,0 Dx0,1,2 Dy 1,0,1
  • At time t2, x,y,x receives update and updates
    its distance table.
  • x,y,zs least costs do not change and hence y
    does not send any
  • message to z.

89
Distance Vector link cost changes (9)
  • Link cost changes
  • bad news travels slow - count to infinity
    problem!
  • 44 iterations before algorithm stabilizes see
    text
  • before the cost changes
  • Dx0,4,5 Dy4,0,1 Dz5,1,0
  • assuming at time t0, y detects the change,
    thus,
  • Dy6,0,1 and infrom x,z
  • at time t1,z receives the new vector of y
  • Dz7,1,0
  • at time t2,y receives the new vector of z
  • Dy8,0,1 .

90
Comparison of LS and DV algorithms
  • Message complexity
  • LS with n nodes, E links, O(nE) msgs sent
  • DV exchange between neighbors only
  • convergence time varies
  • Speed of Convergence
  • LS O(n2) algorithm requires O(nE) msgs
  • may have oscillations
  • DV convergence time varies
  • may be routing loops
  • count-to-infinity problem

4.5 Routing algorithms
91
Comparison of LS and DV algorithms
  • Robustness what happens if router malfunctions?
  • LS
  • node can advertise incorrect link cost
  • each node computes only its own table
  • DV
  • DV node can advertise incorrect path cost
  • each nodes table used by others
  • error propagate thru network

4.5 Routing algorithms
92
3?Hierarchical Routing
4.5 Routing algorithms
  • Our routing study thus far - idealization
  • all routers identical
  • flat networks
  • not true in practice
  • scale with 200 million destinations
  • cant store all dests in routing tables!
  • routing table exchange would swamp links!
  • something must be done to reduce the complexity

93
3?Hierarchical Routing
4.5 Routing algorithms
  • administrative autonomy
  • internet network of networks
  • each network admin may want to control routing in
    its own network

94
3?Hierarchical Routing
  • routers in same AS aggregate routers into
    regions, autonomous systems (AS)
  • An AS is the collection of networks with the same
    routing policy, and usually under single
    ownership, trust and administrative control
  • run same routing protocol
  • intra-AS routing protocol
  • routers in different AS can run different
    intra-AS routing protocol

4.5 Routing algorithms
  • Gateway router
  • Direct link to router in another AS

95
Example Choose among multiple ASes
  • Now suppose AS1 learns from the inter-AS protocol
    that subnet x is reachable from AS3 and from AS2.
  • To configure forwarding table, router 1d must
    determine towards which gateway it should forward
    packets for dest x.
  • This is also the job on inter-AS routing
    protocol!
  • Hot potato routing send packet towards closest
    of two routers.

96
roadmap
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • 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
  • Summary

97
4.6 Routing in the Internet
  • RIP
  • OSPF
  • BGP

98
Intra-AS Routing
4.6 Routing in the Internet
  • Also known as Interior Gateway Protocols (IGP)
  • Most common Intra-AS routing protocols
  • RIP Routing Information Protocol
  • OSPF Open Shortest Path First
  • IS-IS Intermediate System to Intermediate System
  • IGRP Interior Gateway Routing Protocol (Cisco
    proprietary)

99
RIP advertisements
4.6 Routing in the Internet
  • 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

100
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
101
RIP Link Failure and Recovery
  • If no advertisement heard after 180 sec --gt
    neighbor/link declared dead
  • routes via neighbor invalidated
  • new advertisements sent to neighbors
  • neighbors in turn send out new advertisements (if
    tables changed)
  • link failure info quickly propagates to entire
    net
  • RIP runs over UDP, Port is 520

102
RIP Table processing
  • RIP routing tables managed by application-level
    process called route-d (daemon)
  • advertisements sent in UDP packets, periodically
    repeated

Transprt (UDP)
Transprt (UDP)
network forwarding (IP) table
network (IP)
forwarding table
link
link
physical
physical
103
2?OSPF (Open Shortest Path First)
4.6 Routing in the Internet
  • open publicly available
  • Uses Link State algorithm
  • LS packet dissemination
  • Topology map at each node
  • Route computation using Dijkstras algorithm
  • Advertisements disseminated to entire AS (via
    flooding)(?)
  • Carried in OSPF messages directly over IP (rather
    than TCP or UDP

104
OSPF advanced features (not in RIP)
  • Security all OSPF messages authenticated (to
    prevent malicious intrusion)
  • Multiple same-cost paths allowed (only one path
    in RIP)
  • For each link, multiple cost metrics for
    different TOS (e.g., satellite link cost set
    low for best effort high for real time)

4.6 Routing in the Internet
105
OSPF advanced features (not in RIP)
  • Integrated uni- and multi-cast support
  • Multicast OSPF (MOSPF) uses same topology data
    base as OSPF
  • Hierarchical OSPF in large domains.

4.6 Routing in the Internet
106
Hierarchical OSPF
107
Hierarchical OSPF
  • Two-level hierarchy local area, backbone.
  • Link-state advertisements only in area
  • each nodes has detailed area topology only know
    direction (shortest path) to nets in other areas.
  • Area border routers summarize distances to
    nets in own area, advertise to other Area Border
    routers.
  • Backbone routers run OSPF routing limited to
    backbone.
  • Boundary routers connect to other ASs.

108
3?Internet inter-AS routing BGP
4.6 Routing in the Internet
  • BGP (Border Gateway Protocol) the de facto
    standardRFC1771
  • BGP provides each AS a means to
  • Obtain subnet reachability information from
    neighboring ASes.
  • Propagate the reachability information to all
    routers internal to the AS.
  • Determine good routes to subnets based on
    reachability information and policy.
  • find loop free paths between ASs
  • Optimality is secondary goal

109
3?Internet inter-AS routing BGP
4.6 Routing in the Internet
  • Allows a subnet to advertise its existence to
    rest of the Internet I am here
  • BGP runs over TCP,
  • port179

110
Path attributes BGP routes
  • When advertising a prefix, advert includes BGP
    attributes.
  • prefix attributes route
  • Two important attributes
  • AS-PATH contains the ASs through which the
    advert for the prefix passed AS 67, AS 17
  • NEXT-HOP Indicates the specific internal-AS
    router to next-hop AS. (There may be multiple
    links from current AS to next-hop-AS.)
  • When gateway router receives route advert, uses
    import policy to accept/decline.

111
BGP route selection
  • Router may learn about more than 1 route to some
    prefix. Router must select route.
  • Elimination rules
  • Local preference value attribute policy decision
  • Shortest AS-PATH DV algorithm
  • Closest NEXT-HOP router hot potato routing
  • Additional criteria

112
BGP messages
4.6 Routing in the Internet
  • BGP messages exchanged using TCP.
  • BGP messages
  • OPEN opens TCP connection to peer and
    authenticates sender
  • UPDATE advertises new path (or withdraws old)
  • KEEPALIVE keeps connection alive in absence of
    UPDATES also ACKs OPEN request
  • NOTIFICATION reports errors in previous msg
    also used to close connection

113
BGP routing policy
4.6 Routing in the Internet
  • A,B,C are provider networks
  • X,W,Y are customer (of provider networks)
  • X is dual-homed attached to two networks
  • X does not want to route from B via X to C
  • .. so X will not advertise to B a route to C

114
BGP routing policy (2)
4.6 Routing in the Internet
  • A advertises to B the path AW
  • B advertises to X the path BAW
  • Should B advertise to C the path BAW?
  • No way! B gets no revenue for routing CBAW
    since neither W nor C are Bs customers
  • B wants to force C to route to w via A
  • B wants to route only to/from its customers!

115
Why different Intra- and Inter-AS routing ?
4.6 Routing in the Internet
  • 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

116
Why different Intra- and Inter-AS routing ?
4.6 Routing in the Internet
  • Performance
  • Intra-AS can focus on performance
  • Inter-AS policy may dominate over performance

117
Chapter 4 Network Layer
  • 4. 1 Introduction
  • 4.2 Virtual circuit and datagram networks
  • 4.3 Whats inside a router
  • 4.4 IP Internet Protocol
  • Datagram format
  • IPv4 addressing
  • ICMP
  • IPv6
  • 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

118
Broadcast Routing Algorithms
duplicate creation/transmission
duplicate
duplicate
(a)
(b)
Figure 4.40 Source-duplication versus in-network
duplication. (a) source duplication, (b)
in-network duplication
119
Uncontrolled and Controlled Flooding
  • Uncontrolled Flooding
  • source node sends a copy of the pkt to all
    neighbors except the neighbor from which it
    received the pkt
  • if graph is connected, every node will eventually
    receive a copy
  • flaw
  • if graph has cycles, the pkt will cycle
    indefinitely
  • broadcast storm
  • Controlled Flooding
  • selective flooding
  • sequence-numbered-controlled flodding
  • reverse path forwarding

120
Reverse path forwarding
  • Reverse Path Forwarding
  • when a router receives a broadcast pkt with a
    given address, it transmits the pkt on all of its
    outgoing links only if the arriving link is on
    the shortest unicast path to the source address

121
Spanning Tree Broadcast
RPF
(a) Broadcast initiated at A
(b) Broadcast initiated at D
  • Sequence-number controlled flooding and RPF can
    avoid broadcast storm, but can not completely
    avoid the transmission of redundant broadcast
    pkts
  • Every node should receive only one copy of the
    pkt
  • spanning tree
  • a spanning tree of G(N,E) is a graph G(N,E)
  • construct a spanning tree and every node can use
    it. e.g. (b)

122
Approaches for building mcast trees
  • Approaches
  • source-based tree one tree per source
  • reverse path forwarding
  • group-shared tree group uses one tree
  • center-based trees

we first look at basic approaches, then specific
protocols adopting these approaches
123
Reverse Path Forwarding
  • rely on routers knowledge of unicast shortest
    path from it to sender
  • each router has simple forwarding behavior
  • if (mcast datagram received on incoming link on
    shortest path back to center)
  • then flood datagram onto all outgoing links
  • else ignore datagram

124
Center-based trees
  • single delivery tree shared by all
  • one router identified as center of tree
  • to join
  • edge router sends unicast join-msg addressed to
    center router
  • join-msg processed by intermediate routers and
    forwarded towards center
  • join-msg either hits existing tree branch for
    this center, or arrives at center
  • path taken by join-msg becomes new branch of tree
    for this router

125
Internet Multicasting Routing DVMRP
  • DVMRP distance vector multicast routing
    protocol, RFC1075
  • flood and prune reverse path forwarding,
    source-based tree
  • RPF tree based on DVMRPs own routing tables
    constructed by communicating DVMRP routers
  • no assumptions about underlying unicast
  • initial datagram to mcast group flooded
    everywhere via RPF
  • routers not wanting group send upstream prune
    msgs

126
PIM Protocol Independent Multicast
  • not dependent on any specific underlying unicast
    routing algorithm (works with all)
  • two different multicast distribution scenarios
  • Dense
  • group members densely packed, in close
    proximity.
  • bandwidth more plentiful
  • Sparse
  • networks with group members small wrt
    interconnected networks
  • group members widely dispersed
  • bandwidth not plentiful

127
Network Layer summary
  • What weve covered
  • network layer services
  • routing principles link state and distance
    vector
  • hierarchical routing
  • IP
  • Internet routing protocols RIP, OSPF, BGP
  • whats inside a router?
  • IPv6
  • Next stop
  • the Data
  • link layer!

128
Homework
  • Problems
  • p404 4, 5
  • p405 7,8,9
  • P406 10
  • P407 15,16
  • P408 21, 22(a,g),23
  • Due Date
  • 3 Weeks
Write a Comment
User Comments (0)
About PowerShow.com