Documente Academic
Documente Profesional
Documente Cultură
&
ROUTING PROTOCOLS
V.Maheswaran Nair
Sub Divisional Engineer
BSNL,Trivandrum.
TCP/IP
(Transmission Control Protocol/
Internet Protocol)
TCP/IP
TCP is Used
Networking protocols
Moving packet of data from
Source to Destination
Data concurrency
Packet Sequencing
Delivery guarantee
Error Control
Retransmission
Internet address
IP address 16 bit
Destination)
MAC address
48 bit (6 Bytes)
Hexa Decimal Notation
AB 0F 25 B6 C5 D2
Vendor ID Serial No
IP Address
Each Internet address
consists of 4 bytes (32-bits),
defining two parts:
Netid
Hostid
128.11.3.31
Classes
There are five different IP
Address Classes: A, B, C, D & E.
Net Id Host Id
Internet Address Classes
A 0 NETID HOSTID
B 10 NETID HOSTID
Network Host
Class B 10xxxxxx
10 xxxxxxxx xxxxxxxx xxxxxxxx
Network Host
Class C 110xxxxx
110 xxxxxxxx xxxxxxxx xxxxxxxx
Identifying a class of address
Address Identifier Network Id Host Id
B-25%
1011111 0
19 1
1 1 0 A-50%
19
2
110000 0 1
C-12.5% 00
1101111 1
1 0
22
D-6.25% 3 22 1
1110000 4 23 0 0000000
E-6.25% 0 1110111 9 24 0
1 0 25 0
11110000
1111111
5
1
Class A
A 0 NETID HOSTID
Class
The
A lot ‘A’
First addresses
Octet
left-most
of addressesbit are
defines
must
Remaining seven bits defineare thezero
be
wasted
designed
to
inEach
netid.
define
this for
network
Theoretically,
There
Two special
are
class
the organizations
as theoretically
actually
addresses
we
class
it is can
as126 have
highly
‘A’. that
can
(hostid
27
different networks.
may
have
=
all128have
up
networks
0s and toa2huge
24
networks.
improbable only
hostid
that number
because
all
an 1s) areofused
= 16,777,216
two of
organization
computers
hosts.
the
for
hasspecial
addresses
so many attached
purposes. to theirfor
are reserved
computers.
networks.
special purposes.
Class B
B 10 NETID HOSTID
Class
The two‘B’left-most
addresses are
bits are 10
A
Two
We
Eachlot of
Octets
can addresses
network
have define
2 are
the
theoretically
14
= wasted
netid
16,384 can
designed
to The
Last next
define for
16-bits
the midsize
14-bits
are
class used
define
as to
‘B’. define
andTwo
in this
two
networks
have upspecial
class
octets
toin 2 addresses
1also as
6 define
class= it the
65,536
‘B’. (hostid
is hosts
highly(or
organizations
different
the hostid. networks.that may have a
all 0s and
improbable
hostid.
routers). hostid
that all
an 1s) are used
organization
large number of computers
for
hasspecial
so many purposes.
computers.
attached to their networks.
Class C
A 0.0.0.0 127.255.255.255
128.0.0.0 191.255.255.255
B
192.0.0.0 223.255.255.255
C
224.0.0.0 239.255.255.255
D
240.0.0.0 255.255.255.255
E
Number of networks and hosts in each Class
SESSION
OSI Model TRANSPORT TRANSPORT
TCP/IP Model
NETWORK NETWORK
DATA LINK DATA LINK
PHYSICAL PHYSICAL
TCP/IP Protocol Suite
FTP TFTP
A DHCP SMTP SNMP
TELNET DNS
HTTP
T TCP UDP
P
Data Encapsulation
Application Data
UDP Message
SEQUENCE NUMBER
ACKNOWLEDGEMENT NUMBER
SN-95426
2 AN-00000 SN-16780 3
1 0 000B AN- 95427
1 1 000B
SN-95427
AN-16781
4
0 1 000B
SN-95628
5 AN-17031 SN-17031
WAIT
SN - 17334
AN - 95881 6
SN - 95881 0 1 1 0B
AN -17334
0 0 1 0 0B 0
6-Finish; 0- Closed
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)
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
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
TCP will time out after a number of unsuccessful
retransmissions
Sliding Window-Flow Control
Moves to right when Sent and ack
ack is received.
Sent but not ack
Moves to right when
data is sent. Can be sent
Window Size
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 (Maximum Segment
Size)
Informs the receiver of the largest segment the sender is
willing to accept, without causing fragmentation
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.
User Datagram Protocol
Provides unreliable connectionless service
Transfers data without establishing a session
Used for services that have an inbuilt
reliability
Does not use end to end error checking and
correction
Does not order the packets; may loose or
duplicate a packet
Runs faster than TCP due to less overheads
UDP Header..
PADDING
OPTIONS
IP Header…
Version (4 Bits)
Identifies the IP version to which the packet belongs
Header Length (4 Bits)
Indicates the length of IP header in 32 bit words.
Minimum length is 20 octets.
Options may increase the size up to a maximum of 24 octets.
Type of Service (8 Bits)
Used for specifying special handling of packet.
Has two sub-fields:
Precedence
TOS
IP Header….
P P P D T R C 0 Reserved:
Always set to ‘0’
0 0 0 0 0 0 0 0 = No TOS
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 = Packet’s data payload
Identification (16 Bits)
Each datagram is identified by a identification number set
by the source.
Normally incremented by 1 for each datagram sent.
IP Header……
Flags (3 Bits)
First bit is not used.
Second bit is Don’t 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
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
Fragmentation..
MTU-1500 MTU-1500
172.16.2.0 MTU-576 172.16.3.0
1500 B
IP TCP Data
512 B 512 B 476 B
IP IP TCP Data IP Data IP Data
DF=0; MF=1; Offset=0 DF=0; MF=1; Offset=64 DF=0; MF=0; Offset=128
IP TCP Data
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
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 is calculated by each router
IP Header…….
Source Address of Host (32 Bits)
IP Address of the Originating Machine
Destination Address of Host (32 Bits)
IP Address of the Destination 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
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.
Well known port numbers
PORT DESCRIPTION
20 File Transfer-Data
21 File Transfer-Control
23 Telnet
25 SMTP
53 Domain Name Server
69 Trivial File Transfer
80 WWW
123 Network Time Protocol
179 Border Gateway Protocol
Domain Name System (DNS)
DNS Server What is the IP Address of
www.Yahoo.com
What is the IP Address of
www.Yahoo.com
DNS Server
www.yahoo.com , IP address
is 210.212.90.15
yahoo.com
ROUTING PROTOCOLS
Routing Protocol
Sharing
Updating
Routes
Static
Distance Vector
Protocols
Dynamic RIP,IGRP
OSPF,IS-IS
Path Determination
Router-A
Network Next Hop
Router
A B
192.168.7.
192.168.1.0 Direct
192.168.2. 192.168.1.
0
0 0
192.168.2.0 Direct
192.168.3.0 Direct 192.168.3. C 192.168.6.
192.168.4.0 B,C 0 0
.2 .1 .2 .1 .2 .1
.2 .1 .2 .1 .2 .1
.2 .1 .2 .1 .2 .1
.2 .1 .2 .1 .2 .1
>= 100Mbps 1
Ethernet/802.3 10
E1(2.048Mbps) 48
64Kbps 1562
4 4 4
A B A B
20 5 3 5
2 5 3
0
C 2 2
D C D
2
PATH VECTOR ROUTING
AS-0
BG IGP BG
AS-1
P P
AS-2
BG
IGP P IGP
Note: