Title: Subnet Addresses
1Subnet Addresses
2Finding the Addresses in a Specific Subnet
- If a network address is subnetted then you must
be able to determine which addresses are assigned
to each subnet - If a host is assigned an IP address from the
wrong subnet, they will not be able to
communicate properly - Many TCP/IP configuration problems are due to
incorrect address or subnet mask assignment
3Result of Wrong SM
Assume the correct subnet mask is supposed to be
255.255.252.0 but 255.255.248.0 was assigned.
Sender IP 129.130.22.1 Destination IP
129.130.20.2 Destination IP 1000 0001.1000
0010.0001 0100.0000 0010 Correct SM 1111
1111.1111 1111.1111 1100.0000 0000
1000 0001.1000 0010.0010 0100.0000
0000 Destination IP 1000 0001.1000 0010.0001
0100.0000 0010 Wrong SM 1111 1111.1111
1111.1111 1000.0000 0000 1000 0001.1000
0010.0010 0000.0000 0000
4Subnet Intervals
Subnet Mask Interval Bits Used Subnets 192
64 1100 0000 2 224
32 1110 0000 6 240 16 1111
0000 14 248 8 1111 1000
30 252 4 1111 1100 62
254 2 1111 1110 126 255
1 1111 1111 254
The interval indicates the range of addresses in
a subnet for a particular subnet mask. For
example, a subnet mask of 192 provides 2 subnets
(22 - 2) with a interval of 64.
5Defining a Range of Addresses for Two Subnets
Addresses in each subnet Subnet
1 129.130.64.1 through 129.130.127.254 Subnet
2 129.130.128.1 through 129.130.191.254
6Another Example
Subnet Mask 255.255.224.0 Subnet 0 0000
0000 0 Subnet 1 0010 0000 32 Subnet 2 0100
0000 64 Subnet 3 0110 0000 96 Subnet 4 1000
0000 128 Subnet 5 1010 0000 160 Subnet 6 1100
0000 192 Subnet 7 1110 0000 224
The interval in this case is 32.
Cisco routers can use the zero subnet if the IP
SUBNET ZERO configuration command is used.
7Example (continued)
Subnet Mask 255.255.224.0 Subnet
0 x.y.0.1 through x.y.31.254 Subnet
1 x.y.32.1 through x.y.63.254 Subnet
2 x.y.64.1 through x.y.95.254 Subnet
3 x.y.96.1 through x.y.127.254 Subnet
4 x.y.128.1 through x.y.159.254 Subnet
5 x.y.160.1 through x.y.191.254 Subnet
6 x.y.192.1 through x.y.223.254 Subnet
7 x.y.224.1 through x.y.255.254
8Shortcut Method
- Find the interval
- Subtract the lowest order octet of the subnet
mask from 256 to get the interval. - For example, with a subnet mask of 255.255.248.0
you get an Interval of 256 248 8.
9Shortcut Method
- Find address ranges
- With traditional subnetting you cant change the
network address - Subnet addresses are integer multiples of the
interval - Last address in a range is the last address
before the next subnet - First host address in a subnet range is the
smallest it can be without being all zeros - Last host address in a subnet range is the
smallest it can be with being all ones
10Shortcut Method Example
Network 65.0.0.0 Subnet Mask 255.224.0.0
Interval 256 224 32
65.0.0.1 65.31.255.254 65.32.0.1
65.63.255.254 65.64.0.1 65.95.255.254 65.96.0.1
65.127.255.254 65.128.0.1 65.159.255.254 65.16
0.0.1 65.191.255.254 65.192.0.1
65.223.255.254 65.224.0.1 65.255.255.254
11Address Range in Binary
65.32.0.1
0100 0001.0010 0000.0000 0000.0000 0001
65.63.255.254
0100 0001.0011 1111.1111 1111.1111 1110
12Sample Problem
- Define address ranges for the following
- 75.0.0.0, SM 255.192.0.0
- 129.130.0.0, SM 255.255.248.0
- 170.160.0.0, SM 255.255.252.0
13Sample Problem
- Which of the following IP addresses belong to the
same subnet - 129.130.25.169, 129.130.25.9, SM 255.255.252.0
- 129.130.25.169, 129.130.27.240, SM 255.255.252.0
- 129.130.25.169, 129.130.22.140, SM 255.255.252.0
- 140.130.36.158, 140.130.64.120, SM 255.255.224.0
- 140.130.127.1, 29.130.25.169, SM 255.255.224.0
14Sample Problem
IP 109.128.2.2 SM 255.0.0.0
IP 109.128.1.1 SM 255.0.0.0
IP 109.100.11.11 SM 255.255.0.0
Router
IP 109.128.10.10 SM 255.255.0.0
15Sample Problem
IP 131.128.100.27 SM 255.255.0.0
IP 131.128.33.8 SM 255.255.0.0
IP 131.128.33.7 SM 255.255.0.0
IP 131.128.100.28 SM 255.255.0.0
Router
16Sample Problem
IP 131.128.32.27 SM 255.255.224.0
IP 131.128.64.8 SM 255.255.224.0
Router
IP 131.128.96.8 SM 255.255.224.0
IP 131.128.32.28 SM 255.255.224.0
Router
IP 131.128.64.9 SM 255.255.224.0
IP 131.128.96.7 SM 255.255.224.0
17Broadcast Addresses
- A subnets broadcast address is the address that
has the correct subnet address and has all 1s in
the host portion of the address - It is the last address in a range plus 1
18Broadcast Addresses
IP Address 129.130.0.0 Subnet mask
255.255.252.0 What is the broadcast address of
the 129.130.32.0 subnet?
Address range is 129.130.32.1 129.130.35.254 so
broadcast address is 129.130.35.255.
1000 0001.1000 0010.0010 0011.1111 1111
19Try it!
IP Address 65.8.23.17 Subnet Mask
255.255.0.0 IP Address 220.65.32.14 Subnet
Mask 255.255.255.252
20Tricky Class C Addresses
IP Network 220.64.32.0 Subnet Mask
255.255.255.224 220.64.32.32 220.64.32.63
All zeros
First address 1101 1100.0100 0001.0010 0000.0010
0000
Last address 1101 1100.0100 0001.0010 0000.0011
1111
All ones
21Tough Problem
IP Network 65.0.0.0 Need 1,000 Subnets What
subnet mask and first 2 address ranges? 2n 2 gt
1,000 n 10
22IOS Commands to Know
- IP address ltip addressgt ltsubnet maskgt
- Ip host
- Ip netmask format ltbitcountdecimalhexadecimalgt
- Terminal ip netmask-format ltbitcountdecimalhexad
ecimalgt - Ping
- Telnet
- Trace
23IOS Commands to Know
- Show ip interface
- Show ip interface-brief
- Show ip arp
- Debug ip packet
- Ip subnet zero