Netcom Module IV
Netcom Module IV
Lesson 1 IP Addressing
Module I
2
MODULE IV
INTRODUCTION
Networks that are directly connected to the Internet must have their
IP addresses assigned by the Internet Network Information Center (InterNIC)
or some other authority. Businesses usually obtain these addresses through
their local Internet service provider (ISP). However, firewall and proxy
server combinations, which are popular on today’s networks, hide a
network’s IP addresses from other hosts on the Internet.
An IPv4 address has 32 bits and is familiar. An IPv6 address has 128
bits and looks wild. Extending the address space was one of the driving
reasons to develop IPv6, along with optimization of routing tables,
especially on the Internet.
Module IV
3
network can exist with only a small number of public addresses because only
a few of the hosts in the private network will be attached to the Internet at
any time.
This module will help you become familiar with the old IPv4
addresses and addressing scheme and will also explain howIPv4 and how IPv6
addressing works and why they have been designed the way they are. We
will also cover the necessity, the principles and the methods of subnetting.
Then we will provide the concepts of Network Address Translation (NAT).
OBJECTIVES
There are four lessons in the module. Read each lesson carefully then
answer the exercises/activities to find out how much you have benefited
from it. Work on these exercises carefully and submit your output to your
instructor or to the College of Computer Science office.
Module IV
4
Lesson 1
IP Addressing
1.2Types of Addresses
Module IV
5
Module IV
6
Classless: The full address range can be used without regard to bit
reservation for classes. This type of addressing scheme is primarily not used
in direct host assignment. The scheme is directly applied to the routing
tables of the Internet and ISPs.
Module IV
7
The IP address 0.0.0.0 is used by hosts when they are being booted.
All addresses of the form 127.xx.yy.zz are reserved for loopback
testing, they are processed locally and treated as incoming packets.
1.4IP Classes
Module IV
8
Module IV
9
1. 1.0.0.1
2. 126.0.0.1
3. 10.255.255.254
4. 125.125.125.125
1. 1.0.0.0 - Host ID (last octet) in which all bits are set to 0 cannot
be assigned because this host ID is used to represent the
network ID of the IP address.
Ex. 1.
UTP Cable
Ex. 2. Wireless
Module IV
10
Ex. 3.
UTP Cable
Name: Comp_C
Name: Comp_B IP Address: 12.22.255.9
IP Address: 12.60.239.1 Subnet Mask: 255.0.0.0
Subnet Mask: 255.0.0.0
Ex. 1
UTP Cable
Ex. 2
Wireless
Ex. 3.
UTP Cable
Name: Comp_C
Name: Comp_B IP Address: 12.22.255.9
IP Address: 12.60.239.1 Subnet Mask: 255.0.0.0
Subnet Mask: 255.0.0.0
Module IV
12
1. 128.56.56.56
2. 191.168.0.1
3. 129.255.255.254
4. 139.139.139.139
Ex. 1.
UTP Cable
Ex. 2. Wireless
Ex. 3.
UTP Cable
Router
Name: Comp_A
IP Address: 130.2.89.250 UTP Cable
Subnet Mask: 255.255.0.0
Name: Comp_C
Name: Comp_B IP Address: 130.2.255.9
IP Address: 130.2.239.1 Subnet Mask: 255.255.0.0
Subnet Mask: 255.255.0.0
Ex. 1
UTP Cable
Ex. 2
Wireless
Ex. 3.
UTP Cable
Router
Name: Comp_A
IP Address: 140.2.89.250 UTP Cable
Subnet Mask: 255.255.0.0
Name: Comp_C
Name: Comp_B IP Address: 140.1.255.9
IP Address: 140.2.239.1 Subnet Mask: 255.255.0.0
Subnet Mask: 255.255.0.0
Class C addresses are the most commonly assigned by the NIC. Class B
addresses have been exhausted. Each Class C network address has a 24-bit
network-prefix with the three highest order bits set to 1-1-0 and a 21-bit
network number, followed by an 8-bit host-number. Class C networks are
now referred to as "/24s" since they have a 24-bit network-prefix.
This class allows lots of networks with a fewer hosts per network. A
Class C address is identified by the first 3 bits of the first field. If the first
and second bits are 1s and the third bit is a 0, this will identify a Class C
address. This allows 2,097,152 network numbers, each capable of supporting
254 hosts (all 0s and all 1s are still reserved no matter what type of routing
and addressing you are using).
1. 192.56.56.56
Module IV
15
2. 223.223.223.223
3. 192.168.0.1
4. 199.0.0.5
Ex. 1.
UTP Cable
Ex. 2. Wireless
Ex. 3.
UTP Cable
Router
Name: Comp_A
IP Address: 205.2.89.250 UTP Cable
Subnet Mask: 255.255.255.0
Name: Comp_C
Name: Comp_B IP Address: 205.2.89.9
IP Address: 205.2.89.1 Subnet Mask: 255.255.255.0
Subnet Mask: 255.255.255.0
Ex. 1
UTP Cable
Ex. 2
Wireless
Module IV
17
Ex. 3.
UTP Cable
Router
Name: Comp_A
IP Address: 195.10.89.250 UTP Cable
Subnet Mask: 255.255.255.0
Name: Comp_C
Name: Comp_B IP Address: 195.10.88.9
IP Address: 195.10.89.1 Subnet Mask: 255.255.255.0
Subnet Mask: 255.255.255.0
The value of the four highest bits of the first byte is 1110. The class D
addresses are not divided into a network and a computer addresses, because
they are multicast addresses themselves.
Module IV
18
Decimal Binary
32 0010 0000
19 0001 0011
57 0011 1001
Decimal Binary
192
128
254
10
1. Dotted-Decimal Notation
To make Internet addresses easier for human users to read and write,
IP addresses are often expressed as four decimal numbers, each separated
by a dot. This format is called "dotted-decimal notation."
Module IV
19
192.168.1.1
2. Binary Notation
0 or 1
Separated by dots
11000000.10101000.00000001.00000001
Fig 1: Binary and Dotted decimal notation
IP Address Sequence
191.255.0.1
192.168.0.5
Module IV
199.200.254.253
20
Host ID’s are used to identify a host within a network. The host ID are
assigned based on the following rules:
Hosts that are located on the same physical network are identified by the
network ID, as all host on the same physical network is assigned the same
network ID. The network ID is assigned based on the following rules:
The network ID cannot start with 127 because 127 belongs to class A
address and is reserved for internal loop-back functions.
All bits of network ID set to 1 are reserved for use as an IP broadcast
address and therefore, cannot be used.
All bits of network ID set to 0 are used to denote a specific host on
the local network and are not routed and therefore, aren’t used.
Module IV
21
The problem with this classful addressing method is that millions of class A
address are wasted, many of the class B address are wasted, whereas,
number of addresses available in class C is so small that it cannot cater the
needs of organizations. Class D addresses are used for multicast routing and
are therefore available as a single block only. Class E addresses are
reserved.
EXERCISE
Module IV
22
Lesson 2
2.1Subnet Masks
Subnet and Subnet Mask
Module IV
23
consider the class A network ID, which has the possibility of over 16 million
hosts on the same network. All the hosts on the same physical network
bounded by IP routers share the same broadcast traffic; they are in the
same broadcast domain. It is not practical to have 16 million nodes in the
same broadcast domain. The result is that most of the 16 million host
addresses are not assignable and are wasted. Even a class B network with 65
thousand hosts is impractical.
Note that the rest of the IP internetwork still regards all the nodes on
the three subnets as being on network 174.38.0.0. The other routers in the
IP internetwork are unaware of the subnetting being done on network
174.38.0.0, and therefore require no reconfiguration.
Module IV
24
A key element of subnetting is still missing. How does the router that
is subdividing network 174.38.0.0 know how the network is being subdivided
and which subnets are available on which router interfaces? To give the IP
nodes this new level of awareness, the router must be told exactly how to
discern the new subnetted network ID regardless of Internet Address
Classes. To tell an IP node exactly how to extract a network ID, either class-
based or subnetted, a subnet mask is used.
Module IV
25
Custom subnet masks are those that differ from the above default
subnet masks when doing subnetting. For example, 138.96.58.0 is an 8-bit
subnetted class B network ID. Eight bits of the class-based host ID are being
used to express subnetted network IDs. The subnet mask uses a total of 24
bits (255.255.255.0) to define the subnetted network ID.
Module IV
26
IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0
IP Address: 110000000.10101000.00000001.00000001
Subnet Mask: 11111111. 11111111. 11111111.00000000
Network ID Host ID
Dotted Decimal
Slash
Conversion:
Module IV
27
(Convert to Binary)
11111111. 11111111.00000000.00000000
= 16 network bits
= /16
Module IV
28
IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0
Network Address Host Addresses Broadcast Address
192.168.1.0 192.168.1.1 to 192.168.1.255
192.168.1.254
IP Address: 10.1.0.1
Subnet Mask: 255.0.0.0
Network Address Host Addresses Broadcast Address
10.0.0.0 10.0.0.1 to 10.255.255.255
10.255.255.254
IP Address: 174.21.0.1
Subnet Mask: 255.255.0.0
Network Address Host Addresses Broadcast Address
174.21.0.0 174.21.0.1 to 174.21.255.255
174.21.255.254
IP Address: 184.254.0.1
Subnet Mask: 255.255.0.0
Network Address Host Addresses Broadcast Address
IP Address: 8.33.0.1
Subnet Mask: 255.0.0.0
Network Address Host Addresses Broadcast Address
Module IV
29
2.4 Subnetting
It allows a network to be split into several parts for internal use but
still act like a single network to the outside world.
Example 1: What subnet mask should be used to support 3 subnets if you are
using a network address of 172.16.0.0/16.
Step 1:
Formula
/original slash + /N = /new slash
2N = _ >= 3 subnets
2
2 =
4 >= 3 subnets
Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).
Module IV
30
Step 3:
Step 1:
Formula
/original slash + /N = /new slash
2N = _ >= 7 subnets
3
2 =
8 >= 7 subnets
Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).
Module IV
31
Step 3:
Step 1:
Formula
/original slash + /N = /new slash
2N = _ >= 20 subnets
5
2 =
32 >= 20 subnets
/8 + /5 = /13 or 255.248.0.0
Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).
Module IV
32
Step 3:
Practice: (Use separate sheet of paper and follow the steps in the previous
examples.)
Example 1: What subnet mask must be used to support 20 hosts if you are
using a network address of 172.16.0.0/16.
Step 1:
Formula
/32 - /H = /new slash
2H = _ >= 20 hosts
5
2 =
32-2 = 30 >= 20 hosts
Module IV
33
Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).
Step 3:
Step 1:
Formula
/32 - /H = /new slash
9
2 =
512 -2 = 510 >= 500 hosts
Module IV
34
Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).
Step 3:
Example 3: What subnet mask must be used to support 120 hosts if you are
using a network address of 199.2.1.0/24.
Step 1:
Formula
/32 - /H = /new slash
7
2 =
128 -2 = 126>= 120 hosts
Module IV
35
Step 2: Get the octet and increment of the new slash to get the next
network address in step 3 (using finger method).
Step 3:
Practice: (Use separate sheet of paper and follow the steps in the previous
examples.)
1. What subnet mask must be used to support 100 hosts if you are using
a network address of 150.50.0.0/16.
2. What subnet mask must be used to support 2000 hosts if you are using
a network address of 11s.0.0/8.
3. What subnet mask must be used to support 10 hosts if you are using a
network address of 192.45.45.0/24.
Module IV
36
EXERCISE
Module IV
37
Lesson 3
3.1Public Addresses
Module IV
38
When the public addresses are assigned, routes are programmed into the
routers of the Internet so that traffic to the assigned public addresses can
reach their locations. Traffic to destination public addresses is reachable on
the Internet.
3.2Private Addresses
The private address space is defined by the following three address blocks:
10.0.0.0/8: The 10.0.0.0/8 private network is a class A network ID that
allows the following range of valid IP addresses: 10.0.0.1 to
10.255.255.254. The 10.0.0.0/8 private network has 24 host bits which
can be used for any subnetting scheme within the private organization.
172.16.0.0/12: The 172.16.0.0/12 private network can be interpreted
either as a block of 16 class B network IDs or as a 20-bit assignable
Module IV
39
address space (20 host bits) which can be used for any subnetting
scheme within the private organization. The 172.16.0.0/12 private
network allows the following range of valid IP addresses: 172.16.0.1 to
172.31.255.254.
192.168.0.0/16: The 192.168.0.0/16 private network can be interpreted
either as a block of 256 class C network IDs or as a 16-bit assignable
address space (16 host bits), which can be used for any subnetting
scheme within the private organization. The 192.168.0.0/16 private
network allows the following range of valid IP addresses: 192.168.0.1 to
192.168.255.254.
Some groups of addresses are reserved for use in private networks and
are never exposed to the wider Internet. The ranges appear to be random
and have historic reasons for their values, but note that there is one address
range chosen from each of Class A, B, and C. They are shown in Table 11.7.
Of course, in a genuinely private network any addresses could be used, but
it is a good exercise in self-discipline to use the allocated ranges.
3.3
3.4Network Address Translation (NAT)
Since the IP addresses in the private address space will never be assigned
by the IANA as public addresses, there will never exist routes in the Internet
routers for private addresses. Traffic to destination private addresses is not
reachable on the Internet.
Therefore, Internet traffic from a host that has a private address must
either send its requests to an application layer gateway (such as a proxy
server), which has a valid public address, or have its private address
translated into a valid public address by a network address translator (NAT)
before it is sent on the Internet.
Module IV
40
Private LANs may that have or don’t have intent to connect to the Internet
as in figure 11.8. Private LANs with no intent to connect to the Internet can
choose any addresses they want, even public addresses that have been
assigned by the IANA. If an organization later decides to connect to the
Internet, its current address scheme may include addresses already assigned
by the IANA to other organizations. These addresses would be duplicate or
conflicting addresses and are known as illegal addresses. Connectivity from
illegal addresses to Internet locations is not possible and it must be
changed.
Module IV
41
NAT replaces the internal network IP address for each Internet Protocol
(IP) packet passing through the firewall with a dummy one from a fixed pool
of addresses. The actual IP addresses of computers on the private network
are thus hidden from users outside the firewall. All requests that pass
through the firewall have their addresses translated on the way to the
private network, and all responses returned to the unsecure public network
have their addresses translated back on the way out of the private network.
Module IV
42
and you have enabled that protocol and the DHCP server is running on our
network, then our device will be given an IP address by the server.
DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and
various DHCP options from DHCP servers in a four-step process as it are
illustrated in Figure 11.9:
Module IV
43
At its most basic level, the IP address is taken from a pool of free IP
addresses, this means that the IP address could change from one day to
another. This can cause problems in some situations. For example, if a
printer is configured on the network queue to work with a particular IP
address and the DHCP server allocates a different IP address to the one that
the queue is expecting to use, the printer will not be able to print as the IP
address is different.
Module IV
44
MAC Address
IP address that the supervisor would like to use.
This is better than DHCP as you always know what IP address you will
have in the device. The drawback to it is that you have to add an entry to
the BOOTP server every time you buy a new network device.
We'll often find the devices that support these three protocols have some
kind of prioritization that allows us to specify which protocol should be used
first. Imagine that you had a DHCP server; a BOOTP server and a RARP
server. As the network card supports all three IP address allocation
methods, there may be some confusion as to what IP address the card might
get. To get around this, a card should be able to specify which IP address
method it will use first, so it might use DHCP first, then fall back to BOOTP,
etc…
Module IV
45
EXERCISE
Module IV
46
Lesson 4
IP v6 Addresses and
Managing the Address Space
4.1IP v6 addresses
An IPv6 address has 128 bits and looks wild. Extending the address space
was one of the driving reasons to develop IPv6, along with optimization of
routing tables, especially on the Internet.
While it is true that the addressing was changed to 128 bits, there are
many more features about the address space and its allocation that were
carefully crafted. IPv6 addresses provide the same function as IPv4:
identifiers for interfaces and sets of interfaces.
Module IV
47
The first few bits of the IPv6 address don't specify the class, but they tell
something about the address. For example, where the address has been
assigned an address type and is known as the format prefix.
The amount of space used for these prefixes are specified by the formula
1 / 2 X, where x is the number of bits used. For example, if the first 8 bits
are 0000 0000, then this is 1 / 2 8, or 1/256.
Prefixes are also used in this environment just like in the CIDR
environment. A /30 indicates the first 30 bits are used for routing. Also
notice that fields in certain types of addresses are given names to further
identify the sub address portions.
There are three address types that are assigned out of the 0000 0000
format prefix space. These are the “unspecified address,” the loopback
address, and the IPv6 addresses with embedded IPv4 addresses. This
allocation supports the direct allocation of provider addresses, local use
addresses, and multicast addresses. Space is reserved for NSAP addresses,
IPX addresses, and geographic addresses. The remainder of the address
space is unassigned for future use. This can be used for expansion of existing
use (e.g., additional provider addresses, etc.) or new uses (e.g., separate
locators and identifiers).
Module IV
48
The first bits of an IPv6 address, called the Format Prefix (FP), indicate
the use to which the address is put and the format of its contents. They are
now managed by the Internet Assigned Numbers Authority (IANA). The
number of FP bits varies from usage to usage, but can always be determined
by the pattern of the early bits. Table 11.8 lists the currently defined FP bit
settings.
There are five addresses types identified by the Format Prefix bits shown
in Table 11.8.
Module IV
49
Site Topology: 16bit field contains Site Level Aggregation ID (SLA ID),
which is used by an ISP or organization to break their network up into as
many as 65,536 smaller administrative chunks.
Interface Topology: 64 bits of the address used for the Interface ID to
identify an individual router, host, or interface.
2. Link Local Unicast Addresses: (see Figure 11.12) are used between
neighbors on the same link. Their scope is limited to the link and they
are not distributed more widely. This is useful for dial-up devices or for
hosts on a local network.
3. Site Local Unicast Addresses: As shown in Figure 11.13, the site local
address includes a subnetwork ID which can be used in a hierarchical
manner within the organization’s network in the same way as the SLA ID
in the global address are equivalent to the three reserved address ranges
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 in IPv4. They are
addresses that are allocated within an organization but are not
distributed more widely. Hosts using site local addresses rely on Network
Module IV
50
Module IV
51
The IANA is the Internet Assigned Numbers Authority, and it has overall
authority for the number space used in the Internet. This number space
includes port number, address, IP version numbers, and many other
significant number assignments.
The Regional IRs operate under the authority of IANA. They operate in
large geographical areas such as continents. Currently, there are three
defined:
These IRs do not cover all areas. It is expected that each IR covers any
area not specifically specified, but within its immediate area. Local IRs are
established under the authority of the regional IR and IANA. They cover
national dimensions.
Module IV
52
IANA, too, has been dismantled, and the new caretaker of the Internet’s
names and address numbers is the Internet Corporation for the Assignment
of Names and Numbers (ICANN). ICANN is currently creating a competitive
registry structure that will enable commercial entities to compete with each
other in the registration of IP names and numbers.
Module IV
53
EXERCISE
Module IV