# EC310 Lesson 14: Subnets

Δίκτυα και Επικοινωνίες

23 Οκτ 2013 (πριν από 4 χρόνια και 8 μήνες)

114 εμφανίσεις

1

EC310 Lesson 14: Subnets

Objectives:

(a) Demonstrate the ability to subnet a network and assign host IP addresses in a given scenario.

(b) Describe the use of broadcast and network IDs.

I. Subnetting

Suppose the organization does not want one big honking network, but would like to have multiple networks,
called subnetworks. The “world outside” is unaware that the organization has divided its network into
subnetworks. At the organization's network boundary, the division into subnetworks is known.

To accomplish this, the organization has its own mask. It partitions its block of addresses into sub-blocks, each

Student's often find the topic of subnetting difficult to grasp, with the fog only lifting after seeing some
examples. So… let's dive right into an example.

Example

An organization has been granted the block 130.56.0.0 / 16. The administrator wants to create 1000 subnets of
equal size.

Solution: The organization has 16 bits for its network ID (i.e., the network prefix). These leftmost 16 bits
will not change among all IP addresses within the organization's network. Since the leftmost 16 bits align
exactly with the first two octets (using the IP address dotted-decimal notation), all IP addresses in this

The organization has the remaining rightmost 16 bits to use internally. If the organization was not
interested in subnetting, it could assign IP addresses to hosts using these 16 remaining bits. It would thus
have
16
2 2−
IP addresses to dole out (remember, we cannot dole out the all zeros or all ones host

2

number!) This is the scheme shown in the top picture above, where the left bits are used for the network
prefix and the right bits are used for host numbers.

In this case, though, the organization is interested in subnetting. So, it has to use some of its "host
number" bits for the purpose of designating subnets. This is shown in the bottom picture on the previous
page.

1000 subnets means that

So, an individual subnet will use the 16 bits in network prefix,

So, the subnet mask will be

(b) Find the number of available host addresses in each subnet.

Solution:

After allowing for the network address and the subnet number, I have

Hence I have ____ addresses per subnet.

Just as before, though, we cannot use the

Thus, we have

(c) Find the IP address for the first host on subnet number 1. Note that the first subnet is subnet number 0,
and we are interested in subnet number 1.

Solution:

(d) Find the IP address for the last host on subnet 1.

Solution:

3

(e) Find the first and last IP addresses in subnet 1000.

Solution:

Example

You have been given you the block of addresses 131.122.144.0 / 20.

(a) How many addresses have you been given?

Solution:

Solution:

Solution:

(d) What is the last address in your block that is assignable to a host?

Solution:

(e) Suppose you decide to use a DHCP server to give out addresses to your hosts. A host transmits an IP packet
to a DHCP server saying “Give me an address please.” How can a host transmit an IP packet to the DHCP
server if it does not have an IP address, and does not know the IP address of the DHCP server?

Solution:

Now, for the remaining questions, suppose that you have decided to establish 100 (equal-size) subnets in

(f) How many bits will be used for the subnet ID?

Solution:

4

(g) How many hosts will be on each subnet?

Solution:

(h) What is the subnet mask for your network in dotted decimal notation?

Solution:

(i) What is the IP address of the 4
th
host on the 50
th
subnet? Assume the first subnet is subnet 0.

Solution:

Assistant Professor Patrick Vincent

Help us improve these notes! Send comments, corrections and clarifications to vincent@usna.edu