Download presentation
Presentation is loading. Please wait.
Published byVeronika Gunawan Modified over 5 years ago
1
Subnets in TCP/IP Networks © N. Ganesan, Ph.D.
Chapter Subnets in TCP/IP Networks © N. Ganesan, Ph.D.
2
© N. Ganesan, All rights reserved.
Chapter Objectives © N. Ganesan, All rights reserved.
3
Introduction to Subnetting
Module Introduction to Subnetting
4
© N. Ganesan, All rights reserved.
Subnetting Division of a network into subnets For example, division of a Class B address into several Class C addresses Some of the host IDs are used for creating subnet IDs © N. Ganesan, All rights reserved.
5
© N. Ganesan, All rights reserved.
Need for Subnetting Classes A and B have a large number of hosts corresponding to each network ID It may be desirable to subdivide the hosts in Class C subnets Often, there is a limitation on the number of hosts that could be hosted on a single network segment The limitation may be imposed by concerns related to the management of hardware Smaller broadcast domains are more efficient and easy to manage © N. Ganesan, All rights reserved.
6
© N. Ganesan, All rights reserved.
Subnetting Principle Use parts of the host IDs for subnetting purpose A subnet mask is used to facilitate the flow of traffic between the different subnets and the outside network (hops) A hop is the distance a data packet travels form one node to the other © N. Ganesan, All rights reserved.
7
Using Host IDs to Subnet
140 15 1 Subnet 1 Class B Network 140 15 2 140 15 Subnet 2 140 15 3 Subnet 3 Third octet is now used for subnet IDs © N. Ganesan, All rights reserved.
8
© N. Ganesan, All rights reserved.
Subnet Configuration Subnet ID 140 15 1 ….. 140 15 1 1 140 15 1 254 First Host ID Last Host ID © N. Ganesan, All rights reserved.
9
© N. Ganesan, All rights reserved.
Routing of Traffic 1 Routing 2 Outside world 3 Subnets © N. Ganesan, All rights reserved.
10
© N. Ganesan, All rights reserved.
End of Module © N. Ganesan, All rights reserved.
11
Module Subnetting Example
12
© N. Ganesan, All rights reserved.
Subnetting Example Consider the case of a class C address assigned to an organization Subnets can be constructed by allocating part of the higher-order bits of the host ID Assume that three of the higher-order bits of the host ID are to be reserved for that purpose © N. Ganesan, All rights reserved.
13
© N. Ganesan, All rights reserved.
Subnetting Structure 195 175 25 Subnet Mask © N. Ganesan, All rights reserved.
14
© N. Ganesan, All rights reserved.
Sub Net Last Octet Subnet ID 1 2 3 4 5 6 7 8 Usable Subnets (6) © N. Ganesan, All rights reserved.
15
Sample Subnet Division
Router . . 30 hosts per subnet. © N. Ganesan, All rights reserved.
16
Total Number of Subnets and Hosts
All zeros and ones are not used This has been overcome in the new RFC Total number of subnets is 6 Number of hosts per subnet is 30 Subnet mask is © N. Ganesan, All rights reserved.
17
© N. Ganesan, All rights reserved.
End of Module © N. Ganesan, All rights reserved.
18
Module The Routing Process
19
Overview of the Masking Process
IP address and subnet masks are used for the masking operation The purpose of masking is to identify whether an IP address corresponds to a local host or a remote host The mathematical technique used is known as the ANDing process © N. Ganesan, All rights reserved.
20
© N. Ganesan, All rights reserved.
ANDing Process Similar to the AND Boolean operator Consider A = B and C A is true only when B and C are true Otherwise, A is false for all other scenarios © N. Ganesan, All rights reserved.
21
© N. Ganesan, All rights reserved.
ANDing Table B C B AND C 1 © N. Ganesan, All rights reserved.
22
© N. Ganesan, All rights reserved.
Subnet Masking AND host IP and subnet mask value at startup to identify network ID AND destination IP address and subnet mask value determine either of the following: IP represents local host IP represents remote host © N. Ganesan, All rights reserved.
23
Subnet Masking Example
Subnet ID: Subnet Mask: Host address Case 1 destination address Case 2 destination address © N. Ganesan, All rights reserved.
24
© N. Ganesan, All rights reserved.
Network Scenario Outside World Local Host Router Subnet Mask: Host © N. Ganesan, All rights reserved.
25
Computing Subnet ID at Startup
Host ID 195 175 25 34 Subnet Mask 255 224 ANDing Result 32 Yields subnet ID. © N. Ganesan, All rights reserved.
26
© N. Ganesan, All rights reserved.
TCP/IP Properties of the Host © N. Ganesan, All rights reserved.
27
Masking of Destination Address:Case 1
Destinati-nation IP 195 175 25 40 Subnet Mask 255 224 ANDing Result 32 Yields subnet ID to be that of the local subnet. © N. Ganesan, All rights reserved.
28
Case 1 Forwarding of Data Packets
The destination host is local Broadcast for the hardware address of the local host at IP Send information to the local host © N. Ganesan, All rights reserved.
29
Masking of Destination Address:Case 2
Destinati-nation IP 195 175 25 67 Subnet Mask 255 224 ANDing Result 64 Yields subnet ID to be that of different subnet. © N. Ganesan, All rights reserved.
30
Case 2 Forwarding of Data Packets
The destination host is remote Send information to the gateway The router at the gateway will route the data packet to the appropriate subnet © N. Ganesan, All rights reserved.
31
© N. Ganesan, All rights reserved.
Gateway IP address specified In TCP/IP properties. © N. Ganesan, All rights reserved.
32
Summary of Transmission and Routing of Data Packets
Subnet at Local Host Router Subnet Mask: Host (Case 1) (Case 2) © N. Ganesan, All rights reserved.
33
Valid Subnet Masks for Class C Addresses
Subnets Hosts Host Total 2 62 124 6 30 180 14 196 © N. Ganesan, All rights reserved.
34
© N. Ganesan, All rights reserved.
End of Module © N. Ganesan, All rights reserved.
35
Subnetting Convention
Module Subnetting Convention
36
© N. Ganesan, All rights reserved.
Subnet Convention Consider the following Class C example /27 In the above case, the first three octets and the first three higher-order bits of the fourth octet are used in subnet masking 3*8+3 = 27 bits from the beginning of the 32 bit IP address © N. Ganesan, All rights reserved.
37
Subnet Convention Illustrated
8 Bits 8 Bits 8 Bits 3 Bits Total number of masking bits = 27 /27 Network ID © N. Ganesan, All rights reserved.
38
Variable Length Subnets
/16 Subnet /17 /17 /17 1 Network, 32,766 hosts Subnet /21 /21 15 Networks, 2046 hosts per network /24 /21 8 Networks, 254 hosts per network Source: Microsoft White Paper © N. Ganesan, All rights reserved.
39
© N. Ganesan, All rights reserved.
End of Module © N. Ganesan, All rights reserved.
40
Classless Inter-Domain Routing (CIDR)
Module Classless Inter-Domain Routing (CIDR)
41
Classless Inter-Domain Routing (CIDR)
To avoid the depletion of the class B addresses, it is subnetted and assigned as class C addresses To avoid the proliferation of network IDs that would complicate entries in the routing tables, they were folded for easing the routing process The above is known as CIDR © N. Ganesan, All rights reserved.
42
Subnetting of Class B Example
Consider the requirement of 2000 hosts by a company Allocation of one class B network ID would yield 65,534 hosts Far more than required The solution is to subnet a B class address 8 C class network IDs with each network being able to support 254 hosts The total number of hosts supported is 2,032 © N. Ganesan, All rights reserved.
43
© N. Ganesan, All rights reserved.
CIDR CIDR enables the folding of network IDs The Internet router tables will need one entry for network ID with the use of a subnet mask for supernetting Otherwise, the table need to carry 8 entries in the previous example RIP for IP version 2, OSPF and BGPv2 are protocols that support CIDR © N. Ganesan, All rights reserved.
44
© N. Ganesan, All rights reserved.
Classless Addressing Fixed Zeros Network ID Fixed Variable Fixed + Variables Host IDs © N. Ganesan, All rights reserved.
45
© N. Ganesan, All rights reserved.
End of Module © N. Ganesan, All rights reserved.
46
Module Supernetting
47
Supernetting and CIDR . Internet Router Entry 8 Network IDs Network ID
Subnet Mask (For supernetting) . Network ID Source: Microsoft White Paper on TCP/IP © N. Ganesan, All rights reserved.
48
End of Module End of Chapter
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.