Chapter 4 slides - PowerPoint PPT Presentation

1 / 184
About This Presentation
Title:

Chapter 4 slides

Description:

Title: Chapter 4 s Author: analoui Last modified by: hamid Created Date: 10/8/1999 7:08:27 PM Document presentation format: On-screen Show (4:3) – PowerPoint PPT presentation

Number of Views:128
Avg rating:3.0/5.0
Slides: 185
Provided by: anal49
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4 slides


1
Computer Networks
Network Layer
2
Chapter 4 Network Layer
  • Chapter goals
  • understanding 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
  • Overview
  • network layer services
  • routing principles path selection
  • hierarchical routing
  • IP
  • Internet routing protocols reliable transfer
  • intra-domain
  • inter-domain
  • whats inside a router?
  • IPv6
  • mobility

3
Chapter 4 Outline
  • 4.1 Introduction and Network Service Models
  • 4.2 Routing Principles
  • 4.3 Hierarchical Routing
  • 4.4 Routing in the Internet
  • 4.5 The Internet (IP) Protocol
  • 4.6 Whats Inside a Router
  • 4.7 IPv6
  • 4.8 Multicast Routing
  • 4.9 Mobility

4
Network Layer Functions
  • transport packet from sending to receiving hosts
  • network layer protocols in every host, router
  • three important functions
  • path determination route taken by packets from
    source to dest. (Routing Algorithms)
  • forwarding move packets from routers input to
    appropriate router output
  • call setup some network architectures require
    router call setup along path before data flows

application transport network data link physical
application transport network data link physical
5
Network Service Model
  • Q What service model for channel transporting
    packets from sender to receiver?
  • Services
  • guaranteed bandwidth?
  • preservation of inter-packet timing (no jitter)?
  • loss-free delivery?
  • in-order delivery?
  • congestion feedback to sender?

The most important abstraction provided by
network layer
virtual circuit or datagram?
6
Virtual circuits
  • source-to-destination path behaves much like
    telephone circuit
  • performance-wise
  • network actions along source-to-destination path
  • call setup, teardown for each call before data
    can flow
  • each packet carries VC identifier (not
    destination host ID)
  • every router on source-destination path maintains
    state for each passing connection
  • transport-layer connection only involved two end
    systems
  • Link and router resources (bandwidth, buffers)
    may be allocated to VC
  • to get circuit-like performance.

7
Virtual Circuits Signaling Protocols
  • used to setup, maintain teardown VC
  • used in ATM, frame-relay, X.25
  • not used in todays Internet

6. Receive data
3. Accept call
2. Incoming call
5. Data flow begins
4. Call connected
1. Initiate call
8
Datagram networks the Internet model
  • 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-destination
  • pair may take different paths

2. Receive Data
1. Send Data
9
Network Layer Service Models
Guarantees ?
Congestion feedback no (inferred via
loss) no congestion no congestion yes no
Network Architecture Internet ATM ATM ATM ATM
Service Model best effort CBR VBR ABR UBR
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
CBR Constant bit rate VBR Variable bit
rate ABR Available bit rate UBR Unspecified bit
rate
  • Internet model being extended Integrated
    services, Differentiated Services
  • Chapter 6

10
QoS Factors
  • Timing
  • Connection Establishment Delay
  • End-To-End Delay
  • Connection Establishment Failure Probability
  • Throughput or Bandwidth Guarantee
  • Ordering Preservation
  • Congestion Indication (Control)
  • Bit-Error rate or Packet-Loss Rate Control
  • Protection
  • Priority
  • Resilience (Return Back to Normal Operation).

11
Service Clases
  • Guaranteed Quality of Service
  • Predictive Quality of Service
  • Best Effort Quality of Service

12
Guaranteed QoS
  • Specified through QoS parameter values
  • deterministic
  • statistical
  • Single value - average (threshold, target)
  • Pair of values - interval
  • Triple of values max., mean, min.

13
Predictable Service
  • Parameter bounds based on history, that is, past
    network behavior.
  • Parameter values are measured, and certain
    statistical analyses may be carried out

14
Best Effort Services
  • No guarantees of quality, no QoS parameter values
  • UDP/IP
  • Partial guarantees, some QoS parameter values are
    given.
  • TCP/IP

15
Datagram or VC Network why?
  • 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
  • many link types
  • different characteristics
  • uniform service is difficult
  • ATM
  • evolved from telephony
  • human conversation
  • strict timing, reliability requirements
  • need for guaranteed service
  • dumb end systems
  • telephones
  • complexity inside network

16
Buffering in IP routers


Internet
Router
Router
  • Buffer size
  • Space for bursts of packets
  • Latency
  • Dropping packets
  • When?
  • What?

17
FIFO Queueing in the Router(Drop Tail)
Network Interface
  • Single queue maintained

18
FIFO Queueing in the Router (Drop Tail)
Network Interface
  • Single queue maintained
  • Dequeue from head

19
FIFO Queueing in the Router (Drop Tail)
Network Interface
  • Single queue maintained
  • Dequeue from head
  • Enqueue at tail

20
FIFO Queueing in the Router (Drop Tail)
Network Interface
  • Single queue maintained
  • Dequeue from head
  • Enqueue at tail
  • When full

21
FIFO Queueing in the Router (Drop Tail)
Network Interface
  • Single queue maintained
  • Dequeue from head
  • Enqueue at tail
  • When full drop arriving packet (drop-tail)

22
Slow Feedback from Drop Tail
  • Feedback comes when buffer is completely full
  • even though the buffer has been filling for a
    while
  • Plus, the filling buffer is increasing RTT
  • and the variance in the RTT
  • Might be better to give early feedback
  • Get one or two flows to slow down, not all of
    them
  • Get these flows to slow down before it is too late

23
Queue Management
  • Performance Degradation in current TCP Congestion
    Control
  • Multiple packet loss
  • Low link utilization
  • Congestion collapse
  • The role of the router (i.e., network)
  • Control congestion effectively with a network
  • Allocate bandwidth fairly

24
Active Queue Management
  • Goals
  • Better congestion notification for responsive
    flows (i.e. TCP)
  • Maintain shorter queues
  • Fairness in drops (proportional)

25
Random Early Detection (RED)-1
  • Basic idea of RED
  • Router notices that the queue is getting
    backlogged
  • and randomly drops packets to signal congestion
  • Packet drop probability
  • Drop probability increases as queue length
    increases
  • If buffer is below some level, dont drop
    anything
  • otherwise, set drop probability as function of
    queue

26
Random Early Detection (RED)-2
27
Active Queue Management-RED
Drop probability
Average queue length
Max Queue Size
Time
28
Properties of RED
  • Drops packets before queue is full
  • In the hope of reducing the rates of some flows
  • Drops packet in proportion to each flows rate
  • High-rate flows have more packets
  • and, hence, a higher chance of being selected
  • Drops are spaced out in time
  • Which should help desynchronize the TCP senders
  • Tolerant of burstiness in the traffic
  • By basing the decisions on average queue length

29
Problems With RED
  • Hard to get the tunable parameters just right
  • How early to start dropping packets?
  • What slope for the increase in drop probability?
  • What time scale for averaging the queue length?
  • Sometimes RED helps but sometimes not
  • If the parameters arent set right, RED doesnt
    help
  • And it is hard to know how to set the parameters
  • RED is implemented in practice
  • But, often not used due to the challenges of
    tuning right
  • Many variations
  • With cute names like Blue and FRED

30
Explicit Congestion Notification
  • Early dropping of packets
  • Good gives early feedback
  • Bad has to drop the packet to give the feedback
  • Explicit Congestion Notification
  • Router marks the packet with an ECN bit
  • and sending host interprets as a sign of
    congestion
  • Surmounting the challenges
  • Must be supported by the end hosts and the
    routers
  • Requires two bits in the IP header (one for the
    ECN mark, and one to indicate the ECN capability)
  • Solution borrow two of the Type-Of-Service bits
    in the IPv4 packet header

31
Chapter 4 Outline
  • 4.1 Introduction and Network Service Models
  • 4.2 Routing Principles
  • Link state routing
  • Distance vector routing
  • 4.3 Hierarchical Routing
  • 4.4 Routing in the Internet
  • 4.5 The Internet (IP) Protocol
  • 4.6 Whats Inside a Router
  • 4.7 IPv6
  • 4.8 Multicast Routing
  • 4.9 Mobility

32
Routing
Goal determine good path (sequence of routers)
thru network from source to dest.
  • Graph abstraction for routing algorithms
  • graph nodes are routers
  • graph edges are physical links
  • link cost delay, cost, or congestion level

Abstract model of a network
  • good path
  • typically means minimum cost path
  • other definitions possible

33
Routing Algorithm Classifications
  • 1. Global
  • all routers have complete topology, link cost
    info
  • link state algorithms
  • 2. Decentralized
  • router knows physically-connected neighbors, link
    costs to neighbors
  • iterative process of computation, exchange of
    info with neighbors
  • distance vector algorithms
  • 1. Static
  • routes update slowly over time
  • 2. Dynamic
  • routes update more quickly
  • periodic update
  • in response to link cost changes

34
A Link-State Routing Algorithm
  • Dijkstras algorithm (global)
  • net topology, link costs known to all nodes
  • accomplished via link state broadcast
  • all nodes have same information
  • computes least cost paths from one node
    (source) to all other nodes
  • gives routing table for that node
  • iterative after k iterations, know least cost
    path to k destinations.

35
Notation
  • N set of nodes whose least cost path
    definitively known
  • c(i,j) link cost from node i to j. cost infinite
    if not direct neighbors
  • p(v) nodes along path from source to v
  • D(v) current value of cost of path from source
    to destination v.

Example
N A, B, C, D, E, F C(A,C)5 C(C,A)5 C(B,D)2
C(D,B)3 SourceA p(F) A-D-E-F D(F)4
36
Dijsktras Algorithm
1 Initialization 2 N A 3 for all
nodes v 4 if v adjacent to A 5 then
D(v) c(A,v) 6 else D(v) infinity 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
n number of nodes (except the source)
n(n1)/2) times
37
Dijkstras Algorithm example
computes least cost paths from node A to all
other nodes
D(F),p(F) infinity infinity 4,A-D-E-F 4,A-D-E-F 4,
A-D-E-F 4,A-D-E-F
D(C),p(C) 5,A-C 4,A-D-C 3,A-D-E-C 3,A-D-E-C 3,A-D-
E-C 3,A-D-E-C
D(B),p(B) 2,A-B 2,A-B 2,A-B 2,A-B 2,A-B 2,A-B
D(E),p(E) infinity 2,A-D-E 2,A-D-E 2,A-D-E 2,A-D-E
2,A-D-E
Step 0 1 2 3 4 5
start N A AD ADE ADEB ADEBC ADEBCF
D(D),p(D) 1,A-D 1,A-D 1,A-D 1,A-D 1,A-D 1,A-D
D(v) Distance (cost) of A to v. P(v) nodes
along path fromA to v.
38
Dijkstras Algorithm discussion1
  • Algorithm complexity Suppose there are n nodes,
    except source
  • First iteration Search through all n nodes to
    determine the node, w, not in N that has the
    minimum cost.
  • Second iteration Check n - 1 nodes to determine
    minimum cost.
  • Third iteration n - 2 nodes, and so on.
  • Total number of nodes searched n(n 1)/2
  • The implementation of the link state algorithm
    has worst-case complexity of order n squared
    O(n2).
  • A more sophisticated implementation of this
    algorithm, using a data structure known as a
    heap, can find the minimum in line 9 in
    logarithmic rather than linear time, thus
    reducing the complexity O( nlog(n) )

39
Dijkstras Algorithm discussion2
  • Oscillations possibility
  • Suppose link costs are equal to the load carried
    on the link, or the delay that experienced.
  • Link costs are not symmetric, c(A,B) equals
    c(B,A) only if the load on both directions on the
    AB link is the same.
  • Nodes B and D originates a unit of traffic
    destined for A.
  • Node C originates e unit for A.

40
Discussion2 (cont.)
  • oscillations possible
  • Algorithm is run C determines (Fig. a) the
    clockwise path to A has a cost of 1, while the
    counterclockwise path to A has a cost of 1 e.
    Hence C s least-cost path to A is now clockwise.
  • Similarly, B determines that its new least-cost
    path to A is also clockwise, resulting in costs
    shown in Fig. b.

41
Discussion2 (cont.)
  • oscillations possible
  • When algorithm is run next, nodes B, C, and D all
    detect a zero-cost path to A in the
    counterclockwise direction, and all route their
    traffic to the counterclockwise routes.
  • The next time the LS algorithm is run, B, C, and
    D all then route their traffic to the clockwise
    routes.

Fig. d- B, C, D find better path to A is
clockwise
42
Dijkstras Algorithm discussion2
  •   To prevent such oscillations
  • Solution1 link costs not depend on the amount of
    traffic carried ,an unacceptable solution since
    one goal of routing is to avoid highly congested
    (for example, high-delay) links.
  • Solution2 all routers do not run the LS
    algorithm at the same time (a reasonable
    solution).
  • Routers run the LS algorithm with the same
    periodicity, the execution instance of the
    algorithm would not be the same at each node.
  • Researchers have noted Routers in the Internet
    can self-synchronize among themselves. That is,
    even though they initially execute the algorithm
    with the same period but at different instants of
    time, the algorithm execution instance can
    eventually become, and remain, synchronized at
    the routers.
  • Avoid such self-synchronization Introduce
    randomization into the period between execution
    instants of the algorithm at each node.

43
Distance Vector Routing Algorithm (Decentralized)
  • Iterative
  • continues until no nodes exchange info.
  • self-terminating no signal to stop
  • Asynchronous
  • nodes need not exchange info/iterate in lock
    step!
  • distributed
  • each node communicates only with
    directly-attached neighbors
  • Distance Table data structure
  • each node has its own
  • row for each possible destination
  • column for each directly-attached neighbor to
    node
  • example in node X, for dest. Y via neighbor Z
    DX(Y,Z)

distance from X to Y, via Z as next hop
44
Distance Table example
neighbor j
A B C D
A 1 7 6 4
B 14 8 9 11
D 5 5 4 2
destination i
source
B
w

45
Distance table gives routing table
cost to destination via
E
Outgoing link to use, cost
A,1 D,5 D,4 D,4
D () A B C D
A B C D
E
A 1 7 6 4
B 14 8 9 11
D 5 5 4 2
D ()
destination
destination
Distance table
Routing table of node E
46
Distance Vector Routing overview
  • Iterative, asynchronous each local iteration
    caused by
  • local link cost change
  • message from neighbor its least cost path change
    from neighbor
  • Distributed
  • each node notifies neighbors only when its least
    cost path to any destination changes
  • neighbors then notify their neighbors if necessary

wait for (change in local link cost or message
from neighbor) recompute distance table if
least cost path to any destination has changed,
notify neighbors
Each node
47
Distance Vector Algorithm
At node X
  • Initialization
  • for all adjacent nodes v
  • DX (,v) 8 / the means "for all
    desstinations" /
  • DX (v,v) c(X,v)
  • for all destinations, y
  • 6 send minW DX (y,w) to each neighbor / w
    over all X's neighbors /

48
Distance Vector Algorithm (cont.)
8 loop 9 wait ( until I see a link cost
change to neighbor v 10 or until I
receive update from neighbor v ) 11 12 if (
c(X,v) changes by d ) 13 / change cost to
all dest's via neighbor v by d / 14 /
note d could be positive or negative / 15
for all destinations y DX (y,v) DX (y,v) d
16 17 else if (update received from v for
destination Y) 18 / shortest path from V to
some Y has changed / 19 / V has sent a
new value for its minW DV (Y,w) / 20 /
call this received new value is "newval" / 21
for the single destination y DX (Y,v)
c(X,v) newval 22 23 if we have a new minW
DX(Y,w) for any destination Y 24 send new
value of minW DX(Y,w) to all neighbors 25 26
forever
49
Distance Vector Algorithm example
Node Xs table
Node Ys table
Node Zs table
new minimum
time
50
Distance Vector Algorithm example
4
1
X dose not sends DX(Y,Y) to Y and Z.
3
4
X sends new DX(Y,Z) to Y and Z
2
2
X learns this term from Y
1
X learns this term from Z
1
51
Distance Vector link cost changes
  • Link cost changes
  • t0Y detects local link cost change.
  • updates distance table (line 15).
  • least cost path DY (X,X) changes, notify
    neighbors (lines 23,24).
  • t1 Z receives Ys update and
  • then updates its table.
  • t2 Y receives Zs update and
  • then updates its table, DY (X,X)
  • not changed, terminate.

52
Distance Vector link cost changes
  • Link cost changes
  • Routing loop in order to get to X, Y routes
    through Z, and Z routes through Y.
  • count to infinity problem!

53
Poisoned reverse solution count to infinity
problem!
  • If Z routes through Y to get to X
  • Z tells Y its (Zs) distance to X is infinite (so
    Y wont route to X via Z)
  • will this completely solve count to infinity
    problem?

54
Comparison of LS and DV algorithms
  • Robustness what happens if router malfunctions?
  • LS
  • Node (router) can advertise incorrect link cost
  • each node computes only its own table robustness
  • DV
  • DV node can advertise incorrect least-cost paths
  • each nodes table used by others
  • error propagate thru network
  • Message complexity
  • LS with n nodes, E links, O(nE) msgs sent each
  • 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

55
Chapter 4 Outline
  • 4.1 Introduction and Network Service Models
  • 4.2 Routing Principles
  • 4.3 Hierarchical Routing
  • 4.4 Routing in the Internet
  • 4.5 The Internet (IP) Protocol
  • 4.6 Whats Inside a Router
  • 4.7 IPv6
  • 4.8 Multicast Routing
  • 4.9 Mobility

56
Hierarchical Routing
  • The routing study thus far was idealized
  • all routers identical
  • network flat
  • not true in practice
  • scale with 200 million destinations (hosts)
  • cant store all dests in routing tables (memory
    limitation)!
  • routing table exchange would leave no bandwidth
    left for sending data packets!
  • DV algorithm that iterated among large number of
    routers never converge!
  • administrative autonomy
  • internet network of networks
  • each network admin may want to control routing in
    its own network

57
Hierarchical Routing
  • aggregate routers into regions, autonomous
    systems (AS)
  • routers in same AS run same routing protocol
  • intra-AS routing protocol
  • routers in different AS can run different
    intra-AS routing protocol
  • special routers in AS
  • run intra-AS routing protocol with all other
    routers in AS
  • also responsible for routing to destinations
    outside AS
  • run inter-AS routing protocol with other gateway
    routers

58
Intra-AS and Inter-AS routing
  • Gateways
  • perform inter-AS routing amongst themselves
  • perform intra-AS routers with other routers in
    their AS

C
B
A
?Routers in an AS have information about routing
paths within that AS.
Inter/intra-AS routing in gateway A.c
To/from A.d
59
Intra-AS and Inter-AS routing
Inter-AS routing between A and B
Host2
B
C
Intra-AS routing within AS B
A
Intra-AS routing within AS A
Host1
60
Chapter 4 Outline
  • 4.1 Introduction and Network Service Models
  • 4.2 Routing Principles
  • 4.3 Hierarchical Routing
  • 4.4 Routing in the Internet
  • 4.5.1 Intra-AS routing RIP and OSPF
  • 4.5.2 Inter-AS routing BGP
  • 4.5 The Internet (IP) Protocol
  • 4.6 Whats Inside a Router?
  • 4.7 IPv6
  • 4.8 Multicast Routing
  • 4.9 Mobility

61
Routing in the Internet (RC1812) Requirements
for IP Version 4 Routers
  • The Global Internet consists of Autonomous
    Systems (AS) interconnected with each other
  • Stub AS small corporation one connection to
    other ASs
  • Multihomed AS large corporation (no transit)
    multiple connections to other ASs
  • Transit AS provider, hooking many ASs together
  • Two-level routing
  • Intra-AS administrator responsible for choice of
    routing algorithm within network
  • Inter-AS unique standard for inter-AS routing.

62
Routing Protocols in the Internet-1
Transport layer TCP, UDP
Network layer
Link layer
physical layer
ICMP Internet Control Message Protocol, RFC792
63
Internet Routing Protocol
  • Intra-AS administrator responsible for choice of
    routing algorithm within network
  • Also known as Interior Gateway Protocols (IGP)
  • Most common Intra-AS routing protocols
  • RIP Routing Information Protocol (RFCs1058,2453)
  • It is a distance vector protocol.
  • Routing updates are exchanged between neighbors
    app. Every 30sec.
  • OSPF Open Shortest Path First (RFC2328) (Open
    Spec.)
  • IGRP Interior Gateway Routing Protocol (Cisco
    proprietary)
  • These are link-state protocol that uses flooding
    of link information and a Dijkstra least-cost
    path algorithm.
  • Inter-AS unique standard for inter-AS routing
    BGP (RFC1771)

64
Internet AS Hierarchy
Intra-AS border (exterior gateway) routers
C
B
A
Inter-AS (interior gateway) routers
65
RIP ( Routing Information Protocol)
  • Distance vector algorithm
  • Included in BSD-UNIX Distribution in 1982
  • Distance metric of hops (max 15 hops)
  • Can you guess why?
  • 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

66
RIP Example
C
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2
z B 7 x -- 1 . . ....
Routing table in D
67
RIP Example
Dest Next hops w - - x -
- 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
68
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
  • poison reverse used to prevent ping-pong loops
    (infinite distance 16 hops)

69
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
70
RIP Table example (continued)
  • Router giroflee.eurocom.fr

Destination Gateway
Flags Ref Use Interface
-------------------- -------------------- -----
----- ------ --------- 127.0.0.1
127.0.0.1 UH 0 26492 lo0
192.168.2. 192.168.2.5 U
2 13 fa0 193.55.114.
193.55.114.6 U 3 58503 le0
192.168.3. 192.168.3.5 U
2 25 qaa0 224.0.0.0
193.55.114.6 U 3 0 le0
default 193.55.114.129 UG
0 143454
  • Three attached class C networks (LANs)
  • Router only knows routes to attached LANs
  • Default router used to go up
  • Route multicast address 224.0.0.0
  • Loopback interface (for debugging)

71
OSPF (Open Shortest Path First)
  • open publicly available
  • Uses Link State algorithm
  • LS packet dissemination
  • Topology map at each node
  • Route computation using Dijkstras algorithm
  • OSPF advertisement carries one entry per neighbor
    router
  • Advertisements disseminated to entire AS (via
    flooding)
  • Carried in OSPF messages directly over IP (rather
    than TCP or UDP

72
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)
  • Integrated uni- and multicast support
  • Multicast OSPF (MOSPF) uses same topology data
    base as OSPF
  • Hierarchical OSPF in large domains.

73
Hierarchical OSPF
74
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.

75
Inter-AS routing in the Internet BGP
R4

R5

BGP


AS3

R3
(
OSPF
intra
-
AS

AS1

AS2


routing)

(
OSPF




(RIP intra-AS routing)
BGP

intra
-
AS

routing)


R1
R2

76
Internet inter-AS routing BGP
  • BGP (Border Gateway Protocol) the de facto
    standard
  • Path Vector protocol
  • similar to Distance Vector protocol
  • each Border Gateway broadcast to neighbors
    (peers) entire path (i.e., sequence of ASs) to
    destination
  • BGP routes to networks (ASs), not individual
    hosts
  • E.g., Gateway X may send its path to dest. Z
  • Path (X,Z) X,Y1,Y2,Y3,,Z

77
Internet inter-AS routing BGP
  • Suppose gateway X send its path to peer gateway
    W
  • W may or may not select path offered by X
  • cost, policy (dont route via competitors AS),
    loop prevention reasons.
  • If W selects path advertised by X, then
  • Path (W,Z) w, Path (X,Z)
  • Note X can control incoming traffic by
    controlling it route advertisements to peers
  • e.g., dont want to route traffic to Z -gt dont
    advertise any routes to Z

78
BGP controlling who routes to you

Figure 4.5- BGPnew a simple BGP scenario
  • 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

79
BGP controlling who routes to you
  • A advertises to B the path AW
  • B advertises to W 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!

80
BGP operation
  • Q What does a BGP router do?
  • Receiving and filtering route advertisements from
    directly attached neighbor(s).
  • Route selection.
  • To route to destination X, which path )of several
    advertised) will be taken?
  • Sending route advertisements to neighbors.

81
BGP messages
  • 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

82
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

83
Chapter 4 outline
  • 4.1 Introduction and Network Service Models
  • 4.2 Routing Principles
  • 4.3 Hierarchical Routing
  • 4.4 Routing in the Internet
  • 4.5 The Internet (IP) Protocol
  • 4.4.1 IPv4 addressing
  • 4.4.2 Moving a datagram from source to
    destination
  • 4.4.3 IP address,
  • 4.4.4 Address depletion
  • 4.4.5 NAT Network Address Translation
  • 4.4.6 Datagram format
  • 4.4.7 IP fragmentation
  • 4.4.8 ICMP Internet Control Message Protocol
  • 4.4.9 DHCP Dynamic Host Configuration Protocol
  • 4.6 Whats Inside a Router
  • 4.7 IPv6
  • 4.8 Multicast Routing
  • 4.9 Mobility

84
IP Addressing Introduction
223.1.1.1
  • IP address 32-bit identifier for host, router
    interface
  • interface connection between host/router and
    physical link
  • routers typically have multiple interfaces
  • host may have multiple interfaces
  • IP addresses associated with each interface

223.1.1.4
223.1.2.9
223.1.1.3
223.1.1.1 11011111 00000001 00000001 00000001
223
1
1
1
85
IP Addressing
223.1.1.1
  • IP address
  • network part (high order bits)
  • host part (low order bits)
  • Whats a network ? (from IP address perspective)
  • device interfaces with same network part of IP
    address
  • can physically reach each other without
    intervening router

223.1.2.1
223.1.1.2
223.1.1.4
223.1.2.9
223.1.2.2
223.1.3.27
223.1.1.3
LAN
223.1.3.2
223.1.3.1
network consisting of 3 IP networks
86
IP Addressing
223.1.1.2
  • How to find the networks?
  • Detach each interface from router, host
  • create islands of isolated networks

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
Interconnected system consisting of six networks.
223.1.2.1
223.1.2.2
223.1.3.2
223.1.3.1
87
Getting a datagram from source to dest.
  • IP datagram
  • datagram remains unchanged, as it travels source
    to destination
  • addr fields of interest here

88
Getting a datagram from source to dest.
forwarding table in A
  • Starting at A, send IP datagram addressed to B
  • look up net. address of B in forwarding table
  • find B is on same net. as A
  • link layer will send datagram directly to B
    inside link-layer frame
  • B and A are directly connected

A
B
89
Getting a datagram from source to dest.
forwarding table in A
  • Starting at A, dest. E
  • look up network address of E in forwarding table
  • E on different network
  • A, E not directly attached
  • routing table next hop router to E is 223.1.1.4
  • link layer sends datagram to router 223.1.1.4
    inside link-layer frame
  • datagram arrives at 223.1.1.4
  • continued..

223.1.1.1
A
223.1.2.1
223.1.1.2
223.1.2.9
223.1.1.4
B
223.1.2.2
223.1.3.27
E
223.1.1.3
223.1.3.2
223.1.3.1
90
Getting a datagram from source to dest.
forwarding table in router
  • Arriving at 223.1.4, destined for 223.1.2.2
  • look up network address of E in routers
    forwarding table
  • E on same network as routers interface 223.1.2.9
  • router, E directly attached
  • link layer sends datagram to 223.1.2.2 inside
    link-layer frame via interface 223.1.2.9
  • datagram arrives at 223.1.2.2

91
IP Addresses Class-full
  • given notion of network, lets re-examine IP
    addresses

class-full addressing
range
class
format
1.0.0.0 to 126.255.255.255
A
0
Network
Host
N.H.H.H
128.0.0.0 to 191.255.255.255
B
Host
Network
10
N.N.H.H
192.0.0.0 to 223.255.255.255
C
N.N.N.H
224.0.0.0 to 239.255.255.255
D
multicast address
1110
240.0.0.0 to 247.255.255.255
E
experimentation
11110
32 bits
92
Class-full Summary
93
Private or Non-Routable addresses
  • Some addresses are reserved for use on local
    networks that are not connected to the Internet
  • Routers do not consider these addresses to be
    valid Internet addresses, and will not route a
    packet to any of them
  • These addresses may be used on private internets
    not directly connected to the Internet.
  • 10.0.0.0/8 10.0.0.0 to 10.255.255.255 (a
    single class A net)
  • 172.16.0.0/12 172.16.0.0 to 172.31.255.255
    (contiguous class Bs)
  • 192.168.0.0/16 192.168.0.0 to 192.168.255.255
    (contiguous class Cs)

94
Special Purpose IP Addresses
  • Several Addresses within the classes are reserved
    for special use.
  • 0.0.0.0 Source IP Addr. Just after Boot
  • network part of dest. Addr. 0 Source and
    Destination are in same network.
  • Dest. Addr.255.255.255.255 Broadcast in
    Senders network.
  • host part of Dest.111 Broadcast in
    destination network.
  • Dest. Addr. 127.anything Loop Back

95
Special Purpose Addresses-List
  • Address Block Present Use Reference
  • 0.0.0.0/8 "This" Network
    RFC1700, page 4
  • 10.0.0.0/8 Private-Use Networks
    RFC1918
  • 14.0.0.0/8 Public-Data Networks
    RFC1700, page 181
  • 24.0.0.0/8 Cable Television Networks
  • 39.0.0.0/8 Reserved, subject to allocation
    RFC1797
  • 127.0.0.0/8 Loop back RFC1700,
    page 5
  • 128.0.0.0/16 Reserved but subject to
    allocation
  • 169.254.0.0/16 Link Local
  • 172.16.0.0/12 Private-Use Networks
    RFC1918
  • 191.255.0.0/16 Reserved but subject to
    allocation
  • 192.0.0.0/24 Reserved but subject to
    allocation
  • 192.0.2.0/24 Test-Net
  • 192.88.99.0/24 6to4 Relay Anycast RFC3068
  • 192.168.0.0/16 Private-Use Networks RFC1918
  • 198.18.0.0/15 Network Interconnect Device
    Benchmark Testing RFC2544 223.255.255.0/24
    Reserved but subject to allocation
  • 224.0.0.0/4 Multicast RFC3171
  • 240.0.0.0/4 Reserved for Future Use
    RFC1700

96
Address depletion
  • In 1991 IAB identified 3 dangers
  • Running out of class B addresses
  • Increase in nets has resulted in routing table
    explosion
  • Increase in net/hosts exhausting 32 bit address
    space
  • Four strategies to address
  • Creative address space allocation RFC 2050
  • Private addresses RFC 1918, Network Address
    Translation (NAT) RFC 1631
  • Classless Inter-Domain Routing (CIDR) RFC 1519
  • IP version 6 (IPv6) RFC 1883

97
Creative IP address allocation
  • Class A addresses 64 127 reserved
  • Handle on individual basis
  • Class B only assigned given a demonstrated need
  • Class C
  • divided up into 8 blocks allocated to regional
    authorities
  • 208-223 remains unassigned and unallocated
  • Three main registries handle assignments
  • APNIC Asia Pacific www.apnic.net
  • ARIN N. S. America, Caribbean sub-Saharan
    Africa www.arin.net
  • RIPE Europe and surrounding areas www.ripe.net

98
NAT Network Address Translation-1
  • Motivation 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 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).

99
NAT Network Address Translation-2
  • Implementation NAT router must
  • outgoing datagrams replace (source IP address,
    port ) of every outgoing datagram to (NAT IP
    address, new port )
  • . . . remote clients/servers will respond using
    (NAT IP address, new port ) as destination
    addr.
  • remember (in NAT translation table) every (source
    IP address, port ) to (NAT IP address, new port
    ) translation pair
  • incoming datagrams replace (NAT IP address, new
    port ) in dest fields of every incoming datagram
    with corresponding (source IP address, port )
    stored in NAT table

100
NAT Network Address Translation-3
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
101
NAT Network Address Translation-4
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
102
NAT Network Address Translation-4
  • 16-bit port-number field
  • 60,000 simultaneous connections with a single
    LAN-side address!
  • NAT is controversial
  • routers should only process up to layer 3
  • violates end-to-end argument
  • NAT possibility must be taken into account by app
    designers, eg, P2P applications

103
IP addressing CIDR
  • Classful addressing
  • inefficient use of address space, address space
    exhaustion
  • e.g., class B net allocated enough addresses for
    65K hosts, even if only 2K hosts in that network
  • CIDR Classless Inter Domain Routing (RFC1519)
  • network portion of address of arbitrary length
  • address format a.b.c.d/x, where x is bits in
    network portion of address

104
Subnet Mask-1
  • A subnet mask is applied to the host bits to
    determine how the network is subnetted,
  • e.g. if the host is 137.138.28.228, and the
    subnet mask is 255.255.255.0 then the right hand
    8 bits are for the host (255 is decimal for all
    bits set in an octet)

105
Bit Masks and Subnet Masks
In a production environment this prefix typically
varies in length from 8 to 30 bits
/16 255.255.0.0 /17 255.255.128.0 /18
255.255.192.0 /19 255.255.224.0 /20
255.255.240.0 /21 255.255.248.0 /22
255.255.252.0 /23 255.255.254.0
/8 255.0.0.0 /9 255.128.0.0 /10
255.192.0.0 /11 255.224.0.0 /12
255.240.0.0 /13 255.248.0.0 /14
255.252.0.0 /15 255.254.0.0
/24 255.255.255.0 /25 255.255.255.128 /26
255.255.255.192 /27 255.255.255.224 /28
255.255.255.240 /29 255.255.255.248 /30
255.255.255.252 /31 not usable /32 not usable
/30 yields two usable hosts and is used for WAN
connections
106
(No Transcript)
107
Protocols
Class-full Routing Protocols Classless Routing Protocol
RIP version1 RIP version2
IGPR EIGPR
EGP OSPF
BGP3 BGP4
IS-IS
108
Examples
109
Subnetting(Extended Network Prefix)
  • Q How an organization gets network part of IP
    addr?
  • A It gets allocated portion of its ISPs address
    space.

The ISP have been allocated the address block
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
The ISP divides the block into 8 smaller addr.
blocks (subnets) and gives them to 8
organization.
110
Hierarchical addressing route aggregation
Hierarchical addressing allows efficient
advertisement of routing information
Organization 0
route aggregation or route summarization.
Send me anything with addresses beginning
200.23.16.0/20
Organization 1
Organization 2
ISP1
200.23.16.0/20
Internet
Organization 7
ISP2
Send me anything with addresses beginning
199.31.0.0/16
199.31.0.0/16
111
Hierarchical addressing more specific routes
ISP2 has a more specific route to Organization
1 The routers in Internet use a longest prefix
matching rule, and route toward ISP2, as it
advertises the longest (more specific) address
prefix that matches the destination address. 
Organization 0
Send me anything with addresses beginning
200.23.16.0 /20
Organization 2
20 bits
ISP1
Internet
Organization 7
Send me anything with addresses beginning
199.31.0.0/16 or 200.23.18.0 /23
ISP2
Organization 1
23 bits
112
Subnet Mask
ISP's block 11001000 00010111
00010000 00000000 200.23.16.0/20 ISPs subnet
mask 11111111 11111111 11110000 00000000
255.255.240.0 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 Ors subnet
mask 11111111 11111111 11111110 00000000
255.255.254.0
Network part of an IP address subnet mask IP
address
113
CIDR Subneting Example
  • You are assigned the CIDR address 200.32.108.0
    /22 and
  • you must support the network shown in the
    diagram.
  • Create an addressing scheme that will meet the
    diagram requirements.

100 computers
100 computers
300 computers
100 computers
114
CIDR Subneting Example (Questions)
  • Given the CIDR address 200.32.108.0 /22
  • How many Class C networks do we have? 4 classes
  • How many host addresses do we have? 4x254
    addresses
  • What is the largest LAN requirement? 300
    addresses
  • Host required - 300, 100, 100, 100, and 3 WAN
    links

115
200.32.108.0 /22
0
0
200.32. 110.0/24
200.32.108.0/24
200.32. 110.0
255
255
0
0
200.32. 109.0/24
200.32. 111.0/24
200.32. 111.0
255
255
116
0
0
200.32. 110.0/24
200.32.108.0/24
200.32. 110.0
300 hosts 200.32.108.0 /23
255
255
0
0
200.32. 109.0/24
200.32. 111.0/24
200.32. 111.0
255
255
117
0
0
200.32. 110.0/24
200.32.108.0/24
300 hosts 200.32.108.0 /23
255
255
0
0
200.32. 109.0/24
200.32. 111.0/24
255
255
118
(No Transcript)
119
(No Transcript)
120
CIDR Subneting Example (Results)
  • Given the CIDR address 200.32.108.0 /22

200.32.111.0 /25
1/2 Class C
100 computers
200.32.111.240 /30
200.32.111.248 /30
200.32.111.244 /30
300 computers
100 computers
200.32.108.0 /23
100 computers
2 Class Cs
200.32.110.128 /25
200.32.110.0 /25
1/2 Class C
1/2 Class C
121
Supernetting Example-1
  • Company XYZ needs to address 400 hosts.
  • Its ISP gives them two contiguous Class C
    addresses
  • 207.21.54.0/24
  • 207.21.55.0/24
  • Company XYZ can use a prefix of 207.21.54.0 /23
    to supernet these two contiguous networks.
    (Yielding 510 hosts)
  • 207.21.54.0 /23
  • 207.21.54.0/24
  • 207.21.55.0/24

23 bits in common
122
Supernetting Example-2
addressing authority of ISP, include XYZ, be
advertised to Internet as a single supernt
123
CIDR and the Providerexample of route aggregation
advertising address a.b.c.d/x
124
IP datagram format
IP protocol version Number4bits
32 bits
total datagram length (bytes)
head. len
type of service
header length (bytes)4bits
ver
length
fragment offset
fragmentation/ Reassembly/ DF, MF Flags
flags
16-bit identifier
type of data Priority 3bits Delay1bit Throu
ghput1bit Reliability1bit
upper layer
time to live
Checksum 1s add of 16bits words in header
upper layer protocol to deliver payload to (rfc
1700)
32 bit source IP address
max number remaining hops (decremented at each
router)
32 bit destination IP address
Options (if any)
1 ICMP 6 TCP 17 UDP
data (variable length, typically a TCP or UDP
segment)
  • how much overhead with TCP?
  • 20 bytes of TCP
  • 20 bytes of IP
  • 40 bytes app layer overhead

e.g. timestamp, record route taken, specify list
of routers to visit.
A packet is unique in Internet by Id S. IP Add
D. IP Add Upper L.
125
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
126
IP Fragmentation and Reassembly
data
20 Byte
0.3979
ID x
length 4000
offset 0
fragflag 0
  • Example
  • 4000 byte datagram
  • MTU 1500 bytes

4000 Bytes
0.1479
ID x
length 1500
offset 0
fragflag 1
14802959
One large datagram becomes 3 smaller datagrams.
ID x
length 1500
offset 1480
fragflag 1
ID x
length 1040
offset 2960
fragflag 0
127
ICMP Internet Control Message Protocol
  • Network managers or users identify network
    problems.
  • One of the most frequently used debugging tools
    invokes the ICMP echo request and echo reply
    messages.
  • A host or router sends an ICMP echo request
    message to a specified destination.
  • The command users invoke to send ICMP echo
    requests is named ping. Sophisticated versions of
    ping send a series of ICMP echo requests, capture
    responses, and provide statistics about datagram
    loss. They allow the user to specify the length
    of the data being sent and the interval between
    requests. Less sophisticated versions merely send
    one ICMP echo request and await a reply.

128
ICMP (Cont.)
  • Any machine that receives an echo request
    formulates an echo reply and returns it to the
    original sender. The request contains an optional
    data area the reply contains a copy of the data
    sent in the request. The echo request and
    associated reply can be used to test whether a
    destination is reachable and responding. Because
    both the request and reply travel in IP
    datagrams, successful receipt of a reply verifies
    that major pieces of the transport system work.
  • First, IP software on the source computer must
    route the datagram.
  • Second, intermediate routers between the source
    and destination must be operating and must route
    the datagram correctly.
  • Third, the destination machine must be running
    (at least it must respond to interrupts), and
    both ICMP and IP software must be working.
  • Finally, all routers along the return path must
    have correct routes.

129
ICMP (Cont.)
  • The Internet Control Message Protocol allows
    routers to send error or control messages to
    other routers or hosts ICMP provides
    communication between the Internet Protocol
    software on one machine and the Internet Protocol
    software on another.
  • When a datagram causes an error, ICMP can only
    report the error condition back to the original
    source of the datagram the source must relate
    the error to an individual application program or
    take other action to correct the problem.
  • Each ICMP message has its own format. They all
    begin with the same three fields
  • an 8-bit TYPE field that identifies the message,
  • an 8-bit CODE field that provides further
    information about the message type,
  • a 16-bit CHECKSUM field (ICMP uses the same
    additive checksum algorithm as IP, but the ICMP
    checksum only covers the ICMP message).
  • In addition, ICMP messages that report errors
    always include the header and first 64 data bits
    of the datagram causing the problem.

130
ICMP TYPE, CODE
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
131
ICMPs Message Format an example
ICMP echo request or reply message format.
OPTIONAL DATA is a variable length field that
contains data to be returned to the sender. An
echo reply always returns exactly the same data
as was received in the request. IDENTIFIER and
SEQUENCE NUMBER are used by the sender to match
replies to requests. The value of the TYPE field
specifies whether the message is a request (8) or
a reply (0).
The ICMP message is encapsulated in an IP
datagram, which is further encapsulated in a
frame for transmission. To identify ICMP, the
datagram protocol field contains the value 1.
132
IP addresses how to get one?
  • Q How does host get IP address?
  • IP addr. is configures into host by admin. in a
    file
  • Wintel control-panel-gtnetwork-gtconfiguration-gttcp
    /ip-gtproperties
  • UNIX /etc/rc.config
  • DHCP Dynamic Host Configuration Protocol
    (RFC2131) dynamically get address from as server
  • plug-and-play

133
IP addressing ICANN
  • Q How does an ISP get block of addresses?
  • A ICANN Internet Corporation for Assigned
  • Names and Numbers
  • allocates addresses
  • m
Write a Comment
User Comments (0)
About PowerShow.com