














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















4: Network Layer (^) 4b-
ver (^) length
32 bits
data (variable length, typically a TCP or UDP segment)
16-bit identifier Internet checksum
time to live 32 bit source IP address
IP protocol version number header length (bytes)
max number remaining hops (decremented at each router)
for fragmentation/ reassembly
total datagram length (bytes)
upper layer protocol to deliver payload to
head. len
type of service “type” of data (^) flgs fragment offset upper layer
32 bit destination IP address Options (if any) E.g. timestamp, record route taken, pecify list of routers to visit.
4: Network Layer (^) 4b-
r network links have MTU (max.transfer size) - largest possible link-level frame. m different link types, different MTUs r large IP datagram divided (“fragmented”) within net m one datagram becomes several datagrams m “reassembled” only at final destination m IP header bits used to identify, order related fragments
fragmentation: in: one large datagram out: 3 smaller datagrams
reassembly
4: Network Layer (^) 4b-
ID =x
ID =x
ID =x
ID =x
One large datagram becomes several smaller datagrams
4: Network Layer (^) 4b-
r used by hosts, routers, gateways to communication network-level information m error reporting: unreachable host, network, port, protocol m echo request/reply (used by ping) r network-layer “above” IP: m ICMP msgs carried in IP datagrams r ICMP message: type, code plus first 8 bytes of IP datagram causing error
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
4: Network Layer (^) 4b-
r Also known as Interior Gateway Protocols (IGP)
r Most common IGPs:
m RIP: Routing Information Protocol
m OSPF: Open Shortest Path First
m IGRP: Interior Gateway Routing Protocol (Cisco propr.)
4: Network Layer (^) 4b-
r Distance vector algorithm
r Included in BSD-UNIX Distribution in 1982
r Distance metric: # of hops (max = 15 hops) m Can you guess why?
r Distance vectors: exchanged every 30 sec via Response Message (also called advertisement )
r Each advertisement: route to up to 25 destination nets
4: Network Layer (^) 4b-
Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B 7 x -- 1 …. …. ....
w (^) x y
z
Routing table in D
4: Network Layer (^) 4b-
F i g u r e 1 3 - 3 (^) E x a m p l e o f u p d a t i n g a r o u t i n g t a b l e
Net1 7 A Net2 2 C Net6 8 F Net8 4 E Net9 4 F
Net1 7 A Net2 5 C Net3 9 C Net6 5 C Net8 4 E Net9 4 F
Net2 5 Net3 9 Net6 5 Net8 4 Net9 6
Net2 4 Net3 8 Net6 4 Net8 3 Net9 5
Updating algorithm
Old routing table New routing table
RIP message from C after increment
Net1: No news, don’t change Net2: Same next hop, replace Net3: A new router, add Net6: Different next hop, new hop count smaller, replace Net8: Different next hop, new hop count the same, don’t change Net9: Different next hop, new hop count larger, don’t change
Rules
RIP message from C
4: Network Layer (^) 4b-
If no advertisement heard after 180 sec --> neighbor/link declared dead m routes via neighbor invalidated m new advertisements sent to neighbors m neighbors in turn send out new advertisements (if tables changed) m link failure info quickly propagates to entire net m poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)
4: Network Layer (^) 4b-
r RIP routing tables managed by a pplication-level process called route-d (daemon)
r advertisements sent in UDP packets, periodically repeated
4: Network Layer (^) 4b-
Router: giroflee.eurocom.fr
r Three attached class C networks (LANs) r Router only knows routes to attached LANs r Default router used to “go up” r Route multicast address: 224.0.0. r Loopback interface (for debugging)
**Destination Gateway Flags Ref Use Interface
127.0.0.1 127.0.0.1 UH 0 26492 lo 192.168.2. 192.168.2.5 U 2 13 fa 193.55.114. 193.55.114.6 U 3 58503 le 192.168.3. 192.168.3.5 U 2 25 qaa 224.0.0.0 193.55.114.6 U 3 0 le default 193.55.114.129 UG 0 143454**
4: Network Layer (^) 4b-
F i g u r e 1 3 - 1 0 (^) S l o w c o n v e r g e n c e
0 seconds 15 seconds (^) n × 15 seconds
R1 R2 R n Net1 Net2 Net n + 1
4: Network Layer (^) 4b-
r Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used
r Multiple same-cost paths allowed (only one path in RIP)
r For each link, multiple cost metrics for different TOS (eg, satellite link cost set “low” for best effort; high for real time)
r Integrated uni- and multicast support: m Multicast OSPF (MOSPF) uses same topology data base as OSPF
r Hierarchical OSPF in large domains.
4: Network Layer (^) 4b-
4: Network Layer (^) 4b-
r Two-level hierarchy: local area, backbone. m Link-state advertisements only in area m each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. r Area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers. r Backbone routers: run OSPF routing limited to backbone. r Boundary routers: connect to other ASs.
4: Network Layer (^) 4b-
r CISCO proprietary; successor of RIP (mid 80s) r Distance Vector, like RIP r several cost metrics (delay, bandwidth, reliability, load etc) r uses TCP to exchange routing updates r Loop-free routing via Distributed Updating Alg. (DUAL) based on diffused computation
4: Network Layer (^) 4b-
Suppose: gateway X send its path to peer gateway W r W may or may not select path offered by X m cost, policy (don’t route via competitors AS), loop prevention reasons. r If W selects path advertised by X, then: Path (W,Z) = w, Path (X,Z) r Note: X can control incoming traffic by controling it route advertisements to peers: m e.g., don’t want to route traffic to Z -> don’t advertise any routes to Z
4: Network Layer (^) 4b-
AS1 AS
AS4 AS
N 1 R 1 A S 1 (^) N 1 R 2 A S 2 , A S 1
N 1 R 3 A S 3 , A S 2 , A S 1
F i g u r e 1 3 - 4 4 (^) P a t h v e c t o r p a c k e t s
N 1
R 1
R 3
R 2
R 4
4: Network Layer (^) 4b-
r BGP messages exchanged using TCP.
r BGP messages:
m OPEN: opens TCP connection to peer and authenticates sender m UPDATE: advertises new path (or withdraws old) m KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request m NOTIFICATION: reports errors in previous msg; also used to close connection
4: Network Layer (^) 4b-
r Inter-AS: admin wants control over how its traffic routed, who routes through its net. r Intra-AS: single admin, so no policy decisions needed
r hierarchical routing saves table size, reduced update traffic Performance : r Intra-AS: can focus on performance r Inter-AS: policy may dominate over performance
4: Network Layer (^) 4b-
r Fabric slower that input ports combined -> queueing may occur at input queues r Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward r queueing delay and loss due to input buffer overflow!
4: Network Layer (^) 4b-
4: Network Layer (^) 4b-
First generation routers: r packet copied by system’s (single) CPU r speed limited by memory bandwidth (2 bus crossings per datagram) Input Port
Output Port
Memory
System Bus
Modern routers: r input port processor performs lookup, copy into memory r Cisco Catalyst 8500
4: Network Layer (^) 4b-
r datagram from input port memory
to output port memory via a shared bus
r bus contention: switching speed limited by bus bandwidth
r 1 Gbps bus, Cisco 1900: sufficient speed for access and enterprise routers (not regional or backbone)
4: Network Layer (^) 4b-
r buffering when arrival rate via switch exceeeds ouput line speed r queueing (delay) and loss due to output port buffer overflow!
4: Network Layer (^) 4b-
IPv
m header format helps speed processing/forwarding m header changes to facilitate QoS m new “anycast” address: route to “best” of several replicated servers
m fixed-length 40 byte header m no fragmentation allowed
4: Network Layer (^) 4b-
IPv6 Header (Cont)
Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: identify upper layer protocol for data
4: Network Layer (^) 4b-
Other Changes from IPv
m additional message types, e.g. “Packet Too Big” m multicast group management functions