Lecture 03
Lecture 03
TCP/IP – Part I
Prof Indranil Sengupta
Computer Science and Engineering
Indian Institute of Technology
Kharagpur
1
Introduction
2
Network Layering in TCP/IP
Why Layering ?
3
The 7-layer OSI Model
Application
Presentation
Host-to-host
Session
Transport
Network
Datalink Point-to-point
Physical
4
Data Flow in 4-layer Model
Application Application
Transport Transport
A B C
5
TCP/IP Family Members
User
FTP TFTP SMTP SNMP DNS Process
Typical Scenario
User User
Process Process
TCP UDP
IP
6
What does IP do?
7
What does UDP do?
Addresses in TCP/IP
User User
Process Process
Port Address
TCP UDP (16 bits)
IP Internet Address
(32 bits)
Physical Address
Ethernet Layer
(48 bits)
8
Encapsulation
• Basic concept:
¾As data flows down the protocol
hierarchy, headers (and trailers) get
appended to it.
¾As data moves up the hierarchy,
headers (and trailers) get stripped off.
• An example to illustrate:
¾Trivial file transfer protocol (TFTP).
¾TFTP client transfers 200 bytes of data.
¾4 bytes of TFTP header gets added.
UDP UDP
IP IP
Ethernet Ethernet
9
Encapsulation in TFTP
Data
IP Datagrams
10
The IP Layer
11
Illustration
Data
Format of IP Datagram
0 4 8 15 16 31
VER HLEN Service type Total Length
-------HEADER--------
Options
DATA
12
IP Header Fields
• VER (4 bits)
¾Version of the IP protocol in use (typically
4).
• HLEN (4 bits)
¾Length of the header, expressed as the
number of 32-bit words.
¾Minimum size is 5, and maximum 15.
• Total Length (16 bits)
¾Length in bytes of the datagram, including
headers.
¾Maximum datagram size :: 216 = 65536 bytes.
13
IP Header Fields (contd.)
14
SOLUTIONS TO QUIZ
QUESTIONS ON
LECTURE 2
15
Quiz Solutions on Lecture 2
LAN
16
Quiz Solutions on Lecture 2
Packet switching.
Virtual circuit.
Datagram.
Virtual circuit.
17
Quiz Solutions on Lecture 2
Datagram.
18
Quiz Solutions on Lecture 2
19
Quiz Questions on Lecture 3
20
Quiz Questions on Lecture 3
21