BRANCH-E&TC ENGINEERING
SEM – 4th
SUBJECT-DATA COMMUNICATION AND COMPUTER NETWORK
CHAPTER-07 – tcp/ip
TOPIC- tcp ip protocol
Ay-2021-2022 ,summer-2022
FACULTY-ER V BEHERA.(LECTURER E & Tc engg dept)
TCP/IP
TCP/IP PROTOCOL FAMILY
WHAT IS AN INTERNET?
WHAT IS AN INTERNET? (CONT)
ISO/OSI NETWORK MODEL
You don’t need to know the layers just the idea that it is layered
TCP/IP NETWORK MODEL
�OSI AND PROTOCOL STACK
OSI: Open Systems Interconnect
OSI Model
TCP/IP Hierarchy
Protocols
7th
Application Layer
6th
Presentation Layer
5th
Session Layer
4th
Transport Layer
3rd
Network Layer
2nd
Link Layer
1st
Physical Layer
Application Layer
Transport Layer
Network Layer
Link Layer
Link Layer : includes device driver and network interface card
Network Layer : handles the movement of packets, i.e. Routing
Transport Layer : provides a reliable flow of data between two hosts
Application Layer : handles the details of the particular application
PACKET ENCAPSULATION
22Bytes
20Bytes
20Bytes
4Bytes
64 to 1500 Bytes
IP
IP ADDRESSES
ROUTING
ROUTING (CONT)
ALLOCATION OF ADDRESSES
IP PACKETS
IP DATAGRAM
Vers
Len
TOS
Total Length
Identification
Flags
Fragment Offset
TTL
Protocol
Header Checksum
Source Internet Address
Destination Internet Address
Options...
Padding
Data...
0
4
8
16
19
24
31
Field Purpose
Vers IP version number
Len Length of IP header (4 octet units)
TOS Type of Service
T. Length Length of entire datagram (octets)
Ident. IP datagram ID (for frag/reassembly)
Flags Don’t/More fragments
Frag Off Fragment Offset
Field Purpose
TTL Time To Live - Max # of hops
Protocol Higher level protocol (1=ICMP,
6=TCP, 17=UDP)
Checksum Checksum for the IP header
Source IA Originator’s Internet Address
Dest. IA Final Destination Internet Address
Options Source route, time stamp, etc.
Data... Higher level protocol data
You just need to know the IP addresses, TTL and protocol #
IP ROUTING
Destination IP address
IP address of a next-hop router
Flags
Network interface specification
Application
Transport
Network
Link
Application
Transport
Network
Link
Network
Link
Source
Destination
Router
UDP
UDP DATAGRAM
Destination Port
Source Port
Application data
0
16
31
Checksum
Length
Field Purpose
Source Port 16-bit port number identifying originating application
Destination Port 16-bit port number identifying destination application
Length Length of UDP datagram (UDP header + data)
Checksum Checksum of IP pseudo header, UDP header, and data
TYPICAL APPLICATIONS OF UDP
TCP
APPLICATIONS OF TCP
TCP IMPLEMENTATION
TCP PACKETS
TCP SEGMENT
Destination Port
Acknowledgment Number
Options...
Padding
Data...
0
4
10
16
19
24
31
Source Port
Window
Len
Sequence Number
Reserved
Flags
Urgent Pointer
Checksum
Field Purpose
Source Port Identifies originating application
Destination Port Identifies destination application
Sequence Number Sequence number of first octet in the segment
Acknowledgment # Sequence number of the next expected octet (if ACK flag set)
Len Length of TCP header in 4 octet units
Flags TCP flags: SYN, FIN, RST, PSH, ACK, URG
Window Number of octets from ACK that sender will accept
Checksum Checksum of IP pseudo-header + TCP header + data
Urgent Pointer Pointer to end of “urgent data”
Options Special TCP options such as MSS and Window Scale
You just need to know port numbers, seq and ack are added
TCP : DATA TRANSFER
Host
Client
Send Packet 1
Start Timer
Retransmit Packet1
Start Timer
Packet should arrive
ACK should be sent
ACK would normally
Arrive at this time
Receive Packet 1
Send AXK 1
Time Expires
Receive ACK 1
Cancel Timer
Packet Lost
Timer
Timer
IPV6
ETHERNET
example: 00-C0-4F-48-47-93
Ethernet Packet:
Dest.
address
Data
CRC
Source
address
Type
MAC: Media Access Control
6bytes
6bytes
2bytes
Preamble
8bytes
64 - 1500bytes
4bytes
Do not worry about this slide
ARP : ADDRESS RESOLUTION PROTOCOL
32bit IP address <-> 48bit MAC address
128.97.89.153 <-> 00-C0-4F-48-47-93
maintains the recent mappings from IP addresses to MAC addresses
Protocol
Do not worry about this slide
DHCP
Do not worry about this slide
Thank You