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

Network Layer

The document discusses the network layer in computer networking. It covers several topics: - The duties of the network layer include host-to-host delivery, addressing, and routing. - Chapters 19-21 cover host-to-host delivery, network layer protocols, and unicast/multicast routing protocols. - IP addressing uses 32-bit addresses written in dotted-decimal notation. Address classes include A, B, C, and subnetting is used to divide networks into subnetworks for efficient routing. - Network addressing and routing involve applying subnet masks to destination addresses to determine the specific network, subnetwork, or host to route packets to. Default routes are used if no specific match is found

Uploaded by

mrphanhieuqt
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Network Layer

The document discusses the network layer in computer networking. It covers several topics: - The duties of the network layer include host-to-host delivery, addressing, and routing. - Chapters 19-21 cover host-to-host delivery, network layer protocols, and unicast/multicast routing protocols. - IP addressing uses 32-bit addresses written in dotted-decimal notation. Address classes include A, B, C, and subnetting is used to divide networks into subnetworks for efficient routing. - Network addressing and routing involve applying subnet masks to destination addresses to determine the specific network, subnetwork, or host to route packets to. Default routes are used if no specific match is found

Uploaded by

mrphanhieuqt
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

PART IV

Network Layer

Position of network layer

1
Network layer duties

Chapters

Chapter 19 Host-to-Host Delivery


Chapter 20 Network Layer Protocols
Chapter 21 Unicast and Multicast Routing Protocols

2
Chapter 19

Host-to-Host
Delivery:
Internetworking,
Addressing,
and Routing

19.1 Internetworks

Need For Network Layer

Internet As A Packet-Switched Network

Internet As A Connectionless Network

3
Figure 19.1 Internetwork

Figure 19.2 Links in an internetwork

4
Figure 19.3 Network layer in an internetwork

Figure 19.4 Network layer at the source

5
Figure 19.5 Network layer at a router

Figure 19.6 Network layer at the destination

6
Figure 19.7 Switching

Figure 19.8 Datagram approach

7
Note:

Switching at the network layer in the


Internet is done using the datagram
approach to packet switching.

Note:

Communication at the network layer


in the Internet is connectionless.

8
19.2 Addressing
Internet Address
Classful Addressing
Subnetting
Supernetting
Classless Addressing
Dynamic Address Configuration
Network Address Translation

Note:

An IP address is a 32-bit address.

9
Note:

The IP addresses are unique


and universal.

Figure 19.9 Dotted-decimal notation

10
Note:

The binary, decimal, and hexadecimal


number systems are reviewed in
Appendix B.

Example 1
Change the following IP addresses from binary notation to dotted-
decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11111001 10011011 11111011 00001111

11
Example 2
Change the following IP addresses from dotted-decimal notation to
binary notation.
a. 111.56.45.78
b. 75.45.34.78

Note:

In classful addressing, the address


space is divided into five classes: A, B,
C, D, and E.

12
Figure 19.10 Finding the class in binary notation

Figure 19.11 Finding the address class

13
Example 3
Find the class of each address:
a. 00000001 00001011 00001011 11101111
b. 11110011
1111 10011011 11111011 00001111

Figure 19.12 Finding the class in decimal notation

14
Example 4
Find the class of each address:
a. 227.12.14.87
b. 252.5.15.111
c. 134.11.78.56

Figure 19.13 Netid and hostid

15
Figure 19.14 Blocks in class A

Note:

Millions of class A addresses are


wasted.

16
Figure 19.15 Blocks in class B

Note:

Many class B addresses are wasted.

17
Note:

The number of addresses in class C is


smaller than the needs of most
organizations.

Figure 19.16 Blocks in class C

18
Figure 19.17 Network address

Note:

In classful addressing, the network


address is the one that is assigned to
the organization.

19
Example 5
Given the address 23.56.7.91, find the network address.

Example 6
Given the address 132.6.17.85, find the network address.

20
Example 7
Given the network address 17.0.0.0, find the class.

Note:

A network address is different from a


netid. A network address has both
netid and hostid,
with 0s for the hostid.

21
Figure 19.18 Sample internet

Note:

IP addresses are designed with two


levels of hierarchy.

22
Figure 19.19 A network with two levels of hierarchy

Figure 19.20 A network with three levels of hierarchy (subnetted)

23
Figure 19.21 Addresses in a network with and without subnetting

Figure 19.22 Hierarchy concept in a telephone number

24
Table 19.1 Default masks
In Dotted-
Class In Binary Using Slash
Decimal

A 11111111 00000000 00000000 00000000 255.0.0.0 /8

B 11111111 11111111 00000000 00000000 255.255.0.0 /16

C 11111111 111111111 11111111 00000000 255.255.255.0 /24

Note:

The network address can be found


by applying the default mask to any
address in the block (including itself).
It retains the netid of the block and
sets the hostid to 0s.

25
Example 8
A router outside the organization receives a packet with destination
address 190.240.7.91. Show how it finds the network address to
route the packet.

Figure 19.23 Subnet mask

26
Example 9
A router inside the organization receives the same packet with
destination address 190.240.33.91. Show how it finds the
subnetwork address to route the packet.

Figure 19.24 DHCP transition diagram

27
Table 19.2 Default masks

Range Total

10.0.0.0 to 10.255.255.255 224

172.16.0.0 to 172.31.255.255 220

192.168.0.0 to 192.168.255.255 216

Figure 19.25 NAT

28
Figure 19.26 Address translation

Figure 19.27 Translation

29
Table 19.3 Five-
Five-column translation table
Private Private External External Transport
Address Port Address Port Protocol

172.18.3.1 1400 25.8.3.2 80 TCP

172.18.3.2 1401 25.8.3.2 80 TCP

... ... ... ... ...

19.3 Routing

Routing Techniques

Static Versus Dynamic Routing

Routing Table for Classful Addressing

Routing Table for Classless Addressing

30
Figure 19.28 Next-hop routing

Figure 19.29 Network-specific routing

31
Figure 19.30 Host-specific routing

Figure 19.31 Default routing

32
Figure 19.32 Classful addressing routing table

Example 10
Using the table in Figure 19.32, the router receives a packet for
destination 192.16.7.1. For each row, the mask is applied to the
destination address until a match with the destination address is
found. In this example, the router sends the packet through
interface m0 (host specific).

33
Example 11
Using the table in Figure 19.32, the router receives a packet for
destination 193.14.5.22. For each row, the mask is applied to the
destination address until a match with the next-hop address is
found. In this example, the router sends the packet through
interface m2 (network specific).

Example 12
Using the table in Figure 19.32, the router receives a packet for
destination 200.34.12.34. For each row, the mask is applied to the
destination address, but no match is found. In this example, the
router sends the packet through the default interface m0.

34

You might also like