0% found this document useful (0 votes)
14 views

Computer Networks!

Uploaded by

ptrial1900
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Computer Networks!

Uploaded by

ptrial1900
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 132

<br>

aud IP Address
Tntroduuctien to Copuctu Networls

a ISP

HOST
www ProLes

IP addvess Host
DNS NID HID

Network ID

comvext doman nawe wto to IP addres


O
Service that wed to u

iu
called dnain nae servi ce

a proceu ia the host.


O
Povt wuoer u
wed to
paticlor
services, pt nuwoer is
For wel kuown
htt þ
- 80
ftp - 21
Weme poge. We

Eve
w weed to reah Address
gwes re IP
need to viit DNS
as DNS Dveshead
howe page Ti
Rect ifieation:- The Ip addreu 4 gocom u ctored etustt
we want to vitthat page, we ca

address
we hawe
attennative) e
to
to NS (we
DN

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Classul IP addres classfeatio


tee IP addre&A
Ihere are 32 bits
„32 30
2

3)
2

11

30
5

e
Nuwber IP addresee w a netw ovk ef clas A
class-1
B =
clas 20 las D: 8
clasE
fepula sepreseuctabi IP addhe
Motatien
h Dotted Decial(4octets)
Notatin
32 lbits
32 loits

(192 168-173.9)
bits Rbits gbits aoits.
8

class A stats wih s

class B
start wttlh ee |0

clase G
stats with
tats ith 1|o
tlauD
class B stauts wth lIW

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

A
CLASS
os e clas A 2-128
76its 24 bit Aluwber e possible

|D
Size ef eocl network/ No e
clas D distint IP addresses wittn
each network
Network doHost IDsi2 PENTALON e
(NASA,
class A netw or)

No ef hosts : -2
O Stating addies (AU zevoe) aud euding address (al os)
e wst used

NumdoeY ed natwors u cas A: (28 -2: |26

Range
=
Q - |27

B
|CLASS
2
No
ef IP addhees poscibleE

14 bits l6 bits z 2
Size ot each wetwork
Host : l6
Netork No e4 hosts 2-2
ID

Rauge =
128 - 191|

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

c
CLASS
No
e pass lale IP addiesses 229
No- et netuors t class C

=
21bits Size et each etook 2
2 yHost
Netwok
Metwore

Rauge

|CLASSD And CLASS E

ee
netork IDs aud wast IDs

Class D
l1st octet) Class E
llst octed)

000 O: 224
11: 234
I1
1
1: 255

Kamge
aat- 239 |Rowge 240-255
O
used to wuuhcasting wsed
w
ed to
ep emailng pplctiu
ghoup Croadtotg

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
3Unicast
<br>

- Limited Broad cast


Directed Byadcast

to ee host Broadeaating
Unicast - ee ost inited
hosts
ne wost to
2 Broadcast' i0- Directed Broodcastine

22220 |1-0-0-0 200.d


22S class 'A' Class A2
UNICASTING

201-2:3
I1-23 D SA DA

Seuder Destinatie
Data addyess address

IP addrese heprests
Whew
Host ID' has al o's theu te wn a network c

eese IP addhes
netwoyk. Tis
S
te IP adder aost
u

Wied as a alid
meve

BROADCASTING
LIMITED Ceutns
I Destinatien addiess
's
25S eeu, te
Il0.00 255-2SS 255.
pacet will be seut to all
Class 'A' 255 25t 4r
terat network
D|123 uosts witiu
Hi-M23 ottste 2SS-255
0-LBA= 255. 25.
DIRECTED BROADCA STING

Destinatien addheu cêtas


20-0-0o It He Host I pat,
11-0-0.0
al i's u
thn,
o -e. X255- 25S-2s5 to set
pocuet wl be
1-1-2:3

20.265.2<3.255 is
DI-)-23| DBA NID, HIDal
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Networa ID Divected Broodeast Liwuted Broadoat


I/P addses addres Adde

|.255. 255-255 255. 25S: 255-25


Class A
|b255. 253.2SS 25- 2SS. 255- 25
|D 15 2060
130(- 2SS. 2SS 255 2Ss 253.25
130. 2-3 1301· D0 255
(as B 150:0 255-25S 2S5-2SS 2SS.
I50: D, 1S0ISb 1500 DO
200.1 10-25S 253. 2SS2SS.2S
loss C
200. |. lo-lD0 20010 25S2sS-25S 255
220 )5.1: 1D 220-15 22015 1- 2SS

ClasE4 25d. o-2 X

Inalt 300l· 2
3 X

SUBNETS 9
SUBNET MASK, RoutING
Whe tth size ol netwo te maint aineuce wil lbe
diiut
O
Aso tthene is a
lack od
secaity netwoh

OSubnettin- is tee proCess o a metworh wto

Swalen netwoks (called subnets)

(Clas C wetwot)
2001-20
2.001-21
2.00- 120

NID= 200-I·2- 128 NID= 200 1-2-0


YDEA: 200-1-2127
200-1:2.255

No- e4 hosts u A
128-2 : |26
No - hests w B 28-2- 126
252
. Subnetting
w
To
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
tal hosts 200 )2-0 |26+126
<br>

sUBNETTING
There will be loss e IP addres de to

Aabiguity netodk oY
to te whete
200-1·2-0 ef a pacet,
notin tee addess
2-4 200-1-2. 255
is te desti
wittuu netoork oY to edy Wosts

it be set Bto all hosts


u suuonet ?
ane we
wthere
Auswer i depeuds upon from
It lbe
user, the networh wowld
Foy a exter nal
aodocooi be able to see subnets be wad up

wseY 4ee newok weuld


For ternal Me
2 ulonets

o-12) (28-5

Exterual Rowts ( 1SP)

Subnet D
2001·20
200-12-0
Sunet
200-|:201---
200-1-2- 00 S2
$2 64-127) (0-63) Bu 127)
(0-63)/ (26-19)
subnet ID 3)
S3 200-2.7
200: 2. 10 Bact'ca
(128-191) (142 -25s)

DA 2001-2- 20

Here tee caalleg a putiula IP


whicl
Subnet dor
addhes belemg
Thiis i dee b ag SUBNET
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
MASK
<br>

SUBNET MASK
=
32 bit unber
Subnet
Netook ID, sbnet D
Mash
po - 's
Host ID pat
u
suwbnet metuwoyk shsum oloove
Subnet mask oy tte 4

200 1
2-_HID A

SD.

SM = 255- 255. 25S. 142

qive u
IP addres, he bitwice AND wit SM, we
get 4he NID et t suonet kor wtieh te IP Lelongs to.

|SM R IP: NID

= 200-13
IP: II001000: 000000ol:00000010. |ooo0o lb
SM:
NID:

-'. The TP address belevgs to tee suonet|200-1-2.128

There wy be
caes where there could oe

pacuet watcue wittn


watehesie cu 2 wctiaA).
Ou teuis case, te wttoace longt sulonet
chosen:

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

SUBNET MASKING
e VARIA BLE LENGTH
wequal sizes &
called
to culonets
Dviding netwok
a
(vLSM )
wasking
Vanialole lbugth subnet
a
He eadh udoMet will cet
Whe sulanet size u ditterent
subnet
dfent wask.

Three subnets
200-1-2-0 255-25S-255./92
SM:
o 200-12- (0 NID = ES 20o1:2- |28
oo00oo 2
141
64
DBA= 200I
128

SM. 255255.255.|2 192


20o-1-2-11- SM: 2S5- 255 255.
NID =
200- 1-2-0 NID= 200-:
2
142
DBA = 255-25S. 255-|27 DBA 2001 2
2SS

The netwoYks tehat hre same Lowe


Sizes

wask u
btg ct weue theie
netwoyk size
Wen tee wl be Smallac
Hheu, SM
WoYe wosts wo hosts,
size is Small ie les
Weu te etwor
then
Routig table
Sulonet wask Iaterface
Network ID
255-255.255|27
2001 20
255- 255.25S.- l42
200- 1
2- 128 255-142
255- 255.
2001- 2. 142

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Finding wnbex sutonets ro tue


Civem uwbnet wah 255-255 255. 142

NID +
SID 26
ttae netwo to elass A, Hn,
NID= 8

.
Maxinuwjno ot subnets u
tee netoye 2°

Question FLL Hhe taole

Suloet wask No e wosts Subnets


bo claSS
u Sulonets in
A class B

255- b0: 21-2 1


255. 1280.0
255 1926.O 222..
2-2
255 240 D·0
255. 255 0O 16-2 12
255- 25S- 254-0 2-2
255-255-255-0 -2
255-25S. 25$-224
-2 2
255-255-255-24o -2

Oo00O000
128
142.
224
240
242
252
2S4
255

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Classless Irter Domain Routing (CIDR)ao


pves eut
elassc |classD) ctau E wetuwove is
O No class | classB |
A
P

giD patt iu witu the


The uber et bits in
O

address cIDR notati u

It n: 20, teM,
CIDR notatieni ab-c-d/n BiD: 20 bits
HID: I2 brts
Instcad NID, Noef bits
32 bit
BID u wed IP address
(Blek Ib)
|n is kwewn as slasu nuwber Block

|Rules for torwaing CIDR block |B)D HUD

addyesses should be
cotigunut
O AU IP pouer of2
Bloch size sluould aluays be

9 No ef hosts u blockue
w
the bloch sleuld
O
First Ip addyess sze oloch
divisible by tu
be evel

tae IP ada
ess es fome a cDR block?
Q: Tell wthetther
Rule! 2
e IP, addrexel l6
LO0 1
2.33 Rule 2:
No

Rule 3 : first tP addves


LDO1 2- 47ee
Go's !. diisible by 2
orwe CIDR Blocde
The IP addresses

2) 20 1D. 36. 32
lD30 33 addreses= 32
2
20
Rule2: No- e pPP

Rule 3: Pirst addres


IP -
20LD 30 63
20-D. 30.001oo0oD
Go's divi sible by2

TP addyehee
.The
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

) 150 b. 20-64 (a3) Rle j


2
|50 J0 20-65 No- e addresses : 64
Rue 2: tP
150 lD 20.127 Rue 3: Arst P addres
150|020.| 0o000o divisble by 26
9o's
- IP addresses torm valid CIDR
bloe

QDerive the rawge et CiDR block

20 -1b 30-35 27
BID= 27 bits HID 5 bcts

20-1030
000 abrhhe
BID
HID 20-103032
0000 (32) 20 l0 30-33

20-|0 30. 623

2)
BID= 20 bits HID: 12 bits

BD H1D
O000 0000O000 (D6)
b000 DOOOo0o1 (o.)

ill. 1l|I)15.255) |o01, I5- 255

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Subneting?
n cIDR

20.30.40o.|b)25
Aleim))d
20-30. yo.|0o |010
20-30. 4000o0|b|0 | 00000p64)
0oo 000olo
in (27)
B

)8iD= 20 30 40 64/26
BiD: 20: 30-40-o/2.6
DBA= 20- 30-40-63 |26
DBA 2030 4o. 127) 26
(

VLSM w ClDR bloks


[some as claxgt)

QUESTIONS ON SUBNET MASk


LMPORTANT

is alio
euoron as Network muask?
Sulbnet wask
tue felesing ingomatin
ipcont? comwraud qives
provided ISP
IPv4 address to tee netork
0cte conected d
Default wastk tuat seed loe

Subnet Mask
- Sonet
comver sien to IP address.
3 DNS '-

e B

address ef A Ig IP adldres
Let Ih IP
SA = Sulonet mask
4e Sp sudonet wmasle B.

B
Detault

ane potsble
pack et fom A to B, 2 cases
e
A 2 B are same network, Haeu, poclet Cau be

4 A
eB difeemt metwoe, teem, packet is
ae w set dom
Dqw and ew trom Dw
to B
A to

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

A: Ip
SA SA

Bitwise AN D
((NID) A) (NIB) B)
Acc to A ACCto A

|(uD)A), ((ND)B),
Acc toA theu
A
2B re
Acc to A

Example l:
=
IA 200. 1-2-jo Ip
20o2- 13D
MeY
SA = 255 128
255.255.

SA :

200 2

((ND)A)e
Acc to A
200-1-20d

SA

11
DOl000
200
2 |28

j(NID)
Acc toA (b)s)Acc to A

A
Dsme ALB re
utent wehwose

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Exawsple 2: (Practiec)

20o |2- lo Ig: 20012-69


Ia=
Sp 255.255 255 192
Sa= 255- 255- 255 129

Aus A inee Ae b ane

Superneting Aggregtion network


each aud eney
cotauw
table table wll
O
et netooss is large, taen, tue
o Size e
Lot
rog , to prouess
cpoudialy and te eter taes netucos
Hence we need to aggegat lebae te
super neting l98g
Ruler fpu aggnegatien
u
tee wetwoxk IDs sleud loecetigou
same and
4 Size e each networu slueulod be
pewen 2.
boy size
L The lst LPaddese sold ae evedy divitlole
block 2fol
Routig talale tor Ry
- Suton Iuter foce
NID
Subnet D
a

200-1-1-0)4 200
255-255.255.0
hapo l0-0
200-/:| o 258. 2S5 2550
D
0 2SS-255- 255.
2001-2:
200.1-3 o 255.255- 255

2001-2-0b 200-1-30
Radundny

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

network IDs
Ruulel:
V
Total si'ze
) 200. |· oo|24
Rule 2: Size ot each nuw 4x8
2) 200 1:
1-o24 220
3) 200 | 2·o/ 24 Rule 3: first LP addyes

4) 200 13-0|24 200 I: 000 DObOO. 000O000 0

:. The networs cau be

SuPERNET MASK
32 bits
No e l's : ixed partf
e
No
o's Vauiable patwora horts

|Suponet 255. 255. 252- b

2001-0.o)24

200-1: 32-0) 24 Rule 1:v


200.1-33-024 Rule 2: Size ef each nu 8 2

200: 1·47-0]24
Rule 3: first IP addesoaS
200 |. 000o00. O00000o

The metwors cau be ggegtad

SUPERNET MASKe 255-255.240o


2001-32- o
l20

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

201
4ate ef CIDR based IP addresse availalola
Chik
wth t
:

245. 248128-026 guanter to


ogauigation A ad a
cuuk IP adderses to wita
orgaigaliom wile retaiing es
valüd allodaten addhes
a

136 21
and
245 24& 128:022-0) Anlsl
L9245. -o| 248-
2us. 24 8- (28.022
b) 24s-. 248. |28- o and
21

c) 2us- 242. 132 0|22 24s- 248- 132- 6| 2

d) 245 248136 o|
24
ad us. 242 132-0 | 21

245.243-|28-0 ]2o
|D00oo0 000eo8o
0D

245-248. 1doopoo0-ooo0
10004 I11E

245-248. 128- o/2 oY 24S- 248- 136 -D21


A Cau be

A u 246-24& 128-o/2l
9 00cooooo : 245- 248-136o 22
24S.248.100o000
Not preset

o
24S-248.240. 22
24S- 244 8- 100o 00-ooo 00000

A ts 245-248. L36-o/21
3
oo
A= 24S. 248. 136-o/2)
245.2UA.[0D00o00- 000o0c
245.nh .
245-24 &. 128-o/22 A
B: 24S- 248. 128 o22

2US 248 ooo | 900 e0e coc o

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

FLOw CoNTROL MEIHODS

Delags in ouputer Netwovhi


().
1) Trans missiem
tee paciet tyom Hu ust to te

The time talee to tiauwit


store -aud- torwand delay
Also lkwon as
pusl. al the pachets
bit uto te wire

HOST

Transwssien Data sze


Baudwidth
Q
Bamdwidth l bps I bit per secavd )
10 bits
J. Bed Trausissin

8 Baduwidth : |kbps data size


=
looo ts
Transmissien ls

data Size = |kB

Traws wissie 1024


=h024s

For
dota size Foy
Bandidt
btoz dada K- looo beoz bandi dtelh

Size M= 1024x 024 M


Lo6

decne
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

a
gole
2) Propagation delay-
to each
The time taleeu by a bit pro paga
tee stlhe end e Hae ik is called

Pepagaton delay depeude R

1) Distauce blw seuder


e receiver

med
u
fee traumissie

For(epbzal bred,
()
v 707 peed a liglt

&-d 2lkm
1DX |65
2-lxjo8

Total fine taeeu to semd paclet


fom sender toeceiveY

(T4),
3) processed
Queing te destiien, t is
ot
u 4ee
reaches preeetes stored
tmediatetet
AU tae pacleets
proceused.
beqore being
Buee
pachet
(Ta)

4) Process inq deloy LeA


receiver to proce al
The tie tae by
a packet

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Flow control wetthodo stop amd aolbh oiopoge


waitt à tthe siwplest
coto wechawem
Stop awd packet aud the teps aud
wiich te seide sed trom the ree
toaits for tue aegno acknowtedgeet
begre sding te next þaclet.
Sendey ReceiveY
-
Total time
T
ldata) + Tpldata)+
Tpldat

Ti (data) t 2 Tp +

Tp lack) buz prepogatnta

T t+
Total tinme 2* lp tor oleet,

usetul thwe TE
Total time +
2*Tp l+2a

Tgud o
biti taat cau be seut u
l second

poet
(L LXBXB)
baudwid ta
Hectie Tt 2* Tp yol Te+ 2* Tpo9
baudidtt utizoon)
T X
B
T¢t 2* Tp 142a

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

eteiuey
msec
T Imsec Tp :
)
wlere as
|+2a

1+2
3333/
= Imsec
2) T 2msec
a

|+2a
wee
50
I+ 2x/,

qiveu'

5 (+2a: 2
l+20

Bw 4Mbps Tp =
lmsec So tuat 4: atteast So).
-3 sec.
Bw= 4 Mbps 4xIo° bdsl se. Tp: Ix 10

1+2a
aso5

>2Tps T V
2x163 sec
Bw
L 2xIDx Bw

L
2x16x 4* |b
L
8x1b bits

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Factos wtuic aect eticieey


+
2* d Bw
l+ 2a 1+ 2Tp
Te

Vaniab les
inversely pro povional
(fixed)
Bw (fixed)
L - die

distaCe ueeares M
decrease
wat iu best e2 LANs
StoP d
data size inereases
.good
Stop wat u e pachets
ad laig

Problem nd w stop
ther rectticabien and wait þoto col
pyo
1) Data lost alem
Seuder Receiier
Data
IH
þachetue
dataü lost
Seude will wait tor ockuwledqnet
Ack Aaiaet.
Sigal before traumutting wat

Reeeiver willever send ackuwledge


Doy
boz it did wst veceire pacter

!. DEADLOCK.

Data Rectification:- Timet iner is uied.

wot
received itin Histe,
Time
ame pachet
S u
seut
fimer
Data

ARS
awd wAlT + TIME OUT TIMER = wait
STOP Stop ad
(Aucoaie Regeu
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 Repeot Pequet)
<br>

23
prolblem
2) Acknasledgemeut lost
data pacl et was

O Acu to seuder, waybe dota t get


4data lost to wich it did
e
ackaouwledgumeut sigmal.
TO
mer
Xack packet
Sae
O
9t Seud Sae dota paclet
iurecelved
data veceivey, diferent
O Ac- to be
nd t will

D2

D2
sproble eu each dato
sequeuee wunber
Rectifcotiem Hare
ck

.
þrcblam
Delaged oclnowledgemeut
3)
gmal aalayed
TO
hwey teci. ack seuds tee
veceives acuoledgaut
SOe paclet aud
u
4 seude 2nd it bost
pachet bucd
TO dalayed ochuasledguut
fmer 4 received

Acc to seuder 2 paclets


Yeceivey paclet is received.
Acc- to

TO A2
Seutin Provide Bequeuee uwloer
to ackuooledget

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

There is Some problem t


coiwuieatien clianel det
wtlcu He bits Lost. Let eyror
4oo pachets
lhanel be o2- 20 9

pacuets e
traniwitted
No ef pachets wih get ast ot 4 4o0: 20uuD (80)

Agaim frem e
o). wiU be lost adlo

. No e4 pacuets
tauted 40+
40ol1+
400
o
(o 2)+
2+ (o-2)' +
4oo (o-2)+..

(o2)'+.

|-b:2

5 00 pachets

20jS
o
qate rotocel is, Used en a
luk wth
tat stop aud wat Miniu
Suppose
20 wiec Propagation dslay
bit nat e 644 kblsec and
a
to aclieve
&tze byt
-3 sec a) 160
qveu Tp = 20x|D
- 64000bite sec
&w
pBandwidth, ) 640
Link udil'yatem ) 220

1+2T2

2> 1+ 0-04x64000
Buo L
|+2X20xt6°x
L
bits
L 4ox64 ) L2560
siZe 2560 biti
= 320 layt

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

2S
CAPACITY(OF PIPE AND PIPELINING

Capacity ef pipe-ng
Maiu wumbe t bt tat caw lbe preut Ppe at
an itat copacty P

Bw* Tp for haly duplex

duuplex
2ABwx Tp for tull
igh, t is called teick peT

For stop aud wat capacctf

lt2a 1+2* Tp * Bw

w
stop 2wOut pootocol Th t 2*Tp
L
þacket
Time talew to
transit
=
(msec Tp l5msec
Given T boindev

(+2TP 1+2x1S
Te

Y 25/.
Render Receier

=
Round ip time 2*1p 3msee

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

at tee seude side


so
at |2

Butfer| &ueue umaiutaned


be retrauswitted
pachet e lost, t cu
Wuen ackuowledaeeut

5 4 3
) (Traitted GTraumited
aclewowledged)
2

Not but wot


rausuitted) acluonoledgd)

1Atso kuiown as sleding winde otocot

+
winde 20
The seuder wmdous cize

O The seqguone e pacuets have to loe stoed


os
he
heade ald the packet

Min wo
t sequce uos : lt 2a

Min wo

2 = loy llt20)
2:+ 2a nlog

Paceet wo
et pacuet trausuitt ed2egi
Co be wsed

Te= lmsec T: 495 msec


semden windbw sze fo mautMum cticey
For
waxiwetieey
size, w,
a =

Seud winde |+ 2 1+2Tp

Sequeuee wos 0-|0


Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
27
<br>

Sequce wlou poui ble yagig frn lo4


to be
teu 64

64
u 44ms
.Windew size stop
wait
imted by

Ws: Math min( 42a, 2

Sluding windou proto col is a theoretical concept

|Slaing window poofoeo|

|Go Back N |Sete cive &epeat|


(GeN) (sR)
>

OSendey windew size ie N


O
Seuder wwdew size,

thau )
Recever windee sle size si ze,
O
Receivey wudew
Receirer neve oceept
wl
eut et orce pacets
wiudow te-rousmitfed
tellhee
el sku accepkd

O
It wsee cuml ative seatieby etrauutted
ackuo wletgut 9t
Aclaewlegemut

No retvumcsites is Loo

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Go BACK N

O Sele Seuder size u Go Back N

Tp =
44S miec E&d. qo BACK \o
+
Maxiw winde size 2a= 1+
2: +
19 loo
Culet wde size to

Receivey winde size u l

Tiwme
et Suppose data
Timer paclet 2 is
or eacl
tost TD Discard
packet fimo 6ecaus
rtcever s
prclet

Seude retrbu

:- qoback 3 , 4 evey þaclet Hat St Leg hastel


is lost and io pacuet' (are to e
set, heu wavg
tasien a
required ?

I2
Is4 los
(5, 6 (7, 8

&vo loss

hausmss'itM

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

pacuet lost Ib þackets


to be seut Heus may tranewisieu
4
1
23 4 5
. Ist loss

2uy lost
17
Total muwber

achuow tedgemd
Ackutoledgute?

Camulative Acknaledgeut udepeudeit Ackuowledgeunut


Less Adv: Higl. reliolilty
Advi hattie,
Disadus Less reiable Disodv: More trotte
Go Back -N we cumuloetive aclus wled geMede

t
the eceiver side, receies
stats a aclauosledgeet t'er
aexpives,
At
eceiver
awy pacet,. whn it
whemeer
mlatie achuowledgeit
t seds taat mterval
pacets received be
wU seu
focuets ere veceived, N+ acknoledgemet Wo

imer wll ot stat til


Imp: Acknsuedgn ent receive pacet d
has
reLeiveY

seudey side sheud be


Timeet imer at at Hde
ackubledmt ie reeeiveY

Timeout Acluouledge t
timer fimer

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

sequeuce
Kelatiensup bluw windeus sizes ad ubers
4
Case I Seuder windou size
No o sequem ce wwdoers 4 (0.- -. 3)
1
2 Receiver 'u

2ud set 04
Does not 2
pachet but
acuepts ot
Pauket
Let set.

Duplicote
pacets aalu
Occepked.

=
TI- Sendn windes Size 4
Case
No e sequence
msb wiwbers 5
r9)
34

lost

pocbets ue discanded

) Sksender wndew 'n 2


tceiver window size
size
,
='
tuen to dotrct duplieate poekets "N sequue
be wed

kor auy suding woindao protocol, i4 it bas to ootk

(Avaulalole Sequence
Nuwbers

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

SELECTIVE KEPEAT
O Seuder windes size,
Tp 495ms w: 50o SR proto cot
seuder l+49= (00
Moxinuwj windes size lt2a= lt 21R.
TE

lDD567.

size
Receiver
winde size S to seudr wdow

u called "selec'vely repeat pyotocot because


This proto
el be tmesut ot
wheNer paclet s lost, ttee wl
a

2
seude teat
the seuden side
paciculo pacuet

Q Ws : 3 |0 pachetr au seut. Every sa pacled u


lest

trauiiisie
w
sR þyotoct?

5 6 715) 8
| 2
1stloss 2ud loss

mdipudeut
Acthusuledgeautt ne
The behare
u
the sane
case e þacuet loss, qBN R
I In
achet, qBN doen't seud
cupted data
|| In case 4 wliile SR 4eud tAke
NACK
achwtwledgemeut
ackwowledgmint)

wndow Jze
Th

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Conapaison
t vari s

Stop aud qo Bacl Selective


wait N
(SAW) Repeot
(GeN) (SR)
Sndwind

|+2a
l+20
N Site

|+20

Butfus |+1
(seuder teiver) N+1 N+N

Sequeuce
Numbexs 2

Retranswitsieme
N
lot)

Bandwidth Leus igh


Required Modesate
(becae

CPU
requremeut
Moderae
No (orting ot veceieu (et o ord
pachete ae
seaclit at seud er
No

also
accepkcd )

seanaliy at seudes.
b last athet

Lew Moderat Complex

Aclna uoledg Tadepoudet auwuative Tndapeudut


Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

2016 l33
qate commecaien one aypro pa saA
Consider 128x 1o b]s satellite
size 4 kb Neglet baumissisn
to send data wtln fvoemimimum wewo ot bite required
The
time od acuewledget to actiere (oo utigatin s

seud wind ize


a) 2
w
whene
I+2a

c) 6 W< |+ 2a
w< l+ 2 Tp (o24 x B
d) R
Bw |2 8x103
2B-7
0064
)w l+ 2xbl5
protoceti
Foy
SR O064
Ws
WR <5-62 ) 5
No- esequnce
vequired

No ef bits yuired: log, to


4

CoNTROL METHODS
AcCESS
with
Stoctie can comwieate
hs
2 bypes %

Point to poiut Byoadcat linbs


links
blw 2 statins stati
O dodicoted lik to utu'c wuuttiple
ane conected
for
towmmication
u wed
blw 2
stie oy Connected stetee
te
toY

Cowwumitod
Bvoadeast inh
Poiet to
poiut link

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Access Covetrol
Access Coutrol isa mechaism that cetrols he aceess
statieu to tee trawswissie linh
Need:
To prevent fhe colisi occwrauce
the collien ocns, deal wtlh t
Collisie ot dota pachets results w data

A
2D stat thausithing

A B

O Access coutrol wettods ae


th acces eode coutrol

ese Swoot en teu networa

cOHTIAcees coytrl wetuods


Time Divisiew Mutuplexing

CSMA|cD
Toke

Aloha

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

1) TiMe Division Muitiplexing equal size


e4
slots aud each slot a
O The Link time is divided ut Roloin wamner
Rond
w

allocated to He statiee
O Fach sttien tsits it data duwng te ime seot alo cated to t.
o4waste.
statiM dees wot have ay data to trauit, tae tiwe sot s

A B D A

A B

Size ef time slot


Size et each ime slot iu hept uh tehat each sttien
tha put te pachet
e He tramissien we (Ti)
lat bit ed tee packet iu alole to get eut t tu lu (To)

Size e4
time sot= Tp
t T4

usetl tiwe T
Cyce tme I+a
EHectie Bandwid tu/
Bau duidth utiizton)
Thvevgaput

pisadvawtag
y
9L
statiem dss wot
hare dota to thaumit, ttueu,
n
tthe
fine lot
u
wated Tuis teads to doereaue

1+ TPITe 1+1

EHective Baudwidthz rlBw) : 0Sx 4Mbps 2Mops


each statio reguirei 2t lbps Blo, fud maximw wo

Stotie
= Mox Avolalle Bw
NX 2us
2wubps
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 N= |DO0
<br>

One statien is selected auong


to trau mit data potling ayoith.
The selocted statie the seud tue dota to
the detuat
Theu, te

udicte

AmeTt
ele tie
Advantages
O
no' time slot iu waste d ulilhe TDM)
waxiwum tbandwidth uctilizaten
Disaduauth gu

Time ig asfed i

&-
each yend !. sew status way stave.

wo
Maximuw Avail alole Total *
Baudwidt
Btective BandwidHa Stations Requiremeut of
| stoctu

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

LAN
wed w E
ttheet
3) CSMACD
Multiple Accese / Collision Detection
Cawier Sense
Stepi Se nsing 4e aes o
taniwt te data
caier free or nt).
Caier (checks

the paclket otthewise wot


J! A
senses tae caier,
t wil caenree
Poivt
Coutact
e A utile t a wot lbcoz D
iu tranuitting dole
StatnA

Step 2:- Detecting the coLision


ODetecien celisien is dene lay trausi ting te
statien
For detecting ellisieu, CsMA)LD implements tue
O

poss;ble
2
caseA ae felowig condibun

No colided Colided
>= 2* Tp
L 2* Tp* BW
COMes Sigual
back
duing Cewes lback
Mini wum size s tte acuet
troutmisconduvg houswm S
size pacet is tess ha 4ee
. nimuw size,
indicates
exta bits ae added to t

indicatey 2*Tp x
Bw
dato bacet CelisieM tolisier Deteetn is wot þosi lole it L<
u trauwited OCcned

Step 3i- Reaziug JAM


JAM is a
48 bit releaseo thausmitling staten
as Son Aotets collis

o
9+ erts oten statioue wot to
traimit thin u dota
immediat ely tte colision a poxs
(ottnwise thene bitay
vita Jne data po
chet oga)

data siguals Ti eeuer tuat JAM


sigual does
wot ceide wita data Hhe data
colisim

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

w aiting
Stephi for Back
of Time
, the transwittiwg
4{er the
colision DccuYs
stottn
or a
Yaudo awet o
tine catled Cach-of
wte
(aeteined by bach ef algorita) tw
An backotH tine, it thie bawnuting tae
dat achet
94 agam celiuen ocr, tte statioy
raudoi toacle off
tiuee te tie agal

trauicsien is aborted

eficieuy csMA
|CDtermet
e isisions
ecelise

2tp 24g
Cycle time
HTe

e-2t, +TtTp
Maxiwauswt o

data tert can be


1500 byts
|t6.44a
8xeks Seut tHseg
etthennet
9 y
diitamee decreases, inereases

!. Suitalole toy LANS


not suitoble for wANS
dota pacuet
size et data paalet ineveasei,
Traumty statee cloore a
from (o to 2-) dsutalde for bigu dot

Applicable or euy 2 chatioud

atu torlst coicien


prolbalouly 2ud
elsi

eponey
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
2015
<br>

a
Gate Consicer a csMACD netuork Hhat t awmicte doto at

locMbps (10°b/s) over Calole with no repeaters


hate
Size requred or tais netwosle a

|250 lbytes, wat is tae


A) Booo : lo bps
Bw= looMbps
B) |bo0o calole |km
-
) 16000 size ed data pochet
24Dx 8 lbits
T 1250X8
lo8
Foy cSMA CD networe,
d
ot size a
1t 2Tppachwiniwww
2x1o4 2000bkm|s

4) To
ken passingJ
Ring topoleyt
exprecced
twme
In toke passing
+banduwidth

Secovds) (bits)
Meters)t
* velocuy * baudwidth

wesage Composed e special bit þattem.


Tolkewi-Osmall to seud a data pachet
1 Orepresets tee peissiom e
y
s allewed to seud dota backet
Statu poseses the tokew
otehewise wot

2 king latey ay a bit to coplet


e
yevoutie
Time taleu
Called

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Ring lateny t (N*b)


Leugth Ra
ng-d STime talkeu Time
Speed of thu bit
by thebit to tab
raverse by He steties
No-o satns N
Hue
bit
at
tacu

3) Tolem Roldiug tme


Time foywtich a statien holds tu toleeu belore
thausitting to tae othen side

The tine talen tu tokem to cowmplet

tiu

Cyde time : + N* THT

usetul te
ycle fie
siuce each stotien seuds
stoctiewu l dat
=
pachet. N*Te

NX TE
Ip + NX THT

|*Tokew Hotding Time'


wmplntel
Tolex. Pouing ahadegoa

Delayed Tolhen
Teluew
Reinserie Reimierto

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Reinsertien
Delayed Telem
the stotiem keeps halding tee tou
:

In tis stiategy by t
wt
util tae tast bitvevoe doto pachetu taus mitted
cewes lbace to t
tales the towplete uuben of sing L

Toke)
Data Data
pochet
Tpocket
stationi Toke Trausislb
kolding
Time
Station|
Stationz(THT)
Data Stotiong)
poche t| Data
packet

Assu wptibn

bit delay NX T
ost
Cases
Tp
t NxTHT Tp t N(T +
Tp)

N 1+[N)a

Eay To
lkeu Reinsertien
In ttid stretegy statien releaes tae pa
teeu inamediadely
ti dato pachet to be
trau itted ew

(Peachedl)
(Tolue
IPacell Statim Pachet I
Pacet3J Toleu
Trauiwisste
Lelding
Staten
lat
(THT)
(To
Pacaet2) Statoms
Tfached
lee
Teke Pacet)
A

Tp
t Nx T
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Delayid hen Reinsertm


To vls Baly Totiem Rensertin
(DTR) LETR)
Each statib uoldi teu aelet Each statien releases
tee to
teen uutil ita data
pacet reaches Lacle t d. dota

Fhene exute ey l data There exsti


pachet ou te at a

guven stue en wtauee

More
relablest2 Less relialole.

5. ALOHA

Pure Noha
6 statibn can trowiit dota at ay buine wtuuenea tey waut
O Aftun
tamttiug packet, stotbin waita kon Seue tiue
8
rereed, teuéu, trauissicn
94 ot
Yeceived, erew statien wats oY
vudou tiue
u
Atu bache iut reacled, t aborts tae traiwiiee

5rFor waxiw etf cemey


dM
)

:. Moz
efiuiucy pune oloha 18 4

Collls ou.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
43
<br>

Slotted Aoa
Time i divi dod wto sle

sttien caw touwut


y
at tee beginuig 4tiw slet
wlhw 2
statuew ty
et
dato at fee Saue tit

G
leha

Fer wosi uw

Slotted Alo ua
Pure Aloua
sttiew cau tauit Ay statin cou trauiit
tue.Jodas at

Th twe is
cetiueus e
Te fe
is
disrete and
wot glsbctlyymeloigd
Valneralole ie: 2X1

Mmox= &-4).
M wax <
36-8.
(a= h) (4=)

Main adv
Mar ad

ipl'eity vedueed
wmplemutod ol'sl'e
doulde

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Suwwmon

Flow covtrol wetods -


Make sne Hat e
Ytcelver s wot
evelaurdoed
with tu pachets.
stop aud wat pxctocot

o Bac N

L+2a

Selectle N
Repeat lt2a

Access covtrol wethods


acces et
Mettuods Hat coctol tu statuwto

HIime Divisitu
l+a

Roting

HcSMACD

Delayd Tokeu
Reinuer tien

Baty Teuew
Renserttom 1+N
Pure Aoha
PAoua

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ERROR CONTROL METHODS

or
aud correting data frama tet hare beeu
sopted duing tauitsitn
Lost pacuets ae haudled Fles cetol wetoda

OEror dete ctien is Hu techuiqe used to ele cde


u
tere dat thaussiu
Evroy Detectien Tecamigue

Cyeie Reduudag
Single Party ceneca (CRC)
clheck

Single Panty Check


pady
ts techniqye,
called
ee Skps
At
ltvew
Sede side, total
wa 1s

exta bit m
data is ceutd
seut alog witth to
ott aut is
Paricty bit
u set to o1
bity
wale
Data +
enity bit u transited
Exauple
: packet
Data to be baustened |00 |oo) Receiver vecelves tte
wsed
eve pavity ü
else
=
data s Coret
Parity bit 1

Code
w
ovd eceived
Yecelve Y Data hans fend || 00[o
wed.
Receiver Couuts
wo
odd poty
dekrwies
o I's eveu Pasty bit =o
u or wot
Advoutogs t
Code word lloolbo
guarautees detetem geueed
bit
Ddd wumber
erors
taler place,
teeive yeceres
Disadvautogs L1oolo0.
no
canot dotot evem

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Redundaney
based e y divisib
CRC Geue otoy- algebraie au bit pokhey
pelguin preetd
patten elotained by
Exaple
Bit re
CRC Qenerator s fucr gires tae poctien of
teu bit

Bit Paten u CRC geerator


wot x
esd be divi dole by
burst emors
(eusures tat al
Steps arë detectad)
If n isttu size ot slsuld be divi ble by (x+1)
CRC qeneator,
bit ane appeuced to

-ator Exawwple
Data to be trawtemed o|0|lo)
Remander obtained
s
called CRC. CRC geuesctor
(n-i) bits
CRC is appeuded to
to be
te loo
1

1olo||b1)
oiginal data
traumited
At Receiver side, code s
agan divided by CRC
||0|0|10|1o11
geierator. Data trawmcttd
Ondiviuen renainde
s wot
At receivers ed
sO, Heu, data
oeti euoptec else it
cusopted Joo1|1o|o||0l00
D| D01|O|o||

o0000|oI|10I

10D
000
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Checksum u
dividad uto
lait ccesun data wwit
wn
u wwed,
I
bit
ase added
Senders
Sde
O
Thevalue ootaimd is called checs

, uwit u
diridad icto wbit segmentr.
freO Recelved, dota witl clesu vale
Receiver's AUL
th ae addad
Side Vale sotained is compleeuted
cowuptieu
relt
o
copled dota
abA
lo01 ooo0foo
uut to
Dota trondwutted lo0 ||00 lI1b00 loooloo
be

\o0
L00110ol + 111000l0+ poolooloo+ e|oDoo
8 bite)
lo00loo011 :l2000|0D [o

+
elecesa value
||||
ooloolo)+ 1o1)010
Jabae 20-021
s cowple

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

1SO 0SI STACK

to
Functios weedd
lbe implemeuted for
Cowwwunicatms
lqas 21

Mandato
functas
O Eryoy control
O
Fleo coutrol (C Leivey
usuld wst be over Hooded ) ORoutig
O Acces coutrol skob Lslqouss

Addressig
Lswmadaonytnd

hefneuce mdele
lo inplement the above kuctienalit, vaieus
1ooolo ool
Refeaenee
ATM
O X25
ode
TEEE(eals oith LANs)

1S0-0sI mode o000o,


Internotienal Stadod Orga gabgm- hem Sutn Tuteronnects
-
teu 0s) wodel
Layou
cong
uer Divrde oud
(wteractiveness 2) Preseutatisn layo
3) Sescion layer
Thick
Netuork layes
Coplex +)
e6) Data ünle laye

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Touch Sachin's bdite Patni


Aijal
Please Do Not
* olde

) Physical layen

O
Physical layer deals with Electrtcal Mechauial, Functisal
EMEP 2
Rrocedural eharateristies
TranS mission modei
(single)
S2 (Haly eo buplex)
Jalae Talle

A3YAI AM ATAQ (&

Bus topologtoil
star topooyt Ring bopelogt

Mee Topele

Dea witth eueoding ( lbits

Difereuctial Mancherter
Mauchester Eacodint
eucoding

0 Represetad by

emcodings,
In both the 2-* Bit Rate
Baud Rate
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 þer
beng scut oer feLens
<br>

Example cwesding

Difeetal Maueherte
Manchelter

2) DATA LINK LAYER tmitdbe


to wed ewtten awetuo)

SR)
O FLeus coutrol ( Stop wat, BN,
&

Eror coutol (CRC, chechsuw)


6Acces towtrol (TDM, Peing CsMAlCD, Telkeun Rusag,Aela)

Pltcal addvesing
Frawing
O process af taleing dota from tue albove layer(netoone laye),
peottüg t u a
rame ad eading it
AC4Deshinatn
add re Sating te pachet à see
Seurel
Addrees

staton me
kue
Every
.
te sed4pecial
inning callad
Thehe u
Frome DeliuteY (srD)

Bnd Steut ot

|Data A
C| SFD
.Jolo|

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

SFD repres eute taat a fhae ü com aud alet ll tee statü.

SFD Sequouce o bits that is eutinely att trom data.

Bits SED
Requla NFA DEA Sequeut
circut
(1o)010
10... 1)(o+)presitem
Dota

SFD DACSFD J

End ed fhame

Framel
Vasiable size|lemgth
Fixed sized/legtcet Jraue.
hames
Tolue
size s Ethernet
9 Since 4rae lesMAjeb)
Rawing
easiy e Having feld
frame cau be Buding
dotermined Sanyg leugtl belideten
fragmetahon
Probleu Intemal Problew ED ca
Broblew Cuup tien wateu cwien
Seutm: Padaing
ee data
loi ts awalalole

Selhen

ooclety toy
Twp
|cosd Choackerchofig qakBit
Hue
wed when
haratns Seudn stutte
a
bt to bead
He data pocttn
e
sed
ED, a
Receiver reeeive fhae
It data ceutie I4 dota cevtau oll1o1,t
stukted ito
ü dotaM Teuores tee
re ad He
diferenctiate d.
to dala
ED
Data = 0oo01O
bata atta bit stutfg
01l010oolilio0
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Plysicat Addreasing
MAG Madia Access toudyol)
Coueho) s tee pleysicat adda
is
Hha4 woks at tae doto i tayolojola)
MAC Address =
48 bit o
ewbedded
to
Netwook Iwterface
duung wanugatuing
Card(Nic)sD

dgt hexadecimal uuber


9epreseutd by Celen Hexadaciwal ot atien

3c:5A:B4 Qooye
He
3C: b9:28- lett
Paceond
Networe Tudertace
covteler assigd
wawufactus
Aos Caled
brgauigatonat
Uniayue Tdutier
(DUr)

Comaud to see MAC addres ipconf'y(att

Tokeu Ring,e
e
LAN as addes
Tecwogus
i°R Gerwet
MAC addre

AppleTalk daes wot use MAC A


ddres s playicat addu

Logial Lik control


EYor (oroL, ow cutyel
tata limk
Layer
Media Access Cotro l
handls
ateetuovtrot eror coutt

oUtleiepoigi
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

7:49

3) NETWORK LAYER

Main res peneibitctes


O Hest to Host Conneetivity Traiporttotuye
eud eud)
A ddresS
Netwote Loyee
Conne cking
Data inlL (hoct to ost)
vaie
w

e Fageudatiew

Centrol
(at rep)

Switch de

Max size paed for ehn iso0ley


-
palut eeds to be
bren
Roubng
tadole

Switcuiny

esigolorbl
T34S3HT3

4) TRANSPORT LÀYER

Maa repevsiblutus C

O
End to cud ComwiatienNibasyd
uug port uwbers Addre ssing)
wuwloers
Sevvice Roint
(Port
SA softwore layel TL)
6 Fow ontrolSR) GeN- wordwire agu( DLL)

Enor Conteol (cuecsuw)


Tales duto 4rom
Appliatn, Presudohom,
Sesiia lae)
Segetatiom (
aud divj des to

Coutro

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

SESSIDN LAYER 43YAI A0WT3M (


Authonyatien ad autHeticate
Torrent
inter counetien, wovie dew wload rew
Not
Requred sue
br

PRESENTATIDN LAY ER

aaractey traus tatien

ompreibm (- zip)

LAN Technolagies

ETHERNET 1EEE 802·3)


Bus Topelg
Acces Coutrol Mettudi CSMA |CD

Manchester eweoding

represeutd

No ackuawledgewnt sigual
bata Ratt
Badid)

fast Paigabit
ektnemet etlruet
Etheet operates at DLL
(LAN Teckualogie E
dealt n
DLL)
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Ss
|Applicaten laye
Trawport layerNetuot
(uyen
(Message) (Seg meut) (Dotagyoud) (Fra)

I PDU
Singl
(Retocol Data

FRAME FoRMATnbil
FRAME FoRMAT DF ETHERNET IEEE B02-3

wiine 0104 Frawe


64 lbytes

PRE AMBLE SFD DA LENQTH DATA CRC


SA

K
DLL
Added Data Link
Layer Tail
Header
Oused to alet all
the statiee
PREAMBLE 7 buyte udicade stat of

Frawe Deimiter): 1 byte 10|o|o||


SFD :Start sycoavyadun

DA: Destinatin address MAC addyesses


SA : Sorce addyes
etetthmu wed)
CRC geuaatr

CRC: Cycic Redun dauey cleck : 4 bytes (32 bt

pes oft MAC


|Ty
addresses

MULTICAST BROADCAST
UNICAST
LSB G4 1st bytes LSB
I's n MAC addres

|1:2B: 3C:48:S6:6F
1A:28:3c: 48:56:6F

SA auw ays wicast Mutticast DA maus eaat


Te pacdet
u s
et o

a
DA weans pachet s
jeut to
Unieast
paclet u jeut to
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

LENGTH: 2 bytus
O tttwuet olles ble bugt
vaniable taes
L 2* Bw* Tp ot etanuet,
Sulbs titutiug the staudand values
L 64
bytu ( hame sz)
=
OMax teugth a data 1500 bfts
SPD ae wot
Min Moy
aze boz
fane Data
DLL
I50o bjts
frae:
PL adds Frame
preawdole Lsep

Disadvautages
O
Not applicable tor teal tiwne applicatibme
Nat applicable for ntnactie opplicatuny
o
pioitis. So wot suitalole for clieut seyver

Tbufts Gbytes
2byt 4 byf
Preawwbte SFD bA SA Length Data CRC
Tbyte Gbyts

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

SWITCHING

Civcuitswitehing applied at PL, closeete tectno ogy

Suite king Packet switching Vitual cireite swthing


Datnga Lwititcaing
Mesage suitcling

Switehing is doe ot network laye.

Packet sui tebuin

Virtual ircuts Dataa


Switl
Switetng
Pacet headen Al pacleate lave
pacet gloloal kaade glotaal heades
lst
otter pachets local headeu otor
dene
(A No resevotien is dee
Reservatien
each
a veIGUrces
euter
. ConnectieLest.
at
.. connectien orient ed

Nst relialole
Higaly elialale

tosty
td oto Not

Pachets eceived w But e ordeu pasa


rder la received

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

PAIHDTIWe
IP y4
versien 4
forw o4 Iutevnet Proto cot
is slort
1P)
(fbuyth versiem source wot t dettiotiu
or detieny ek paceb from
ORespouible
host
we eu pachet susthed wetu
& a connectienless protoco
IPv4

IPy4 Header
32bite
-2bits I6 lacts
<4 bits4bitt
Versiox Header Tyre service Total leng th
Length
(4 bits) (4 bits) (8 bits) (l6-tbits)

Identificatie Nuuwbey
D|M
(16bits) Ahen( 13 bits)tdbog
o h

Time t ive Protoce Hedex checksw


5(bts) (8 bits) (l6 bits )

Source |P address (32 bit)


Destinaten |P address 32 bit)

Otions (0-4o bytes)

J- Versie
Hrat dicates verion od 1P beuvg
O
For 1Pv4. d Olo0

usith are
dteet Ve GeWs

-1Pv4 doatagae paused by


b versien: 4 þaier:
versiem 6 pazers

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

2: Header leug
ae word
4
bt word tat tells
: 44 laytu
heador
Gxauuple - 94 length
haad
(outae

=
60
20
byly= Heades size

Headu lengh leld <- 15|


65
3. Type l ser
servi ce

Specialtreat wet is to aatagia tor


patcuan serie

4. Total leugth

=
Total
leotl Heada eugth t fayload (data)

Mini
Maycimuuw : 65536 bgle

5. Ideutajcat.en Nuuwber

he a P

idevditcain wr
he wwwbey
fragmeuted dataga

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

6. DF bit
Do Not Fagueut lot
gaut pevwicaion to inter medi ete duvices
to fragnt
0
batagsau cauwet be
tragded
L tnguted to
thorl
futhen but Hue
settigs do wot allew,
iü dis eardad
datnga
ie seut to te seude
Au eoY to
ha been ducanded due
te packet

7. ME bit
More Frnguoute bit
0
indicate t tee eceiven eat e

oy t ie tee
last
fngt u
tee set

dakogau
L wdicatei to teae veceiver eaot ehe
cuent
a
is
More
tgt

a ragmutd datag
0 Indicatu tau position
a
ha
e First fhagaded datngia
No

Scaling actor

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

9
Time to ive
eps a
ok
O
ndicates maximum nwber
destintien
tae to reacl tae
O
Main pnpase e TTL ü to prevet the P
datagami
foenen Lw a

o
Vale TTL device
talles a
termediat
hovinig
tales a hop to the desthn ation
TTL s o beore
discanded it vale
destiotion

I0- Protocet

roucte desti natien to wtuida


O
Tella te ww laye at
te belong
protocol astagu
Protoeo
2
|CMP | I(MP
7
6
UDP
TCP

ed protocols TCP > UDP > IGMP


> ia (cMP
Priority
Computatuen e heade
chedeswm meludes
ecksum P
header
) Header
O 6 bt eld of encie headr
e checlksum vale handled ley
eucapsutatid
At eac w ie cepanad pyotouet

Head set cleces


wu's watched, datoaga t
chclsu whenewe
O Rocteu
mo di
IP
te
header.
modi fies

Relds Haat can le wodid


L- TTL
2 Options
3- Headnlept
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

12- Source |P Address


32 bit
datagan
13. DeshintieM IP Addres
32
bt ield
&ertunatiom o
addre datagkn

4. Oktien

LRecord Poute|
This optien ü wsed to recrd tuu tP addreses
weich datagau paue.

Max-wo-e4 1Pv4 router


addressu Hhat ca
lbe vecorded

b|Source Rouding
Youto
H
datagsauu st tae
Loose vouthig
Strict Rontbg
3we Yot

To wae headn

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

FRAGMENTATION
ts traweissien
auy davices he yectens at tet uetiork lay
o Done by wteredi
Frausmtietote Tranissien Unit)
Need MTu (Maxiwum
Each mw ha t

tot c be
set t

MTU cannot e traniwitted


Eaom

tue metwork

Dato graw Fragmentation


to trau wut tut, t exoumet
a
dategha
when route yeceives
O Size of dotagnan network
OMTU e4 destinatien

DE bit Actien
Cases ob Aatega
Size <= MTU Traucsit te

Size MTU

Size > MTU badagaut

is chongd
Total

mode
Caugerouter
by tee
dung tagneutahon set to I.

ottset al
Recalelate teu hiad

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

RoUT ER B
NETWORK X

C(re atest
MT0 ww Y: 200 bytu
to a
Host A
wauti send

The datagau
Roter receive a
from wast A

500 tbytes
Headsn luglh: 20bge
I76 bytes I76L4kes
Total lugh 520 lbyte

origial dotog
500 20

< MTU
t nlw Y

:DE bit is set to o, trelore


mgnetaton I76 2
Fiogadi dotagan
Size tragmeteyd
ot be

wwtipl ' 6 ( becawse lst trogwt


vale ia sealod Headn by nheld valu=
5

to &

MF=1
Maxintt vatttt
hoaden

fuylod buge

Tstal auta l68


MF =0

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Reasseubly Algonita tthat tee


Depeudingpo
MF
aud raeottset, receive) ideuti

MF Frame e!set
|st tragt
1 Lntemeiat fae

Last

Des tinadiem
ideuctilies dotya Tdeuds
fiagwetd uat fragwut
MF=I
Fram otscto
rale offcet

Repeat
procedure fragts
=
|TL HLx4)]-8

þoivt
Importat from aw alagyaun
Dfet fragt
reacl
to
lestinatien
ote done at dastnatien (uevee ot votu)
Reaseuby
* Size of te hoad
(Mo of fraguieuts -)
Total ovestaead=
heod
Dato witteut
Data itt leae
*
Bavdwidta
Tknegabut
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

PROTOCOLS AND oNCEPTS


NETWORK LAYER

IMPLEMENTATION DF BROAD CASTING


4

AL M
M
TL
LBA
NL M| Ia 255- 255 255-2ss

DLL MY|A 255.255-255 255 DMAC


MA
| FF:FF:. PF te

MA

ve brood cartig s do
at networe aer,
be dee wiHiet tae Broadcast'ng fab

For bivect Broadcatting


LBA replace bu DBA
replaced n0yt Youter MAC
DMAC
Roten router
b acldrex
as wwicast meseoge
to

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

ARP (Address Resolution Rotocol)aA9


progona|opplicatng
tae couputn
of
Need'- Mot
addvecs ( tP addiess) to send/veceive
cowmmni catibn hapPpen
ove
Hewerer, tae acual
addves ( MAC address)

ie
to cowmwnicate
So, destinati MAC addes
with ote pt devices.

MAC addvess.
of ARP > IP addrex
Fmctn
ICMP l4MP

ARPRARP

Netwok

OARP
Respeuse is wmcast
ARP Rett
wsed MAC DUL
Host Meeds to
oo Host Routen loorbotTO0&
Routn Kot
RoutuRote

speor
Bace Addres
Special Addvess (277/Loop
pacet oitth dleiaties
AL
addre 127 te tee pochet s
TL
to
Lbach to
NL
DLL bost.
omuebity at)
PL
(st , we are to
pug 27: 1-2-3
The commam to et &

Timeo ut
Qud
Priyanshu (GATE 2024 AIR
we slheuld theoleslueot
379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Address Kesetetion Protocol)


aRARP Reverse
ceataut. Tnefoe
stored
ROM. til MAC
ddres
t ut
RARP is ed to get IP addaM tro MAC add
(NFS Networe File serex
Contain a teble et 1P
LMAC asdreises

Qisadvautag
o
haNe RARP server
Eveny
ssuld
static

RARP 2 ARP
Reree Addhe Address Resot
Resowtn Protbus Botocol

MAC addhess
kus IP
oddnen is Yrequeited

BooTP Bootstrop Protocot )


BooTP tres ot AL)

ad RARP wors ct DL

AL R
TL
NL
RI s
|o-o-0.o |253 255 2s
DLL
PL

(BooTP (Rlay
M,
server)
O
Buy Bovtp sever u wed

presct n toe wlws


do wot hane B00TP servey
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

wctla teu boo


aLget ca
commicat serrer becoue t
1
add reys o
Bo0TP Jerve

Adv
Disadv > Mappn9 table s static

Broto cot)
DHCP (Dynawic Host Covgigara tie
O Ma ditfeence blw DHCp aud BoTP i teat tte taole
wet statie DHCP

seyvex e
tee talole has
2

DHCp has
a
table at DH

pat
pasts statie ant
daie
G IP addres à
Seyvers re wtrnequined
gve perwoueut
(P address
yalid upto Leaete

MAC P
M
I servers
M

Pec ed
IP addrells

I lost A, Ma wats ts (P address theu te dyae


pat wil
MA C IP Lease Time
MA lOin
Ma

DHCP jerver

Table

wale DHCP cewpatible witln Bout ) betth DHCP e


BooTP have saue port

operatzd at pplicabn Layer


canst be

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Covtrol Message
Protool)
ICMP Lenes
wors at Netwok laye

TTL Bxceed
Eror handling! Parawetex prgolem
Sewnce qemcl
Feedbac
Sewrce redirect
ICMP
Deatination werea
-laole.
Reqest nd

Tine stawp eq

Nwmak
Rout solicitat
& asverticemet

Evvor Haudling Feedback


l weagng
whenee tre
ICMP prstoco

IP whelialo le

Pachets aue
is lost, lCMP
at packet a
10utes de I P packet gmothd
cogaken
to
beoz t
lCMP + 1PYllable

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

1
TTL Exceed

pacuet has neacied t


TTL=) TTL=O dostintien, theu, YSuta
TTL2 |bisCARDED Seuds lcMp pacdet to
4e sGurce
\CMP
e = TTL ExLeed

2 Seurce qemel
sends a lot packels*
tere
Rz Caumet hande

lcMP(sa) tferet
send pacets Via

3- Parametey Pyololew
Strict Scurce Pouting R

STRICT SoURCE RoUTIN4 is set ct DR,


Linh buteen
D

R2 Pace et a des cardec


s
leMP (Paraweter Prolol)
lcMP Parameter
probley
wmreaclaalole
4. Destinatie UMreaclhaLle
Host
Destinatien ereaclaable
Port
besiuatie
or
R, seds ARP segst eting
MAC addre
is dom, Rz seuds
lCM?wreaelhlole) I{ bot wmeso
( D4 1CMP(DHU) evoY

DF bit
o s
tol
NA
MTU-150Dstre MTU SODB CR:
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
Eroq
etan hegueds
<br>

O
paclet not discarded
ú

Source Redirect warmng wot ror wessg


5
it ie

Best Rsute R, Rz D

Ri fooavds
cMP
(Seurce,
redicet)
kuew best part was hy RyD.

It wl torward te pact to Ry

but at
tte sawe tiu,y t wl
I4 a pacet frogde ucto Send lCMP paclet bo
telly t
l00 parts d tà dicarded, Hut ow t next tbe, it
pachet seut

te seud ul hae
to sed

Brd packot wo
tost, tmp

iCMP message
fomat suotyp
i
<8bits8 bits 16 eite
Type Code Check
Detines iCMP
o
mesage tyP Reet Hae heade
The code Dota setie
oy each
IP eadn packet
ü
wlich diicarded

data

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

1CMP Req uest ad wmecagimg

) Echo Reqent aud Rep


used to test wtt tene NL
uterwediate reute re
=
PING cowwaud u wwed Pacleet Iuternet (roter
os at NL wot Al
-server
1-aot lit
AL
AL
TL
NL¢ t
DLL
PL PL
PL
SJacA
)
Reten selieitation and adver tiieueut

added octn to a

seude br0ad costi


pagp to al teel
wetworte ses
10tte conected to t
oe
iavaiaole t used

-latsle Seuds bactk

Time stap Reayest ad Reply


w

dteevt pate ef tee wod


ONo devices cre avalaole

Problewe of seroyati
For P better sychronizatien,
specol typ o%

request reply 2
called Tinne ctaup

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Network Mauk Regest aud

iw hoters.

uch ttat te ww wark preseut


Youte

Evey lost caw send lcm packet to tee noutu to get


lonet mark

TracerOute Applicatio LCMP

te teruet tavele
Tvaceroute provides a map t
tere Seurce to tte detinatie.

Procedlre
Seud a
pachet with TTL:1. TTL 0 t
ist Yoter and

tere procLen witta TTL 213,4


...
O
Deatinatien
paceet
doent jed
Caut dis carded
ICMP paet wn T2o buwz

.. pot
wo teaot deeiut exiut at te
destiati
A
dmg
In tai Case, desthnatien po seds lCMP pecet o
type
Deit natin Port Ureaclaalole

ttMP( DPU) patk Yeceived.

- Traceroute
But
wigt mot ke
Case we
te actal
actal patea

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

l7s
Traceroute wot volid potl
bcoz pacet ca ove w

at diredigne

PMTUD Patt MT0 Discovery - Application o 1cMP

Finding mam size ed taat can be set


dataga
trom Source to detiote teat thagetotuon tauee
place

MTU 5UDB MTU 3008


MTU 1S008

lcMP(DU,
pcMp
FR, DF21, MTU:So)
ICMPLDeU)

Seder seds a paceet e


size 1500B
2altuot olhO
It reLeives rCMP ( DU, FR, DF=l, MTUe Soo)

Sender sends a paclet Size 5008


e
It receives tCMP DU, PR, DE=), MTU 300)
Seude pacuet sze 3ooß
It Teceivel lCMP

becase duuy pot


mo- wed

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

KOUTZNG
at erery suter
tableia called

(B)
wed to
Routimg talole is
decideto wli ch route
ae paceet sesld loe

Routing
Set ext
tadel

a pacleet to all possible directieu


Konding

Flooding Routing
Reut taele guied
No tables aul regused O wot
O suortest s anavteed shortest path is
patl .
relialsle
tess relable
Disadv
O No duplicate pacet at destnat
Duupliccte pacleta at desiuaben
More tratti

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

|Routing algoriths

|Static
Maway porepae aud upload
ane
xouting tlsle oine clamgs

Meuy e
added)

Distace Link
at a router), teen,d VectoY State
wawwol uterveuen Routing
hequired. (LSR)
.
Not wied

DIS TANCE VECTO R RoUTINGI


to
DUR reqires Haot a RoUte wkom abot tepetogieat chaugee
d eiglibeua peiodi atbg
a
heuter cetaiu 3 kields
TLe routing taole at
2) Distauee 3) Next Hop.
L) Desti uatien

Algori Ham
O
Roctu trawsiti iti die tauee vectur to
wost rteeuty eeeived

ditoee veeto
vector
O

Retn taen Lecaleulatie


de dataee
NH
DesDis
A A
Des Dis NH
A
7B 2

2
Des DiS NH
JDes DisNH
A A A

B B
c3
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

o
Each houtn seds tee duteee ectoy to weglng

Routing toole ia
weiniwwma lee vaes from negyoug
Distauce

Belwa Ford

Couut to
a o
a
liuk 3
de, te, t talee lot

ime 4or tee noetou to updati teee to


talole

1 D
attn Line bolo A28
2 3 distauces to A) dewn
23
3

5 5
5

72 7
Reaso dor
te
vectoY
abve
seut
prolbe
distace autes
exclauaed bluo
wext
te
The distaues (wt tae wap)
,adualey

Ceuut to inity pachet


to

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Spit Horizon - Seltiou to Couut to Tuity Rrolblewm.

Selutien to csut to

Wie ing distauce veto rom A


to b, distawces w A

o
e
set to

3
3
Yeach A
lhefove, üsead
tee value 2, t
.
seud tere vale

oned
t e

|LINK STATE ROUTING(LSR)

ueate called Line state Poclet


Retten
Link state packet contae
PNegb ouvi mg, wode
P
istauce to He

Yeceves liue tade packet om ene oftes


ot

pockets ane seut by oodig


he Link state
O
by
ng tere paeketk iwto n tae paclets received, eact
evtng toble wig DIJ EKSTRA ALCORHAA
lecct ceates its

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Sea Seg,
TTL TTL
A
7
B3
The Linde stat
3 are semt toeey
thea Yo
utn

Seg
Seg
TTL
TTL
2
2

ode ha glebal datalbate.


DUR - local dataloae
(depunde oudy upon tiuo mugi
LSR -
gleoal dataloael depude ugon ito e al vout).

Single Source Stortest Patu algoritem ü applied at a


eac wode
DIJEKSTRA AL4oRTHM:TO TAT2

taloe at A
Routi ng talole atB

Dis NH
Des Dis Des
NH
2 A
A A
2 B

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

4 LSR converges {arter tera DVR

LSR- Problemth
o Heavy tagtie due to
Seqence wwmber preact u
eel ih State Bap Pacet.
D
Each Yotu stores the seq o
tae latest pa ceet
a 94 a pacet
received partiuas hoct
a
tequuce less tha terat aeady received heac
Aouter, (due to a
ditet
dizcarded.
path li toes longe tiwe),
eaeu, tu pachet
A B

Talole preiet at
A

Routey Lates t (B, 8) -- Discarcled *


B jo 15v (B,1s) -
Accepledv
30 (B,1) - Discarded
controled
cequnce mubers
* Floo dig Ca be
eld paclet i8 received a a
o, t is wot
transited
futer

a
Iime to live eld cd to preveut pacet ho giliny
wto wngiite loop

a
fxed aut of tinme,
te euty
ü
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 danded
<br>

0Hher þroblew with LSR


LSR pexsistent
hae 2 o'
tauieut
pobleus (tor seuort te)
1) Blach luole
deu t taes tiut
tiwe t discove
There prolblevus au preset upto
tat tut pacet seut tro
kon a
slort auout

A
tolote

tee paclet to C

C
is wot awae e
te dewn Ace to C,
slortest þatl to veacl B
is A.

Distamee Vector Routig Linh State Routig


used 19280s ed w l40s
, vector u
seut

kuesedge
Ford Dijikstra lgoritm
OBelmor
O Less trat'e

Cowt to
No
cout to
iwity
Trai eut oep

proto
RiPAIR 384)
Priyanshu (GATE 2024 AIR 379, GATE 2023 col
@ https://x.com/Priyanshu__2109 0SPF
<br>

RIP (Routing Infor veation tastocal)


wplemet
topcouut (uegt)
taene, wtty
0SPF
(LsR) copuctotiom a
Tplenetation copler
DSPF ivide al tee out wto see d

There ie a
oten de ated Border Routr
recelres
conected to Area O
Bacbone zeue
Border Recte

Backbene zeue
Border
Reuter Area
0
)

EIGRP protouel =
RIP+ 0SPE

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Transmission Control Protocol (TCA)

TCP header -
32 lbiti (4 loys)
Destnatien Poyt ( 6)
Source Port (16)
Segumee muber (32)
Aclkwbuwledqemet wuwwlber ( 32)
16
bts u
Winde size or
Header ad windeno (6)

Checkswm(lb) Urgeut Peuten (l6)

fptiow (o-4o Byt)


Data

Source Port
16 hald
bt

2 Detinatien Port

Táutkies pont ef tee veLiing ottication

kup

-2 port wubers cau htp: 80 D-)02.3> hel


Services
porf
kepresentad ftp: 21
be
(0-65535) Telneti 23 ]D24 -L915| -Rue
SMIP: 25
4915)-6SS3S- qeue

Connecti
Port wo+ IPaddress =
idstifie

TCP u
coMnectiea onieuted protoce Resocea ae relered)
Sochet
=
Porf wo
t IP
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR (bbit) (32lbt)
384) @ https://x.com/Priyanshu__2109
<br>

3. Seqemce Nunber
(yaudony closen)
32 bt
a wmge segeMce mewdan to each byte of dota
i
cotained
Thi d ceti tee seqee wwber

4 Ackwawledgemet uaber
O
32 bit keeld
trot receiver
segeee wuuber et teae dota byta
Ceta from tae sendeY
expecks to Yeceive next
O Acenowledqew et wwwber Sequee weoer atL
Last yeceived data layt

5. Header legtl
4 lait hild
factor 4
salug wlene He actusl data begiwe

bytes
Length o TCP
haad20-6o

Header ength ald 5- 15


ca côutau valee

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Wrap Arond Time


The
tue tee tie vegied ate wliich a
padieula

Aere ue 32 bte
e
sequce no
. No tegueMce wubers posscble 232

Wrap Avouwd Tinme (wAT) dapurd wpon bandwidt

Exauple= Baudwi dth | MBhs


) lsec IMB

x2sec

In today's wtemet, tee iu a


ceneept o tetwe
er
Maxinw awt t wica
to reac
Pue

packet aive oy Hae time taeu


tee destinatien
w
worst cose)

Lifetime -3in
=
180 sec

ae
As long wAT >
LT, Mo
proble.
WAT <
LT, proble aw de to sane seg usme

SeiMs
wot
Deerean bawdwi dth but þroti cal becaua
we wDwld DIE tor
bamdidh t?)

the wwb

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Exaunple Bauduidth = lGB

Asec
seg wos required
) 180sec 180x I6)

- No
addetunal lbiti requied foy eqo= 42-32
=
lo

These twd
bite ahe
are
epte audstaunp
calle fme d

to
prevet tee pro
lole

Establishing TCP connectien


Three way Haudslaking

Step :-I
[syN]
For estalbLisling a connectien, server.
ler to ttae
Oiet seud a
keqet seget TCR header wtlh
a

cesLste

Hae server
O
Thu, it waite los tee

Request sgaud
Tnihial segeme wwubr
set to I o Rae nehwork.
Size ( MSS)
Maiww
windew Size

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Step-2: [sYN+ AC)


Agtes heceiving the nguest sagnt,
Servey
to the cliut
agnt
serves de

Initial seqeee mnber.


set to
SYN
bt
- Maxiwwm
Receiing windew Size
Acueuledgement ewber
ACk bit set to l.

:- LAcK]
Step-3

the server
O
It adhwsedgs
pe ackuouledausut

SYNI
MSS - 460 Seg No
521

Seq. No : 2000
SyNzI
MSSSoD
3) Acbwavsledg
Seg-No
Acano- 522
200I
A Sea o
S22 cau
-Connectie
estalo isaed
be wed

Data
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

DATA TRANSFER AFTER CONNECTION ESTARISH MENT


522
Seq, vuo
522 AK= I ack 2001
200)

Seq no
2001 Ack=I ach: 622
No dada
. to
Seud Pure Se. wo.: 622
achnew stedgu ACll ace 2o)

Seq- w: 622 ACK=


622

a cle=7 2.2
Seg. no= 2101 (00
Puye acnew
Sea-mo- = 722
-ledgmut Ace=| ach: 220)

SYN ACk

lst
2ud
segt (Aiply gt)
Pure ackwousledgemet
Not þassible

achuoutedget Aut.

Sequence mmber iu cosumed acleuotedqt

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

CONNECTION TERMINATION
ServeY
Cient
Seq No
722
FIN| ack 2201 daarud
m
serer
Bultere
sud

adk 723 Data CSX


I v
Seg. Noz 220 Data Sc
Afteteuu, cieut
Canot seud data MARdadto sh

Cone ctuên is oace


tewinated fro ACK S c (Piga
cent Sde

2201 Aele=l acle723


Seg-No=
Seq- No
723
ace g2 2
Covnectien Temiatad

segmet send er dda conne ctien ttalolisamet


3
Data tralp

ferwintie

Flags sed
SyN Hlag Symconiggserversegnce waulbrs
cliut wtice saqame

ACK Tells ocluwtedgtwmeut waer


valid oY Et

FIN ag Requweit kor (aMnectn ferminato

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

psH (Pust ag)


ow cewe
o4emer aly TL tales data AL tt bts at a tie aud
waits
wuore data wwtil ee of data heacee MCS.

ueed to tell TCP not to bukhes te dato ad


divectly pua tau data (thog o4
Jwall aize) to +ee DLL.
Interactie Lisn
Pplicatis | chat, Telnet ,
O
etc. have PSH=|
ssH, Potp
Ptty, Pisgin)
AL
Since PSH-1, AL
TL Joge Siuce Ps H
TL ),
directy set to NL
DLL
NL set to Dr.
AL
DLL
PL PL

URG (Urgt Flag)


wrgeut
tel teat tae
is
O
used to
slusuld be execwted fost
URG Lag set to |
u
te eceiver side,
oa
gut witta

procesed fst data

caeeot see tte UR Hag


have TL
o
ot tey
Rotes
i. Type ef service field a (ip datagau)
For urgeut bat flag
Gbits priosty

Reliab
Rionitt bt
Cost Tarnugltut

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

(l6 lbits)
URGENT PONTER
TCP segueut, tAsone pat t data i wngsrt aut,
poitin Wed

peuten telli tee Lost


teportad
pto wticl data

seg wo = l000 Urgaut petni l00 Thn,


|
seq uenee wos- e

l000- l00
s
ie lo! byti ot data

Last bgte of
Sequewee wwbs
data

RST Hlag (Resct)


wsed to reset He TCP
Cowectien

RST bt is set tot) eu onet


ndicata te eLeiver to terunote
O
t
te connectue
t causer both tee sedlS to eleae
al t hesuYees abnormat divectiens
The Cease
w
both tee
lesult

erorS
tee TCP Connechou

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Winde size
size veeiving
cotaie tee
O adertises hes wwcl data (w tee sed 4 Ca
TCceive wstehêut acluewlede
a wied
window size

advertiseweut inde
If on the size-0, persis lenle tar à
wed
endens side aten weic it to
clere it adertsewuent
TCP State Transition Diagram Connetion Estalolicndt

Stepl ot
coNNEcT SyN
CLOSED 3 usog
handseoling)
LIsTEN| icuosE)
(step 2 ef
syN syNACK –
LISTEN
RST SE ND syN
SYN Rcvdk SYN SENT
sYN/sYN+ACK

<Data troniter
Establishedk SYNtAs /ACK 3 wwat

SesveY
ULLsual evevts
cliet.
tveut) Acten poui)

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Hamsamida
– Cownectie Release.
TCP State Transitien Diagram

CLOSE|FiN FIN Ack


Estaoished
Active Passive
cLose close

FIN
wactl |Close wat
FIN
AcK[ Ac

AN
Last
itz pIN/A watt
Ack
Tlwe ut

Server
Closed clieuts21
Ackl

Event /Actieu

TCP Checksum
as
bate TCP heade, TCP data as well
Tale care
pseudo IP header

From P
headeu, ceclsm caleuated ely
s

tee pieudo IP heades Becaus llu


packat
w

tee reeeiver

Pseudo Source tP addreslb)


Destinaten P add resle)
IP
Header. 6oceeou Protocot TCP segut

(ole)
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

LP header etee is
? ealclated
catbtatig TCPchecesm
ord
Tn to hawe deole cuckmg
To nale
e
suie tuat tee
corect desttnal

OFtions
bitea.

1 Time stap 2
Windes size exteun
3 Panameter negotiate 4 Paddug

Time stamp
when wrop aeUnd tiw
imestowps weed
Timestamp mmosls the age ot pacet
Tor ezauuple,lceJhiaNOT o (32 o's) 2 time staup D,

ben 0o0.0 (32 s) 2 tiwe stanp


seg

Winde size negotoction

l6 bte cau
ee hepheseted
t
wore clata,
twauds to receive
windor size wig
Cau adverse
are peuded
The cxta bts

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Paater negotiat
conectn eatalolisaed
botth under and eceier
Sze (MSS)

tpecified

Podáig wwwed
A
dditn aud mmalie t coom to

tre tumise called


the standad sise
Heads gt huls

TCP Retransmission
O Ketraukuting of a segnaut teat ott begore reoclig
retramissie.
O
whe sende dicovers terot tee segt seut lay

gwet to tee receiver

Ei taer Time Dut Timer expires


or t reeelves 3 duplicot acluosed gewet

Retramission atu timesut expiry eLeier, t


a TCP to te
Eacl tine seuden baiwts
stats Tmeout TFmer.

sends dses wot


neeeie achnowtedget
e fee set
tee tiwes ges ot, it etvat tee sau
seget beore
e
to tee ceiver reet fwen
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Sendex Receivey
Seget last
Timeeut
Jteu
toer
Reraiissie
SCULe ek
Timeet
tier exres

Retrawssien ote veceiving 3 duplicat


acdnouledge meuta
sede aseee teat paclet Uas eew Lost ét t gets
3 duplicatt ockuotedgente o a
t gmt seut

leuen Ealy etYoueicsien or


Fast Retrausicsien
Seder send
2ud gt geh lot
Seuds
Seud ack oY 2
2
2 acle
set

Seudn receivee 3
dplicati acluouledg
u fotal

Tinsut rettll

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Conqestion Control tonn


TCP teenies Melaiie
elers to fe
Congeutuon coute
congetom batore it hoppee
peret tee Lappenad
O Eittu
ott
r Yeeve cevget
the sende wiudo
TCP reacte to comgetimtid
size
u

Send wndno
Reeeiver winde size
ude

l: Receivex wmde suze


wnden teau rceiver
Advexisenent
wot ced data gheaten
Sendu sesuld
indew Sze heades
windeo TP
t
Receiver dictate

seud data
O
send eeuld wt

Receiver
Send usnde Miniwuw wndeo
Size
Size

Sles start
Avoidamce
Congertiem
TeP Congeztaen
Qetation
>Congution

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
Start þhaseset
<br>

Slow
sender comngertn oMainwm00
Iritatly Size ( Mss)
Seguet
The ue eceivd.
acle
Sendex Reeetver.

ten l eund triP


- Mss
Cogeitin loin doo Size (2)-2
LAcK

AAn 2 YDd tip, Lsegt


congestn wiudon Qze
(2)= 4Mss
2
sewt
A{t 3 1ewnd toip,
conges ten wndew s2e: (2)'- Bms.

Tis pease coutines


4A4A|
wntl 4ee
Cugeten ido
tareetd.
slew stat
Threshold - Receiver wiudwsze
MSS * 2

Conbestion Avoidauce Phase


liwearly to avold

o Sende ineneayes comgestien wdeo ce


te acdwoutedgemned
cogtien
Maxiwt
Reeeier

SLoo
MSS
Covgestcon!
Tetd Avoidamee
Slow paace
Start þha
LMS

Time

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Congestion Detection phase ,


Whe sende) detect tee loss gets
tee loes s datected

Timneot u
1)Detectien betone receiving
expires
Tne eut timer

Caaeel ferat it wa due to

Seuton -
Seder reats by
slew stt tareslao ld t hay tte
becreasu Cws to lMSs
slew staut plate.

Duplicati Achnswledgeneut
) Detectuon e recciving 3

ackuotedgmte
bo
O
Seudn receives 3 duplicat

was
teat t &ue to
aNoNnhrovA Norasono
setien
Seudn reats by
tae sle start aereold to alk
tn wndew size.
Cws to ste start teeshold
phage

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

TCP TimeY Mamagemeut


Time wait timer -
Tme wait tie wed o
Cenectien teeinoas

Started waem Seadn seuds tee Secod Fin gt


2) Keep Aive Timer
Oused to terwinate idle TCP cownecties
Each tine Seve leas ke clent, e
keep alive tier iu
heet
e
set to tere clet
respee Necelved, couuetisn feinoed

3) Ackwouoledgawaennt
tier

4) Persisteut iwmer

TC wes persisteut tiues to deal wth zero winde


Size deadlo ch stwotie

5) Timeout timMer
Time wtich senden scsld
kor oct tor ach wewledqeuet
witlot vekvasw tee
be

Rouwd Trip Time.


TTmeot twen 24

beuen to mal wmnece3 eraiui ssim


)imeet C8

Prelblem
Tvneet uen pactet

LL
Jacobies Pgesin
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Timeeuct Timer cowputataon


Basic Agorittun
is caleulated
Timeeut times

5ms= ARTT
TRTT= lOwa
TO = 20ms 2* 1RTT z 20s
To
me
ARTT- 15

TO=2Sy
20 ARTT
NRIT « IRT +ll-«) ARTT

( wil

To= 25we tor


et
poxeet)

bisod vatage To
For wext pachet,
No 1RTT - 12-5we
2
wed TD 25
m

=
Iwital Red Tip ìnme
IRTT NATT 0s25+0Sx 20
Trip TìvwMe
ARTT
=
Actal Rend
NRTT : Next Rond Trip Tiae (opedhd)

Timeout Timex Computoen


Jacobson's Aqorithm
Siilar to loasic
ID
-
litial bevtae
TO = 4* ID +IRTT AD= Actal eviote
ARTT
AD
=IATT-
T
NRTT d IRTT +ll-) ART

ND KID + (I-)D
trat we
domt eelve
Karns wodileabn

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Need For UDP Use Dataga Protocsl


Sene situattine
TCP
1) Whew te appicatiem weeds Jut
BO0T P DHCP NTP (Netuo urte Time Protool),
Ex- DNS, )
RUP
NNP ( Netuuot Neuc Botocet), TETP, OSPE
(Trivial Hle Tauste Protoct)
re eedod
2) For loroodcottig -woe wtiasting butstes
to
to be alocated TCP Re eacl host This Luads
w

3) when we require speed


than eiablity
u
yeuebe video HD
forwat Tep
LH I tawe is Lost, video

but tew video s wot w


HD, sewe freues
be lost lsut video wll ot te ctea.
wot pause AUse, uatty at uidio y drop
de
to bosc e
trae
UDP HeadeY

€32 eits
Source Dectinahe OUDP eeld comnwi cate eu ephg
Povt Port to te LP bataga
-
The vae
Checsw eptime
)ReteTrae
2> Reord Rete
Computed 3) Time stanp.
dota headen
psudo QP
to intor w
appeicaten lge
tMe erroy pacets.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

A PpLication layer protocols


Service teat
Application layer
wternet provider
paototsu
Aplicatiem layer PoP
HTT FTP SMTP
DNS )

FiLes Emal Ewail


DN-IP web
pages Rebving

y
DNSDoman Nane Service) Port wber :
53)|
DNS Uses UDP at
used to Corert Donai wae to LP addhe

doman ( com, edu, mil


Aomain(in,ws, ule)
- na
Inverse domain ( civen iP addresc Pind dowan

s
DNS Jotoloae
Root DNS Server

level
Com DNS Top
domait
(n DNS wil DNS
server
serveX Server

Authorihve
doma

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Take Force mamage 13 eot seyvers


Lnteynet (IETE)
across tere otd to deal with lailes
preweut DNS ovey head
Local DNs
ü wsed to
mas tor
O a
e P ddyesses tene dade
stores reg used doan
ierver
Local DNS cotacts Reot serveY
| Local ler
Tb
2
DMS Dowan
) Tterative way
2) Recursive wa
Serves

Root

Host
DNS Tap
Lelels
Auttont
$mer

) HT TP Hyper Text Trautex Rrotocat


need rellablty ( it dsu wat ,TMP
O HTTP ea TCP at tvaueport
baud proto col ( bote commanss l data
mot taceed server lide)
2 versio HTTP 1-o (won persictet cone ctiev )
counectuen s
wed tor eaelaoieel
HTTP 2I (persisteut cnueckm)
tjecty
Mataod pported HTTP
L
Head
b
retume eader (wkadota) elaag
2. Get
3 Post
wsed wi
th ows
4t Put to
5- belt to
delete tee elijeet
G-
Trace Trace h sending dat

8-
Priyanshu (GATECowmet
2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
wed by httosfor
<br>

3) Fle tnt Trawsl Rotocel ( FTP) Port Nuwber = 21

Tectia lezilla are pepula FR

FFC Flezila Plecust)


FFS (Fezilla File Server)

Cotol owwectn
Wevsskeud
P
puloic add,
Data cyuecten

Satter
geta
tray date,
ducouuedd.
pstocot Comwamd l data low tusugl
duget connectuee )
FTP wwes as
TCR tee

4) SMTP(Simple Mail
Tiaslr fretscs)
e
SMTP

laecawse to
u uxng TP, both seve aud cieut
TMTA Mai

Text baled protoce For wutimedia thautery MIME So

prheet
JTert Non-text|
ut
Non text- teek
Mal
(euto) Mad lint
RoSH(SMT)
PoLe(po)
Mal
MIA $evey MIA Mail sever

Cis co
Pusy
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

for y gem stuateny

lesMA (cD
l+644A

NA0 TR-D. J+a(tth ) |+a


No ueed
wuwwul
solve VLTR-E>
to

1+ l+ 644

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Host 5 lay - AL TL NL DLL PL:

Cables be
to baue T (10welo ps, o wuttiplexng Loow)
Jo base 2
to bare s Soo w)

Lengt ot LAN

at ageica
lae (cowpleteby handusaa)

posi lole

Repeaters
ed to wenease fae leyt of A

For exawple Lo lbae T


caloles wyed
wax wpto
. dstauee wliel
Repeat wed to thawit
ds tnee.

LAN Reqenerato

for

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

to Cone ct 2 LAN segeut of sinila type


wed
1
ble
Dewaw umatteced|
to cownect teS,
we
cut a wire and troduee repeat
cag
wcreaed

Hub uo.
vepeat called
Muttiport
Thoy
worus punely
poisilole.
Coisie = N
domaw
eistn
Cost lese

Brig bridgs PL, DLL)


connect LAN
Used to

a) Filkerig
2 types
For war
) ai
c) Fleo
Statie Leaauingl du
4ued
Taapod able to Store
ad oward
wew a stetiem sedi
wo ted.
boridge

tme taleiy but Colusto dowun


Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

toops
Avoidig weute

Miiwn

Tree Agoritu
Evey briag
LANL

tae as
B
Mark
oe port
ecl bidge |b d

LAN2

LAN3

to a
lorest it tae desiguatd b
lovdge toy LAN.
that ale LAN 4
port a dega
-ated povt

Moue t yoot pete aud LANI

LAN
LAN3

| Bs
Switeh
LAy
No yo

Colisie domain üo

at
-O e
can Comwwi cate
te sae tiwe
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Device Broadcast bowa Collisienbea


Repeater Sae Sae
Soe Sae
Boidge
Redee
Suitcl
Sae Redcer (o)
Reucts Reduees Reduees
Redees Reduee

Routers
Cowweebig 2
aiytet wetwovks
Rerctn a

tac povt DLL &


PL
No cee
uiicle YotS

Gateways
protoel comwerter

Wsed to Cowet no with ateut potocola


TL

DLL

TPL LP ATM

wed

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Appicaton layer
Trausport gateog
Rou
Suwitl
DLL

Ramwung code
for detecton of t bt euor,

Tótl bct
m Y
Relaton
mt t}
2Z

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Congesbon
deteton

O cwnd increases lay


ac
lkno wledgmet
Aend tip
roled)
tongestion
wnd inureaes |MSS
RTT:

inerea set
Cuceeapul ackowtedgcut
win olow Se, tn cwnd acdowleget
will aie LRTT

owlat
Recelnwdow

2x Mss

TLP

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Lite WOs never meant to tun into thiss

KOMPUTER
NETWORKS
(- For eugaw Data
Cowwnicaee

2 Kurose Ross Cowputen etooeng A

Top -Dox Apphoach

3-Taweulbauu Cowputen hNtkuooe

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Wby Layeivg 2
wto
1
Modua nity Me phoblem isdecowpo1ed
ore waagenble sibprollawat.

eveluivg owpute Metovs.

2..
Functional Reese
shaed

Lower layer provides services to pper layere

Laer 5dsibyoo)

reuai g ees
2 TALIK
Layer

pleane do
te e

Proto ce
geed upou cewentiou en cowmmunicati
G botlh eudpoits need to uidestod ehe
pLstocel.

hstoe wuit lbe nd wmabiguus.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Headers
Laghig and
GEach layer Meede to add Sene Covtol goation
e 0hdo to do te jeb
tNuslaleto the data
prependeá to taa
Heade 9 This data is tbypically reptnted

ce
Duee the lower layos delive the data avd
peer uses
tee couto ow
iomation the lay

1sbivo
yical Lael
Ocoordinotes ait stream trae wissie eve plyecal wdauu
ert
G repres to be tyauswittd, bta
etatiu -clectieal|opt'c al
he ecoded uto

Os ad ls canged

digantt lasne
bit egth data rate : Pugeicat laye
bit kacte nd accovding
bits Set each Second

Data link Layer Jasata9


:
The D-LL divid
received
data wuits called rawes

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

O The DLl add


paycical address NIC addreer of oppropn ota
frome to specity the
MAC
address heceive tene othen ide io
(48 bts
handeoded nto
NIC)

eoh cotrol: The

wsomatio meceysay to dotect e cover


28936M
daaged | ot
eesk O access cotrol when ore derLes
4ee DLL dotei
ever att
which deice. has Cetel ink
tine

Network Layer!
O loqical addrescing re
the data link layer handle
adldnesugl doliveny Palole

is eedd to helo
awthen addnening syet
seurce dertiati yw

tee welail
laoiteucig pachcts to tei tinal destnati
hetg
Oagmeutation and reasiewblyi

lugth efwanags taat cau be


fut. If the pacet aat tae NL wavt
too wuustsput
up
oCg te NL
tue pacleet fendl each piece to bLe and
ten hane pieces veasseunleled
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109 ee
<br>

Routig
G Routing pusto cala

eiee weed to be geutoKorps tue talole ready

Forwo a
to
asdi fote grd

a packet toand tee dstinotion.


vtem a pacet aives at te wode

wuote fenal s wot


destinato tia wode.

Trowsport Layer
port severa puoLesee

at Sae tie for tis reayeM oce to


pocess

proess t ethn
address ncldes a
typ of address
oclseCaud port addvess.

Osegmeutot ad reateubly
A
divrded uto
segmentotsig Tuse nos
to teaKenle
o idaitg 2 veplace pocteks
at ae bott

pofommel
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR Pow
384) @ https://x.com/Priyanshu__2109
endto
<br>

Switching
u
Lomg dis tamce traiissio
Suwitclimg

Circuidt Soitclng
Pacet

Virtual corcuit
Datagraw
approach. approdet

Cireuit suiteing data ia wot brokeM iuto


pante
dota seut
Cheating a sessie esenee dedicatod oauduidth
callen and neeeip yecipuot
Series

sessuen up

>Betore Sending, mwit regenve


Ca
pauty sessiou ouli
Success =
bandwidth ie guorautead

A hasto Cowwwiwtate

A
to B.

B Comwweutf
path A
C0-B
So, A
cauet coenitete
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Packet suitclug
oniNotiu
O To
each trane, a
tutle bif o utorwmation (ueoden)

added tulls the suwitce

- Bneak data uto paclets; send


waen taey

to we

tveny wtnmedate deice (routen)

alttnnat une ia taene, pa uets


aue
sored

aalalole Souwgs reuwaii


paclisk w qyucase

fee
paclet

Vitual ciYcit appiuogcli


suOUte estalblisaed betone ay pa cuet

Call reyst catt accept


tovnectien ( handcahing)
ud packeoki estalish

pa clet covtaine
iurtead 64 degtinoctiom addsess

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

decisoue eguined f individual pocleets.

Aeguost paclet is

Not
a
dodicated pathsias n a
path may oe

Shared vital circutts ).

VC tp teweutatiou
cevite e
a
path from seurce to dastiiati
vemubers, beuwberto each

packet belg to Vo cassi


VC unbe

(rattier the destimatibw addese)

pack et
Trteauet appicatue anebsty
ail is
baudidthten
veceired
eeusLes badi dth uben
cte
viit
(datagrau)

tuppot buoty applicatiimh f

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Phuysical agc
Coucewed wcth hos to
Scepe
a
bits vel

Link laye iu implementa


adapts' (NIc)

Acaptun veLeives
Create

CPU Mem"y
packet Link Laye |packet
proto cet
Host b

HYam

sewdung Coveroler
Reein
wde
Netwo
Adapter
adoptesbod Paysica
(handaave) Transwiesie

bee pto disnete


chunkss

Aeceiver meede wehen a


fame stals
and
hn ise wi utpyretalan af
ata rean
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Approachi: Time gaps.


a
cetmte vteval)

Approach
2: ixed 4rae c'e tor
We gt be vetdictig baseles smollul

be tee
> wastag reaourcee
b lange fhae cig

4eree

Approach

eud

(Byte cout)

Couwt eld ay get


tusopi ed"

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

at tae staut nd ed
ae rae
FLAG
FLAG
eMd
Stat end
Two conseuctivt lags ndicate stat aud

uhat

e
use ecape canact fAG
preset iu data
at receiven
ORIqINAL AFTER
Rule
ed
ByTES STUFFING
wext
haractn ad cosiden loyo
AFLAB A FA a pant of dala.

dota
that retetyty CQtaime

A Esc F|B Selutin


oue wore eacape
charact as
eatbd
PLAG
ud
-
FLA-# FLAG FLAlG

ESC, FLAG These tale


each
wed
FLAG##-- PAG

not epaoal
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Bit stfing
Simple agot d
Wsed Hag

At taimitter 5
consecutve emes
aZeyo

At reeeivey n a
pattew t ywte
lltlo
tee dota Yewo ve

TRANS MITTER RECEIVER

2 Eroor Ramdlig
Detect and/or comect esoRE w receied

Suugle bit esrora


Esors cussepted.

Burst eror
Copted O1o

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

BLock
coding
Ga feuo bite ae appeudid to the mage
Tue lots ca
k bti n-k bits be oppevdad

Message Pasuty
bits
bits
end
boawovd

Codowohd

e k bcte tor data word,


=
No dactawods poscible

Eror cotiol
metod

Ersotu Detectiew Erow orectiou


bits
Cy elic Redundauy
Checa CCRC) Codes

Chechsms

10 Receiver
aluogs kwes
Codewo rds.

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

O
smplest sclome
add au extra bit to tee data, such erat e

odd ( odd paty


Eve pasuy male tae Mo Ls u a
bit
Cowwwsy
a
eNen unoer.

50dd pauty i make

Check at teevecelrer

hoGiven a
lits , D,,
mMesageio k dota Da
ppeud
paity bit P
to ae a
codeword

P=D, D, Dy .

Receive datect e y

Ce odd

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Hawwing distante
2 worels e same
The hawwming dustauce bo

cohheapomding bit

Mininw Haeming dustae


The mni dislaee ee
smalltst laming dütavee blw all
posile pavs n a set t wordi.

Miiuwm
2

Miinm awing dtauee


Cocleg

G2
IMP
14 the miimum
2
valid Codewords
Tepres euted
Maxiwuw w
be dete cted by te receienE
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

guarataa
To dolet detect what sluoued be
tee
wininnu hamg dutae
A
S Suppose
B. S-1

Valid valid
duvaid
odeoords
Tuis
Bdy Sugle bit eroY pos<ible bit coutd vaid
odawoYd

i invalid
eventapplug. taen, we
Se
oTyect enors coceoyd uuat
olways

dwin MiuLw haming dataee


Maximum bite ef enor eat te
heceive tau uoectTur 2

To
uaravta CoRRECTIDN pto s
ehors tuthat sloued
be he
wiminm bo duatauee
codewoyds ?

A 2s
B.
2s +1
e
2s-l O000
D. Noye ef eese
:. 2s+l cyin =

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

X walid codeword bebeen

we caw cotect

G dwin t1.oSt 23Na

Suek
e five couut o!
all posetle
tuuo s
woTdA

co
dew0rda

3
EnorS that e
code can detect L

Eors

codewors
loe deected nd

1)
(d+

o000 Cor be
ected e
wing distavee feu code

Cod AND
dale cting (dzc) cde
dutauee (Ate +).
Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Single CroOr Corecting Code (se)


Desigming ode wtieh ca
uoet
xHaww
bivide tae dataword ucto
Basic tdea
evelappig gps

VM Data bits

the relati
2
m+rt 1.

possible
Lomloination

bitr

02Let k be the iw mumloer 4 lGita nedad

e tae
possible t teen, wueh
Ledties

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109
<br>

Hamming Code

Costruction

Stepi i- Mak all bit poštione that


e
peee
bt.
(poseton I, 2,4, 8, l6,32-- )
6 1
8 9 lo |1 12
1
2 3. 45

Find te
pos
bidg terat to) aud Fep2:- Iit dats bts iu remainig
add tohin locodions
ocatien
o "Data to seud 0l100T
to tiudthe
cusoopdrdata bit sos

Step 3;- Caleulate tle


Eaci pa bit calculates th poudy Soe
Tue
Actewines
trat t altenoty
the segSee
, 9 -
1,3,5,
2: 2, 3, 6, 7, 10,l1,. .
fosrtuen

fostion 4 )-4,5, 6, 7, 2, 13, 14, 15 ..

Priyanshu (GATE 2024 AIR 379, GATE 2023 AIR 384) @ https://x.com/Priyanshu__2109

You might also like