Tải bản đầy đủ (.pdf) (8 trang)

Advanced Computer Networks: Lecture 18 - Dr. Amir Qayyum

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (414.85 KB, 8 trang )

CS716
Advanced Computer Networks
By Dr. Amir Qayyum
1


Lecture No. 18


Internet Protocol (IP)
• Network protocol for the Internet
• Operates on all hosts and routers (routers connect 
distinct networks into the Internet)
FTP

HTTP

NV

TFTP

UDP

TCP

IP

FDDI

Ethernet




ATM
3


Internetwork
• Concatenation of networks

H6

H7

H1
R1

 Network 
 Network 
11
Ethernet
Ethernet

Network 2
Point
­to­
point

H3

H2


R3

 Network 
 Network 
33
FDDI
FDDI

R2

 Network 
 Network 
44
Ethernet
Ethernet

H5

H8

H4

• Protocol stack
H1

H8

TCP


R1
IP

IP
ETH

R2

ETH

R3

IP
PPP

PPP

IP
FDDI

FDDI

TCP
IP

ETH

ETH

4



IP Addresses
7 bits (126 nets)
Class A:

0

24 bits (16 million hosts)

Network

Host

14 bits (16k nets)
Class B:

1

0

16 bits (64K hosts)

Network
21 bits (2 million nets)

Class C:

1


1

0

– 18.10.5.22
– 130.126.143.254
– 192.12.70.111

Network

Host
8 bits (256)
Host

host in class A network (MIT)
host in class B network (UIUC)
host in class C network

• More recent classes
– Multicast (class D): starts with 1110
– Future expansions (class E): starts with 1111
5


Datagram Format
0

4
Version


8
HLen

16
TOS

31
Length

Ident
TTL

19

Flags
Protocol

Offset
Checksum

SourceAddr
DestinationAddr
Options (variable)

Pad
(variable)

Data








4­bit version (4 for IPv4, 6 for IPv6)
4­bit header length (in words, minimum of 5)
8­bit type of service (TOS); more or less unused
16­bit datagram length (in bytes)
8­bit protocol (e.g., TCP=6 or UDP=17)
6


Datagram Format
0

4
Version

8
HLen

16
TOS

31
Length

Ident
TTL


19

Flags
Protocol

Offset
Checksum

SourceAddr
DestinationAddr
Options (variable)

Pad
(variable)

Data

• Fragmentation support
– 16­bit packet ID (identifies packet fragments)
– 3­bit flags; one bit marks last fragment
– 13­bit fragment offset into packet (in 8­byte words)

• 8­bit “time­to­live” (TTL); a hop count until 
forced destruction of packet

7


Datagram Format






16­bit IP checksum on header
32­bit source IP address
32­bit destination IP address
Options and padding (variable length)
– Source­based routing (typically disabled)
0
4
8
16
– Record route
TOS
Version
HLen
– Several others
Ident
Flags
TTL

Protocol

19

31
Length
Offset

Checksum

SourceAddr
DestinationAddr
Options (variable)

Pad
(variable)

Data

8



×