Embed
Email

Network_Layer

Document Sample

Shared by: dandanhuanghuang
Categories
Tags
Stats
views:
0
posted:
1/21/2012
language:
pages:
77
Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 1

Network layer

 transport segment from

sending to receiving host application

transport



on sending side

network

 data link network

physical

encapsulates segments

network data link network

data link physical data link

physical physical

into datagrams (packets) network

data link

 on rcving side, delivers physical network

data link



segments to transport

physical



network

layer network

data link

data link

physical

physical

 network layer protocols network

data link application



in every host, router physical transport

network

data link

 Router examines header physical





fields in all IP datagrams

passing through it

Network Layer 2

Key Network-Layer Functions



 forwarding: move analogy:

packets from router‟s

input to appropriate  routing: process of

router output planning trip from

source to dest

 routing: determine

route taken by  forwarding: process

packets from source of getting through

to dest. single interchange



 Routing algorithms



Network Layer 3

Interplay between routing and forwarding

routing algorithm





local forwarding table

header value output link

0100 3

0101 2

0111 2

1001 1









value in arriving

packet’s header

0111 1



3 2









Network Layer 4

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 5

Network layer connection and

connection-less service

 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

 No choice: network provides one or the other

 Implementation: in the core







Network Layer 6

Virtual circuits

“source-to-dest path behaves much like telephone

circuit”

 performance-wise

 network actions along source-to-dest path





 call setup, teardown for each call before data can flow

 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 VC





Network Layer 7

VC implementation

A VC consists of:

1. Path from source to destination

2. VC numbers, one number for each link along

path

3. Entries in forwarding tables in routers along

path

 Packet belonging to VC carries a VC

number.

 VC number must be changed on each link.

 New VC number comes from forwarding table



Network Layer 8

Forwarding table VC number





12 22 32



1 3

2





Forwarding table in interface

number

northwest router:

Incoming interface Incoming VC # Outgoing interface Outgoing VC #



1 12 3 22

2 63 1 18

3 7 2 17

1 97 3 87

… … … …





Routers maintain connection state information!

Network Layer 9

Virtual circuits: signaling protocols



 used to setup, maintain teardown VC

 used in ATM, frame-relay, X.25

 not used in today‟s Internet







application

transport 5. Data flow begins 6. Receive data application

transport

network 4. Call connected 3. Accept call

network

data link 1. Initiate call 2. incoming call

data link

physical

physical







Network Layer 10

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







application

application

transport

transport

network

network

data link 1. Send data 2. Receive data

data link

physical

physical





Network Layer 11

4 billion

Forwarding table 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



Network Layer 12

Longest prefix matching



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?









Network Layer 13

Datagram or VC network: why?



Internet ATM

 data exchange among  evolved from telephony

computers

 human conversation:

 “elastic” service, no strict

 strict timing, reliability

timing req.

requirements

 “smart” end systems

 need for guaranteed

(computers)

service

 can adapt, perform

 “dumb” end systems

control, error recovery

 telephones

 simple inside network,

 complexity inside

complexity at “edge”

network

 many link types

 different characteristics

 uniform service difficult

Network Layer 14

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 15

The Internet Network layer

Host, router network layer functions:



Transport layer: TCP, UDP





Routing protocols IP protocol

•path selection •addressing conventions

•RIP, OSPF, BGP •datagram format

Network •packet handling conventions

layer forwarding

ICMP protocol

table

•error reporting

•router “signaling”



Link layer



physical layer





Network Layer 16

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 17

IP datagram format

IP protocol version

number(4 bits) 32 bits total datagram

header length(4 bits) head. type of length (bytes)

(bytes) ver length

len service for

“type” of data(8 bits) fragment fragmentation/

16-bit identifier flgs

offset reassembly

max number time to upper Internet

remaining hops live layer Note:

checksum

(decremented at offset (13 bits)

each router) 32 bit source IP address



upper layer protocol 32 bit destination IP address

to deliver payload to E.g. timestamp,

Options (if any)

how much overhead record route

data taken, specify

with TCP? (variable length, list of routers

 20 bytes of TCP typically a TCP to visit.

 20 bytes of IP or UDP segment)

 = 40 bytes + app

layer overhead

Network Layer 18

IP Fragmentation & Reassembly

 network links have MTU

(max.transfer size) - largest

possible link-level frame.

 different link types, fragmentation:

different MTUs in: one large datagram

 large IP datagram divided out: 3 smaller datagrams

(“fragmented”) within net

 one datagram becomes

several datagrams

reassembly

 “reassembled” only at final

destination

 IP header bits used to

identify, order related

fragments









Network Layer 19

IP Fragmentation and Reassembly

length ID fragflag offset

Example =4000 =x =0 =0

 4000 byte

One large datagram becomes

datagram several smaller datagrams

 MTU = 1500 bytes

length ID fragflag offset

=1500 =x =1 =0

1480 bytes in

data field length ID fragflag offset

=1500 =x =1 =185

offset =

1480/8 length ID fragflag offset

=1040 =x =0 =370









Network Layer 20

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 21

IP Addressing: introduction

 IP address: 32-bit 223.1.1.1



identifier for host, 223.1.2.1

router interface

223.1.1.2

223.1.1.4 223.1.2.9

 interface: connection

223.1.2.2

between host/router 223.1.1.3 223.1.3.27



and physical link

 router‟s typically have

multiple interfaces 223.1.3.1 223.1.3.2

 host typically has one

interface

 IP addresses

associated with each 223.1.1.1 = 11011111 00000001 00000001 00000001

interface

223 1 1 1



Network Layer 22

IP Addressing: Classes









Network Layer 23

IP Addressing: Private IP

Special IP: 0.0.0.3 intranet IP

127.0.0.1 Local Host, Loop back test

x.0.0.0, x.x.0.0, x.x.x.0 subnet IP address

255.255.255.255 Broadcast IP(all “1”s)

Private IP: 10.x.x.x

172.16~31.x.x

192.168.x.x

Net mask: 255.0.0.0(Class A), 255.255.0.0(Class B),

255.255.255.0(Class C)

a.b.c.d/x (Classless netmask)

Subnet ID: IP AND Net_mask (AND operation)









Network Layer 24

Subnets

 IP address: 223.1.1.1



 subnet part (high 223.1.2.1

223.1.1.2

order bits) 223.1.1.4 223.1.2.9

 host part (low order

bits) 223.1.1.3

223.1.2.2

223.1.3.27

 What‟s a subnet ?

subnet

 device interfaces with

same subnet part of IP 223.1.3.1 223.1.3.2

address

 can physically reach

each other without

intervening router network consisting of 3 subnets









Network Layer 25

Subnets 223.1.1.0/24

223.1.2.0/24









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.3.0/24





Subnet mask: /24





Network Layer 26

Subnets 223.1.1.2







How many? 223.1.1.1 223.1.1.4



223.1.1.3





223.1.9.2 223.1.7.0









223.1.9.1 223.1.7.1

223.1.8.1 223.1.8.0



223.1.2.6 223.1.3.27



223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2









Network Layer 27

IP addressing: CIDR

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









subnet host

part part

11001000 00010111 00010000 00000000

200.23.16.0/23

Network Layer 28

NAT: Network Address Translation



rest of local network

Internet (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





All datagrams leaving local Datagrams with source or

network have same single source destination in this network

NAT IP address: 138.76.29.7, have 10.0.0/24 address for

different source port numbers source, destination (as usual)





Network Layer 29

NAT: Network Address Translation



 Motivation: local network uses just one IP address as

far as outside world 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).





Network Layer 30

NAT: Network Address Translation

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

Network Layer 31

NAT: Network Address Translation

NAT translation table

2: NAT router 1: host 10.0.0.1

WAN side addr LAN side addr

changes datagram sends datagram to

138.76.29.7, 5001 10.0.0.1, 3345 128.119.40.186, 80

source addr from

…… ……

10.0.0.1, 3345 to

138.76.29.7, 5001, S: 10.0.0.1, 3345

updates table D: 128.119.40.186, 80

10.0.0.1

1

S: 138.76.29.7, 5001

2 D: 128.119.40.186, 80 10.0.0.4

10.0.0.2

138.76.29.7 S: 128.119.40.186, 80

D: 10.0.0.1, 3345 4

S: 128.119.40.186, 80

D: 138.76.29.7, 5001 3 10.0.0.3

4: NAT router

3: Reply arrives changes datagram

dest. address: dest addr from

138.76.29.7, 5001 138.76.29.7, 5001 to 10.0.0.1, 3345



Network Layer 32

NAT: Network Address Translation



 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

 address shortage should instead be solved by

IPv6





Network Layer 33

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 34

ICMP: Internet Control Message Protocol

 used by hosts & routers to Type Code description

communicate network-level 0 0 echo reply (ping)

information 3 0 dest. network unreachable

 error reporting: unreachable

3 1 dest host unreachable

host, network, port, protocol 3 2 dest protocol unreachable

3 3 dest port unreachable

 echo request/reply (used by

3 6 dest network unknown

ping)

3 7 dest host unknown

 network-layer “above” IP: 4 0 source quench (congestion

 ICMP msgs carried in IP control - not used)

datagrams 8 0 echo request (ping)

 ICMP message: type, code plus 9 0 route advertisement

first 8 bytes of IP datagram 10 0 router discovery

causing error (RFC 792) 11 0 TTL expired

12 0 bad IP header









Network Layer 35

Traceroute and ICMP

 Source sends series of  When ICMP message

UDP segments to dest arrives, source calculates

 First has TTL =1 RTT

 Second has TTL=2, etc.  Traceroute does this 3

 Unlikely port number times

 When nth datagram arrives Stopping criterion

to nth router:  UDP segment eventually

 Router discards datagram arrives at destination host

 And sends to source an  Destination returns ICMP

ICMP message (type 11, “host unreachable” packet

code 0)

(type 3, code 3)

 Message includes name of

 When source gets this

router& IP address

ICMP, stops.





Network Layer 36

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 37

IPv6

 Initial motivation: 32-bit address space soon

to be completely allocated.

 Additional motivation:

 header format helps speed processing/forwarding

 header changes to facilitate QoS

IPv6 datagram format:

 fixed-length 40 byte header

 no fragmentation allowed









Network Layer 38

IPv6 Header (Cont)

Priority: identify priority among datagrams in flow (8 bits)

Flow Label: identify datagrams in same “flow.”

(concept of“flow” not well defined). (20 bits)

Next header: identify upper layer protocol for data







TTL in IPv4



Protocol in IPv4









Network Layer 39

Other Changes from IPv4

 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

 additional message types, e.g. “Packet Too Big”

 multicast group management functions









Network Layer 40

Transition From IPv4 To IPv6

 Not all routers can be upgraded simultaneous

 no “flag days”

 How will the network operate with mixed IPv4 and

IPv6 routers?

 Tunneling: IPv6 carried as payload in IPv4

datagram among IPv4 routers









Network Layer 41

Tunneling

A B E F

Logical view: tunnel



IPv6 IPv6 IPv6 IPv6



A B C D E F

Physical view:

IPv6 IPv6 IPv4 IPv4 IPv6 IPv6



Flow: X Src:B Src:B Flow: X

Src: A Dest: E Dest: E Src: A

Dest: F Dest: F

Flow: X Flow: X

Src: A Src: A

data Dest: F Dest: F data



Dual-Stack Routers:

B and E run both data data

IPv4 and IPv6

A-to-B: E-to-F:

B-to-C: B-to-C:

IPv6 IPv6

IPv6 inside IPv6 inside

IPv4 IPv4

Network Layer 42

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 43

Interplay between routing and forwarding



routing algorithm





local forwarding table

header value output link

0100 3

0101 2

0111 2

1001 1









value in arriving

packet’s header

0111 1



3 2









Network Layer 44

Routing Algorithm classification

Global or decentralized Static or dynamic?

information? Static:

Global:

 routes change slowly

 all routers have complete

topology, link cost info over time

 “link state” algorithms Dynamic:

Decentralized:  routes change more

 router knows physically- quickly

connected neighbors, link

 periodic update

costs to neighbors

 iterative process of  in response to link

computation, exchange of cost changes

info with neighbors

 “distance vector” algorithms



Network Layer 45

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 46

A Link-State Routing Algorithm

Dijkstra‟s algorithm Notation:

 net topology, link costs  c(x,y): link cost from node

known to all nodes x to y; = ∞ if not direct

 accomplished via “link neighbors

state broadcast”

 D(v): current value of cost

 all nodes have same info of path from source to

 computes least cost paths dest. v

from one node („source”) to

 p(v): predecessor node

all other nodes

along path from source to v

 gives forwarding table

for that node  N': set of nodes whose

least cost path definitively

 iterative: after k

known

iterations, know least cost

path to k dest.‟s



Network Layer 47

Dijkstra‟s algorithm: example

Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)

0 u 2,u 5,u 1,u ∞ ∞

1 ux 2,u 4,x 2,x ∞

2 uxy 2,u 3,y 4,y

3 uxyv 3,y 4,y

4 uxyvw 4,y

5 uxyvwz





5



v 3 w

2 5

u 2 z

1

3

1

x y 2

1

Network Layer 48

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 49

Distance Vector Algorithm

Bellman-Ford Equation (dynamic programming)

Define

dx(y) := cost of least-cost path from x to y



Then



dx(y) = min {c(x,v) + dv(y) }

v





where min is taken over all neighbors v of x



Network Layer 50

Bellman-Ford example

5

Clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3

v 3 w

2 5

u 2 z B-F equation says:

1

3

1 du(z) = min { c(u,v) + dv(z),

x y 2

1 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

Network Layer 51

Distance Vector Algorithm

 Dx(y) = estimate of least cost from x to y

 Distance vector: Dx = [Dx(y): y є N ]

 Node x knows cost to each neighbor v:

c(x,v)

 Node x maintains Dx = [Dx(y): y є N ]

 Node x also maintains its neighbors‟

distance vectors

 For each neighbor v, x maintains

Dv = [Dv(y): y є N ]



Network Layer 52

Distance vector algorithm (4)

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) ← minv{c(x,v) + Dv(y)} for each node y ∊ N



 Under minor, natural conditions, the estimate Dx(y)

converge to the actual least cost dx(y)







Network Layer 53

Distance Vector Algorithm (5)

Iterative, asynchronous: Each node:

each local iteration caused

by:

 local link cost change wait for (change in local link

 DV update message from cost of msg from neighbor)

neighbor

Distributed:

recompute estimates

 each node notifies

neighbors only when its DV

changes if DV to any dest has

 neighbors then notify

changed, notify neighbors

their neighbors if

necessary







Network Layer 54

Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} Dx(z) = min{c(x,y) +

node x table = min{2+0 , 7+1} = 2 Dy(z), c(x,z) + Dz(z)}

= min{2+1 , 7+0} = 3

cost to cost to cost to

x y z x y z x y z

x 0 2 7 x 0 2 3 x 0 2 3

from









from

y ∞∞ ∞ y 2 0 1









from

y 2 0 1

z ∞∞ ∞ z 7 1 0 z 3 1 0

node y table

cost to cost to cost to

x y z x y z x y z y

2 1

x ∞ ∞ ∞ x 0 2 7 x 0 2 3 x z

from







y 2 0 1 y 2 0 1

from









from

y 2 0 1 7

z ∞∞ ∞ z 7 1 0 z 3 1 0

node z table

cost to cost to cost to

x y z x y z x y z



x ∞∞∞ x 0 2 7 x 0 2 3

from









from





y 2 0 1 y 2 0 1

from









y ∞∞ ∞

z 71 0 z 3 1 0 z 3 1 0

time

Network Layer 55

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 56

Hierarchical Routing

 aggregate routers into Gateway router

regions, “autonomous

 Direct link to router in

systems” (AS)

another AS

 routers in same AS run

same routing protocol

 “intra-AS” routing

protocol

 routers in different AS

can run different intra-

AS routing protocol









Network Layer 57

Interconnected ASes



3c

3a 2c

3b 2a

AS3 2b

1c AS2

1a 1b

1d AS1

 Forwarding table is

configured by both

intra- and inter-AS

Intra-AS

Routing

Inter-AS

Routing routing algorithm

Intra-AS sets entries

algorithm algorithm



Forwarding for internal dests

Inter-AS & Intra-AS

table



sets entries for

external dests

Network Layer 58

Inter-AS tasks AS1 needs:

1. to learn which dests

 Suppose router in AS1

are reachable through

receives datagram for

AS2 and which

which dest is outside

through AS3

of AS1

 Router should forward 2. to propagate this

packet towards one of reachability info to all

the gateway routers, routers in AS1

but which one?

Job of inter-AS routing!





3c

3a 2c

3b 2a

AS3 2b

1c AS2

1a 1b

1d AS1

Network Layer 59

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 60

Intra-AS Routing



 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)









Network Layer 61

RIP ( Routing Information Protocol)



 Distance vector algorithm

 Included in BSD-UNIX Distribution in 1982

 Distance metric: # of hops (max = 15 hops)





From router A to subsets:



u destination hops

v

u 1

A B w v 2

w 2

x 3

x y 3

z C D z 2

y



Network Layer 62

RIP advertisements

 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









Network Layer 63

RIP: Example

z

w x y

A D B



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



Network Layer 64

RIP: Example

Dest Next hops

w - 1 Advertisement

x - 1 from A to D

z C 4

…. … ...

z

w x y

A D B



C

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 Network Layer 65

RIP: Link Failure and Recovery

If no advertisement heard after 180 sec -->

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)









Network Layer 66

RIP Table processing



 RIP routing tables managed by application-level

process called route-d (daemon)

 advertisements sent in UDP packets, periodically

repeated

routed routed



Transprt Transprt

(UDP) (UDP)

network forwarding forwarding network

(IP) table table (IP)

link link

physical physical



Network Layer 67

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 68

OSPF (Open Shortest Path First)

 “open”: publicly available

 Uses Link State algorithm

 LS packet dissemination

 Topology map at each node

 Route computation using Dijkstra‟s 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



Network Layer 69

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.





Network Layer 70

Hierarchical OSPF









Network Layer 71

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 AS‟s.









Network Layer 72

Network Layer

 Introduction  Routing algorithms

 Virtual circuit and  Link state



datagram networks  Distance Vector

 Hierarchical routing

 IP: Internet Protocol

 Datagram format  Routing in the

 IPv4 addressing Internet

 ICMP  RIP

 IPv6  OSPF

 BGP









Network Layer 73

Internet inter-AS routing: BGP



 BGP (Border Gateway Protocol): the de

facto standard

 BGP provides each AS a means to:

1. Obtain subnet reachability information from

neighboring ASs.

2. Propagate the reachability information to all

routers internal to the AS.

3. Determine “good” routes to subnets based on

reachability information and policy.

 Allows a subnet to advertise its existence

to rest of the Internet: “I am here”



Network Layer 74

BGP basics

 Pairs of routers (BGP peers) exchange routing info over semi-

permanent TCP conctns: BGP sessions

 Note that BGP sessions do not correspond to physical links.

 When AS2 advertises a prefix to AS1, AS2 is promising it will

forward any datagrams destined to that prefix towards the

prefix.

 AS2 can aggregate prefixes in its advertisement







3c

3a 2c

3b 2a

AS3 2b

1c AS2

1a 1b

AS1 1d

eBGP session

iBGP session

Network Layer 75

Distributing reachability info

 With eBGP session between 3a and 1c, AS3 sends prefix

reachability info to AS1.

 1c can then use iBGP do distribute this new prefix reach info

to all routers in AS1

 1b can then re-advertise the new reach info to AS2 over the

1b-to-2a eBGP session

 When router learns about a new prefix, it creates an entry

for the prefix in its forwarding table.





3c

3a 2c

3b 2a

AS3 2b

1c AS2

1a 1b

AS1 1d

eBGP session

iBGP session

Network Layer 76

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





Network Layer 77



Related docs
Other docs by dandanhuanghua...
GEOL 104 – Earth Through Time Laboratory
Views: 0  |  Downloads: 0
WECC
Views: 1  |  Downloads: 0
FA
Views: 6  |  Downloads: 0
MMARS Liaisons - Mass.Gov
Views: 4  |  Downloads: 0
Papua New Guinea Update
Views: 1  |  Downloads: 0
INF739_PH
Views: 0  |  Downloads: 0
Dashboard
Views: 21  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!