diff --git a/00. Jeremy's IT LAB CCNA course.md b/00. Jeremy's IT LAB CCNA course.md index ac42e22..805afc6 100644 --- a/00. Jeremy's IT LAB CCNA course.md +++ b/00. Jeremy's IT LAB CCNA course.md @@ -23,3 +23,4 @@ tags: [[Static Routing]] [[The Life of a Packet]] [[Subnetting (Part 1)]] +[[Subnetting (Part 2)]] diff --git a/14. Subnetting (Part 2).md b/14. Subnetting (Part 2).md new file mode 100644 index 0000000..780be8a --- /dev/null +++ b/14. Subnetting (Part 2).md @@ -0,0 +1,201 @@ +--- +id: 1777871422-VTLQ +aliases: + - Subnetting (Part 2) +tags: [] +--- + +# Subnetting (Part 2) + +## Question + +45 hosts -> SW1->+--+<-SW3<-45 hosts + |R1| +45 hosts -> SW2->+--+<-SW4<-45 hosts + +Divide the 192.168.1.0/24 network into four subnets that can accommodate +the number of hosts required. + +The first subnet (Subnet 1) is 192.168.1.0/26 What are the remaining subnet + +Hint: Find the broadcast address of Subnet 1. The next address is the network address of +Subnet 2. Repeat the process for Subnets 3 and 4 + +### Subnet 1 + +Subnet 1: 192.168.1.0/26 +11000000.10101000.00000001.00**000000** + 192 . 168 . 1 . 0 +broadcast address: +11000000.10101000.00000001.00**111111** + 192 . 168 . 1 . 63 + +192.168.1.0 to 192.168.1.63 + +### Subnet 2 + +Subnet 2: 192.168.1.64/26 +11000000.10101000.00000001.01**000000** + 192 . 168 . 1 . 64 +11000000.10101000.00000001.01**111111** + 192 . 168 . 1 . 127 + +192.168.1.63 to 192.168.1.127 + +### Subnet 3 + +Subnet 3: 192.168.1.128/26 +11000000.10101000.00000001.10**000000** + 192 . 168 . 1 . 128 +11000000.10101000.00000001.10**111111** + 192 . 168 . 1 . 191 + +192.168.1.128 to 192.168.1.191 + +### Subnet 4 + +Subnet 4: 192.168.1.192/26 +11000000.10101000.00000001.11**000000** + 192 . 168 . 1 . 192 +11000000.10101000.00000001.11**111111** + 192 . 168 . 1 . 255 + +192.168.1.192 to 192.168.1.255 + +### Trick + +By adding 64 the last bit of the network portion you can find the network address + +## Subnetting + +11000000.10101000.00000001.0**0000000** +192.168.255.0 + +11000000.10101000.11111111.1**0000000** +192.168.255.0 +Borrowing 1 bit = can make 2 subnets + +### Formulas + +2^x = number of subnets +(x=number of 'borrowed' bits) + +2^n-2 = number of hosts +(x=number of hosts bits) + +## Identify the subnet + +What subnet does host 192.168.5.57/27 belong to? + +11000000.10101000.00000101.00111001 +192.168.5.57 + +The borrowed bits are +11000000.10101000.00000101.**001**11001 + +to find the network address we need to change the host bits by zero + +11000000.10101000.00000101.**001**00000 +192.168.5.32 + +What subnet does host 192.168.29.219/29 belong to? + +11000000.10101000.00011101.**11011**011 +192.168.29.219 + +to find the network address we need to change the host bits by zero +11000000.10101000.00011101.**11011**000 +192.168.29.216 + +## Subnets / hosts (class C) + + +| Prefix Length | Number of subnets | Number of Hosts | +| ------------- | ----------------- | --------------- | +| /25 | 2 | 126 | +| /26 | 4 | 62 | +| /27 | 8 | 30 | +| /28 | 16 | 14 | +| /29 | 32 | 6 | +| /30 | 64 | 2 | +| /31 | 128 | 0 (2) | +| /32 | 156 | 0 (1) | + + +## Subenetting Class B + +The process of subnetting Class A, Class B and Class C networks is : +Exactly the same ! + +### Example 1 + +You have been given the 172.16.0.0/16 network. You are asked to create 80 +subnets for your company's various LANs, What prefix length should you use ? + +172.16.0.0/16 + +10101100.00010000.00000000.00000000 + 172 . 16 . 0 . 0 + +We have to borrow 7 bits = 128 subnets + +10101100.00010000.**0000000**0.00000000 + 172 . 16 . 0 . 0 + +### Example 2 + +You have been given the 172.22.0.0/16 network. You are asked to create 500 +subnets for your company's various LANs, What prefix length should you use ? + +172.22.0.0/16 + +10101100.00010000.00000000.00000000 + 172 . 22 . 0 . 0 + +We have to borrow 9 bits = 512 subnets = /25 + +10101100.00010000.**00000000.0**0000000 + 172 . 22 . 0 . 0 + +### Example 3 + +You have given the 172.18.0.0/16 network. Your company requires 250 subnets with the +same number of hosts per subnet. What prefix length should you use + +172.18.0.0 + +10101100.00010000.00000000.00000000 + 172 . 18 . 0 . 0 + +We have to borrow 8 bits = 256 subnets = /24 + +10101100.00010000.**00000000**.00000000 + 172 . 18 . 0 . 0 + +## Subnets / hosts (class B) + + +| Prefix Length | Number of subnets | Number of Hosts | +| ------------- | ----------------- | --------------- | +| /17 | 2 | 32766 | +| /18 | 4 | 16382 | +| /19 | 8 | 8190 | +| /20 | 16 | 4094 | +| /21 | 32 | 2044 | +| /22 | 64 | 1022 | +| /23 | 128 | 510 | +| /24 | 256 | 254 | +| /25 | 2 | 126 | +| /26 | 4 | 62 | +| /27 | 8 | 30 | +| /28 | 16 | 14 | +| /29 | 32 | 6 | +| /30 | 64 | 2 | +| /31 | 128 | 0 (2) | +| /32 | 156 | 0 (1) | + + +## Review + +- Subnetting practice questions (class C networks) +- Subnetting Class B networks