Subnetting defined through simple example:
- An IP network is simply a set of consecutively numbered IP addresses that follows some preset rules
- Class B network 172.16.0.0 consists of all IP addresses that begin with 172.16: 172.16.0.0, 172.16.0.1, 172.16.0.2, and so on, through 172.16.255.255.
- Another example: Class A network 10.0.0.0 includes all addresses that begin with 10.
- An IP subnet is simply a subset of Class A, B, or C network.
- If fact, the word subnet is a shortened version of the phrase subdivided network.
- For example, one subnet of Class B network 172.16.0.0 could be the set of all IP addresses that begin with 172.16.1., and would include 172.16.1.0, 172.16.1.1, 172.16.1.2, and so on, up through 172.16.1.255.
- Another subnet of that same Class B network could be all addresses that begin with 172.16.2.
- most IT jobs require you to work from operational view meaning that someone else before built the network and you need to operate it and upgrade it
Analyze subnetting and addressing nodes:
- 1. which hosts should be grouped together into a subnet
- 2. how many subnets does this network require
- 3. how many host IP addresses do each subnet require
- 4. will we use a single subnet size for simplicity or not?
Number 1: Rules about which hosts are in which subnet:
- every device needs IP address
- these devices include computers used by end-users, servers, phones, laptops, IP phones, routers, switches, firewalls…
- any device that uses IP to send and receive packets needs an IP address
- IP addresses must be assigned according to some basic rules.
To make routing efficient, IP addressing rules group addresses into groups called subnets. These rules are as follows:
- addresses in the same subnet are not separated by a router
- addresses in different subnets are separated by at least one router
ROUTER’S MAIN JOB IS TO FORWARD PACKETS FROM ONE SUBNET TO ANOTHER ROUTERS TYPICALLY CONNECT TO MULTIPLE SUBNETS!
Number 2: Determining the number of subnets (how many subnets network needs)
- to determine number of subnets required, engineer must think about the internetwork as documented and count the locations that need subnet
- engineer requires access to network diagrams, VLAN configuration details, details about WAN links
We should plan subnet for every:
- PPP serial link
- Ethernet emulation WAN link (EoMPLS)
Number 3: How many host IP addresses does each subnet require:
- just look around other offices, try to figure out will the department grow or not
Number 4: Choose one subnet or not?
- to create multiple subnet sizes network must create some subnets using one mask, some with another and so on
- different masks mean different numbers of host bits and different number of hosts in some subnets based on 2H-2 formula
MAKE DESIGN CHOISES:
- public IP addresses- run out of public IP addresses
- before, company was assigned with unique IP address that only that company had
- soon, they realized they will run out of IP addresses
To solve problem, several solutions came:
- new version of IPv6 (128bit)
- assigning a subset of public IP network to each company, instead of an entire public IP network
- NAT which allows the use of private IP networks
Private IP networks:
- RFC defines set of private IP networks and these IP networks:
- will never be assigned to an organization as public IP network
- can be used by organizations that will use NAT when sending packets to the Internet
- can also be used by organizations that never need to send packets to the Internet
Choosing an IP Network during the design phase:
- if a design engineer followed topics so far, he would know following
- number of subnets required
- number of hosts per subnet required
- that a choice was made to use only one mask for all subnets, so that all subnets are the same size
- the classful IP network number that will be subnetted
Classful IP networks before subnetting:
- when you think about it, classful IP network is not subnetted yet and we have a whole range to work around with
Borrowing host bits to create subnet bits:
Choosing enough subnet and host bits:
- question is, where to move host bits?
- how many subnet and host bits should we choose?
We need to know:
- number of subnets required
- number of hosts per subnet
With 1 subnet bit, we can create 2 subnets
With 2 subnet bits, we can create 4 subnets
With 3 subnet bits, we can create 8 subnets
With 4 subnet bits, we can create 16 subnets
With 5 subnet bits, we can create 32 subnets
With 6 subnet bits, we can create 64 subnets
With 7 subnet bits, we can create 128 subnets
Also, remaining number of host bits must also be large enough to number the host IP addresses
EXAMPLE DESIGN 1:
172.16.0.0, 200 subnets, 200 hosts
Class B network:
How many subnet S bits do I need to number 200 subnets?
2 to the power of 7 = 128 which is not enough subnets
2 to the power of 8 = 256 which is enough.
We need at least 8 subnet bits
How many host bits do I need to number 200 hosts per subnet?
2 to the power of 7 = 128 which is not enough
2 to the power of 8 = 256 – 2 (network and broadcast) which is enough for 200 hosts per subnet