17 1 Internet I
-
Upload
akhil-neyyattinkara -
Category
Documents
-
view
216 -
download
0
Transcript of 17 1 Internet I
-
8/3/2019 17 1 Internet I
1/38
1
TCP/IP Protocol Suite
Arun Aggarwal
GM ( NW)
Tel: +91-120-2728294(O)+91-120-2728410(R)
E-Mail: [email protected]
-
8/3/2019 17 1 Internet I
2/38
2
Objectives
What is Internet?
TCP/IP Layers
Data Encapsulation
TCP-IP Protocol Suite
-
8/3/2019 17 1 Internet I
3/38
3
What is Internet?
Internet is network of networks, withdifferent hardware/software technologies
Also known by the name TCP/IP Internet
Name TCP/IP is taken from the names ofthe one of the transport layer protocols(Transport Control Protocol) and thenetwork layer protocol (Internet Protocol)
TCP/IP is backbone of the Internet
-
8/3/2019 17 1 Internet I
4/38
4
TCP/IP and OSI
OSI is made of seven layers.
TCP/IP protocol is made of five layers.
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
APPLICATION
PHYSICAL
DATA LINK
NETWORK
TRANSPORT
SESSION
PRESENTATION
APPLICATION
OSI Model TCP/IP Model
-
8/3/2019 17 1 Internet I
5/38
5
Frame Head Trailer
Frame
Data Encapsulation
Data
Data
Data
TCP Header
TCP Segment
UDP Header
UDP Message
TCP-UDP DataIP Header
IP Datagram
IP Header TCP-UDP Data
Application
TPT Layer
NW Layer
Data Link
-
8/3/2019 17 1 Internet I
6/38
6
D
P
N
T
A
TCP/IP Protocol Suite..
ICMP IGMPRARPARP
FTP
SMTPTELNETHTTP
TFTP
NFSSNMPDNS
TCP UDP
IP
Protocols defined by the underlying networks
-
8/3/2019 17 1 Internet I
7/38
7
Applications using TCP
File Transfer Protocol (FTP) Provides the ability to upload and download files
between hosts on the network. Simple Mail Transport Protocol (SMTP)
Provides the ability to send mail between userson the network.
TELNET Provides the ability to login into a remote host
and administer the machine.
Hyper Text Transfer Protocol (HTTP) Provides the ability to supply web pages between
a browser and the server.
-
8/3/2019 17 1 Internet I
8/38
8
Applications using UDP
Trivial File Transfer Protocol (TFTP) Provides simplex file transfer for network booting
of devices. Network File System (NFS)
Provides the ability for sharing directoriesbetween hosts on the network.
Simple N/w Management Protocol (SNMP) Provides the ability to supply network
management services on the network.
Domain Name Service (DNS) Provides mapping between domain name and IP
address and vice versa.
-
8/3/2019 17 1 Internet I
9/38
9
TCP Details
Provides application programs access to thenetwork using a reliable connection-oriented
transport layer service TCP sends and receives data reliably using
sequence numbers and acknowledgements
Every byte in each packet is assigned asequence number
Data stream handed over to TCP is called anunstructured stream
TCP divides this data stream into segmentsfor transmission to remote network
-
8/3/2019 17 1 Internet I
10/38
10
TCP Header..
76543210765432107654321076543210
ACKNOWLEDGEMENT NUMBER
DESTINATION PORTSOURCE PORT
OPTIONS AND PADDING
URGENT POINTERCHECKSUM
WINDOW SIZEFIN
SYN
RST
PSH
ACK
URG
HELEN
Octet +3Octet +2
SEQUENCE NUMBER
Octet +1Octet +0
-
8/3/2019 17 1 Internet I
11/38
11
TCP Header
Source & Destination Port (16 Bits) Can run number of applications using same
transport by multiplexing through port numbers Port numbers (0-65535) are used to identify a
unique application in a machine
The first 1024 ports, port numbers 0-1023
known as well known port numbers, areassigned and are reserved for standardapplications 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
-
8/3/2019 17 1 Internet I
12/38
12
Well known port numbers
Network Time Protocol123
File Transfer-Data20
File Transfer-Control21
Telnet23
SMTP25
Domain Name Server53
Trivial File Transfer69
WWW80
DESCRIPTIONPORT
Border Gateway Protocol179
-
8/3/2019 17 1 Internet I
13/38
13
TCP Header
Sequence Number & Acknowledgement Number (32Bits each)
Helps in establishing TCP connections, along withSYN bit, called as Three Way Handshake
Helps in maintaining account of amount of databeing transferred
Sequence number is incremented, in the system,every 4 microsecond
Acknowledgement Number identifies the
sequence number expected from the other end ofdata transmission unit
-
8/3/2019 17 1 Internet I
14/38
14
Seq/Ack numbers relation
During TCP Connection Establishment/Three way handshake
Acknowledgement Number Sent = SequenceNumber Received+1
During Data Transfer
Acknowledgement Number Sent = SequenceNumber Received + Data Received in Bytes
-
8/3/2019 17 1 Internet I
15/38
15
Three-Way-Handshake
ReceiverSender 0 1
0) Closed; 1) Listen; 2) SYN-Sent; 3) SYN-Received; 4) Link Established
AN-00000
000B01
SN-95426
2
AN- 95427
000B11
SN-16780 3
AN-16781
000B10
SN-95427
4
Ack. FlagSyn. Flag
-
8/3/2019 17 1 Internet I
16/38
16
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
Flags (6 Bits) Urgent (URG)
Acknowledgement (ACK)
Push (PSH)
Reset (RST)
Synchronisation (SYN)
Finish (FIN)
-
8/3/2019 17 1 Internet I
17/38
17
TCP Header..
Window Size (16 Bits)
Indicates the size of the sliding window
Specifies the number of octets, starting with theoctet indicated by the acknowledgementnumber, that the sender of the segment willaccept from its peer at the other end of theconnection before the peer must stoptransmitting and wait for an acknowledgement
A default window size is 4096 bytes
Used for flow control by using Sliding windowmechanism
-
8/3/2019 17 1 Internet I
18/38
18
Flow Control
Sender retains a copy of transmitted data until itreceives an acknowledgment from the remotenetwork.
If no acknowledgment is received, within aspecified time, the data is retransmitted by usingadaptive retransmission algorithm. TCP records the time of the transmission and sequence
number of the segment.
TCP again records the time of the acknowledgementreceived.
Using this delta, TCP builds a sample round-trip delay time
and uses this to build an average time for a packet to besent and to receive an acknowledgement
TCP will time out after a number of unsuccessfulretransmissions
-
8/3/2019 17 1 Internet I
19/38
19
TCP Header..
Checksum(16 Bits) Used for error detection
Covers both header and the encapsulated data
Urgent Pointer(16 Bits) Used only when urgent flag is set
Points to the last octet of urgent data Options
One of the important options is MSS (MaximumSegment Size)
Informs the receiver of the largest segmentthe sender is willing to accept, withoutcausing fragmentation
-
8/3/2019 17 1 Internet I
20/38
20
User Datagram Protocol
Provides unreliable connectionless service
Transfers data without establishing a
session
Used for services that have an inbuiltreliability
Does not use end to end error checking andcorrection
Does not order the packets; may loose orduplicate a packet
Runs faster than TCP due to less overheads
-
8/3/2019 17 1 Internet I
21/38
21
UDP Header..
DESTINATION PORTSOURCE PORT
CHECKSUMMESSAGE LENGTH
76543210765432107654321076543210
Octet +3Octet +2Octet +1Octet +0
Source Port & Destination Port
Same as in TCP
Message length (16 Bits)
Indicates the size of the UDP header and its data in
bytes.
Checksum (16 Bits)
Covers the UDP header and UDP data.
-
8/3/2019 17 1 Internet I
22/38
22
Internet Protocol.
Provides best-effort or connectionlessdelivery 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 datagramseach of which is transported separately
Responsible for IP addressing
Datagrams may travel along different routesand may arrive out of sequence orduplicated.
-
8/3/2019 17 1 Internet I
23/38
23
IP Header..
HEADER CHECKSUMPROTOCOLTIME TO LIVE
DESTINATION ADDRESS OF HOST
SOURCE ADDRESS OF HOST
PADDINGOPTIONS
76543210765432107654321076543210
FRAGMENT OFFSETMFDFIDENTIFICATION
TOTAL LENGTHTOSHLENVER
Octet +3Octet +2Octet +1Octet +0
-
8/3/2019 17 1 Internet I
24/38
24
IP Header
Version (4 Bits)
Identifies the IP version of the packet Type of Service (8 Bits)
Used for specifying special handling of packet.
Has two sub-fields:Precedence & TOS Total Length (16 Bits)
Specifies total length of the packet, including
header, in octets Maximum possible size of an IP packet is 65535
octets
-
8/3/2019 17 1 Internet I
25/38
25
IP Header.
0CRTDPPP
Reliability0-Normal1-Maximise
Precedence000-Routine001-Priority
010-Immediate011-Flash100-Flash Override101-CRITIC/ ECP110-Internetwork Control111-Network Control
Delay0-Normal1-Minimise
Throughput0-Normal1-Maximise
Cost0-Normal1-Minimise
Reserved:Always set to 0
0 = No TOS0000000
-
8/3/2019 17 1 Internet I
26/38
26
IP Header
Identification (16 Bits)
Each datagram is identified by a identification number setby the source.
Flags (3 Bits)
First bit is not used.
Second bit is Dont Fragment (DF) bit Third bit is More Fragment (MF) bit
Maximum Transmit Unit (MTU) is the size of thelargest 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
-
8/3/2019 17 1 Internet I
27/38
27
IP Header
Fragment Offset (13 Bits)
The fragmentation occurs at the routers, if the
original packet length exceeds the MTU of a datalink
Used only in the cases when a datagram isfragmented on its way
Specifies the offset, in units of eight octets, fromthe beginning of header to the beginning of thefragment
Each fragment is marked, by router, with thesame identifier number
-
8/3/2019 17 1 Internet I
28/38
28
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
Header Checksum (16 Bits)
Error detection field for IP header
As each router decrements the TTL, the checksum iscalculated by each router
Source Address of Host (32 Bits)
IP Address of the Originating Machine
Destination Address of Host (32 Bits)
IP Address of the Destination Machine
-
8/3/2019 17 1 Internet I
29/38
29
IP Header.
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 Record Route:
Makes each router to append its IP address. Time Stamp:
Makes each router to append its IP addressand time stamp
-
8/3/2019 17 1 Internet I
30/38
30
Underlying Networks Protocols
Ethernet
Token Ring
FDDI Fiber Distributed Data Interface
HDLC
High-level Data Link Control Frame Relay
PPP
Point-to-Point Protocol ATM
Asynchronous Transfer Mode
-
8/3/2019 17 1 Internet I
31/38
31
Internet Control Message Protocol
Internet Control Message Protocol is amechanism used by hosts and routers to
send notification of datagram problems backto the sender.
Sends error messages only to the source
and not to intermediate routers. Sole function is to report problems, not to
correct them.
An important use of ICMP is echo/reply totest whether a destination is reachable andresponding.
-
8/3/2019 17 1 Internet I
32/38
32
Internet Control Message Protocol
Echo request/reply (PING; Packet INternetGropher) Destination unreachable
0-Network unreachable
1-Host unreachable
2-Protocol unreachable 3-Port unreachable
4-Fragment needed but DF bit is set
5-Source route failed
Time exceeded message format
0-TTL exceeded
1-Fragment reassembly time exceeded
-
8/3/2019 17 1 Internet I
33/38
33
Internet Group Message Protocol
Internet Group Message Protocol providesallows for multicast to operate on an
internetwork. Multicast is one-to-many communication.
A message sent can be simultaneously received
by a group of hosts. Special type of Class-D IP addresses,
starting with 1110, are reserved as
multicast addresses.
-
8/3/2019 17 1 Internet I
34/38
34
Address Resolution Protocol
Address Resolution Protocol is used totranslate 32 bits IP addresses to 48 bits
Ethernet addresses. A hosts physical address is determined by
broadcasting its IP address to all machines.
The machine with matching IP address, inbroadcast message, sends its hardwareaddress to the machine originating
broadcast.
-
8/3/2019 17 1 Internet I
35/38
35
ARP Operation
RequestIgnored
RequestIgnored
ARPResponseAccepted
Give me MAC address of 129.1.1.4
ThatsMe
Here is my MAC address
129.1.1.1 129.1.1.4
129.1.1.2 129.1.1.308-00-39-00-2F-C3
08-00-10-99-AC-54
08-00-5A-21-A7-2208-00-39-00-2F-AB
-
8/3/2019 17 1 Internet I
36/38
36
Reverse Address Resolution Protocol
Reverse Address Resolution Protocol isused to get the 32 bits Source IP
address, knowing the 48 bits Hardwareaddress.
It is reverse of ARP, hence named
Reverse Address Resolution Protocol. A diskless workstation broadcasts RARP-
Request to find its IP Address at the time
of boot up.
-
8/3/2019 17 1 Internet I
37/38
37
RARP Operation
Give me my IP address RARP Response
Disklesswork
station RARPServer
08-00-39-00-2F-C3 08-00-10-99-AC-54
08-00-5A-21-A7-22
223.1.2.1 223.1.2.2
223.1.2.3
08-00-39-00-2F-AB
-
8/3/2019 17 1 Internet I
38/38
38