Escolar Documentos
Profissional Documentos
Cultura Documentos
ALTTC/ BB Faculty
Objectives
What is Internet? Comparison of TCP/IP & OSI Data Encapsulation TCP-IP Protocol Suite TCP/IP Protocol Documents TCP-IP Protocol Suite (IPv4 vs IPv6)
ALTTC/ BB Faculty
What is Internet?
Internet is network of networks, with different hardware/software technologies Also known by the name TCP/IP Internet Name TCP/IP is taken from the names of the one of the transport layer protocols (Transport Control Protocol) and the network layer protocol (Internet Protocol) TCP/IP is backbone of the Internet
ALTTC/ BB Faculty
OSI Model
TCP/IP Model
ALTTC/ BB Faculty
Data Encapsulation
Application Data
TPT Layer
Data Data
TCP Segment
UDP Message NW Layer IP Header TCP-UDP IP Datagram Data Link Frame Head IP Header TCP-UDP Frame Data Trailer Data
ALTTC/ BB Faculty
T N D P
ALTTC/ BB Faculty
TELNET
Provides the ability to login into a remote host and administer the machine.
directories
TCP Details
Provides application programs access to the network using a reliable connection-oriented transport layer service TCP sends and receives data reliably using sequence numbers and acknowledgments TCP is a byte oriented protocol i.e. every byte in each packet is assigned a sequence number Data stream handed over to TCP is called an unstructured stream TCP divides this data stream into segments for transmission to remote network
ALTTC/ BB Faculty 9
TCP Header..
Octet +0 Octet +1 Octet +2 Octet +3 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
SOURCE PORT
DESTINATION PORT
SEQUENCE NUMBER
HELEN
WINDOW SIZE
URGENT POINTER
ALTTC/ BB Faculty
10
TCP Header
Source & Destination Port (16 Bits)
Can run number of applications using same transport by multiplexing through port numbers Port numbers are used to identify a unique application in a machine 65536 (0-65535) port numbers can be defined Theoretically it is possible to run 65535 simultaneous applications in a host The first 1024 ports, port numbers 0-1023 known as well known port numbers, are assigned and are reserved for standard applications and are controlled by IANA The remaining ports, 1024-65535, are dynamic and can be used freely by applications Source port is randomly generated by the source machine
ALTTC/ BB Faculty 11
DESCRIPTION File Transfer-Data File Transfer-Control Telnet SMTP Domain Name Server Trivial File Transfer WWW Network Time Protocol Border Gateway Protocol
12
TCP Header
Sequence Number (32 Bits)
Helps in establishing TCP connections, along with SYN bit, called as Three Way Handshake Helps in maintaining account of amount of data being transferred Identifies where the encapsulated data fits within a data stream from the sender Sequence number is incremented, in the system, every 4 microsecond
ALTTC/ BB Faculty
14
Three-Way-Handshake
Sender 0
SN-95426
Receiver
AN-00000 1 0 000B
SN-95427
AN-16781 0 1 000B
ALTTC/ BB Faculty
15
Data Transfer
0 Sender 2
SN-95426 AN-00000 1 0 000B SN-16780 AN- 95427 1 1 000B
1 Receiver 3
AN-16881 0 1 200B
SN-95628
AN-17031 0 1 250B
Sender
Receiver
WAIT
SN - 17334 AN - 95881 SN - 95881 AN -17334 0 1 1 0B
0 1 0
0B
0 6-Finish; 0- Closed
ALTTC/ BB Faculty
17
TCP Header.
Header Length (4 Bits)
Sometimes called Data Offset Indicates the length of header in 32-bit words Identifies the beginning of data Typical value is 5 unless there are options Urgent (URG) Acknowledgement (ACK) Push (PSH) Reset (RST) Synchronisation (SYN) Finish (FIN)
18
Flags (6 Bits)
ALTTC/ BB Faculty
TCP Header..
Window Size (16 Bits)
Indicates the size of the sliding window Specifies the number of octets, starting with the octet indicated by the acknowledgement number, that the sender of the segment will accept from its peer at the other end of the connection before the peer must stop transmitting and wait for an acknowledgement A default window size is 4096 bytes Used for flow control by using Sliding window mechanism
ALTTC/ BB Faculty
19
Flow Control
Sender retains a copy of transmitted data until it receives an acknowledgment from the remote network. If no acknowledgment is received, within a specified time, the data is retransmitted by using adaptive retransmission algorithm.
TCP records the time of the transmission and sequence number of the segment. TCP again records the time of the acknowledgement received. Using this delta, TCP builds a sample round-trip delay time and uses this to build an average time for a packet to be sent and to receive an acknowledgement
Window Size
ALTTC/ BB Faculty
21
TCP Header..
Checksum(16 Bits)
Used for error detection Covers both header and the encapsulated data
Options
One of the important options is MSS (Maximum Segment Size) Informs the receiver of the largest segment the sender is willing to accept, without causing fragmentation
ALTTC/ BB Faculty 22
TCP Header
Padding
Consists of 1-3 octets, each equal to zero, to force the length of TCP header to be in multiples of four octets.
ALTTC/ BB Faculty
23
UDP Header..
Octet +0
Octet +1
Octet +2
Octet +3
ALTTC/ BB Faculty
25
UDP Header...
Source Port (16 Bits)
Identifies the sending process.
Internet Protocol.
Provides best-effort or connectionless delivery service. No error checking or tracking If reliability is important, IP must be paired with a reliable protocol like TCP Transmits blocks of data called datagrams each of which is transported separately Responsible for IP addressing Datagrams may travel along different routes and may arrive out of sequence or duplicated.
ALTTC/ BB Faculty 27
IP Header..
Octet +0 Octet +1 Octet +2 Octet +3 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
VER
HLEN
TOS DM F F
OPTIONS
PADDING
ALTTC/ BB Faculty
28
IP Header
Version (4 Bits)
Identifies the IP version to which the packet belongs
ALTTC/ BB Faculty
29
IP Header.
P P P D T R C 0 Reserved: Always set to 0
Precedence 000-Routine 001-Priority 010-Immediate 011-Flash 100-Flash Override 101-CRITIC/ECP 110-Internetwork Control 111-Network Control
= No TOS
ALTTC/ BB Faculty
30
IP Header..
Total Length (16 Bits)
Specifies total length of the packet, including header, in octets Largest decimal number =216= 65535, the maximum possible size of an IP packet is 65535 octets Total length - header length = Packets data payload
IP Header
Flags (3 Bits)
First bit is not used. Second bit is Dont Fragment (DF) bit Third bit if More Fragment (MF) bit
Maximum Transmit Unit (MTU) is the size of the largest packet, including IP Header, that can be transmitted or received through a data link Default MTU is 576 bytes, which can be handled by any network without fragmentation
ALTTC/ BB Faculty 32
IP Header
Fragment Offset (13 Bits)
The fragmentation occurs at the routers, if the original packet length exceeds the MTU of a data link Used only in the cases when a datagram is fragmented on its way Specifies the offset, in units of eight octets, from the beginning of header to the beginning of the fragment Each fragment is marked, by router, with the same identifier number
ALTTC/ BB Faculty
33
Fragmentation..
MTU-1500
172.16.2.0
MTU-1500 MTU-576
172.16.3.0
1500 B IP 512 B IP IP TCP Data IP TCP Data 512 B Data IP 476 B Data
TCP
ALTTC/ BB Faculty
34
Fragmentation
Only the receiver host reassembles the datagram The destination machine starts a reassembly timer for about 60-120 seconds. If not all fragments were received, then hosts discard the packets and sends a time exceeded ICMP message to the source machine If a single fragment is lost during a transmission, the entire packet must be resent
ALTTC/ BB Faculty 35
IP Header
Time to live-TTL (8 Bits)
Assigns a life to an IP datagram
Protocol (8 Bits)
Specifies the protocol that runs on the top of IP. TCP-6; EGP-8; UDP-17; OSPF-89
the
ALTTC/ BB Faculty
36
IP Header.
Source Address of Host (32 Bits)
IP Address of the Originating Machine
Options
Security: Specifies how secret the datagram is Strict Source Routing(SSR): Gives the complete path to be followed Loose Source Routing(LSR): Gives the list of routers not to be missed
ALTTC/ BB Faculty
37
IP Header..
Record Route: Makes each router to append its IP address. Time Stamp: Makes each router to append its IP address and time stamp.
Padding
Ensures that the header ends on a 32 bit boundary by adding zeros after the option field.
ALTTC/ BB Faculty
38
HDLC
High-level Data Link Control
ATM
Asynchronous Transfer Mode
ALTTC/ BB Faculty 39
Socket Connection..
Ports along with an IP address, known as socket connection, allow any application in any machine on an internet to be uniquely defined. Multiple applications can run simultaneously on a host by making use of separate socket connection for each application.
ALTTC/ BB Faculty
40
Socket Connection-Multiplexing
A.B.C.D E.F.G.H
FTP
2764
DNS
3753
DATA DATA
FTP
21
3753-53 2764-21 3753-53 2764-21 3753-53 2764-21 A.B.C.D-E.F.G.H A.B.C.D-E.F.G.H A.B.C.D-E.F.G.H A.B.C.D-E.F.G.H
DNS
53
TCP IP
UDP T N D P
TRAILER TRAILER
TCP
UDP
HEADER HEADER
1. A.B.C.D(2764) E.F.G.H(21)
ALTTC/ BB Faculty
2. A.B.C.D(3753) E.F.G.H(53)
41
Socket Connection-Demultiplexing
A.B.C.D E.F.G.H DATA DATA DATA DATA DATA DATA TRAILER TRAILER DATA DATA 53- 3753 21- 2764 53- 3753 21- 2764 53- 3753 21- 2764 E.F.G.H-A.B.C.D E.F.G.H-A.B.C.D E.F.G.H-A.B.C.D E.F.G.H-A.B.C.D HEADER HEADER
FTP
2764
DNS
3753
FTP
21
DNS
53
TCP IP
UDP T N D P
TCP
UDP
1. A.B.C.D(2764) E.F.G.H(21)
ALTTC/ BB Faculty
2. A.B.C.D(3753) E.F.G.H(53)
42
ALTTC/ BB Faculty
44
Special type of Class-D IP addresses, starting with 1110, are reserved as multicast addresses.
ALTTC/ BB Faculty
46
ALTTC/ BB Faculty
47
ARP Operation
Give me MAC address of 129.1.1.4 Here is my MAC address
129.1.1.1
129.1.1.4
Request Ignored
Thats Me 08-00-10-99-AC-54
ALTTC/ BB Faculty
48
ALTTC/ BB Faculty
49
RARP Operation
Give me my IP address RARP Response
RARP Server
ALTTC/ BB Faculty
50
IPv4 vs IPv6
Some independent protocols of version 4 are part of ICMPv6.
RARP protocol is dropped from the suite. ARP and IGMP are combined with ICMPv6.
ICMP
IGMP
IPv4
ARP
RARP
ICMP
IPv6
ALTTC/ BB Faculty
51
VER
DESTINATION ADDRESS (128 Bits) PAYLOAD (0-65535 Bytes) (EXTENSION HEADERS + DATA PACKETS FROM UPPER LAYERS)
ALTTC/ BB Faculty
52
A major source for RFCs is the Internet Engineering Task Force and are accessible on site www.ietf.org
ALTTC/ BB Faculty
53
ALTTC/ BB Faculty
54