Notes2:1SubnettingVlans - echadbourne/NET-330 GitHub Wiki
IP Place Values
The highest value in an octet is 255
Looking at the place values, all 1's in the 8 bits is
- 128+64+32+16+8+4+2+1
Subnetting
Organizations are "assigned" a network address to use on the internet
- Champlain College: 216.93.144.0/20
- All Champlain IPs start with the same 20 bits
- We can use the remaining 12 bits (host ID) in any way we want
(2 to the 12th)
But a /20 network can support 4094 hosts - do we want them all on the same network
- Lots of broadcast packets congest the network
- Machines are slowed by trying to process them
- Anyone can contact anyone else on the network
Our network ID can't change but what if we took some host ID bits to create a subnet ID
- These bits are then "added" to the network ID (i.e. the subnet mask now covers them)
- For example, if we used 4 bits for the subnet ID...
Subnet Table
Creating a Subnet
Always start with the largest subnet first: larger subnet boundaries are always valid for smaller ones, but smaller boundaries are not always valid for larger ones
For example, consider arranging /22 and /24 subnets for 129.170.8.0/16
If we start with /22:
- 129.170.8.0/22 (ranges from 129.170.8.1 to 129.170.11.254)
- 129.170.12.0/24 (ranges from 129.170.12.1 to 129.170.12.254)
If we start with /24:
- 129.170.8.0/24 (ranges from 129.170.8.1 to 129.170.8.254)
- 129.170.9.0/22 (ranges from 129.170.9.1 to 129.170.12.254)
IP Rules
All 0's in the host ID refers to the network itself - cannot be assigned to a host
All 1's in the host ID is the broadcast - cannot be assigned to a host
So if we have n bits in our host ID, we can assign 2(to the n) - 2 IP addresses to hosts on our network
Private and Reserved Ranges
Private ranges not routable on the internet
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
Reserved Ranges
- 127.0.0.0/8
- 169.254.0.0/16
- 224.0.0.0/4
VLANs
A Virtual LAN is a group of devices on one or more physical LANs that are configured to communicate as if they were on the same LAN
Define broadcast domains in a layer 2 network
- Broadcast Domain: set of all devices that will receive broadcast packets from any member of the set
- These are typically bounded by routers, who do not forward broadcasts
VLANs are extremely flexible
- They can split a single switch into several separate networks
- They can merge machines on different switches into a single network
Traffic cannot pass directly between different VLANs
To send packets between VLANs, a router or layer 3 switch is required
VLANs are often associated with specific IP subnets
Configuring VLANs
Define the necessary VLANs on each switch
- Choose a unique VLAN ID for each VLAN
- ID must be consistent across all switches involved
Configure the ports on each switch - 2 possible options
- Access Ports: Can only be assigned to/carry traffic from a single VLAN - Used to connect end devices to a switch
- Trunk Ports: Carry traffic from multiple VLANs - used to connect switches - will "tag" packets with the proper VLAN ID
VLANs are an implementation of VLSM
- Once you've subnetted your oganization, the subnetting scheme has to be carried out on the physical infrastructure
- When subnets occupy the same physical space, we can use VLANs to keep devices on separate networks, even though they are next to each other physically