Lab 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

COMPUTER NETWORKS

SUBNETS

LAB 4
WHAT IS A SUBNET?

¡ Subnets are a subset of the entire network


l Networks can be divided into subnets
l Subnets can be divided into subnets

¡ Each subnet is treated as a separate network


l A subnet can be a WAN or LAN
WHAT IS A SUBNET?
¡ Subnets are needed to divide a network
IP ADDRESSES

• The IP Address is 32 bits, divided into 4 octets, each octet is 8 bits


IP ADDRESSES

• The IP address is always acompanyed with a subnet mask. The subnet mask allows you to know
the netwoek ID and host ID
IP ADDRESSES

• As a refrence these are the IP Addresses classes


SUBNET ADDRESSES

¡ Typical (classed) IP addresses (e.g. 137.207.32.2) have two


parts:
l A network ID (e.g. 137.207.0.0)
l A host ID (e.g. 137.207.32.2)

¡ A subnetted network will divide the IP address differently


l Part of the host ID will be used to specify the subnet number
l The network ID and subnet portion of the host ID can be considered
the subnet ID
ROUTING WITH SUBNETS

l Subnetting is transparent outside an organization


l e.g. If subnetting is used in the
•University, routers outside the
•University will not consider subnetting at all
l Thus, subnetting is only relevant within an organization

l When a packet enters a network with subnetting, the routers will behave differently
l A route may use the subnet ID (network portion + subnet portion, followed by zeroes) to determine
which route to take
CALCULATING SUBNET IDS

¡ Calculating the subnet ID is very much the same process as calculating a network

¡ ID (net ID)
¡ The difference is that typically net IDs are calculated using one of the three standard subnet masks:

¡ 255.0.0.0 (Class A)
¡ 255.255.0.0 (Class B)
¡ 255.255.255.0 (Class C)

¡ A subnet ID is calculated using a non-standard subnet mask


CALCULATING SUBNET IDS

¡ As an example if you have a network ID = 137.207.0.0


¡ Network subnet mask is 255.255.0.0
¡ This could also be represented with a / (n) after the IP
CALCULATING SUBNET IDS

¡ For This network 137.207.0.0 , if it needs to be divided into 6


subnets.
¡ First question is: how many bits needed to represent the 6
subnets.
¡ You need 3 bits to represet the 6 subnets

¡ In this case you take 3 bits from the host ip to reprent the
subnets
¡ You start taking these bits from most significant bits (from right to
left)
CALCULATING SUBNET IDS

¡ IP addresses: 137.207.0.0) have two parts:


• 137.207.xxxxxxxx. xxxxxxxx
• These bits will be the subnets as follows:
1. 137.207.00100000.00000000 --> Subnet Mask 255.255.224.0
2. 137.207.01000000.00000000 --> Subnet Mask 255.255.224.0
3. 137.207.01100000.00000000 --> Subnet Mask 255.255.224.0
4. 137.207.10000000.00000000 --> Subnet Mask 255.255.224.0
5. 137.207.10100000.00000000 --> Subnet Mask 255.255.224.0
6. 137.207.11000000.00000000 --> Subnet Mask 255.255.224.0
CALCULATING SUBNET IDS
¡ For each subnet you can calculate the hosts IPs:
• Lets take the first Subnet 137.207.00100000.00000000 = 137.207.32.0/19
1. The network IP 137.207.00100000.00000000 = 137.207.32.0/19
2. The first IP should be as 137.207.00100000.00000001 = 137.207.32.1/19
3. The last IP Should be as 137.207.00111111.11111110 = 137.207.63.254/19
4. The local Broadcast IP Should be as 137.207.00111111.11111111 = 137.207.63.255/19
ASSIGNMENT
¡ For This network 141.20.0.0/16 – Mask: 255.255.0.0 , if it
needs to be divided into 9 subnets.
¡ How many bits needed to represent the 9 subnets.
¡ What are the Subnet IDs for the 9 subnets?
¡ What is the First IP and Last IP for each subnet?

You might also like