CS4470 Computer Networking Protocols 7/23/2018 CS4470 Computer Networking Protocols 10. Subnetting Huiping Guo Department of Computer Science California State University, Los Angeles
7/23/2018 Subnetting Subnetting is the division of a single network into smaller subnets. Each subnet functions as if it were an independent network As far as entries in the routing table are concerned All subnets of a given network number use the same network-prefix but different subnet numbers. 10. Subnetting CS4470_F17
Why are subnets created? Provides greater organization of large networks. Remember: a Class A network can have up to 16 million hosts. It allows you to have additional networks without applying for more IP addresses. Decreases broadcast traffic by reducing broadcast domain size. Broadcasts are not forwarded out of a subnet. 10. Subnetting CS4470_F17
How to subnet a network? Borrow bits from the host field of an IP address. All the subnets have the same network prefix Subnets are only visible to routers inside the network Netid subnetid hostid 16 24 31 10. Subnetting CS4470_F17
Subnet a network: steps Determine the number of subnets How many bits to be borrowed? For each subnet, determine The network address subnet bits cannot be all on or off at the same time The host address range The broadcast address Determine the number of required host per subnet: One for each host One for each router interface 10. Subnetting CS4470_F17
Subnetting example 1: You are assigned a network address 214.97.254/23. You want to create 2 subnets. What are the network addresses and broadcast addresses of the 2 subnets? What are the address range in the 2 subnets? 10. Subnetting CS4470_F17
Subnetting example 1: 11010110 01100001 11111110 0 000 0000 Subnet 1: 23 Subnet bits 11010110 01100001 11111110 0 000 0000 Subnet 1: Network address: 11010110 01100001 11111110 1000 0000/25 Broadcast address: 11010110 01100001 11111110 1111 1111/25 Address range: 11010110 01100001 11111110 1000 0001/25 11010110 01100001 11111110 1111 1110/25 126 IP addresses 10. Subnetting CS4470_F17
Subnetting example 1: Subnet 2: Network address: 11010110 01100001 11111111 0000 0000/25 Broadcast address: 11010110 01100001 11111111 0111 1111/25 Address range: 11010110 01100001 11111111 0000 0001/25 11010110 01100001 11111111 0111 1110/25 126 IP addresses 10. Subnetting CS4470_F17
Subnetting example 2: You are assigned a network address 214.97.254/23. If you assign 3 bits to the subnets. How many subnets can be created What are the network addresses and broadcast addresses of the subnets? What are the address range of the subnets? 10. Subnetting CS4470_F17
Subnetting example 2: 23 Subnet bits 11010110 01100001 11111110 0000 0000 The number of subnets: 23-2=6 Subnet 1: Network address: 11010110 01100001 11111110 0100 0000/26 Broadcast address: 11010110 01100001 11111110 0111 1111/26 Address range: 11010110 01100001 11111110 0100 0001/26 11010110 01100001 11111110 0111 1110/26 26-2=62 IP addresses 10. Subnetting CS4470_F17
Subnetting example 2: Subnet 2: Network address: 11010110 01100001 11111110 1000 0000/26 Broadcast address: 11010110 01100001 11111110 1011 1111 Address range: 11010110 01100001 11111110 1000 0001 11010110 01100001 11111110 1011 1110 26-2=62 IP addresses 10. Subnetting CS4470_F17
Subnetting example 2: Subnet 3: Network address: 11010110 01100001 11111110 1100 0000/26 Broadcast address: 11010110 01100001 11111110 1111 1111 Address range: 11010110 01100001 11111110 1100 0001 11010110 01100001 11111110 1111 1110 26-2=62 IP addresses 10. Subnetting CS4470_F17
Subnetting example 2: Subnet 4: Network address: 11010110 01100001 11111111 0000 0000/26 Broadcast address: 11010110 01100001 11111111 0011 1111 Address range: 11010110 01100001 11111111 0000 0001 11010110 01100001 11111111 0011 1110 26-2=62 IP addresses 10. Subnetting CS4470_F17
Subnetting example 2: Subnet 5: Network address: 11010110 01100001 11111111 0100 0000/26 Broadcast address: 11010110 01100001 11111111 0111 1111 Address range: 11010110 01100001 11111111 0100 0001 11010110 01100001 11111111 0111 1110 26-2=62 IP addresses 10. Subnetting CS4470_F17
Subnetting example 2: Subnet 6: Network address: 11010110 01100001 11111111 1000 0000/26 Broadcast address: 11010110 01100001 11111111 1011 1111 Address range: 11010110 01100001 11111111 1000 0001 11010110 01100001 11111111 1011 1110 26-2=62 IP addresses 10. Subnetting CS4470_F17
Subnetting example 3 A large number of consecutive IP address are available starting at 123.132.0.0/16. Suppose that six organizations, A,B,C, D and E, F, request 2000, 2000, 4000, 4000, 8000 and 8000 addresses, respectively, and in that order. For each of organizations, give the network address, broadcast address, the first IP address assigned and the last IP address assigned in the w.x.y.z/s notation. 10. Subnetting CS4470_F17
Subnetting example 3 A needs 11 bits for host id, which have 2048 IP addresses available. Network A 01111011 10000100 00001000 00000000 Network Address: 123.132.8.0/21 Broadcast Address: 123.132.15.255/21 2046 IP Addresses: 123.132.8.1/21 – 123.132.15.254/21 B needs 11 bits for host id, which have 2048 IP addresses available. Network B 01111011 10000100 00010000 00000000 Network Address: 123.132.16.0.21 Broadcast Address: 123.132.23.255/21 2046 IP Addresses: 123.132.16.1/21 – 123.132.23.254/21 10. Subnetting CS4470_F17
Subnetting example 3 C needs 12 bits for host id, which have 4096 IP addresses available. Network C 01111011 10000100 00100000 00000000 Network Address: 123.132.32.0/20 Broadcast Address: 123.132.47.255/20 4094 IP Addresses: 123.132.32.1/20 – 123.132.47.254/20 D needs 12 bits for host id, which have 4096 IP addresses available. Network D 01111011 10000100 00110000 00000000 Network Address: 123.132.48.0/20 Broadcast Address: 123.132.63.255/20 4094 IP Addresses: 123.132.48.1/20 – 123.132.63.254/20 10. Subnetting CS4470_F17
Subnetting example 3 E needs 13 bits for host id, which have 8192 IP addresses available. Network E 01111011 10000100 01000000 00000000 Network Address: 123.132.64.0/19 Broadcast Address: 123.132.95.255/19 8190 IP Addresses: 123.132.64.1/19 – 123.132.95.254/19 F needs 13 bits for host id, which have 8192 IP addresses available. Network F 01111011 10000100 01100000 00000000 Network Address: 123.132.96.0/19 Broadcast Address: 123.132.127.255/19 8190 IP Addresses: 123.132.96.1/19 – 123.132.127.254/19 10. Subnetting CS4470_F17