The document discusses subnetting and network addressing. It begins by providing an example of finding the major network information, subnet information, and host range given an IP address, network mask, and subnet mask. It then shows how to determine the subnet address, number of subnets, hosts per subnet, and allocation of IP addresses across multiple customer groups. Key steps include converting addresses to binary, performing bitwise AND operations, and determining the subnet and host bits.
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
Subnet Lec 9
1. Lec 9
Subnet
Computer Networks
Al-Mustansiryah University
Elec. Eng. Department College of Engineering
Fourth Year Class
3.1
2. The first address in a block is
normally not assigned to any device;
it is used as the network address that
represents the organization
to the rest of the world.
Note
3.2
3. Host IP Address: 138.101.114.250
Network Mask: 255.255.0.0
Subnet Mask: 255.255.255.192
Given the following Host IP Address, Network Mask and Subnet mask find the
following information:
Major Network Information
Major Network Address
Major Network Broadcast Address
Range of Hosts if not subnetted
Subnet Information
Subnet Address
Range of Host Addresses (first host and last host)
Broadcast Address
Other Subnet Information
Total number of subnets
Number of hosts per subnet
Subnetting – Example
3.3
4. Major Network Information
Host IP Address: 138.101.114.250
Network Mask: 255.255.0.0
Subnet Mask: 255.255.255.192
Major Network Address: 138.101.0.0
Major Network Broadcast Address: 138.101.255.255
Range of Hosts if not Subnetted: 138.101.0.1 to
138.101.255.254
3.4
5. Step 1:
Translate Host IP Address and Subnet Mask into binary notation
138. 101. 114. 250
IP Address 10001010 01100101 01110010 11111010
Mask 11111111 11111111 11111111 11000000
255. 255. 255. 192
Step 1: Convert to Binary
128 64 32 16 8 4 2 1
3.5
6. Step 2:
Determine the Network (or Subnet) where this Host address
lives:
1. Draw a line under the mask
2. Perform a bit-wise AND operation on the IP Address and the Subnet
Mask
Note: 1 AND 1 results in a 1, 0 AND anything results in a 0
3. Express the result in Dotted Decimal Notation
4. The result is the Subnet Address of this Subnet or “Wire” which is
138.101.114.192
138. 101. 114. 250
IP Address 10001010 01100101 01110010 11111010
Mask 11111111 11111111 11111111 11000000
Network 10001010 01100101 01110010 11000000
138 101 114 192
Step 2: Find the Subnet Address
3.6
7. Step 3:
Determine which bits in the address contain Network (subnet)
information and which contain Host information:
Use the Network Mask: 255.255.0.0 and divide (Great Divide) the
from the rest of the address.
Use Subnet Mask: 255.255.255.192 and divide (Small Divide) the
subnet from the hosts between the last “1” and the first “0” in the
subnet mask.
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
subnet host
counting range counting
range
Step 3: Subnet Range / Host Range
3.7
8. Host Portion
Subnet Address: all 0’s
First Host: all 0’s and a 1
Last Host: all 1’s and a 0
Broadcast: all 1’s
G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
subnet host
counting range counting
range
First Host 10001010 01100101 01110010 11 000001
138 101 114 193
Last Host 10001010 01100101 01110010 11 111110
138 101 114 254
Broadcast 10001010 01100101 01110010 11 111111
138 101 114 255
Step 4: First Host / Last Host
3.8
9. G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
subnet host
counting range counting
range
First Host 10001010 01100101 01110010 11 000001
138 101 114 193
Last Host 10001010 01100101 01110010 11 111110
138 101 114 254
Broadcast 10001010 01100101 01110010 11 111111
138 101 114 255
Total number of subnets
Number of subnet bits 10
210 = 1,024
1,024 total subnets
Subtract one “if” all-zeros subnet cannot be used
Subtract one “if” all-ones subnet cannot be used
1,022 total subnets
Step 5: Total Number of Subnets
3.9
10. G.D. S.D.
IP Address 10001010 01100101 01110010 11 111010
Mask 11111111 11111111 11111111 11 000000
Network 10001010 01100101 01110010 11 000000
subnet host
counting range counting
range
First Host 10001010 01100101 01110010 11 000001
138 101 114 193
Last Host 10001010 01100101 01110010 11 111110
138 101 114 254
Broadcast 10001010 01100101 01110010 11 111111
138 101 114 255
Total number of hosts per subnet
Number of host bits 6
26 = 64
64 host per subnets
Subtract one for the subnet address
Subtract one for the broadcast address
62 hosts per subnet
Step 6: Total Number of Hosts per
Subnet
3.10
11. An ISP is granted a block of addresses starting with
190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers as
follows:
a. The first group has 64 customers; each needs 256
addresses.
b. The second group has 128 customers; each needs 128
addresses.
c. The third group has 128 customers; each needs 64
addresses.
Design the subblocks and find out how many addresses are
still available after these allocations.
Example 3.10
3.11
12. Solution
Figure 3.9 shows the situation.
Example 3.10 (continued)
Group 1
For this group, each customer needs 256 addresses. This
means that 8 (log2 256) bits are needed to define each host.
The prefix length is then 32 − 8 = 24. The addresses are
3.12
13. Example 3.10 (continued)
Group 2
For this group, each customer needs 128 addresses. This
means that 7 (log2 128) bits are needed to define each host.
The prefix length is then 32 − 7 = 25. The addresses are
3.13
14. Example 3.10 (continued)
Group 3
For this group, each customer needs 64 addresses. This
means that 6 (log264) bits are needed to each host. The
prefix length is then 32 − 6 = 26. The addresses are
Number of granted addresses to the ISP: 65,536
Number of allocated addresses by the ISP: 40,960
Number of available addresses: 24,576
3.14
15. Figure 3.9 An example of address allocation and distribution by an ISP
3.15
17. Example 3.11 :A company is granted the site address 211.80.64.0 .The company
needs six subnets. Design the subnets?
Solution:
No. of subnet must be power of 2 therefore we design 8 subnets
No.of subnet bits=Log2(8)=3 bits
Ip address 211.80.64.0 is class c
Net Sub Host
24 Bit 3 Bit 8 Bit
3.17
Purpose: This figure explains how broadcast addresses work.
Emphasize: A range of addresses is needed to allocate address space. A valid range of addresses is between subnet zero and the directed broadcast.
The following RFCs provide more information about broadcasts:
RFC 919, Broadcasting Internet Datagrams
RFC 922, Broadcasting IP Datagrams in the Presence of Subnets
Cisco’s support for broadcasts generally complies with these two RFCs. It does not support multisubnet broadcasts that are defined in RFC 922.