Uploaded by Sanif Mujawar

2018 2019CCNActivitySession1A IncludesSolutions

advertisement
CCN Activity Session 1 – IP Addressing and Subnets
As you’ve heard in the session, IPv4 has a dotted decimal notation, which allows an easy
translation to binary. Each element of the dotted decimal representation refers to an octet
in the binary address, thus 193.32.216.9 in dotted decimal notation will translate into
11000001 00100000 11011000 00001001 in binary.
Question
Consider the following IP addresses; what are their binary notation equivalents? Which
network classes do they belong to, and what might they be being used for?
192.168.0.4
11000000101010000000000000000100 – Class C
147.188.123.6
10010011101111000111101100000110 – Class B
In practice, subnets are used in IP networking to help route packets between networks /
sites within an organisation, and to ease administration. Types of subnet can be described
using a postfix to the dotted decimal notation, for example 192.168.1.0/24 is shorthand for
the upper 24 bits of the network address must always be the same for machines to talk on
the subnet. In this case only the lower 8 bits would then be available for machine addresses,
but the 192.168.1 portion could be used to route traffic to that physical network (say a
particular floor of a building).
Question
The figure below (from Kurose & Ross) shows a simple set of subnets and routers. How
many subnets are used in the example? What are the subnet identifiers of each?
6 subnets are in use: 223.1.1.0/24, 223.1.2.0/24, 223.1.3.0/24, 223.1.7.0/24, 223.1.8.0/24,
223.1.9.0/24
Subnet masks are used to apply subnet restrictions to binary notation IP addresses. This
means that system administrators have lots of freedom in their assignment of subnet/host
combinations. A subnet mask consists of binary 1s for every bit position except for the host
address portion, which consists of 0s.
For example, consider an organisation with many small subnets, each with less than 16
hosts. A suitable subnet mask would be 11111111 11111111 11111111 11110000 or
255.255.255.240 in dotted decimal, as this would allow up to 16 binary-addressed hosts (the
lower four bits) in any subnet. Now assume the organisation has a class B address range
beginning 144.123.x.x. A packet arrives for IP 144.123.25.244 – which subnet should it be
routed internally? To determine this, routers take the binary representations of the subnet
mask and the IP address, and perform a binary AND operation:
Subnet mask:
11111111 11111111 11111111 11110000
IP address:
10010000 01111011 00011001 11110100
Subnet number:
10010000 01111011 00011001 11110000
The subnet number equates to 144.123.25.240 in dotted decimal, and it is this that is used
to route the packet to the subnet (which is of course connected to an interface on one of
the organisation’s routers).
Activity
Check that the subnet mask works by finding out which subnet address 144.123.25.248
would be routed to on the same network.
Subnet mask:
IP address:
Subnet number:
11111111 11111111 11111111 11110000
10010000 01111011 00011001 11111000
10010000 01111011 00011001 11110000
Dotted decimal conversion: 144.123.25.240 – therefore the packets would be routed to the
same subnet as the previous example.
Subnets are a very powerful concept, as they can be used to give administrators very precise
control of the network. For example, using the 147.188.149.0/24 subnet in the incoming
firewall rules on a server, allows the administrator to specify only machines on the 149
subnet (all of which are inside the University) can access that server.
Discuss
The 147.188.0.0 – 147.188.255.255 address block is associated with the University of
Birmingham. What does the address block tell you about our network? Either individually or
in small groups discuss the implications of this, including the network class, the possible
numbers of hosts, how we might split up the space available, and whether this system will
be suitable for the future.
The University has a class B address range. We tend to split this up into subnets in the third
octet, giving us 254 addresses in each subnet. The current system will not continue to meet
the University’s needs going forward.
Further reading
Classless Interdomain Routing (CIDR) generalises the notation of subnet addressing to a
known prefix rather than the full class description traditionally used. This has resulted in
much more flexible use of the unassigned address space. Find out more about CIDR as part
of your free study time.
Download