Unit-3 Network Layer
Unit-3 Network Layer
— Unit - 3 —
— Network Layer —
Text Book
Behrouz .A. Forouzan, “Data communication and
Networking”, Tata McGrawHill, 2004
SECURITY
– CONNECTIONLESS VIRTUALLY
CHANGE TO CONNECTION ORIENTED.
– THIS VIRTUAL LAYER IS IPSec.
• Delay
– Transmission Delay
• Delaytr = (Packet length) / (Transmission rate)
– Propagation Delay
• depends on the propagation delay of each network
(LAN or WAN). The propagation delay depends on
the propagation speed of the media, which is 3 × 108
meters/second in a vacuum and much less in a
wired medium.
• Delaypg = (Distance) / (Propagation speed).
11/21/24 Unit-3 : Network Layer 34
in a Fast Ethernet LAN (see Chapter 5) with the transmission rate of
100 million bits per second and a packet of 10,000 bits, it takes
(10,000)/(100,000,000) or 100 microseconds for all bits of the packet
to be put on the line
Notation
Solution
We replace each group of 8 bits with its equivalent decimal
number and add dots for separation:
a. 129.11.11.239
b. 249.155.251.15
Solution
We replace each decimal number with its binary equivalent
(see Appendix B):
Solution
See the procedure in Figure 19.11.
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 252 (between 240 and 255); the class is E.
c. The first byte is 134 (between 128 and 191); the class is B.
Solution
The class is A. Only the first byte defines the netid. We can find the
network address by replacing the hostid bytes (56.7.91) with 0s. Therefore,
the network address is 23.0.0.0.
Solution
Solution
The class is A because the netid is only 1 byte.
First Address:
10100111 11000111 10101010
01010010
AND
11111111 11111111 11111111
11100000
10100111 11000111 10101010
01000000
first address:167.199.170.64
82 -> 90
167.199.170.90 /27 (even when other address
from the block is considered, we still get the
same first address.)
10100111 11000111 10101010 01011010
11111111 11111111 11111111 11100000
10100111 11000111 10101010 01000000
167.199.170.64
• The first mask (/26) is applied to the destination address. The result is
180.70.65.128, which does not match the corresponding network
address.
• The second mask (/25) is applied to the destination address. The result
is 180.70.65.128, which matches the corresponding network address.
The next-hop address and the interface number m0 are extracted for
forwarding the packet
• 180.70.65.140
• Apply the first row’s mask that is 26.
– 10110100 01000110 01000001 10000000
– The network address does not match the first row’s network
address.
– Not sent to interface m2
• 180.70.65.140 / 25
– 10110100 01000110 01000001 10000000
– The network address of 2nd row matches the
destination’s network address.
– Sent to interface m0.
Solution
The router follows three steps:
1. The router looks at the first byte of the address to find the
class. It is class B.
2. The default mask for class B is 255.255.0.0. The router ANDs
this mask with the address to get 190.240.0.0.
3. The router looks in its routing table to find out how to route the
packet to this destination. Later, we will see what happens if
this destination does notUnit-3
11/21/24 exist.: Network Layer 140
Figure 19.23 Subnet mask
Solution
The router follows three steps:
1. The router must know the mask. We assume it is /19, as shown in
Figure 19.23.
2. The router applies the mask to the address, 190.240.33.91. The subnet
address is 190.240.32.0.
3. The router looks in its routing table to find how to route the packet to
this destination. Later, we will see what happens if this destination does
not exist.
Range Total