



























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
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-
ļ² 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
4: Network Layer 4b-
ICMP: Internet Control Message Protocol
ļ² used by hosts, routers, gateways to communication 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
ļ² 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-
Routing in the Internet
ļ² The Global Internet consists of Autonomous Systems
(AS) interconnected with each other:
ļ² Two-level routing:
4: Network Layer 4b-
Intra-AS Routing
ļ² Also known as Interior Gateway Protocols (IGP)
ļ² Most common IGPs:
ļ RIP: Routing Information Protocol
ļ OSPF: Open Shortest Path First
ļ IGRP: Interior Gateway Routing Protocol (Cisco propr.)
4: Network Layer 4b-
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 every 30 sec via
Response Message (also called advertisement )
ļ² Each advertisement: route to up to 25 destination
nets
4: Network Layer 4b-
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)
4: Network Layer 4b-
RIP Table processing
ļ² RIP routing tables managed by a pplication-level
process called route-d (daemon)
ļ² advertisements sent in UDP packets, periodically
repeated
4: Network Layer 4b-
OSPF (Open Shortest Path First)
ļ² āopenā: publicly available
ļ² Uses Link State algorithm
ļ² OSPF advertisement carries one entry per neighbor
router
ļ² Advertisements disseminated to entire AS (via
flooding)
4: Network Layer 4b-
OSPF āadvancedā features (not in RIP)
ļ² Security: all OSPF messages authenticated (to
prevent malicious intrusion); TCP connections used
ļ² Multiple same-cost paths allowed (only one path in
RIP)
ļ² For each link, multiple cost metrics for different
TOS (eg, satellite link cost set ālowā for best effort; high for real time)
ļ² Integrated uni- and multicast support:
ļ² Hierarchical OSPF in large domains.
4: Network Layer 4b-
ļ² 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.
4: Network Layer 4b-
IGRP (Interior Gateway Routing Protocol)
ļ² CISCO proprietary; successor of RIP (mid 80s)
ļ² Distance Vector, like RIP
ļ² several cost metrics (delay, bandwidth, reliability, load etc)
ļ² uses TCP to exchange routing updates
ļ² Loop-free routing via Distributed Updating Alg. (DUAL) based on diffused computation
4: Network Layer 4b-
ļ² 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
ļ E.g., Gateway X may send its path to dest. Z:
Path (X,Z) = X,Y1,Y2,Y3,ā¦,Z
4: Network Layer 4b-
Suppose: gateway X send its path to peer gateway W
ļ² W may or may not select path offered by X
ļ cost, policy (donāt 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 controling its
route advertisements to peers:
ļ e.g., donāt want to route traffic from Z - > donāt advertise any routes to Z