Lecture 1.1.3
Lecture 1.1.3
Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses
Relationship Of Layers And Addresses in TCP/IP
6
Port Numbers
•Port numbers are 16-bit integers (0 65,535)
Servers use well know ports, 0-1023 are privileged
Clients use ephemeral (short-lived) ports
•Internet Assigned Numbers Authority (IANA) maintains a list of port number assignment
Well-known ports (0-1023) controlled and assigned by IANA
Registered ports (1024-49151) IANA registers and lists use of ports as a
convenience (49151 is ¾ of 65536)
Dynamic ports (49152-65535) ephemeral ports
7
Internet Protocol(IP)
8
IP Packet
9
Transmission Control Protocol (TCP)
•TCP must perform typical transport layer functions:
Segmentation breaks message into packets
End-to-end error control since IP is an unreliable Service
End-to-end flow control to avoid buffer overflow
Multiplexing and demultiplexing sessions
10
Transmission Control Protocol
•Reliable
by providing connection oriented end to end reliable delivery of packets.
requires ACK and performs retransmission
If ACK not received in specified time period, retransmit.
Acknowledgments can be “piggy-backed” on reverse direction data packets or sent as separate packets
•Sequence Numbers
Associated with every byte that it sends
To detect packet loss, reordering and duplicate removal
Two fields are used sequence number and acknowledgment number.
Sequence number for each segment is the number of the first byte carried in that segment
The ACK number denotes the number of the next byte that this party expects to receive (cumulative)
If an ACK number is 5643 received all bytes from beginning up to 5642
This acknowledges all previous bytes as received error-free
11
Transmission Control Protocol
•Sending and Receiving buffers
Senders and receivers may not produce and consume data at same speed
2 buffers for each direction (sending and receiving buffer)
12
TCP Segment Format
TCP segment is the unit of data transferred b/w two processes that uses TCP.
Each segment consists of 2 parts :header and data part.
13
TCP Header Fields
•Source Port and Destination Port
Identify processes at ends of the connection
•Control bits
URG urgent (urgent data present)
ACK acknowledgment
PSH push request
Inform receiver TCP to send data to application ASAP
RST reset the connection
SYN synchronize sequence numbers
FIN end of byte stream from sender
14
TCP Header Fields
•Sequence Number: number assigned to first byte of data in current msg.
•Acknowledgment Number: sequence no of next byte of data sender is expected to receive (valid if ACK bit set)
•Header Length: header size in 32-bit units. Value ranges from [5-15] (20-60 bytes)
•Window: size of sender’s receive window ie buffer available for incoming data.
•Urgent
defines end of urgent data (or “out-of-band”) data and start of normal data
Added to sequence number (valid only if URG bit is set)
•Checksum: 16-bit CRC (Cyclic Redundancy Check) over header and data
•Options: up to 40 bytes of optional information in TCP header.
15
REFERENCES
1. Reference Book: T1: Data Communications and Networking, Behrouz A. Forouzan, 5th Edition,
Tata Mcgraw Hill Publication.
16
THANK YOU
For queries
Email: [email protected]
17