Short Notes Computer Networks 64
Short Notes Computer Networks 64
com
1
byjusexamprep.com
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
• IP Addressing
Class D No NID and HID, all 28 remaining bits are used to define the multicast address.
Class E No NID and HID, it is meant for research and future purpose.
2
byjusexamprep.com
Data Link Layer Frames Flow control, Error control, Access control
NID HID
1. – 0’s → Network ID
2. – 1’s → DBA
3
byjusexamprep.com
• CIDR RULES
1. All the IP Addresses in the Block must be contiguous.
2. Block size must be a power of 2.
3. First IP address of the block must be divisible by the size of the block.
• NETWORK TOPOLOGIES
There are four types of network topologies:-
1. Bus Topology
2. Ring Topology
3. Star Topology
4. Mesh Topology
• TRANSMISSION MODES
There are three types of transmission modes: -
1. Simplex Mode
2. Half-Duplex Mode
3. Full-Duplex Mode
• TRANSMISSION DELAY (T d) –
Length / Size of data packet
Transmission delay =
Bandwidth of Network
• PROPAGATION DELAY (P d) –
Distance between sender and receiver
Propagation delay =
Transmission speed
• QUEUING DELAY –
The time spent by the data packet waiting in the queue before it is taken for the execution is
called the queuing delay.
4
byjusexamprep.com
• PROCESSING DELAY –
The time taken by the processor to process the data packet is called the processing delay.
• TOTAL DELAY –
The total delay in sending one data packet or End to End time =
Transmission delay + Propagation delay + Queuing delay + Processing delay
• THROUGHPUT
Throughput = Efficiency × Bandwidth
Tt
Throughput = Bandwidth
Tt + 2xTp
L/B
Throughput = B
Tt + 2xd / v
L
Throughput =
2xd / v
• EFFICIENCY
1 Tp
Efficiency ( ) = , where a =
1 + 2a Tt
• FLOW CONTROL
1. Propagation Delay (P d) = Distance/Velocity or d/v
2. Transmission Delay (Td ) = Length of packet / Bandwidth or L/B
3. RTT =Td(data) +2*Pd +Td(Ack) +Prd +Qd
5
byjusexamprep.com
N = Sender’s Window Size. (in SR, both sender and receiver window are the same)
a = T p /Tt
1. Sequence No. >= (Sender’s Window Size) + (Receiver’s Window Size )
2. Efficiency in TDM (polling) = Tt / (Tpoll + T t)
3. In CSMA/CD, Tt >= 2*T p
4. Hence, minimum frame length = 2*Tp*B
5. In CSMA/CD, Efficiency = 1/(1 + 6.44a)
η = 1/1+2a η = WS/1+2a
η = N/1+2a
or
or
or
n =
n=
useful time/ Total n =
useful time/ Total time
time useful time/ Total time
Efficiency
or
or or
η = WS ∗ Td/RTT
η = T d/RTT η = N∗Td/RTT
or Or Or
Throughput
η*B η*B η*B
6
byjusexamprep.com
• ERROR CONTROL
1. To detect ‘d’ bit error minimum Hamming distance required = d +1
2. To correct ‘d’ bit error minimum Hamming distance required = 2d + 1
3. In Hamming code No. of redundant bit or check bits or Parity bits:
r=(m+r+1) <= 2r (lower limit)
• CRC
1. If the generator has more than one term and the coefficient of x° is 1, all single-bit errors can
be detected.
2. If a generator cannot divide x t+2 (t between 0 and n-1), then all isolated double errors can be
detected.
3. A generator that contains a factor of x+1 and detects all odd-numbered errors.
A good polynomial generator needs to have the following characteristics: -
1. It should have at least two terms.
2. The coefficient of the term x° should be 1.
3. It should not divide xt+1 for t between 2 and n-1.
4. It should have the factor x+1.
7
byjusexamprep.com
• ACCESS CONTROL
1. Minimum size of the frame to detect the collision in Ethernet (CSMA/CD)
Td >= 2* Pd + Td(Jam signal)
2. Backoff Algorithm
Waiting time = K * Slot duration
= K * RTT
= K * 2 * Pd
Range of K = 0 to 2n-1, where n is the collision number
• NETWORK LAY
First
Address First octet bits (red Network (N) and Default
octet
Class bits don't change) Host (H) portion Subnet Mask
(Decimal)
8
byjusexamprep.com
Doesn't know the network topology Knows the entire network topology
• TCP HEADER
49152-65535 Dynamic
9
byjusexamprep.com
SYN = 1 → 1 Seq Number
ACK = 1 → 0 Seq Number
FIN = 1 → 1 Seq Number
1 Data byte → 1 Seq Number
1 0 request
1 1 reply
0 1 Ack
0 0 Data
TO = 2 * RTT TO = 4 * ID + RTT
NRTT = α(IRTT) + (1 –α ) ARTT NRTT =α (IRTT) + (1 – α) ARTT
0 ≤ α≤ 1 0 ≤ α≤ 1
AD = |IRTT - ARTT|
ND =α (ID) + (1 –α )AD
• CONGESTION CONTROL
Slow start Congestion Avoidance Congestion Detection
10
byjusexamprep.com
• TOKEN BUCKET
Maximum Avg rate for Token Bucket (m) = (c+rt)/t
m/1 = (c+rt)/t
mt = c+rt,
mt – rt = c
(m-r)t = c
t = c/(m-r)
• SWITCHING
Switching are basically classified into two categories: -
1. Circuit Switching
2. Packet Switching
o CIRCUIT SWITCHING:
Total time = Setup Time(S) + T d + Pd + Tear Down Time (T)
TT = S + L/B + X.d/v + T
o PACKET SWITCHING:
X → Hop
N → Packet
Total time = X[T d + Pd ] + X-1 [P d + Qd] + N-1[T d]
DNS 53 UDP
HTTP 80 TCP
20 (Data connection)
FTP 21 (Control connection) TCP
SMTP 25 TCP
TFTP 69 UDP
Telnet 23 TCP
11
byjusexamprep.com
Stateful/
Stateless Stateless Stateless Stateful Stateful Stateful
Stateless
Transport
UDP TCP TCP TCP TCP TCP
Protocol Used
Connectionless/
Connection Connection Connection Connection Connection Connection
Connection
Less less oriented oriented oriented oriented
Oriented
The control
HTTP 1.0 is
connection is
non
persistent.
Non- persistent
Persistent/Non- Data
persistent HTTP 1.1
persistent Persistent Persistent Persistent connection is
is
non-
persistent.
persistent.
• IPv4
12
byjusexamprep.com
• IPv6
• UDP HEADER
TCP UDP
Keeps track of lost packets. Makes sure that lost packets are Doesn't keep track of lost
re-sent packets
Adds sequence numbers to packets and reorders any Doesn't care about packet
packets that arrive in the wrong order arrival order
Examples of programs and services that use TCP: Examples of programs and
- HTTP services that use
- HTTPS - UDP:
- FTP - DNS
- Many computer games - IP telephony
13
byjusexamprep.com
• APPLICATION LAYER
IDENT TCP In
Transport
Application Type Application-layer protocol
Protocol
****
14