Section 8: Subnetting

  ICND1 CCENT

< Section 7 | Home | Section 9 >

18% Complete

38: Introduction

https://www.udemy.com/course/cisco-icnd1/learn/lecture/8589518#content

39: CIDR Classless Inter-Domain Routing

https://www.udemy.com/cisco-icnd1/learn/lecture/8589528#content

  • A problem with classful addresses was if a company had more than 254 hosts, they would need to be assigned a Class B network
  • They would require far less than the 65.534 hosts allocated, so this wasted a huge amount of the global address space.
  • Classless Inter-Domain Routing (CIDR) was introduced in 1993 to alleviate this problem.
  • CIDR removed the fixed /8, /16 and /24 requirements for the address classes and allowed them to be split or ‘subnetted’ into smaller networks.
    • For example: 175.10.10.0/20
  • Companies can now be allocated an address range which more closely matches their needs and does not waste addresses.

CIDR and Route Summarization

  • Both ISP A and ISP B can advertise their blocks of IPs
    • This allows ISP A to only advertise it’s block of IPs rather than having to advertise each class C block uniquely.
  • ISP A does not know about all 256/24 networks reachable in ISP B
  • It only has the single 175.11.0.0/16 summary route
  • This reduces the size of ISP A’s routing table and takes up less memory
  • If an individual link goes down in ISP B, it has no impact on ISP A.  The single summary route does not change.
    • (Routers in ISP B would need to recalculate their rou8ting table if a link went down.)
  • This restricts issues to the local part of the network and reduces CPU load.

40: Subnetting Overview

https://www.udemy.com/cisco-icnd1/learn/lecture/8589532#content

  • Subnetting allows you to take a standard network and divide it into smaller networks.

Calculate number of Subnets

To calculate the number of available subnets, the formula is 2subnet_bits.

  • If a Class C network uses a /28 subnet mask, then we’ve borrowed 4 bits from the default /24
    • 24 = 16 available subnets
  • if a Class B network uses a /28 subnet mask, then we’ve borrowed 12 bits from the default /16
    • 212 = 4096 available subnets
  • Hosts on different subnets need to go via a router if they want to communicate with each other.

Calculate number of Hosts

To calculate the number of hosts available in a subnet = 2host_bits – 2.

  • 2 IPs are reserved for the network and broadcast, so we need to remove those.
  • If a Class C network uses a /28 subnet mask, then there are 4 bits remaining for the hosts.
    • 24 – 2 = 16 – 2 = 14 addresses available
  • If a Class B network uses a /28, then there are still only 4 bits remaining for the hosts.
    • 24 – 2 = 16 – 2 = 14 addresses available
  • Note that while the number of hosts available for each subnet will be the same if the subnet sizes are the same, the number of subnets will change dramatically as shown above.

ip subnet-zero

  • Just like we have to subtract 2 to get the number of valid hoss, we used to have to subtract 2 to get the number of available networks also.
  • In the original Internet standards, it was not allowed to use network bits of all 0’s or all 1’s (same as for host ips).
  • There wasn’t a practical need for this and it wasted address space.
  • The ip subnet-zero command on a router overrides the limitation and is enabled by default.
  • DO NOT TAKE 2 AWAY FROM SUBNETS FOR THE TEST!

Subnet Between Routers

  • Cisco now allows you to use a /31 (255.255.255.254) subnet to maximize IP space for Routers (Use the network address for one router and the broadcast for the other)
  • DO NOT DO THIS on the exam!  Always use a /30 (255.255.255.252) unless specifically instructed to use a /31

41: Subnetting Class C Networks and VLSM

https://www.udemy.com/course/cisco-icnd1/learn/lecture/8601328#content

/31 255.255.255.254

  • This is the furthest you can go.
  • Borrows 7 bits for the subnet mask (2^7 = 128 subnets)
  • Leave 1 bit for the host (0 or 1)
    • Two hosts total
  • This BREAKS the standard rule because it leaves no room for the Network IP nor the Broadcast IP
    • Cisco allows this for Point to Point links
    • These have no need for these, so is OK

/30 255.255.255.252

  • Same # of hosts (2)
  • Now allows for broadcast and Network IPs
  • Only 64 subnets vs.128 with /31

ICND1 Exam Topic:  Use a /30 for any request that requires 2 hosts unless explicitly told to use a /31

Bit 128 64 32 16 8 4 2 1
Mask .128 .192 .224 .240 .248 .252 .254 .255
CIDR /25 /26 /27 /28 /29 /30 /31 /32
Networks 2 4 8 16 32 64 128
Hosts 126 62 30 14 6 2 2 1

 

Fixed Length Subnet Masking FLSM vs VLSM

  • All subnets had to be the same size
  • RIPv1 only allowed FLSM
  • All modern routing protocols now support VLSM

 

42: Subnet Mask Question

https://www.udemy.com/course/cisco-icnd1/learn/lecture/8601334#content

198.22.45.173/26

  • Network address: .128
  • Broadcast Address: .191
  • Valid Hosts Range: .129 – .190
  • Dotted Decimal Notation: .192

 

43: Variable Length Subnet Masking Part 1

https://www.udemy.com/cisco-icnd1/learn/lecture/8601340#overview

VLSM – Variable Length Subnet Masks

  • Always start with the largest networks and work your way to the smallest.
  • Leave enough room for growth
    • ICND1 Exam Topic: On the exam, do not guess how many extra hosts you might need.  Calculate to the subnet that fits the required number of hosts.

44: Variable Length Subnet Masking Part 2

https://www.udemy.com/course/cisco-icnd1/learn/lecture/8601340#content

(old) https://www.udemy.com/cisco-icnd1/learn/lecture/8601344#overview

 

45: Subnetting Large Networks Part 1

https://www.udemy.com/cisco-icnd1/learn/lecture/8601346?start=675#overview

    • Calculating the number of hosts remains the same: 2host_bits – 2.
    • Calculate the number of networks is based on the IP class.
      • 0.x.x.x – 127.x.x.x = Class A, so 2(total_network_bits – 8).
      • 128.x.x.x – 191.x.x.x = Class B, so 2(total_network_bits – 16).
    • Example: 135.15.0.0/29
      • 3 bits for hosts =  6 hosts
      • 29 – 16 = 13, so 8192 networks

Magic Number Method

  • Subtract the last octet in the subnet mask from 256 to get the network step size. (total IPs)
    • 135.15.10.138/29
    • Subnet mask = 255.255.255.248
    • 256 – 248 = 8
    • Each network will have 8 IPs.  1 for network, 1 for broadcast, 6 for hosts.
  • Find the Network ID by using the integer value of the last octet divided by the magic number, then multiply the result by the magic number
    • 138 / 8 = 17.25
    • 8 x 17 = 136
    • Network ID = 135.15.10.136
  • Find the Broadcast IP by adding the magic number to the network id and subtract 1
    • 136 + 8 – 1 = 143
    • Broadcast IP = 135.15.10.143

46: Subnetting Large Networks Part 2

https://www.udemy.com/cisco-icnd1/learn/lecture/8601352#overview

Complete this subnet task: 60.0.0.0/19

  • 32-19 = 13 host bits
    • 2^13 = 8192 total network hosts
    • 8190 Hosts per network
  • 19 – 8 = 11 Network bits
    • 2^11 = 2048 Networks

Calculate the Network Address, Broadcast Address and Host Range for 60.15.10.75/19

  • Mask = 255.255.224.0
  • Host bits in 3rd Octet = 5
    • 2^5 = 32, so network address will increment by 32 in the 3rd octet
  • Network Address:
    • Since .10. is less than .32,
    • 60.15.0.0
  • Broadcast IP
    • Add 32 to the Network Address and subtract 1
    • 60.15.31.255
  • Valid host addresses:60.15.0.1 – 60.15.31.254

47: Subnetting on the 4th Octet

Examples: Subnetting-on-the-4th-Octet-Written-Example

 

48: Subnetting on the 3rd Octet

Examples: Subnetting-on-the-3rd-Octet-Written-Example

 

49:Private IP Addresses

YOU ARE HERE

https://www.udemy.com/cisco-icnd1/learn/lecture/8601354#overview

These are also commonly referred to RFC 1918 addresses

  • RFC = Request for Comment

Exam Topic!

  • Class A
    • 0000 1010 . 0.0.0 – 0000 1010 . x.x.x
    • 10.0.0.0 – 10.255.255.255
    • 10.0.0.0/8
    • 10.0.0.0 255.0.0.0
  • Class B
    • 1010 1100 . 0001 0000.0.0 – 1010 1100 . 0001 1111 . x . x
    • 172.16.0.0 – 172.31.255.255
    • 172.16.0.0/12
    • 172.16.0.0 255.240.0.0
  • Class C
    • 1100 0000 . 1010 1000 .0.0 – 1100 0000 . 1010 1000 .x.x
    • 192.168.0.0 – 192.168.255.255
    • 192.168.0.0/16
    • 192.168.0.0 255.255.0.0

Why Private IPs?

  • In the beginning, 4.3 Billion addresses seemed like more than enough!
  • The current protocol wastes a lot of IPs (127.0.0.0/8 Loop back)
  • Late 80’s saw the exhaustion of IPs coming, so developed IPv6 in the 90’s
    • IPv4 = 32 bits
    • IPv6 = 128 bits
  • IPv6 = IPv4 x 7.9×10^28

IPv6 Problems and NAT

  • No seamless migration path from IPv4 to IPv6
  • NAT (Network Address Translation) was implemented as a temporary workaround to mitigate the lack of IPv4 address until organizations had time to migrate to IPv6
  • An organization can use private IP addresses on their inside network, but still grant their hosts Internet access by translating them to their outside Public IP address
  • Many hosts on the inside can share 1 or more public IP addresses on the outside.

 

50: Private IP Addresses Part 2

https://www.udemy.com/cisco-icnd1/learn/lecture/8601356#overview

Today’s Networks

  • Industry experts predicted in the early 2000’s that IPv6 would by ubiquitous within a few years
  • However, most enterprises today still use RFC 1918 IPv4 addresses with NAT
  • RFC 1918 has the security benefit of hiding inside hosts by default (they don’t have a publicly routable IP address) plus network engineers have more experience with IPv4 than v6
  • IPv6 is mostly found in service provider networks, mobile services, and large countries with later Internet adoption, such as India and China
  • Spare Public IPv4 addresses were exhausted in 2011, so IPv6 is still the future path.
  • With IPv6, you still need to understand subnetting – modern enterprises subnet their RFC 1918 addresses to optimize performance and security.
  • It is common to see /24 subnets used for endhosts, /30 for point to point links and /32 for loopbacks.
  • Complex VLSM is more common in enterprises which use public IP addresses on their inside networks and need to maximize their use.

Using Contiguous Address and Route Summarizations

  • Keep locations within the same subnet to reduce IP advertisements between routers.
    • This is NOT how we subnetted the NY / Boston example above!

51 & 52: Where to learn more about subnetting

https://www.udemy.com/cisco-icnd1/learn/lecture/8601358#overview

https://www.udemy.com/course/cisco-icnd1/learn/lecture/9404574#content

 

LEAVE A COMMENT