Module 5 - Network Layer 1
Module 5 - Network Layer 1
Network Layer
BY:
Maulika Patel
Solution
We replace each group of 8 bits with its equivalent
decimal number and add dots for separation.
Solution
We replace each decimal number with its binary
equivalent.
Solution
a. There must be no leading zero (045).
b. There can be no more than four numbers.
c. Each number needs to be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal
notation is not allowed.
Maulika Patel B.Tech(Computer
Engineering/IT) SECE3011-Computer
Networks
Hierarchy in Addressing
Solution
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C
address.
c. The first byte is 14; the class is A.
d. The first byte is 252; the class is E.
Maulika Patel B.Tech(Computer
Engineering/IT) SECE3011-Computer
Networks
Number of blocks and block size in classful IPv4 addressing
classless addressing.
Engineering/IT)
SECE3011-Computer Networks
Note:
• Subnetting for classful addressing is
discussed in LAB which is also in the syllabus.
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightm ostbits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
This is actually the block shown in Figure 3.
Maulika Patel B.Tech(Computer
Engineering/IT) SECE3011-Computer
Networks
Note
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
This is actually the block shown in Figure 3.
Maulika Patel B.Tech(Computer
Engineering/IT) SECE3011-Computer
Networks
Note
Solution
The value of n is 28, which means that number
of addresses is 2 32−28 or 16.
Find
a. The first address
b. The last address
c. The number of addresses.
Maulika Patel B.Tech(Computer
Engineering/IT)
SECE3011-Computer Networks
Example 9 (continued)
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by
bit. The result of ANDing 2 bits is 1 if both bits are 1s;
the result is 0 otherwise.
block.
b.Find the range of addresses for each organization
and the range of unallocated addresses.
c. Show the outline of the address distribution and
Maulika Patel B.Tech(Computer
subnet.
b. Find the subnet prefix.
c. Find the first and the last address in the first
subnet.
d. Find the first and the last address in the last
Maulika Patel B.Tech(Computer
Routing Routing decisions are made Routing decisions are the static
decision based on topology and network tables.
traffic.
Categorization The types of adaptive routing The types of Non Adaptive routing
algorithm, are Centralized, algorithm are flooding and random
isolation and distributed walks.
algorithm.
Complexity Adaptive Routing algorithms are
Maulika Patel B.Tech(Computer
Non-Adaptive Routing algorithms
eering/IT)
are simple.
Engin
more complex. SECE3011-Computer Network
s
Distance Vector Routing Algorithm
• Step-01:
• Each router prepares its routing table. By their local
knowledge. each router knows about-
• All the routers present in the network
• Distance to its neighboring routers
Maulika Patel B.Tech(Computer
Engineering/IT) SECE3011-Computer
Networks
• Step-02:
– Each router exchanges its distance vector with its
neighboring routers.
– Each router prepares a new routing table using
the distance vectors it has obtained from its
neighbors.
– This step is repeated for (n-2) times if there are n
routers in the network.
– After this, routing tables converge / become
stable
Maulika Patel B.Tech(Computer
Engineering/IT) SECE3011-Computer
Networks
Distance Vector Routing Example-
Consider-
• There is a network consisting of 4 routers.
• The weights are mentioned on the edges.
• Weights could be distances or costs or delays.