TCP_IP Model FOR COMPUTER ENGINEERING STUDENTS

elizabethngatunga 0 views 27 slides Oct 16, 2025
Slide 1
Slide 1 of 27
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27

About This Presentation

TCP/IP MODEL FOR NETWORKING BASICS


Slide Content

TCP/IPMODEL
LECTURE 5
IT is a hierarchical model.
There are multiple layers and higher layer protocols are
supported by lower protocols.
ItexistedevenbeforetheOSImodelwasdeveloped.
OriginallyTCP/IPmodelhadfourlayers(bottomtotop):
1.HosttoNetworkLayer
2.InternetLayer
3.TransportLayer
4.ApplicationLayer
ItisalsocalledastheTCP/IPprotocolsuite.Itisacollection
ofprotocols.
TCP/IPmodelisacollectionofprotocolsoftencalledaprotocol
suite.Itoffersarichvarietyofprotocolsfromwhich
wecanchoosefrom.

ThefigureforTCP/IPmodelisasfollows:Application
Transport
Networkor IP
HosttoNetwork
Fig:LayersofTCP/IPReferenceModel

ThestructureTCP/IPmodelisverysimilartothe
structureoftheOSIreferencemodel.TheOSImodel
hassevenlayerswheretheTCP/IPmodelhasfour
layers.
TheApplicationlayerofTCP/IPmodelcorrespondsto
theApplicationLayerofSession,Presentation&
ApplicationLayerofOSImodel.
The Transport layer of TCP/IP model corresponds to the
Transport Layer of OSI model
The Network layer of TCP/IP model corresponds to the
Network Layer of OSI model
The Host to network layer of TCP/IP model corresponds
to the Physical and Datalink Layer of OSI model.
The comparison of OSI model and TCP/IP model
along with the protocols

The diagram showing the comparison of OSI model and TCP/IP
model along with the protocols is as shown below:
Fig:ComparisonofOSImodelandTCP/IPmodel

FunctionsoftheLayersofTCP/IPmodel:
A.HosttoNetworkLayer
Thislayerisacombinationofprotocolsatthephysicaland datalinklayers.
Itsupportsallstandardprotocolsusedattheselayers.
B.NetworkLayeror IP
AlsocalledastheInternetworkLayer(IP).ItholdstheIP protocolwhichis
anetworklayerprotocolandis responsibleforsourceto
destinationtransmissionof data.
TheInternetworkingProtocol(IP)isanconnection-less&unreliable
protocol.
Itisabesteffortdeliveryservice.i.e.thereisnoerror checkinginIP,it
simplysendsthedataandreliesonits underlyinglayerstogetthe
datatransmittedtothe destination.

Inotherwords,sincethereisnoconnectionsetupbetweenthe
senderandthereceiverthepacketsfindthebestpossiblepathand
reachthedestination.Hence,thewordconnection-less.
Thepacketsmaygetdroppedduringtransmissionalongvarious
routes.SinceIPdoesnotmakeanyguaranteeaboutthedeliveryof
thedataitscallanunreliableprotocol.
EvenifitisunreliableIPcannotbeconsideredweakanduseless;
sinceitprovidesonlythefunctionalitythatisrequiredfor
transmittingdatatherebygivingmaximumefficiency.Sincethereis
nomechanismoferrordetectionorcorrectioninIP,therewillbeno
delayintroducedonamediumwherethereisnoerroratall.
IPtransportsdatabydividingitinto packetsordatagramsof
samesize.Eachpacketisindependentoftheotherandcanbe
transportedacrossdifferentroutesandcanarriveoutoforderatthe
receiver.

IPisacombinationoffourprotocols:
1.ARP
2.RARP
3.ICMP
4.IGMP
1. ARP–AddressResolutionProtocol
Itisusedtoresolvethephysicaladdressofadeviceonanetwork,
whereitslogicaladdressisknown.
Physicaladdressisthe48bitaddressthatisimprintedonthe
NICorLANcard,LogicaladdressistheInternetAddressor
commonlyknownasIPaddressthatisusedtouniquely&
universallyidentifyadevice.

2. RARP–ReverseAddressResolutionProtocol
ItisusedbyadeviceonthenetworktofinditsInternetaddress
whenitknowsitsphysicaladdress.
3. ICMP-InternetControlMessageProtocol
Itisasignalingmechanismusedtoinformthesenderabout
datagramproblemsthatoccurduringtransit.
Itisusedbyintermediatedevices.
Incaseandintermediatedevicelikeagatewayencountersany
problemlikeacorruptdatagramitmayuseICMPtosendamessage
tothesenderofthedatagram.
4. IGMP-InternetGroupMessageProtocol
It is a mechanism that allows to send the same message to a group
of recipients.

C.TransportLayer
Transportlayerprotocolsareresponsiblefortransmissionofdata
runningonaprocessofonemachinetothecorrectprocessrunning
onanothermachine
Thetransportlayercontainsthreeprotocols:
1.TCP
2.UDP
3.SCTP
1. TCP –Transmission Control Protocol
TCPisareliableconnection-oriented,reliableprotocol.
i.e.aconnectionisestablishedbetweenthesenderandreceiver
beforethedatacanbetransmitted.
Itdividesthedataitreceivesfromtheupperlayerintosegmentsand
tagsasequencenumbertoeachsegmentwhichisusedat
thereceivingendforreorderingofdata.

2. UDP–UserDatagramProtocol
UDPisasimpleprotocolusedforprocesstoprocesstransmission.
Itisanunreliable,connectionlessprotocolforapplicationsthatdonot
requireflowcontrolorerrorcontrol.
Itsimplyaddsportaddress,checksumandlengthinformationtothedatait
receivesfromtheupperlayer.
3. SCTP–StreamControlTransmissionProtocol
SCTP is a relatively new protocol added to the transport layer of TCP/IP
protocol suite.
It combines the features of TCP and UDP.
It is used in applications like voice over Internet and has a much broader
range of applications

ADDRESSING IN TCP/IP
The TCP/IP protocol suited involves 4 different types of addressing:
1.Physical Address
2.Logical Address
3.Port Address
4.Specific Address
APPLICATION
LAYER
TRASPORT
LAYER
NETWORK LAYER
HOST TO
NETWORK LAYER
PROCESS
SPECIFIC
ADDRESS
TCP UDP SCTP
IP and other associated
protocols
Protocols of underlying network
used at physical & data link layer
PORT ADDRESS
LOGICAL
ADDRESS
PHYSICAL
ADDRESS
Fig: Addressing in TCP/IP model

Eachoftheseaddressesaredescribedbelow:
1.Physical Address
Physical Address is the lowest level of addressing, also known as link
address.
It is local to the network to which the device is connected and unique
inside it.
The physical address is usually included in the frame and is used at the
data link layer.
MAC is a type of physical address that is 6 byte (48 bit) in size and is
imprinted on the Network Interface Card (NIC) of the device.
The size of physical address may change depending on the type of
network. Ex. An Ethernet network uses a 6 byte MAC address.

2.LogicalAddress
LogicalAddressesareusedforuniversalcommunication.
Mostofthetimesthedatahastopassthroughdifferent
networks;Forex:Ethernettowirelesstofiberoptic.Hence
physicaladdressesareinadequateforsourcetodestinationdeliveryof
datainaninternetworkenvironment.
LogicalAddressisalsocalledasIPAddress(Internet Protocol
address).
Atthenetworklayer,devicei.e.computersandroutersare identified
universallybytheirIPAddress.
IPaddressesareuniversallyunique.
Currently there are two versions of IP addresses being used:
a. IPv4: 32 bit address, capable of supporting 232 nodes
b. IPv6: 128 bit address, capable of supporting 2128 nodes

3. Port Address
Alogicaladdressfacilitatesthetransmissionofdatafromsourceto
destinationdevice.Butthesourceandthedestinationbothmaybe
havingmultipleprocessescommunicatingwitheachother.
SincetheresponsibilityoftheIPaddressisoverherethereisa
needofaddressingthathelpsidentifythesourceanddestination
processes.Inotherwords,dataneedstobedeliverednotonlyonthe
correctdevicebutalsoonthecorrectprocessonthecorrectdevice.
A Port Address is the name or label given to a process. It is a 16 bit
address.
Ex. TELNET uses port address 23, HTTP uses port address 80

4.Specific Address
Portaddressesaddressfacilitatesthetransmissionofdatafrom
processtoprocessbutstilltheremaybeaproblemwithdatadelivery.
ForEx:ConsiderusersA,B&CchattingwitheachotherusingGoogle
Talk.Everyuserhastwowindowsopen,userAhastwochatwindows
forB&C,userBhastwochatwindowsforA&CandsoonforuserC
Againtheresponsibilityoftheportaddressisoverhereandthereisa
needofaddressingthathelpsidentifythedifferentinstancesofthe
sameprocess.
Suchaddressareuserfriendlyaddressesandarecalledspecific
addresses.
OtherExamples:MultipleTabsorwindowsofawebbrowserwork
underthesameprocessthatisHTTPbutareidentifiedusing Uniform
ResourceLocators(URL ),Emailaddresses.

IPPROTOCOL–IPV4
PacketsintheIPv4formatarecalleddatagram.AnIPdatagram
consistsofaheaderpartandatextpart(payload).Theheaderhasa20-byte
fixedpartandavariablelengthoptionalpart
1.IP addresses
2.Address Space
3.Notations used to express IP address
4.Classfull Addressing
5.Subnetting
6.CIDR
7.NAT
8.IPv4 Header Format
IPv4canbeexplainedwiththehelpoffollowingpoints:

1.IPaddresses
EveryhostandrouterontheInternethasanIPaddress, which
encodesitsnetworknumberandhostnumber.
Thecombinationisunique:inprinciple,notwomachineson theInternet
have thesameIPaddress.
AnIPv4addressis32bits long
TheyareusedintheSourceaddressandDestination address
fieldsofIPpackets.
AnIPaddressdoesnotrefertoahostbutitreferstoa network
interface.
2. AddressSpace
Anaddressspaceisthetotalnumberofaddressesusedby theprotocol.
IfaprotocolusesNbitstodefineanaddress, theaddressspaceis 2
N
becauseeachbitcanhavetwo different values(0or1)and Nbitscan
have2
N
values.
IPv4uses32-bitaddresses,whichmeansthattheaddress space is2
32
or4,294,967,296(morethan4billion).

3. Notations
Therearetwo notationsto showan IPv4 address:
1.Binarynotation
The IPv4 addressisdisplayed as32 bits.
ex.11000001100000110001101111111111
2. Dotteddecimalnotation
TomaketheIPv4addresseasiertoread,Internet addressesare
usuallywrittenindecimalformwitha decimalpoint(dot)separating
thebytes.
Eachbyte(octet)is8bitshenceeachnumberin dotted-
decimalnotationisavaluerangingfrom0to 255.
Ex.129.11.11.239

4. Classfuladdressing
Inclassfuladdressing,theaddressspaceisdividedintofive classes: A,B,
C,D,andE.
Figure:Classfuladdressing:IPv4

NetidandHostid
Inclassfuladdressing,anIPaddressinclassA,B,orCis dividedintonetid
andhostid.
Thesepartsareofvaryinglengths,dependingontheclass oftheaddressas
shown above.
TheIPaddress0.0.0.0isusedbyhostswhentheyarebeingbooted.
Alladdressesoftheform127.xx.yy.zzarereservedforloopback
testing,theyareprocessedlocallyandtreatedasincomingpackets.

Subnetting
Itallowsanetworktobesplitintoseveralpartsforinternalusebutstill
actlikeasinglenetworktotheoutsideworld.
Toimplementsubnetting,therouterneedsasubnetmaskthat
indicatesthesplitbetweennetwork+subnetnumberandhost.Ex.
255.255.252.0/22.A‖/22‖toindicatethatthesubnetmaskis22bitslong.
ConsideraclassBaddresswith14bitsforthenetworknumber
and16bitsforthehostnumberwheresomebitsaretakenawayfrom
thehostnumbertocreateasubnetnumber.
Fig: AClassBnetworksubnettedinto64subnets.

If 6 bits from the host Id are taken for subnet then available bits are :
14 bits for network + 6 bits for subnet + 10 bits for host
With 6 bits for subnet the number of possible subnets is 2
6
which is 64.
With 10 bits for host the number of possible host are 2
10
which is 1022 (0 & 1
are not available)
CIDR
A class B address is far too large for most organizations and a class C
network, with 256 addresses is too small. This leads to granting Class B
address to organizations who do not require all the address in the address
space wasting most of it.
This is resulting in depletion of Address space.
A solution is CIDR (Classless Inter Domain Routing) The basic idea behind
CIDR, is to allocate the remaining IP addresses in variable-sized blocks,
without regard to the classes.

NAT (Network Address Translation)
The scarcity of network addresses in IPv4 led to the development of
IPv6.
IPv6 uses a 128 bit address, hence it has 2
128
addresses in its address
space which is larger thanaddresses provided by IPv4.
Transition from IPv4 to IPv6 is slowly occurring, but will take years to
complete, because of legacy hardware and its incompatibility to process IPv6
address.
NAT (Network Address Translation) was used to speed up the transition
process
Theonlyruleisthatnopacketscontainingtheseaddressesmayappearonthe
Internetitself.Thethreereservedrangesare:
10.0.0.0–10.255.255.255/8(16,777,216 hosts)
172.16.0.0 –172.31.255.255/12 (1,048,576 hosts)
192.168.0.0 –192.168.255.255/16 (65,536 hosts)

Operation:
WithintheOrganization,everycomputerhasauniqueaddressoftheform
10.x.y.z.However,whenapacketleavestheorganization,itpassesthrougha
NATboxthatconvertstheinternalIPsourceaddress,10.x.y.z,tothe
organizationstrueIPaddress,198.60.42.12forexample.
Figure:TheIPv4(InternetProtocol)header

The description of the fields shown in the diagram is as follows:
NoField NameDescription
1Version Keeps track of the version of the protocol the
datagram belongs to (IPV4 or IPv6)
2IHL Used to indicate the length of the Header.
Minimum value is 5 Maximum value 15
3Type of service Used to distinguish between different classes
of service
4Total length Itincludeseverythinginthedatagram—both
headeranddata.Themaximumlengthis
65,535bytes
5Identification Usedtoallowthedestinationhosttoidentify
whichdatagramanewlyarrivedfragment
belongsto.Allthefragmentsofadatagram
containthesameIdentificationvalue

6DF 1bitfield.ItstandsforDon'tFragment.Signalstheroutersnotto
fragmentthedatagrambecausethedestinationisincapableof
puttingthepiecesbacktogetheragain
7MF MFstandsforMoreFragments.Allfragmentsexceptthelastonehave
thisbitset.Itisneededtoknowwhenallfragmentsofadatagramhave
arrived.
8Fragment offset Usedtodeterminethepositionofthe fragment in the current
datagram.
9Time to live Itisacounterusedtolimitpacketlifetimes.Itmustbedecrementedon
eachhop.Whenithitszero,thepacketisdiscardedandawarning
packetissentbacktothesourcehost.
10 Header checksum It verifies Header for errors.
11Source address IP address of the source
12 Destination address IP address of the destination

13Options The options are variable length. Originally, five options were defined:
1.Security : specifies how secret the datagram is
2.Strict source routing : Gives complete path to be followed
3.Loose source routing : Gives a list of routers not to be missed
4.Recordroute:Makeseachrouter append its IP
address
5.Timestamp: Makeseachrouter append its IP
address and timestamp