Docsity

IP Datagram Format - Computer Networks - Lecture Slides, Slides of Computer Science

Toggle sidebar
bg1
4: Network Layer 4b-1
IP datagram format
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.
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23

Partial preview of the text

Download IP Datagram Format - Computer Networks - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

4: Network Layer 4b-

IP datagram format

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-

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

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:

 Stub AS : small corporation

 Multihomed AS : large corporation (no transit)

 Transit AS : provider

 Two-level routing:

 Intra-AS: administrator is responsible for choice

 Inter-AS: unique standard

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

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

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:

 Multicast OSPF (MOSPF) uses same topology data base as

OSPF

 Hierarchical OSPF in large domains.

4: Network Layer 4b-

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.

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-

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

 E.g., Gateway X may send its path to dest. Z:

Path (X,Z) = X,Y1,Y2,Y3,…,Z

4: Network Layer 4b-

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