Sunteți pe pagina 1din 83

List of Experiments

S. No. Experiment Date Sign.

1 To study Computer Network Technologies.

2 To study various types of Connectors.

Study and verification of standard Network topologies i.e. Star, Bus,


3
Ring.

4 Study of different type of LAN equipment.

LAN installations and their Configurations


5 a. Building a Peer- to – Peer Network
b. Building a Client – Server Network
IP Addressing

6 a. IP addressing basics
b. Classful IP address
c. Classless IP address
Subnetting and Supernetting
a. Subnetting a class A network
7 b. Subnetting a class B network
c. Subnetting a class C network
d. Supernetting
Switches
8 a. Basic Switch Configuration
b. Configuring Static VLANs in Packet Tracer Network simulator

9 To study and configure Static Routing Protocol.

10 To study and configure Dynamic Routing Protocol.

11 To study and configure Static Network Address Translation.

12 To study and configure Dynamic Network Address Translation.

To study and configure Network Address Translation - Port Address


13
Translation and Port Forwarding.
Experiment 1
Aim: To study network technologies

A network consists of two or more autonomous computers that are linked in order to share resources
(such as printers and CD-ROMs), exchange files, or allow electronic communications. The computers
on a network may be linked through cables, telephone lines, radio waves, satellites, or infrared light
beams.

Classification based on transmission technology


Computer networks can be broadly categorized into two types based on transmission technology:
1) Broadcast networks
2) Point to point network
Broadcast networks
Broadcast networks have a single communication channel that is shared by all the machines on the
network. All the machines on the network receive short messages, called packets in certain contexts
sent by any machine. An address field within the packet specifies the intended recipient. Upon receiving
the packet, the machine checks the address field. If the packet is intended for itself, the machine
processes it, and ignores it otherwise.
The system also generally allows possibility of addressing the packet to all destinations. When such a
packet is transmitted, it is received by all the machines on the network. This mode of operation is called
Broadcast mode. Some broadcast system also support transmission to a sub-set of machines. This is
called Multicasting.

Example of a broadcast network on a shared bus

Point to point network


In a point to point network, the end devices that wish to communicate are called stations. The switching
devices are called are called nodes. Some nodes connect to other nodes and some to attached stations.
It uses FDM or TDM for node-to-node communication. There may exist multiple paths between source
and destination for better network reliability. The switching nodes are not concerned with the contents
of data. Their purpose is to provide a switching facility that will move data from node to node until they
reach the destination
Communication based on point to point technology

Classification based on scale: -


Computer networks can be broadly categorized into three types based on scale: -

• LAN (Local Area Network)


• MAN (Metropolitan Area Network)
• WAN (Wide Area Network)

Local Area Network


A Local Area Network (LAN) is a network that is confined to a relatively small area. It is generally
limited to a geographic area such as a writing lab, school, or building. Rarely are LAN computers more
than a mile apart.

In a typical LAN configuration, one computer is designated as the file server. It stores all of the software
that controls the network, as well as the software that can be shared by the computers attached to the
network. Computers connected to the file server are called workstations. The workstations can be less
powerful than the file server, and they may have additional software on their hard drives. On most
LANs, cables are used to connect the network interface cards in each computer. See the Topology,
Cabling, and Hardware sections of this tutorial for more information on the configuration of a LAN.
A Basic Local Area Network

Metropolitan Area Network


A MAN is optimized for a larger geographical area than a LAN, ranging from several blocks of
buildings to entire cities. MANs can also depend on communications channels of moderate-to-high data
rates. A MAN might be owned and operated by a single organization, but it usually will be used by
many individuals and organizations. MANs might also be owned and operated as public utilities. They
will often provide means for internetworking of local networks.
Wide Area Network

Wide Area Networks (WANs) connect larger geographic areas, such as Florida, the United States, or
the world. Dedicated transoceanic cabling or satellite uplinks may be used to connect this type of
network.

Using a WAN, schools in Florida can communicate with places like Tokyo in a matter of minutes,
without paying enormous phone bills. A WAN is complicated. It uses multiplexers to connect local and
metropolitan networks to global communications networks like the Internet. To users, however, a WAN
will not appear to be much different than a LAN or a MAN.

A Wide Area Network


Experiment 2

Aim: To study various types of connectors

The most commonly used connectors for setting up computer networks are: -
• DB -9 (For RS-232 interface standard)
• EIA - 449
• RJ – 45
• BNC connector

DB-9
The DB9 (originally DE-9) connector is an analog 9-pin plug of the D-Subminiature connector family
(D-Sub or Sub-D).
The DB9 connector is mainly used for serial connections, allowing for the asynchronous transmission
of data as provided for by standard RS-232 (RS-232C).

The maximum cable length for RS-232 is 50ft, but in practice depends on baud rate, cable specific
capacitance and ambient noise. The table below contains some rules-of-thumb from experiments done
by Texas Instruments years ago.
Baud rate Maximum range / cable length
19200 50ft
9600 500ft
4800 1000ft
2400 3000ft

RJ-45
RJ45 is a standard type of connector for network cables. RJ45 connectors are most commonly seen
with Ethernet cables and networks.
RJ45 connectors feature eight pins to which the wire strands of a cable interface electrically. Standard
RJ-45 pinouts define the arrangement of the individual wires needed when attaching connectors to a
cable.

Several other kinds of connectors closely resemble RJ45 and can be easily confused for each other.
The RJ-11 connectors used with telephone cables, for example, are only slightly smaller (narrower)
than RJ-45 connectors.

BNC connector

The BNC connector (Bayonet Neill–Concelman) is a miniature quick connect/disconnect RF


connector used for coaxial cable. It features two bayonet lugs on the female connector; mating is
achieved with only a quarter turn of the coupling nut. BNCs are ideally suited for cable termination for
miniature-to-subminiature coaxial cable (e.g., RG-58, 59, to RG-179, RG-316). They are used
with radio, television, and other radio-frequency electronic equipment, test instruments, video signals,
and was once a popular connector for10BASE2 computer networks. BNC connectors are made to match
the characteristic impedance of cable at either 50 ohms or 75 ohms. It is usually applied for frequencies
below 3 GHz [1] and voltages below 500 Volts. Similar connectors using the bayonet connection
principle exist, and a threaded connector is also available. United States military standard MIL-PRF-
39012 entitled Connectors, Coaxial, Radio Frequency, General Specification for (formerly MIL-C-
39012) covers the general requirements and tests for radio frequency connectors used with flexible
cables and certain other types of coaxial transmission lines in military, aerospace, and spaceflight
applications.

BNC connector

The BNC was originally designed for military use and has gained wide acceptance in video and RF
applications to 2 GHz. The BNC uses a slotted outer conductor and some plastic dielectric on each
gender connector. This dielectric causes increasing losses at higher frequencies. Above 4 GHz, the slots
may radiate signals, so the connector is usable, but not necessarily stable up to about 11 GHz. Both 50
ohm and 75-ohm versions are available.
Experiment 3
Aim: Study and verification of standard Network topologies i.e. Star, Bus, Ring

Bus Topology
In local area networks where bus topology is used, each node is connected to a single cable. Each
computer or server is connected to the single bus cable. A signal from the source travels in both
directions to all machines connected on the bus cable until it finds the intended recipient. If the machine
address does not match the intended address for the data, the machine ignores the data. Alternatively,
if the data matches the machine address, the data is accepted. Since the bus topology consists of only
one wire, it is rather inexpensive to implement when compared to other topologies. However, the low
cost of implementing the technology is offset by the high cost of managing the network. Additionally,
since only one cable is utilized, it can be the single point of failure. If the network cable is terminated on
both ends and when without termination data transfer stop and when cable breaks, the entire network
will be down.

Star topology

In local area networks with a star topology, each network host is connected to a central hub with a point-
to-point connection. In Star topology every node (computer workstation or any other peripheral) is
connected to central node called hub or switch. The switch is the server and the peripherals are the
clients. The network does not necessarily have to resemble a star to be classified as a star network, but
all of the nodes on the network must be connected to one central device. All traffic that traverses the
network passes through the central hub. The hub acts as a signal repeater. The star topology is
considered the easiest topology to design and implement. An advantage of the star topology is the
simplicity of adding additional nodes. The primary disadvantage of the star topology is that the hub
represents a single point of failure.
Ring topology
A network topology that is set up in a circular fashion in which data travels around the ring in one
direction and each device on the right acts as a repeater to keep the signal strong as it travels. Each
device incorporates a receiver for the incoming signal and a transmitter to send the data on to the next
device in the ring. The network is dependent on the ability of the signal to travel around the ring. When
a device sends data, it must travel through each device on the ring until it reaches its destination.
Mesh Topology

The full mesh topology is where all nodes are connected directly to all other nodes. Although this
provides the most direct path between endpoints, in reality it doesn’t scale for anything but the simplest
architectures.
If N is the number of nodes, then N(N-1)/2 links are required to provide a full mesh.

Hybrid Topology

Hybrid networks use a combination of any two or more topologies in such a way that the resulting
network does not exhibit one of the standard topologies (e.g., bus, star, ring, etc.). For example, a tree
network connected to a tree network is still a tree network topology. A hybrid topology is always
produced when two different basic network topologies are connected.
Experiment 4
Aim: To study of different type of LAN equipment.
The various equipment used in setting up a basic LAN are: -
• Network Interface Controller (Ethernet card)
• Connecting media (UTP cable)
• RJ-45 connector
• Crimping tool
• Switch/ Hub

Network Interface Controller (Ethernet Card)

Ethernet cards are usually purchased separately from a computer, although many computers (such as
the Macintosh) now include an option for a pre-installed Ethernet card. Ethernet cards contain
connections for either coaxial or twisted pair cables (or both) (See fig. 1). If it is designed for coaxial
cable, the connection will be BNC. If it is designed for twisted pair, it will have a RJ-45 connection.
Some Ethernet cards also contain an AUI connector. This can be used to attach coaxial, twisted pair, or
fibre optics cable to an Ethernet card. When this method is used there is always an external transceiver
attached to the workstation. (See the Cabling section for more information on connectors.)

Unshielded twisted pair cable (UTP cat-5)

Category 5 cable (Cat 5) is a twisted pair cable for carrying signals. This type of cable is used
in structured cabling for computer networks such as Ethernet. The cable standard provides performance
of up to 100 MHz and is suitable for10BASE-T, 100BASE-TX (Fast Ethernet), and 1000BASE-
T (Gigabit Ethernet). Cat 5 is also used to carry other signals such as telephony and video. In some
cases, multiple signals can be carried on a single cable; Cat 5 can carry two conventional telephone
lines as well as a single 100BASE-TX channel in a single cable or two 100BASE-TX channels in a
single cable.
RJ - 45 Connector
RJ45 is the common name for an 8P8C modular connector using 8 conductors that was also used for
both RJ48 and RJ61 registered jacks (which specify pin assignments of the wires in a telephone cable),
although "RJ45" was not originally specified as a registered jack with today's Ethernet wiring. The
"RJ45" physical connector is standardised as the IEC 60603-7 8P8C modular connector with different
"categories" of performance, with all eight conductors present but 8P8C is commonly known as RJ45.
The physical dimensions of the male and female connectors are specified in ANSI/TIA-1096-A and
ISO-8877 standards and normally wired to the T568A and T568B pinouts specified in the TIA/EIA-
568standard to be compatible with both telephone and Ethernet.
Colour sequence for attaching UTP Cat-5 to RJ-45 connector straight through

Network Switch
A network switch is a computer networking device that links network segments or network devices.
The term commonly refers to a multi-port network bridge that processes and routes data at the data link
layer (layer 2) of the OSI model. Switches that additionally process data at the network layer (layer 3)
and above are often called layer-3 switches or multilayer switches.
A switch is a telecommunication device which receives a message from any device connected to it and
then transmits the message only to the device for which the message was meant. This makes the switch
a more intelligent device than a hub (which receives a message and then transmits it to all the other
devices on its network). The network switch plays an integral part in most modern Ethernet local area
networks (LANs). Mid-to-large sized LANs contain a number of linked managed switches. Small
office/home office (SOHO) applications typically use a single switch, or an all-purpose converged
device such as a residential gateway to access small office/home broadband services such
as DSL or cable Internet. In most of these cases, the end-user device contains a router and components
that interface to the particular physical broadband technology. User devices may also include a
telephone interface for VoIP.
Remote Desktop Access

A Host over a peer to peer network can be accessed remotely from other hosts from the network. The
host to be accessed should have the remote desktop feature enabled.
To enable remote desktop feature in Windows XP, go to: -
My Computer→Properties→Remote

Once the remote desktop feature has been enabled, the host can be accessed by typing its IP address in
the run prompt of any other host in the network.
After typing the address, hit enter and the windows logon pop up of the host computer will occur. Type
in the username and password, and the desktop of the host will appear on your machine.

IP Address
IP addresses are 32-bit numbers, most commonly represented in dotted decimal notation
(xxx.xxx.xxx.xxx). Each decimal number represents eight bits of binary data, and therefore can have a
decimal value between 0 and 255. IP addresses most commonly come as class A, B, or C. It's the value
of the first number of the IP address that determines the class to which a given IP address belongs. Class
D addresses are used for multi-cast applications.

The range of values for these classes is given below.

Class Range Allocation


A 1-126 N.H.H.H
B 128-191 N.N.H.H
C 192-223 N.N.N.H
D 224-239 Reserved for multicasting
E 240-255 Reserved for future use

N=Network
H=Host

• 127.0.0.0 is a class A network, but is reserved for use as a loopback address (typically
127.0.0.1).

• The 0.0.0.0 network is reserved for use as the default route.

The class of an address defines which portion of the address identifies the Network number and which
portion identifies the Host, as illustrated above, as N and H.

IP addresses are used to deliver packets of data across a network and have what is termed end-to-end
significance. This means that the source and destination IP address remain constant as the packet
traverses a network. Each time a packet travels, it can match the network number of the destination IP
address.
The IP address of a computer can be determined by using the ipconfig command at the command
prompt.

The ipconfig –a command can be used to view the detailed information.


Subnet mask
Subnet masks are essential tools in network design, but can make things more difficult to understand.
Subnet masks are used to split a network into a collection of smaller subnetworks. This may be done
to reduce network traffic on each subnetwork, or to make the internetwork more manageable as a
whole. To all intents and purposes, each subnetwork functions as if it were an independent network,
as far as entries in the routing table are concerned. The illustration below shows how a routing table
looks when subnet masks are used on a network.
Interface configuration for router 1

Interface IP Address Subnet mask


E0 150.4.2.1 255.255.255.0
E1 150.4.3.1 255.255.255.0
E2 150.4.1.1 255.255.255.0

How the subnet mask works:

Communication between a node on a local subnetwork and a node on a different subnetwork is like
communication between nodes on two different networks. To a user, routing between subnetworks is
transparent. Internally, however, the IP software recognizes any IP addresses that are destined for a
subnetwork and sends those packets to the gateway for that subnetwork.

When subnet masks are used, an IP address is interpreted as follows:

[IP address] = [Network address] [Subnetwork address] [Host address]

This shows that when a network is divided into subnetworks, the host address portion of the IP address
is divided into two parts, the subnetwork address and the host address. For example, if a network has
the Class B IP network address portion 129.47, the remainder of the IP address can be divided into
subnetwork addresses and host addresses. This division is controlled by the network administrator to
allow the most flexibility for network development at the site. A subnet mask is the mechanism that
defines how the host portion of the IP address is divided into subnetwork addresses and local host
address portions. The subnet mask is a 32-bit, (four byte) number, just as an IP address is.
Experiment 5

Lab 3.1 Building a Peer-to-Peer Network

Objective
Create a simple peer-to-peer network between two PCs
Identify the proper cable to connect the two PCs
Configure workstation IP address information
Test connectivity using the pingcommand.
Background / Preparation
This lab focuses on the ability to connect two PCs to create a simple peer-to-peer Ethernet LAN
between two workstations. The workstations will be directly connected to each other without
using a hub or switch. In addition to the Layer 1 physical and Layer 2 data link connections,
the computers must also be configured with the correct IP network settings, which is Layer 3,
so that they can communicate. A basic CAT 5/5e UTP crossover cable is all that is needed. A
crossover cable is the same type that would be used as backbone or vertical cabling to connect
switches together. Connecting the PCs in this manner can be very useful for transferring files
at high speed and for
troubleshooting interconnecting devices between PCs. If the two PCs can be connected with
a single cable and are able to communicate, then any networking problems are not with the
PCs themselves. Start this lab with the equipment turned off and with cabling disconnected.
Work in teams of two with one person per PC. The following resources will be required:
Two workstations with an Ethernet 10/100 NIC installed
Several Ethernet cables, which are both straight-through and crossover, to choose
from for connecting the two workstations
Step 1 Identify the proper Ethernet cable and connect the two PCs
a. The connection between the two PCs will be accomplished using a Category 5 or 5e
crossover cable. Locate a cable that is long enough to reach from one PC to the other, and
attach one end to the NIC in each of the PCs. Be sure to examine the cable ends carefully
and select only a crossover cable.
b. What kind of cable is required to connect from NIC to NIC?
c. What is the category rating of the cable?
d. What is the AWG wire size designation of the cable?
Step 2 Verify the physical connection
a. Plug in and turn on the computers. To verify the computer connections, insure that the link
lights on both NICs are lit. Are both link lights lit?
Step 3 Access the IP settings window
Note: Be sure to write down the existing IP settings, so that they can be restored at the
end of the lab. These include IP address, subnet mask, default gateway, and DNS
servers. If the workstation is a DHCP client, it is not necessary to record this
information.
Windows 95 / 98 / Me/ users should do the following:
Click on Start > Settings > Control Panel and then click the Network icon.
Select the TCP/IP protocol icon that is associated with the NIC in this PC and click on
Properties.
Click on the IP Address tab and the Gateway tab.
Windows NT / 2000 users should do the following:
Click on Start > Settings > Control Panel and then open the Network and Dial-up
Connections folder.
Click ad open the Local Area Connection icon.
Select the TCP/IP protocol icon that is associated with the NIC in this PC.
Click on Properties and click on Use the following IP address.
Windows XP users should do the following:
Click on Start > Settings > Control Panel and then click the Network Connection icon.
Select the Local Area Network Connection and click on Change settings of this
connection.
Select the TCP/IP protocol icon that is associated with the NIC in this PC.
Click on Properties and click on Use the following IP

address.
See the example below:

Step 4 Configure TCP/IP settings for the two PCs


a. Set the IP address information for each PC according to the information in the table.
b. Note that the default gateway IP address is not required, since these computers are directly
connected. The default gateway is only required on local area networks that are connected
to a router.

Computer IP Address Subnet mask Default Gateway

PC – A 192.168.1.1 255.255.255.0 Not Required

PC – B 192.168.1.2 255.255.255.0 Not Required

Step 5 Access the Command or MS-DOS prompt


a. Use the Start menu to open the Command Prompt (MS-DOS-like)
window: Windows 95 / 98 / Me users should do the following:

Start > Programs > MS-DOS Prompt


Windows NT / 2000 users should do the following:
Start > Programs > Accessories > Command Prompt
Windows XP users should do the following:
Start > Programs > Accessories > Command Prompt
Step 6 Verify that the PCs can communicate
a. Test connectivity from one PC to the other by pinging the IP address of the opposite
computer. Use the following command at the command prompt.
C:>ping 192.168.1.1 (or 192.168.1.2)
b. Look for results similar to those shown below. If not, check the PC connections and TCP/IP
settings for both PCs. What was the ping result?

Step 7 Confirm the TCP/IP network settings

Windows 95 / 98 / Me users should do the following:


a. Type the winipcfgcommandfrom the MS-DOS Prompt. Record the results:

Windows NT / 2000 / XP users should do the following:


b. Type the ipconfigcommand from the Command Prompt. Record the results:

Step 8 Restore the PCs to their original IP settings, disconnect the equipment, and store the
cables
Lab 3.2 Building a Hub-based Network

Objective
Create a simple network with two PCs using a hub
Identify the proper cable to connect the PCs to the hub
Configure workstation IP address information
Test connectivity using the pingcommand
Background / Preparation
This lab focuses on the ability to connect two PCs to create a simple hub-based Ethernet LAN
using two workstations. A hub is a networking concentration device sometimes referred to as
a multiport repeater. Hubs are inexpensive and easy to install, but they permit collisions to
occur. They are appropriate for a small LAN with light traffic.
In addition to the physical and data link connections, which are Layers 1 and 2, the computers
must also be configured with the correct IP network settings, which is Layer 3, so that they
can communicate. Since this lab uses a hub, a basic Category 5/5e UTP straight-through cable
is needed to connect each PC to the hub. This is referred to as a patch cable or horizontal
cabling, which is used to connect workstations and a typical LAN. Start this lab with the
equipment turned off and with cabling disconnected. Work in teams of two with one person
per PC. The following resources will be required:
Two workstations with an Ethernet 10/100 NIC installed
Ethernet 10BaseT or Fast Ethernet hub
Several Ethernet cables, which are straight-through and crossover, to choose
from for connecting the two workstations
Step 1 Identify the proper Ethernet cable and connect the two PCs to the hub

a. The connection between the two PCs and the hub will be accomplished using a Category 5
or 5e straight-through patch cable. Locate two cables that are long enough to reach from
each PC to the hub. Attach one end to the NIC and the other end to a port on the hub. Be
sure to examine the cable ends carefully and select only a straight-through cable.
b. What kind of cable is required to connect from NIC to hub?
c. What is the category rating of the cable?
d. What is the AWG wire size designation of the cable?
Step 2 Verify the physical connection
b. Plug in and turn on the computers. To verify the computer connections, insure that the link
lights
on the both PC NICs and the hub interfaces are lit. Are all link lights lit?
Step 3 Access the IP settings window
Note: Be sure to write down the existing IP settings, so that they can be restored at the
end of the lab. These include IP address, subnet mask, default gateway, and DNS
servers. If the workstation is a DHCP client, it is not necessary to record this
information.
Windows 95/98/Me users should do the following:
Click on Start > Settings > Control Panel and then click the Network icon.
Select the TCP/IP protocol icon that is associated with the NIC in this PC and click on
Properties.
Click on the IP Address tab and the Gateway tab.
Windows NT/2000 users should do the following:
Click on Start > Settings > Control Panel and then open the Network and Dial-up
Connections folder.
Click and open the Local Area Connection icon.
Select the TCP/IP protocol icon that is associated with the NIC in this PC.
Click on Properties and click on Use the following IP address.
Windows XP users should do the following:
Click on Start > Settings > Control Panel and then click the Network Connection icon.
Select the Local Area Network Connection and click on Change settings of this
connection.
Select the TCP/IP protocol icon that is associated with the NIC in this PC.
Click on Properties and click on Use the following IP address.
See the example below:

Step 4 Configure TCP/IP settings for the two PCs


c. Set the IP address information for each PC according to the information in the table.
d. Note that the default gateway IP address is not required, since these computers are directly
connected. The default gateway is only required on local area networks that are connected
to a router.

Computer IP Address Subnet mask Default Gateway

PC – A 192.168.1.1 255.255.255.0 Not Required

PC – B 192.168.1.2 255.255.255.0 Not Required

Step 5 Access the Command or MS-DOS prompt


b. Use the Start menu to open the Command Prompt (MS-DOS-like)
window: Windows 95/98/Me users should do the following:

Start > Programs > MS-DOS Prompt


Windows NT/2000 users should do the following:
Start > Programs > Accessories > Command Prompt
Windows XP users should do the following:
Start > Programs > Accessories > Command Prompt
Step 6 Verify that the PCs can communicate
c. Test connectivity from one PC to the other through the hub by pinging the IP address
of the opposite computer. Use the following command at the command prompt.
C:>ping 192.168.1.1 (or 192.168.1.2)
d. Look for results similar to those shown below. If not, check the PC connections and TCP/IP
settings for both PCs. What was the ping result?

Step 7 Confirm the TCP/IP network settings


Windows 95 / 98 / Me users should do the following:
a. Type the winipcfgcommand from the MS-DOS Prompt. Record the results.

Windows NT / 2000 / XP users should do the following:


b. Type the ipconfigcommand from the Command Prompt. Record the results.

Step 8 Restore the PCs to their original IP settings, disconnect the equipment, and store the
cables
Lab 3.3 Building a Switch-based Network

Objective
Create a simple network with two PCs using a switch
Identify the proper cable to connect the PCs to the switch
Configure workstation IP address information
Test connectivity using the pingcommand
Background / Preparation
This lab focuses on the ability to connect two PCs to create a simple switch-based Ethernet
LAN using two workstations. A switch is a networking concentration device sometimes
referred to as a multiport bridge. Switches are relatively inexpensive and easy to install.
When operating in full- duplex mode, they provide dedicated bandwidth to workstations.
Switches eliminate collisions by creating microsegments between ports to which the two
workstations are attached. They are appropriate for small to large LANs with moderate to
heavy traffic.
In addition to the physical and data link connections, which are Layers 1 and 2, the computers
must also be configured with the correct IP network settings, which is Layer 3, so that they can
communicate. Since this lab uses a switch, a basic Category 5/5e UTP straight-through cable
is needed to connect each PC to the switch. This is referred to as a patch cable or horizontal
cabling, which is used to connect workstations and a typical LAN. Start this lab with the
equipment turned off and with cabling disconnected. Work in teams of two with one person
per PC. The following resources will be required:
Two workstations with an Ethernet 10/100 NIC installed
Ethernet 10BaseT or Fast Ethernet switch
Several Ethernet cables, which are straight-through and crossover, to choose from for
connecting the two workstations

Step 1 Identify the proper Ethernet cable and connect the two PCs to the switch
a. The connection between the two PCs and the switch will be accomplished using a Category
5 or 5e straight-through patch cable. Locate two cables that are long enough to reach from each
PC to the switch. Attach one end to the NIC and the other end to a port on the switch. Be sure
to examine the cable ends carefully and select only a straight-through cable.
b. What kind of cable is required to connect from NIC to switch?
c. What is the category rating of the cable?
d. What is the AWG wire size designation of the cable?
Step 2 Verify the physical connection
c. Plug in and turn on the computers. To verify the computer connections, insure that the link
lights on the both PC NICs and the switch interfaces are lit. Are all link lights lit?
Step 3 Access the IP settings window
Note: Be sure to write down the existing IP settings, so that they can be restored at the
end of the lab. These include IP address, subnet mask, default gateway, and DNS
servers. If the workstation is a DHCP client, it is not necessary to record this
information.
Windows 95 / 98 / Me/ users should do the following:
Click on Start > Settings > Control Panel and then click the Network icon.
Select the TCP/IP protocol icon that is associated with the NIC in this PC and click on
Properties.
Click on the IP Address tab and the Gateway tab.
Windows NT / 2000 users should do the following:
Click on Start > Settings > Control Panel and then open the Network and Dial-up
Connections folder.
Click and open the Local Area Connection icon.
Select the TCP/IP protocol icon that is associated with the NIC in this PC.
Click on Properties and click on Use the following IP address.
Windows XP users should do the following:
Click on Start > Settings > Control Panel and then click the Network Connection icon.
Select the Local Area Network Connection and click on Change settings of this
connection.
Select the TCP/IP protocol icon that is associated with the NIC on this PC.
Click on Properties and click on Use the following IP
address.

See the example below:

Step 4 Configure TCP/IP settings for the two PCs


e. Set the IP address information for each PC according to the information in the table.
f. Note that the default gateway IP address is not required, since these computers are directly
connected. The default gateway is only required on local area networks that are connected
to a router.

Computer IP Address Subnet mask Default Gateway

PC – A 192.168.1.1 255.255.255.0 Not Required

PC – B 192.168.1.2 255.255.255.0 Not Required

Step 5 Access the Command or MS-DOS prompt


b. Use the Start menu to open the Command Prompt (MS-DOS-like)
window: Windows 95 / 98 / Me users should do the following:
Start > Programs > MS-DOS Prompt
Windows NT / 2000 users should do the following:

Start > Programs > Accessories > Command Prompt


Windows XP users should do the following:
Start > Programs > Accessories > Command Prompt
Step 6 Verify that the PCs can communicate
e. Test connectivity from one PC to the other through the switch by pinging the IP address
of the opposite computer. Use the following command at the command prompt.
C:>ping 192.168.1.1 (or 192.168.1.2)
f. Look for results similar to those shown below. If not, check the PC connections and
TCP/IP settings for both PCs. What was the ping result?

Step 7 Confirm the TCP/IP network settings


Windows 95 / 98 / Me users should do the following:
c. Type the winipcfgcommand from the MS-DOS Prompt. Record the results.

Windows NT / 2000 / XP users should do the following:


d. Type the ipconfigcommand from the Command Prompt. Record the results.

Step 8 Restore the PCs to their original IP settings, disconnect the equipment, and store the
cables
Experiment 6
Lab 4.a IP Addressing Basics

Objective
Name the five different classes of IP addresses
Describe the characteristics and use of the different IP address classes
Identify the class of an IP address based on the network number
Determine which part, or octet, of an IP address is the network ID and which part is the
host ID
Identify valid and invalid IP host addresses based on the rules of IP addressing
Define the range of addresses and default subnet mask for each class
Background / Preparation
This lab exercise helps develop an understanding of IP addresses and how TCP/IP networks
operate. It is primarily a written lab exercise. However, it would be worthwhile to review some
real network IP addresses using the command line utilities ipconfigfor Windows NT/2000/XP
or winipcfg for Windows 9x/ME. IP addresses are used to uniquely identify individual TCP/IP
networks and hosts, such as computers and printers, on those networks in order for devices to
communicate. Workstations and servers on a TCP/IP network are called hosts and each has a
unique IP address. This address is referred to as its host address. TCP/IP is the most widely
used protocol in the world. The Internet or World Wide Web only uses IP addressing. In order
for a host to access the Internet, it must have an IP address.
In its basic form, the IP address has two parts:
A network addresses
A host addresses
The network portion of the IP address is assigned to a company or organization by the Internet
Network Information Centre (InterNIC). Routers use the IP address to move data packets
between networks. IP addresses are 32 bits long according to the current version IPv4 and are
divided into 4 octets of 8 bits each. They operate at the network layer (Layer 3) of the Open
System Interconnection (OSI) model, which is the Internet layer of the TCP/IP model. IP
addresses are assigned in the following ways:
Statically – manually, by a network administrator
Dynamically – automatically, by a Dynamic Host Configuration Protocol (DHCP) server
The IP address of a workstation, or host is a logical address, meaning it can be changed. The
Media Access Control (MAC) address of the workstation is a 48-bit physical address. This
address is burned into the network interface card (NIC) and cannot change unless the NIC is
replaced. The combination of the logical IP address and the physical MAC address helps route
packets to their proper destination.
There are five different classes of IP addresses, and depending on the class, the network and
host part of the address will use a different number of bits. In this lab, different classes of IP
addresses will be worked with and to help become familiar with the characteristics of each. The
understanding of IP addresses is critical to the understanding of TCP/IP and internetworks in
general. The following resources are required:
PC workstation with Windows 9x/NT/2000/XP installed
Access to the Windows Calculator

Step 1: Review IP address classes and their characteristics


Address classes
There are five classes of IP addresses, A through E. Only the first three classes are used
commercially. A Class A network address is discussed in the table to get started. The first
column is the class of IP address. The second column is the first octet, which must fall within
the range shown for a given class of addresses. The Class A address must start with a number
between 1 and 126. The first bit of a Class A address is always a zero, meaning the High Order
Bit (HOB) or the 128 bits cannot be used. 127 is reserved for loopback testing. The first octet
alone defines the network ID for a Class A network address.
Default subnet mask
The default subnet mask uses all binary ones, decimal 255, to mask the first 8 bits of the Class
A address. The default subnet mask helps routers and hosts determine if the destination host is
on this network or another one. Because there are only 126 Class A networks, the remaining 24
bits, or 3 octets, can be used for hosts. Each Class A network can have 224, or over 16 million
hosts. It is common to subdivide the network into smaller groupings called subnets by using a
custom subnet mask, which is discussed in the next lab.
Network and host address
The network or host portion of the address cannot be all ones or all zeros. As an example, the
Class A address of 118.0.0.5 is a valid IP address. The network portion, or first 8 bits, which
are equal to 118, is not all zeros and the host portion, or last 24 bits, is not all zeros or all ones.
If the host portion were all zeros, it would be the network address itself. If the host portion were
all ones, it would be a broadcast for the network address. The value of any octet can never be
greater than decimal 255 or binary 11111111.

Class 1st Octet 1st Octet


Network/Host ID Default Number of Hosts per
Decimal High Order
Range Bits (N=Network, Subnet Mask Networks Network
H=Host)
(Usable
Addresses)
A 1 – 126 * 0 N.H.H.H 255.0.0.0 126 (27 – 2) 16,777,214

(224 – 2)

B 128 – 191 10 N.N.H.H 255.255.0.0 16,382 65,534


(214 – 2) (216 – 2)

C 192 – 223 110 N.N.N.H 255.255.255.0 2,097,150 254 (28 – 2)

(221 – 2)
D 224 – 239 1110 Reserved for Multicasting

E 240 – 254 11110 Experimental; used for research

Note: Class A address 127 cannot be used and is reserved for loop back and diagnostic functions.
Step 2: Determine basic IP addressing
Use the IP address chart and your knowledge of IP address classes to answer
the following questions:
1. What is the decimal and binary range of the first octet of all possible Class B IP
addresses?
Decimal: From: To:
Binary: From: To:

2. Which octet(s) represent the network portion of a Class C IP address?


3. Which octet(s) represent the host portion of a Class A IP address?
4. What is the maximum number of useable hosts with a Class C network address?
5. How many Class B networks are there?
6. How many hosts can each Class B network have?
7. How many octets are there in an IP address? How many bits per octet?
Step 3: Determine the host and network portions of the IP address
With the following IP host addresses, indicate the following:
Class of each address
Network address or ID
Host portion
Broadcast address for this network
Default subnet mask
The host portion will be all zeros for the network ID. Enter just the octets that make up
the host. The host portion will be all ones for a broadcast. The network portion of the
address will be all ones for the subnet mask. Fill in the following table:

Host IP Address Address Network Host Network Broadcast Default Subnet


Class Address Address Address Mask

216.14.55.137
123.1.1.15

150.127.221.244

194.125.35.199

175.12.239.244

Step 4: Given an IP address of 142.226.0.15 and a subnet mask of 255.255.255.0, answer the
following questions:

What is the binary equivalent of the second octet?


What is the class of the address?
What is the network address of this IP address?
Is this a valid IP host address (Y/N)?
Why or why not?

Step 5: Determine which IP host addresses are valid for commercial networks

For the following IP host addresses, determine which are valid for commercial networks and indicate
why or why not. Valid means it could be assigned to any of the following:
Workstation
Server
Printer
Router interface
Any other compatible device
Fill in the following table:

IP Host Address Valid Address? Why or Why Not


(Yes/No)
150.100.255.255
175.100.255.18

195.234.253.0

100.0.0.23

188.258.221.176

127.34.25.189

224.156.217.73

Lab 4.b Study of DHCP Client Setup

Objective
The purpose of this lab is to introduce Dynamic Host Configuration Protocol (DHCP) and the
process for setting up a network computer as a DHCP client to use DHCP services.
Background / Preparation
DHCP provides a mechanism for dynamically assigning IP addresses and other information. A
DHCP server device located on the LAN or at the ISP can respond to a host request and furnish
all of the following required information:
IP address
Subnet mask
Default gateway
Domain Name System (DNS) server
Other resource addresses
Without DHCP all of the above information would have to be manually configured on
each host individually.
The DHCP device is typically a network server.
In small networks, DHCP services can be provided by a small router. This includes many home
networks with DSL, cable, or wireless connections. Cisco and many other manufacturers offer
small routers that include the following features:
An Internet or WAN connection
A small built-in hub or switch
A DHCP server service
This lab will focus on setting up a computer to use the DHCP services provided.
This lab assumes the PC is running any version of Windows. Ideally, this lab will be done in a
classroom or other LAN connected to the Internet. It can also be done from a single remote
connection via a modem or DSL-type connection.
Note: If the network that the computer is connected to is using static addressing, follow
the lab and view the various screens. Do not try to change settings on these machines.
The static settings will be lost and would require reconfiguration.
Step 1 Establish a network connection
If the connection to the Internet is dialup, connect to the ISP to ensure that the computer has an
IP address. In a TCP/IP LAN with a DHCP server it should not be necessary to do this step.
Step 2 Access a command prompt
Windows NT, 2000, and XP users will use the Start menu to open the Command Prompt
window. The Command Prompt window is like the MS-DOS Prompt window for other
Windows versions:
Start > Programs > Accessories > Command Prompt or Start > Programs > Command
Prompt
To open the MS-DOS Prompt window, Windows 95, 98, and ME users will use the Start menu:
Start > Programs > Accessories > MS-DOS Prompt or Start > Programs > MS-DOS
Prompt
Step 3 Display IP settings to determine if the network is using DHCP
Windows 95/98/ME users:
Type winipcfg and press Enter, then click the More Info button.
The example below indicates that DHCP is in fact being used by the entries in the following
boxes:
DHCP Server IP address
Lease Obtained
Lease Expires
These entries would be blank in a statically configured device. DHCP also supplied the DHCP
and WINS server addresses. The missing default gateway indicates a proxy server.
Windows NT / 2000 / XP users:
Type ipconfig/alland press Enter.
The following Windows NT, 2000, and XP example indicates that DHCP is in fact being used
by the DHCP enabled entry. The entries for the DHCP Server, Lease Obtained, and Lease
Expires confirm this fact. These last three entries would not exist in a statically configured
device and DHCP enabled would say No.
Is DHCP running on the network?
Ask the instructor or lab assistant for help if it is hard to tell whether or not the DHCP is
actually running.
What is the length of the DHCP lease?
DHCP servers provide IP addresses for a limited time, usually several days. However, the
actual length of time can be configured by the network administrator. If a lease expires, the
IP address is returned to the pool to be used by others. This allows DHCP to recapture inactive
IP addresses without humans having to update the records. An organization that lacks enough
IP addresses for every user may use very short lease durations, so that they are reused even
during brief periods of inactivity.
When a computer stays connected to the network and remains powered on, it will
automatically request that the lease be extended. This helps a computer avoid an expired
lease as long as it is used regularly.
Sometimes a computer is moved from one network to another where the network portion of
the IP address is different. When this happens, the computer may still retain its settings from
the old network and be unable to connect to the new network. One solution is to release and
renew the lease. Statically configured computers can do this, but there will be no change.
Computers connected directly to an ISP may lose connection and have to replace their call,
but no permanent changes will occur. Follow these steps to release and renew the DHCP
lease:
Windows NT/2000/XP users:

Type ipconfig/release andpress Enter. Look over the results and then type ipconfig/renew.
Since the machine did not actually change locations as described above, the same settings
as before will probably appear. If the machine had been moved as described above, a new
setting would appear.
Windows 95/98/ME users:

Click on the Release All button. Look over the results and then click on the Renew All
button. Since the machine did not actually change locations as described above, the same
settings as before will probably appear. If the machine had been moved as described
above, new settings would appear.
Step 4 Accessing the network configuration window
On the desktop, right click on the Network Neighbourhood or My Network Places icon and
choose properties. If neither icon on the machine, try using the Start button:
Start > Settings > Control Panel
Then double click on the Network icon.
Some users will see a screen like the Network properties box shown below:
Different versions of Windows will have slightly different tabs and the current configuration
of the computer will determine the items included in the Network Components box. However,
the box should still look similar to the one above.
Most Windows 95, 98, and ME systems should see the Network Properties at this point. So, if
a Network window similar to the one above is shown, skip to the next numbered step. Windows
2000 and XP users need to do two more things. In the window, double-click on Local Area
Connection. When the Local Area Connection Status window appears, click on the
Properties button. That will bring up a Local Area Connection Properties similar to the one
shown in the next step.
In the network properties window scroll through the listed components and find a listing for TCP/IP. If
there is more than one listing, find the one for the current network connection, such as NIC or modem.
In Windows 2000 and XP it will look like the following:

Select the appropriate TCP/IP entry and click on the Properties button or double-click directly on the
TCP/IP entry. The screen that will appear next depends again on the version of Windows being used, but
the process and concepts are the same. The screen below should look very similar to what Windows 2000
and XP users are seeing. First thing that should be noted on the example computer is that it is configured
for Static addressing.
Step 5 Enable DHCP
To enable DHCP, select Obtain an IP address automatically and typically select Obtain DNS server
address automatically. The various settings will blank out as these options are selected. If the computer
had Static addressing and it needs to be restored, click on the Cancel button. To keep the changed
settings, click OK.
Older versions of Windows have multiple tabs and require selecting Obtain an IP address
automatically on this tab and then going to the DNS Configuration tab to select Obtain DNS
server address automatically.
If this computer was really being converted from static to DHCP, any entries in the Gateway and WINS
Configuration tabs would need to be removed.
If the computer had Static addressing and it needs to be restored, click on the Cancel button. To
keep these settings, click OK.
Older versions of Windows will say that it is necessary to restart the computer. Windows 2000 and XP
typically do not require a restart.
Windows 95 might even ask for the installation CD-ROM to complete the process.
If the computer was really being changed over to DHCP, Step 3 would be repeated to confirm the
valid set of configurations.
Reflection
Why might a network administrator prefer that various network profiles be used to hide the above
options and screens, thereby preventing users from making any changes?

As a network administrator what would be some of the potential benefits of using a DHCP server within
a network?

Note: Many small routers that are supplied for cable, DSL, or ISDN connections have DHCP configured
by default. This allows additional computers to share the network connection through the use of a hub or
switch. Each computer would need to be configured like in the lab. Typically, DHCP will assign
addresses using one of the private networks, such as192.168.1.0, that are set-aside for this purpose. While
it is common to allow these settings to be changed, read and understand the instruction manual first.
Learn where the Reset Defaults button is located.
Lab 4.c Study of Workstation ARP

Objective
Introduce Address Resolution Protocol (ARP) and the arp –aworkstation command.
Explore the arpcommand help feature using the -? option.
Background / Preparation
ARP is used as a tool for confirming that a computer is successfully resolving network Layer 3 addresses
to Media Access Control (MAC) Layer 2 addresses. The TCP/IP network protocol relies on IP addresses
like 192.168.14.211 to identify individual devices and to assist in navigating data packets between
networks. While the IP address is essential to move data from one LAN to another, it cannot deliver the
data in the destination LAN by itself. Local network protocols, like Ethernet or Token Ring, use the
MAC, or Layer 2, address to identify local devices and deliver all data. A computer MAC address has
been seen in prior labs.
This is an example of a MAC address:

00-02-A5-9A-63-5C

A MAC address is a 48-bit address displayed in Hexadecimal (HEX) format as six sets of two HEX
characters separated by dashes. In this format each hex symbol represents 4 bits. With some devices,
the 12 hex characters may be displayed as three sets of four characters separated by periods or colons
(0002.A59A.635C).
ARP maintains a table in the computer of IP and MAC address combinations. In other words, it keeps
track of which MAC address is associated with an IP address. If ARP does not know the MAC address
of a local device, it issues a broadcast using the IP address. This broadcast searches for the MAC address
that corresponds to the IP address. If the IP address is active on the LAN, it will send a reply from which
ARP will extract the MAC address. ARP will then add the address combination to the local ARP table
of the requesting computer.
MAC addresses and therefore ARP are only used within the LAN. When a computer prepares a packet
for transmission, it checks the destination IP address to see if it is part of the local network. It does this
by checking to see if the network portion of the IP address is the same as the local network. If it is, the
ARP process is consulted to get the MAC address of the destination device using the IP address. The
MAC address is then applied to the data packet and used for delivery.
If the destination IP address is not local, the computer will need the MAC address of the default gateway.
The default gateway is the router interface that the local network is connected to in order to provide
connectivity with other networks. The gateway MAC address is used because the packet will be delivered
there and the router will then forward it to the network it is intended for.
If the computer does not receive any packets from an IP address after a few minutes, it will drop the
MAC/IP entry from the ARP table assuming the device has logged off. Later attempts to access that IP
address will cause ARP to do another broadcast and update the table.
This lab assumes the use of any version of Windows. This is a non-destructive lab and can be performed
with a home machine without concern of changing the system configuration. Ideally, this lab will be
done in a classroom or other LAN connected to the Internet. It can be done from a single remote
connection via a modem or DSL-type connection.
Step 1 Establish a network connection
If the connection to the Internet is dial-up, connect to the ISP to ensure that the computer has an IP
address. In a TCP/IP LAN with a Dynamic Host Configuration Protocol (DHCP) server it should not be
necessary to do this step.
Step 2 Access a command prompt
Windows NT / 2000 / XP users:
Use the Start menu to open the Command Prompt window. This window is similar to the MS-DOS
window on older Windows versions:
Start > Programs > Accessories > Command Prompt or Start > Programs > Command Prompt
Windows 95 / 98 / ME users:
Use the Start menu to open the MS-DOS Prompt window:
Start > Programs > Accessories > MS-DOS Prompt or Start > Programs > MS-DOS Prompt
Step 3 Display the ARP table
a. In the window type arp -aand press Enter. Do not be surprised if there are no entries. The
message displayed will probably be, ‘No ARP Entries Found’. Windows computers
remove any addresses that are unused after a couple minutes.
b. Try pinging a couple local addresses and a website URL. Then re-run the command. The
figure below shows a possible result of the arp -acommand. The MAC address for the
website will be listed because it is not local, but that will cause the default gateway to be
listed. In the example below 10.36.13.1 is the default gateway while the 10.36.13.92 and
10.36.13.101 are other network computers. Notice that for each IP address there is a
physical address, or MAC, and type, indicating how the address was learned.
c. From the figure below, it might be logically concluded that the network is 10.36.13.0 and
the host computers are represented by 22, 1, 92, and 101.

Step 4 Ping several URLs


a. Ping the following URLs and note the IP address of each. Also select one additional URL
to ping and record it below:
www.cisco.com:
www.msn.de:
b. Now run the arp –acommand again and record the MAC addresses for each of the above
next to their IP addresses. Can it be done?
c. Why or why not?

d. What MAC address was used in delivering each of the pings to the URLs? Why?

Step 4 Use the ARP help feature


Try the command arp -?to see the help feature and look over the options.

The purpose of this step is not so much the ARP command options but to demonstrate using
the?to access help, if available. Help is not always implemented uniformly. Some commands
use /? instead of -?
Step 5 Use help with tracert and ping
Try tracert -?and then ping -?to see the options available for the commands used previously.
In looking at the help for ping, notice the –t option, which will send continuous pings, not just four.
More importantly, notice the two commands to stop it:
Control-Break
Control-C
These two-key commands are common for stopping runaway activities. Try pinging a
neighbouring computer with the -t option and then try the Control-Break and Control-C
features. An example in the above network would be ping 10.36.13.101 -tand then press Enter.
Be sure to use the Control-Ccommand to stop the pings.
Reflection
Based on observations made today, what could be deduced about the following results?
Computer 1
IP Address: 192.168.12.113
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.12.1
Pings and tracert to 207.46.28.116 were both successful.
What will be the ARP table entry associated with this address and why?
Experiment 7

Lab 5.a Study of Basic Subnetting

Objective
How to identify reasons to use a subnet mask
How to distinguish between a default subnet mask and a custom subnet mask
What given requirements determine the subnet mask, number of subnets, and hosts per
subnet
What needs to be understood about useable subnets and useable numbers of hosts
How to use the ANDing process to determine if a destination IP address is local or remote
How to identify valid and invalid IP host addresses based on a network number and subnet
mask
Background / Preparation
This lab exercise focuses on the basics of IP subnet masks and their use with TCP/IP networks.
The subnet mask can be used to split up an existing network into subnetworks, or subnets. Some
of the primary reasons for subnetting are the following:
Reduce the size of the broadcast domains, which creates smaller networks with less traffic
Allow LANs in different geographical locations to communicate through routers
Provide improved security by separating one LAN from another
Routers separate subnets, and determine when a packet can go from one subnet to another.
Each router a packet goes through is considered a hop. Subnet masks help workstations,
servers, and routers in an IP network determine if the destination host for the packet they want
to send is on their own network or another network. This lab reviews the default subnet mask
and then focuses on custom subnet masks. Custom subnet masks use more bits than the default
subnet masks by borrowing these bits from the host portion of the IP address. This creates a
three-part address:
The original network addresses
The subnet address made up of the bits borrowed
The host address made up of the bits left after borrowing some for subnets
Step 1 Review the structure of IP addresses
If an organization has a Class A IP network address, the first octet, or 8 bits, is assigned and
does not change. The organization can use the remaining 24 bits to define up to 16,777,214
hosts on its network. This is a lot of hosts. It is not possible to put all of these hosts on one
physical network without separating them with routers and subnets.
It is common for a workstation to be on one network or subnet and a server to be on another.
When the workstation needs to retrieve a file from the server it will need to use its subnet mask
to determine the network or subnet that the server is on. The purpose of a subnet mask is to
help hosts and routers determine the network location where a destination host can be found.
Refer to the table below to review the following information:
The IP address classes
The default subnet masks
The number of networks that can be created with each class of network address
The number of hosts that can be created with each class of network address

Address 1st Octet 1st Octet Network/Host ID Default Number Hosts per
Decimal of
Class Range High (N=Network, Subnet Mask Network
Networks
H=Host)
Order Bits (Usable
Addresses)
A 1 – 126 * 0 N.H.H.H 255.0.0.0 126 (27 – 16,777,214
2) (224 – 2)

B 128 – 191 10 N.N.H.H 255.255.0.0 16,382 65,534


(214 – 2) (216 – 2)

C 192 – 223 110 N.N.N.H 255.255.255.0 2,097,150 254 (28 – 2)

(221 – 2)

D 224 – 239 1110 Reserved for Multicasting

E 240 – 254 11110 Experimental; used for research

* Class A address 127 cannot be used and is reserved for loopback and diagnostic functions.
Step 2 Review the ANDing process
Hosts and routers use the ANDing process to determine if a destination host is on the same
network or not. The ANDing process is done each time a host wants to send a packet to another
host on an IP network. In order to connect to a server, the IP address of the server or the host
name, such as, http://www.cisco.com, must be known. If the host name is used a Domain Name
Server (DNS) will convert it to an IP address.
First, the source host will compare, or AND, its own IP address to its own subnet mask. The
result of the ANDing is to identify the network where the source host resides. It will then
compare the destination IP address to its own subnet mask. The result of the 2nd ANDing will
be the network that the destination host is on. If the source network address and the destination
network address are the same, they can communicate directly. If the results are different, they
are on different networks or subnets. If this is the case, the source host and the destination host
will need to communicate through routers or might not be able to communicate at all.
ANDing depends on the subnet mask. Subnet masks are always all ones. A default subnet mask
for a Class C network is 255.255.255.0 or 11111111.111111111.111111111.00000000. This is
compared to the source IP address bit for bit. The first bit of the IP address is compared to the
first bit of the subnet mask, the second bit to the second, and so on. If the two bits are both
ones, the ANDing result is a one. If the two bits are a zero and a one, or two zeros, the ANDing
result is a zero. Basically, this means that a combination of 2 one’s results in a one, anything
else is a zero. The result of the ANDing process is the identification of the network or subnet
number that the source or destination address is on.
Step 3 Two Class C networks using the default subnet mask
This example shows how a Class C default subnet mask can be used to determine which network
a host is on. A default subnet mask does not break an address into subnets. If the default subnet
mask is used, the network is not being subnetted. Host X, the source on network 200.1.1.0 has
an IP address of 200.1.1.5. It wants to send a packet to Host Z, the destination on network
200.1.2.0 and has an IP address of 200.1.2.8. All hosts on each network are connected to hubs
or switches and then to a router. Remember that with a Class C network address, the first 3
octets, or 24 bits, are assigned as the network address. So, these are two different Class C
networks. This leaves one octet, or 8 bits for hosts, so each Class C network could have up to
254 hosts:

28 = 256 – 2 = 254
Source net: 200.1.1.0 Destination net: 200.1.2.0
Subnet mask: 255.255.255.0 Subnet mask: 255.255.255.0

R
Host Switch o Switch Host
u
X t Z
e
r

Host IP 200.1.1.5 Host


200.1.2.8

Router interface Router interface

IP 200.1.1.1 IP 200.1.2.1
The ANDing process helps the packet get from Host 200.1.1.5 on network 200.1.1.0 to Host
200.1.2.8 on network 200.1.2.0 by using the following steps:
1. Host X compares its own IP address to its own subnet mask using the ANDing process.
Host X IP address 200.1.1.5 11001000.00000001.00000001.00000101
Subnet Mask 255.255.255.0 11111111.11111111.11111111.0000000
ANDing Result (200.1.1.0) 11001000.00000001.00000001.00000000
Note: The result of the ANDing process is the network address of Host X, which is
200.1.1.0.
2. Next, Host X compares the IP address of the Host Z destination to its own subnet mask
using the ANDing process.
Host Z IP address 200.1.2.8 11001000.00000001.00000010.00001000
Subnet Mask 255.255.255.0 11111111.11111111.11111111.00000000
ANDing Result (200.1.2.0) 11001000.00000001.00000010.00000000

Note: The result of the ANDing process is the network address of Host Z, which is
200.1.2.0. Host X compares the ANDing results from Step 1 and the ANDing results from
Step 2, and notes they are different. Host X now knows that Host Z is not in its local-area
network (LAN). Therefore, it must send the packet to its default gateway, which is the IP
address of the router interface of 200.1.1.1 on network 200.1.1.0. The router then repeats
the ANDing process to determine which router interface to send the packet out to.

Step 4 One Class C network with subnets using a custom subnet mask
This example uses a single Class C network address (200.1.1.0) and shows how a Class
C custom subnet mask can be used to determine which subnetwork (or subnet) a host is
on and to route packets from one subnetwork to another. Remember that with a Class C
network address, the first 3 octets, or 24 bits are assigned as the network address. This
leaves one octet, or 8 bits, for hosts. So, each Class C network could have up to 254 hosts:

28 = 256 – 2 = 254
Perhaps less than 254 hosts, workstations and servers combined, are desired on one
network. This could be for security reasons or to reduce traffic. It can be done by creating
two subnetworks and separating them with a router. This will create smaller independent
broadcast domains and can improve network performance and increase security. This is
possible because these subnetworks will be separated by one or more router. Assume at
least two subnetworks will be needed and that there will be at least 50 hosts per
subnetwork. Because there is only one Class C network address, only 8 bits in the fourth
octet are available for a total of 254 possible hosts. Therefore, a custom subnet mask must
be created. The custom subnet mask will be used to borrow bits from the host portion of
the address. The following steps help accomplish this:
1. The first step to subnetting is to determine how many subnets are needed. In this case,
its two subnetworks. To see how many bits should be borrowed from the host portion
of the network address, add the bit values from right to left until the total is equal to
or greater than the number of subnets needed. Because two subnets are needed, add
the one bit and the two bits, which equals three. This is greater than the number of
subnets needed. To remedy this, borrow at least two bits from the host address starting
from the left side of the octet that contains the host address.
Network address: 200.1.1.0
th octet
4 Host address bits: 1 1 1 1 1 1 1 1
Host address bit values 128 64 32 16 8 4 2 1
(from right)

Add bits starting from the right side, the 1 and the 2, until the sum is greater than the number of subnets
needed.
Note: An alternate way to calculate the number bits to be borrowed for subnets is to take the number
of bits borrowed to the power of 2. The result must be greater than the number of subnets needed.
As an example, if 2 bits are borrowed the calculation is two to the second power, which equals four.
Since the number of subnets needed is two this should be adequate.
2. After we know how many bits to borrow, we take them from the left side of the of
the host address, the 4th octet. Every bit borrowed from the host address bit leaves
fewer bits for the hosts. Even though the number of subnets is increased, the
number of hosts per subnet is decreased. Because two bits need to be borrowed
from the left side, that new value must be shown in the subnet mask. The existing
default subnet mask was 255.255.255.0 and the new custom subnet mask is
255.255.255.192. The 192 results from adding the first two bits from the left, 128
+ 64 = 192. These bits now become 1s and are part of the overall subnet mask. This
leaves 6 bits for host IP addresses or 26 = 64 hosts per subnet.
4th Octet borrowed bits for subnet: 1 1 0 0 0 0 0 0
Subnet bit values: (from left side) 128 64 32 16 8 4 2 1

With this information, the following table can be built. The first two bits are the subnet binary
value.
The last 6 bits are the host bits. By borrowing 2 bits from the 8 bits of the host address 4 subnets,
2^2, with 64 hosts each, can be created. The 4 networks created are as follows:
The 200.1.1.0 network
The 200.1.1.64 network
The 200.1.1.128 network
The 200.1.1.192 network
The 200.1.1.0 network is considered unusable, unless the networking device supports the IOS
command ip subnet-zero, which allows using the first subnet.

Subnet No. Subnet Bits Subnet Bits Host Bits Possible Subnet/Host Useable?
Borrowed Decimal Decimal
Binary Values (Range)
Binary Value Value Range
(6 Bits)
0 Subnet 00 0 000000–111111 0–63 No

1st Subnet 01 64 000000–111111 64–127 Yes

2nd Subnet 10 128 000000–111111 128–191 Yes


3rd Subnet 11 192 000000–111111 192–254 No

Notice that the first subnet always starts at 0 and, in this case, increases by 64, which is the number of
hosts on each subnet. One way to determine the number of hosts on each subnet or the start of each
subnet is to take the remaining host bits to the power of 2. Because we borrowed two of the 8 bits for
subnets and have 6 bits left, the number of hosts per subnet is 26 or 64. Another way to figure the number
of hosts per subnet or the increment from one subnet to the next is to subtract the subnet mask value in
decimal, 192 in the fourth octet, from 256, which is the maximum number of possible combinations of
8 bits. This equals 64. This means start at 0 for the first network and add 64 for each additional
subnetwork. For example, if the second subnet is used, the 200.1.1.64 network cannot be used for a host
ID since the network ID of the 64 subnet has all zeros in the host portion.
Another common way to represent a subnet mask, is the use of the “slash/number” (/#) where the #
following the slash is the number of bits used in the mask (network and subnet combined). As an
example, a Class C network address such as 200.1.1.0 with a standard subnet mask (255.255.255.0)
would be written as 200.1.1.0 /24, indicating that 24 bits are used for the mask. The same network, when
subnetted by using two host bits for subnets, would be written as 200.1.1.0 /26. This indicates that 24
bits are used for the network and 2 bits for the subnet. This would represent a custom subnet mask of
255.255.255.192 in dotted decimal format.
A Class A network of 10.0.0.0 with a standard mask (255.0.0.0) would be written as 10.0.0.0 /8. If 8
bits (the next octet) were being used for subnets it would be written as 10.0.0.0 /16. This would represent
a custom subnet mask of 255.255.0.0 in dotted decimal format. The “slash” number after the network
number is an abbreviated method of indicating the subnet mask being used.

Step 5 Use the following information and the previous examples to answer the following subnet-
related questions

A company has applied for and received a Class C network address of 197.15.22.0. The physical network
is to be divided into 4 subnets, which will be interconnected by routers. At least 25 hosts will be needed
per subnet. A Class C custom subnet mask needs to be used and a router is needed between the subnets
to route packets from one subnet to another. Determine the number of bits that need to be borrowed from
the host portion of the network address and the number of bits that will be left for host addresses.
Note: There will be 8 possible subnets, of which 6 can be used. Fill in the
following table and answer the following questions:

Subnet No. Subnet Bits Subnet Bits Host Bits Possible Subnet/Host Use?
Borrowed Decimal and Decimal
Binary Values
Binary Value Subnet No. Range
(Range) (5 Bits)
0 Subnet

1st Subnet

2nd Subnet

3rd Subnet
4th Subnet

5th Subnet

6th Subnet

7th Subnet

NOTES:

Use the table just developed to help answer the following questions:
1. Which octet(s) represent the network portion of a Class C IP address?
2. Which octet(s) represent the host portion of a Class C IP address?
3. What is the binary equivalent of the Class C network address in the scenario? 197.15.22.0
Decimal network address:
Binary network address:
4. How many high-order bits were borrowed from the host bits in the fourth octet?
5. What subnet mask must be used? Show the subnet mask in decimal and
binary. Decimal subnet mask:

Binary subnet mask:


6. What is the maximum number of subnets that can be created with this subnet mask?
7. What is the maximum number of useable subnets that can be created with this mask?
8. How many bits were left in the fourth octet for host IDs?
9. How many hosts per subnet can be defined with this subnet mask?
10. What is the maximum number of hosts that can be defined for all subnets with this scenario?
Assume the lowest and highest subnet numbers and the lowest and highest host ID on each
subnet cannot be used.
11. Is 197.15.22.63 a valid host IP address with this scenario?
12. Why or why not?
13. Is 197.15.22.160 a valid host IP address with this scenario?
14. Why or why not?
15. Host A has an IP address of 197.15.22.126. Host B has an IP address of 197.15.22.129.
Are these hosts on the same subnet? Why?

Lab 5.b Subnetting a Class A Network


Objective
Analyse a Class A network address with the number of network bits specified in order to determine the
following:
Subnet mask
Number of subnets
Hosts per subnet
Information about specific subnets
Background / Preparation
This is a written exercise and is to be performed without the aid of an electronic calculator.
Step 1 Given a Class A network address of 10.0.0.0 / 24 answer the following questions
How many bits were borrowed from the host portion of this address?
What is the subnet mask for this network?
1. Dotted decimal
2. Binary
How many usable subnetworks are there?
How many usable hosts are there per subnet?
What is the host range for usable subnet sixteen?
What is the network address for usable subnet sixteen?
What is the broadcast address for usable subnet sixteen?
What is the broadcast address for the last usable subnet?
What is the broadcast address for the major network?
Lab 5.c Subnetting a Class B Network

Objective
The objective of this lab is to provide a subnetting scheme using a Class B network
Background / Preparation
This is a written lab and is to be performed without the aid of an electronic calculator.
ABC Manufacturing has acquired a Class B address, 172.16.0.0. The company needs to
create a subnetting scheme to provide the following:
36 subnets with at least 100 hosts
24 subnets with at least 255 hosts
10 subnets with at least 50 hosts
It is not necessary to supply an address for the WAN connection since it is supplied by the
Internet service provider.
Step 1 Given this Class B network address and these requirements answer the following
questions
How many subnets are needed for this network?
What is the minimum number of bits that can be borrowed?
What is the subnet mask for this network?
1. Dotted decimal
2. Binary
3. Slash format
How many usable subnetworks are there?
How many usable hosts are there per subnet?
Step 2 Complete the following chart listing the first three subnets and the last 4 subnets

Subnetwork # Subnetwork ID Host Range Broadcast ID

What is the host range for subnet two?


What is the broadcast address for the 126th subnet?
What is the broadcast address for the major network?

Lab 5.d Subnetting a Class C Network


Objective
The objective of this lab is to provide a subnetting scheme using a Class C network.
Background / Preparation
This is a written exercise and is to be performed without the aid of an electronic calculator.
The Classical Academy has acquired a Class C address, 192.168.1.0. The academy needs to
create subnets to provide low level security and broadcast control on the LAN. It is not
necessary to supply an address for the WAN connection. It is supplied by the Internet service
provider. The LAN consists of the following, each of which will require its own subnet:

Classroom #1 28 nodes
Classroom #2 22 nodes
Computer lab 30 nodes
Instructors 12 nodes
Administration 8 nodes

Step 1 Given this Class C network address and these requirements answer the following
questions
How many subnets are needed for this network?
What is the subnet mask for this network?
1. Dotted decimal
2. Binary
3. Slash format
How many usable hosts are there per subnet?
Step 2 Complete the following chart

Subnetwork # Subnetwork IP Host Range Broadcast ID


What is the host range for subnet six?
What is the broadcast address for the 3rd subnet?
What is the broadcast address for the major network?
Experiment 8
Configuring VLANs & TRUNKS in Packet Tracer Network simulator

Learning Objectives
View the default VLAN configuration.
Configure VLANs.
Assign VLANs to ports.
Configure trunking.

Introduction
VLANs are helpful in the administration of logical groups, allowing members of a group to be easily
moved, changed, or added. This activity focuses on creating and naming VLANs, assigning access ports
to specific VLANs, changing the native VLAN, and configuring trunk links.
Task 1: View the Default VLAN Configuration
Step 1. Verify the current running configuration on the switches.
On all three switches, enter user EXEC mode with the password cisco. Then enter privileged EXEC mode
with the password class.
From privileged EXEC mode on all three switches, issue the show running-config command to verify
the current running configuration. The basic configurations are already set, but there are no VLAN
assignments.
Step 2. Display the current VLANs.
On S1, issue the show vlan command. The only VLANs present are the default ones. By default, all
interfaces are assigned to VLAN 1.
Step 3. Verify connectivity between PCs on the same network.
Notice that each PC can ping the other PC that shares the same network:
PC1 can ping PC4
PC2 can ping PC5
PC3 can ping PC6
Pings to PCs in other networks fail.
What benefit will be configuring VLANs provide to the current configuration?
Task 2: Configure VLANs
Step 1. Create VLANs on S1.

The command vlan vlan-id creates a VLAN. Use the name vlan-name command to
name a VLAN. On S1, create four VLANs using the vlan-ids and the names shown
below:
S1(config)#vlan 10
S1(config-vlan)#name Faculty/Staff
S1(config-vlan)#vlan 20
S1(config-vlan)#name Students
S1(config-vlan)#vlan 30
S1(config-vlan)#name Guest(Default)
S1(config-vlan)#vlan 99
S1(config-vlan)#name Management&Native

Step 2. Verify the VLAN configuration.


After creating the VLANs, return to privileged EXEC and issue the show vlan brief
command to verify the creation of the new VLANs.
S1#show vlan brief

VLAN Name Status Ports

1 default active Fa0/1, Fa0/2, Fa0/3,


Fa0/4
Fa0/5, Fa0/6, Fa0/7,
Fa0/8
Fa0/9,
Fa0/1
0,
Fa0/1
1,
Fa0/1
2
Fa0/1
3,
Fa0/1
4,
Fa0/1
5,
Fa0/1
6
Fa0/1
7,
Fa0/1
8,
Fa0/1
9,
Fa0/2
0
Fa0/2
1,
Fa0/2
2,
Fa0/2
3,
Fa0/2
4
Gig1/
1,
Gig1/
2
10 Faculty/Staff active
20 Students active
30 Guest(Default) active
99 Management&Native active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
S1#

Step 3. Create the VLANs on S2 and S3.


On S2 and S3, use the same commands you used on S1 to create and name the VLANs.
Step 4. Verify the VLAN configuration.
Use the show vlan brief command to verify all VLANs are configured and named.
Step 5. Check results.
Your completion percentage should be 38%. If not, click Check Results to see
which required components are not yet completed.
Task 3: Assign VLANs to Ports
The range command greatly reduces the amount of repetitive commands you must enter when configuring
the same commands on multiple ports. However, Packet Tracer does not support the range command. So
only the active interfaces are graded for the switchport mode access command.
Step 1. Assign VLANs to the active ports on S2.
The switchport mode access command configures the interface as an access port. The
switchport access vlan vlan-id command assigns a VLAN to the port. An access port
can only be assigned one access VLAN. Enter the following commands on S2.
S2(config)#interface fastEthernet 0/6
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan
30 S2(config-if)#interface fastEthernet
0/11 S2(config-if)#switchport mode
access
S2(config-if)#switchport access vlan
10 S2(config-if)#interface fastEthernet
0/18 S2(config-if)#switchport mode
access
S2(config-if)#switchport access vlan
20
Step 2. Assign VLANs to the active ports on S3.
Assign VLANs to the active ports on S3. S3 uses the same VLAN access port
assignments that you configured on S2.
Step 3. Verify loss of connectivity.
Previously, PCs that shared the same network could ping each other successfully. Try
pinging between PC1 and PC4. Although the access ports are assigned to the appropriate
VLANs, the ping fails. Why?
Step 4. Check results.
Your completion percentage should be 75%. If not, click Check Results to see
which required components are not yet completed.
Task 4: Configure Trunking

Step 1. Configure S1 Fa0/1 and Fa0/3 for trunking and to use VLAN 99 as the
native VLAN. S1(config)#interface FastEthernet 0/1

S1(config-if)#switchport mode trunk


S1(config-if)#switchport trunk native vlan 99
S1(config-if)#interface FastEthernet 0/3
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan 99

The trunk port takes about a minute to become active again. You can switch between
Realtime and Simulation modes three or four times to quickly bring the port back
up.
Then, the ports on S2 and S3 that connect to S1 become inactive. Again, switch between
Realtime and Simulation modes three or four times to quickly bring the ports back up.
Once the ports become active, you periodically receive the following syslog messages:
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch
discovered on FastEthernet0/1 (99), with S2 FastEthernet0/1 (1).
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch
discovered on FastEthernet0/3 (99), with S3 FastEthernet0/3 (1).

You configured the native VLAN on S1 to be VLAN 99. However, the native VLAN on
S2 and S3 is set to the default VLAN 1.
Step 2. Verify connectivity between devices on the same VLAN.
Although there is currently a native VLAN mismatch, pings between PCs on the same VLAN are now
successful. Why?
Step 3. Verify trunking is enabled on S2 and configure VLAN 99 as the native VLAN.
Dynamic Trunking Protocol (DTP) has automatically enabled the Fast Ethernet 0/1 port on S2 for
trunking. Once you configured the mode to trunking on S1, DTP messages sent from S1 to S2
automatically informed S1 to move the state of Fa0/1 to trunking. This can be verified with the following
command on S1:
S2#show interface
fastEthernet 0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking
Encapsulation: dot1q
Operational Trunking
Encapsulation: dot1q
Negotiation of Trunking:
On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
<output omitted>
S2#

Notice that the administrative mode is set to dynamic auto. This is the default state of all ports on a
Cisco IOS switch. However, DTP has negotiated trunking, so the operation mode is
trunk, resulting in a native VLAN mismatch.
As a best practice, configure the administrative mode of the trunking interface to be in
trunk mode. This ensures that the interface is statically configured as a trunk port and
never negotiates a different mode.
S2(config)#interface FastEthernet 0/1
S2(config-if)#switchport mode trunk
To correct the native VLAN mismatch, configure the trunking port with the switchport
trunk native vlan 99 command.
S2(config-if)#switchport trunk native vlan 99

Step 4. Verify trunking is enabled on S3 and configure VLAN 99 as the native VLAN.
DTP has also successfully negotiated a trunk between S1 and S3.
S3#show interfaces
fastEthernet 0/3 switchport
Name: Fa0/3
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking
Encapsulation: dot1q
Operational Trunking
Encapsulation: dot1q
Negotiation of Trunking:
On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
<output omitted>
S3#

Configure the administrative mode of the trunking interface to be in trunk mode, and
correct the native VLAN mismatch with the switchport trunk native vlan 99 command.

Step 5. Check results.


Your completion percentage should be 100%. If not, click Check Results to see
which required components are not yet completed.
Experiment 9

Lab 6.1.6 Configuring Static Routes

Objective

• Configure static routes between routers to allow data transfer between routers without the use of
dynamic routing protocols.
Background/Preparation

Setup a network similar to the one in the previous diagram. Any router that meets the interface
requirements may be used. Possible routers include 800, 1600, 1700, 2500, 2600 routers, or a
combination. Refer to the chart at the end of the lab to correctly identify the interface identifiers to be
used based on the equipment in the lab. The configuration output used in this lab is produced from

1721 series routers. Any other router used may produce slightly different output. The following steps
are intended to be executed on each router unless specifically instructed otherwise.

Start a HyperTerminal session as performed in the Establishing a HyperTerminal session lab.


Step 1 Configure both routers
a. Note:
Enter the
Go global configuration
to the erase mode
and reload and configure
instructions at thethe hostname
end as Perform
of this lab. shown inthose
the chart.
stepsThen
on all
configure the console, virtual terminal, and enable
routers in this lab assignment before continuing. passwords. If there are any difficulties, refer to
the Configuring router passwords lab. Configure interfaces and IP host tables. If there are any
difficulties, refer to the Configuring Host Tables lab.
Step 2 Configure the workstations

Configure the workstations with the proper IP address, subnet mask, and default gateway.

a. Check connectivity between the workstations using ping.

C:\>ping 192.168.16.2

Pinging 192.168.16.2 with 32 bytes of data:


Request timed out.

Request timed out.


Request timed out.
Request timed out.
b. Was the ping successful?
Ping statistics for 192.168.16.2:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


c. Why did the ping fail?
Approximate
Step 3 Check round trip times in milli-seconds:
interface status
Minimum = 0ms, Maximum = 0ms, Average = 0ms
a. Check the interfaces on both routers with the command show ip interface brief.

Step 4 Check the routing table entries


b. Are all the necessary interfaces up?

a. Using the command show ip route, view the IP routing table for GAD.

output eliminated
GAD>show ip route

Gateway of last resort is not set

C 192.168.14.0/24 is directly connected, FastEthernet0


C 192.168.15.0/24 is directly connected, Serial0

b. Use the command show ip route, view the IP routing table for BHM.

BHM>show ip route
Output eliminated.

Gateway of last resort is not set

C 192.168.15.0/24 is directly connected, Serial0


C 192.168.16.0/24 is directly connected, FastEthernet0

c. Are all of the routes needed in the routing tables?

d. Can a host on subnet 192.168.16.0 see a host on network 192.168.14.0?

If a route is not in the routers to which the host is connected, the host cannot reach the
destination host.
Step 5 Adding static routes

a. How can this situation be changed so that the hosts can ping each other?
Add static routes to each router or run a routing protocol.

b. In global configuration mode, add a static route on Router1 to network 192.168.16.0 and on

Router2 to network 192.168.14.0.

GAD(config)#ip route 192.168.16.0 255.255.255.0 192.168.15.2


Step 6 Verify the new routes
BHM(config)#ip route 192.168.14.0 255.255.255.0 192.168.15.1
a. Use the command show ip route, view the IP routing table for GAD.
GAD>show ip route
c. Why is a static route needed on both routers?
output eliminated

Gateway of last resort is not set

C 192.168.14.0/24 is directly connected, FastEthernet0


C 192.168.15.0/24 is directly connected, Serial0
S 192.168.16.0/24 [1/0] via 192.168.15.2
b. Using the command show ip route, view the IP routing table for BHM.

BHM>show ip route

Output eliminated.

Gateway of last resort is not set

S 192.168.14.0/24 [1/0] via 192.168.15.1


C 192.168.15.0/24 is directly connected, Serial0
C 192.168.16.0/24 is directly connected, FastEthernet0
c. Are all of the routes needed in the routing tables?

d. Can a host on subnet 192.168.16.0 see a host on network 192.168.14.0?


Step 7 ping host to host again

a. Check connectivity between the workstations using ping.

C:\>ping 192.168.16.2

Pinging 192.168.16.2 with 32 bytes of data:

Reply from 192.168.16.2: bytes=32 time=20ms TTL=254


Reply from 192.168.16.2: bytes=32 time=20ms TTL=254
Reply from 192.168.16.2: bytes=32 time=20ms TTL=254

Reply from 192.168.16.2: bytes=32 time=20ms TTL=254

Ping statistics for 192.168.16.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),


Approximate round trip times in milli-seconds:
Minimum = 20ms, Maximum = 20ms, Average = 20ms
b. If the ping was not successful, check routing table to make sure static routes are entered

correctly.

Upon completion of the previous steps, logoff by typing exit. Turn the router off.
Erasing and reloading the router

Enter into the privileged EXEC mode by typing enable.

If prompted for a password, enter class. If “class” does not work, ask the instructor for assistance.

Router>enable

At the privileged EXEC mode, enter the command erase startup-config.

Router#erase startup-config

The responding line prompt will be:

Erasing the nvram filesystem will remove all files! Continue?

[confirm]
Press Enter to confirm.
The response should
be:

Erase of nvram: complete

Now at the privileged EXEC mode, enter the command reload.

Router(config)#reload

The responding line prompt will be:

System configuration has been modified. Save? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Proceed with reload? [confirm]

Press Enter to confirm.

In the first line of the response will be:

Reload requested by console.

After the router has reloaded the line prompt will be:

Would you like to enter the initial configuration dialog? [yes/no]:


Router Interface Summary
Router Ethernet Ethernet Serial Serial Interface
Model
800 (806) Interface
Ethernet #1
0 (E0) Interface
Ethernet #2
1 (E1) Interface #1 Interface #2 #5

1600 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1)

1700 FastEthernet 0 (FA0) FastEthernet 1 (FA1) Serial 0 (S0) Serial 1 (S1)


2600 FastEthernet 0/0 FastEthernet 0/1 (FA0/1) Serial 0/0 (S0/0) Serial 0/1
2500 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1)
(FA0/0)
In order to find out exactly (S0/1)
how the router is configured, look at the interfaces. This will identify the type of router
as well as how many interfaces the router has. There is no way to effectively list all of the combinations of
configurations for each router class. What is provided are the identifiers for the possible combinations of interfaces
in the device. This interface chart does not include any other type of interface even though a specific router may
contain one. An example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation
that can be used in IOS command to represent the interface.
Experiment 10

Lab 7.2.2 Configuring RIP

Objective

• Setup an IP addressing scheme using class B networks.

• Configure the RIP dynamic routing protocol on routers.


Background/Preparation

Setup a network similar to the one in the diagram. Any router that meets the interface requirements
displayed in the above diagram, such as 800, 1600, 1700, 2500, 2600 routers, or a combination,

may be used. Please refer to the chart at the end of the lab to correctly identify the interface
identifiers to be used based on the equipment in the lab. The configuration output used in this lab is
produced from 1721 series routers. Any other router used may produce a slightly different output.

The following steps are intended to be executed on each router unless specifically instructed
otherwise.

Start a HyperTerminal session as performed in the Establishing a HyperTerminal session lab.

Note: Go to the erase and reload instructions at the end of this lab. Perform those steps on all
routers in this lab assignment before continuing.
Step 1 Configure the routers

a. From the global configuration mode, configure the hostname as shown in the chart. Then
configure the console, virtual terminal, and enable passwords. If there is a problem doing this,
refer to the configuring router passwords lab. Next, configure the interfaces according to the
chart. Refer to the Configuring Host Tables lab for assistance.
Step 2 Check the routing table entries

a. Using the command show ip route, view the IP routing table for GAD.
output eliminated
GAD>show ip route
Gateway of last resort is not set

C 172.16.0.0/24 is directly connected, FastEthernet0


C 172.17.0.0/24 is directly connected, Serial0

b. Using the command show ip route, view the IP routing table for BHM.

BHM>show ip route

output eliminated

Gateway of last resort is not set

C 172.17.0.0/24 is directly connected, Serial0


C 172.18.0.0/24 is directly connected, FastEthernet0

Step 3 Configure the routing protocol on the Gadsden router

a. From the global configuration mode, enter the following:


GAD(config)#router rip
GAD(config-router)#network 172.16.0.0

GAD(config-router)#network 172.17.0.0

GAD(config-router)#exit
Step 4 Save the Gadsden router configuration

GAD#copy running-config startup-config

Step 5 Configure the routing protocol on the Birmingham router

a. From the global configuration mode, enter the following:


BHM(config)#router rip
BHM(config-router)#network 172.17.0.0

BHM(config-router)#network 172.18.0.0

BHM(config-router)#exit
BHM(config)#exit
Step 6 Save the Birmingham router configuration

BHM#copy running-config startup-config

Step 7 Configure the hosts with the proper IP address, subnet mask and default gateway

Step 8 Verify that the internetwork is functioning by pinging the FastEthernet interface of the
other router

b.
a. From the host attached to BHM, GAD router FastEthernet interface?
GAD, is it possible to ping the BHM

c. If the answer is no for either question, troubleshoot the router configurations to find the error.
Then do the pings again until the answer to both questions is yes.
Step 9 Show the routing tables for each router

a. From the enable or privileged EXEC mode, examine the routing table entries using the show ip
route command on each router.

b. What are the entries in the GAD routing table?


c. What are the entries in the BHM routing table?

Upon completion of the previous steps, log off by typing exit and turn the router off.
Erasing and reloading the router

Enter into the privileged EXEC mode by typing enable.

If prompted for a password, enter class. If “class” does not work, ask the instructor for assistance.

Router>enable

At the privileged EXEC mode, enter the command erase startup-config.

Router#erase startup-config

The responding line prompt will be:

Erasing the nvram filesystem will remove all files! Continue?

[confirm]
Press Enter to confirm.
The response should be:

Erase of nvram: complete

Now at the privileged EXEC mode, enter the command reload.

Router(config)#reload

The responding line prompt will be:

System configuration has been modified. Save? [yes/no]:

Type n and then press Enter.

The responding line prompt will be:

Proceed with reload? [confirm]

Press Enter to confirm.

In the first line of the response will be:

Reload requested by console.

After the router has reloaded the line prompt will be:

Would you like to enter the initial configuration dialog? [yes/no]:

Type n and then press Enter.


Router Interface Summary
Router Ethernet Ethernet Serial Serial Interface
Model
800 (806) Interface
Ethernet #1
0 (E0) Interface
Ethernet #2
1 (E1) Interface #1 Interface #2 #5

1600 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1)

1700 FastEthernet 0 (FA0) FastEthernet 1 (FA1) Serial 0 (S0) Serial 1 (S1)


2600 FastEthernet 0/0 FastEthernet 0/1 (FA0/1) Serial 0/0 (S0/0) Serial 0/1
2500 Ethernet 0 (E0) Ethernet 1 (E1) Serial 0 (S0) Serial 1 (S1)
(FA0/0)
In order to find out exactly (S0/1)
how the router is configured, look at the interfaces. This will identify the type of router
as well as how many interfaces the router has. There is no way to effectively list all of the combinations of
configurations for each router class. What is provided are the identifiers for the possible combinations of interfaces
in the device. This interface chart does not include any other type of interface even though a specific router may
contain one. An example of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation
that can be used in IOS command to represent the interface.
Experiment 11

Lab - Network Address Translation - Static NAT

Objective
In this lab, static Network Address Translation (NAT).

Step 1
Build and configure the network according to the diagram.
Use ping to test connectivity between the NAT and ISP1 routers, between the workstations
and the default gateway, and between Webserver and ISP1.

Step 2
Since no routing protocol will be enabled, configure a default route to the Internet on the NAT router:

NAT(config) # ip route 0.0.0.0 0.0.0.0 200.200.100.2

Step 3
Create a standard Access Control List that defines all Internal Users:
NAT(config) # access-list 1 permit 192.168.1.0 0.0.0.255

Step 4
In this step, configure private and public address spaces to be used for NAT and
configure the translation:
The public address space 200.200.100.128/25 will be used as a pool to provide NAT
translation for the private IP addresses. To statically map the Internal User with IP address
192.168.1.2 pictured in the diagram, enter the following command
NAT(config) # ip nat inside source static 192.168.1.2 200.200.100.1
This static mapping has the advantage of allowing “external” users to always access the host 192.168.1.2
by way of the fixed IP address 200.200.100.252 (in addition to letting the 192.168.1.2 Internal User access
the Internet).

Step 5
Now, designate the inside NAT interface and the outside NAT interface. In more complex
topologies, it is possible to have more than one inside NAT interface.

NAT(config) # interface fastethernet 0/0


NAT(config-if) # ip nat inside

NAT(config-if) # interface serial 0/0


NAT(config-if) # ip nat outside
NAT#show ip nat translations
Pro Inside global Inside local Outside local Outside global
--- 200.200.100.1 192.168.1.2 --- ---
Experiment 12

Lab - Network Address Translation - Dynamic NAT

Objective
In this lab, dynamic NAT is configured.

Scenario
The International Travel Agency needs approximately 100 private IP addresses translated in a one to-
one fashion with a pool of public IP addresses. To do this, ITA will use NAT translation with a portion
of its class C address space allocated by ISP1.

Step 1
Build and configure the network according to the diagram.
Use ping to test connectivity between the NAT and ISP1 routers, between the workstations
and the default gateway, and between Webserver and ISP1.

Step 2
Since no routing protocol will be enabled, configure a default route to the Internet on the NAT router:
NAT (config) # ip route 0.0.0.0 0.0.0.0 200.200.100.2

Step 3
Create a standard Access Control List that defines all Internal Users:
NAT(config) # access-list 1 permit 192.168.1.0 0.0.0.255

Step 4
In this step, configure private and public address spaces to be used for NAT and
configure the translation:
The public address space 200.200.100.128/25 will be used as a pool to provide NAT
translation for the private IP addresses.
To allow the other hosts on the internal (private) network to reach the Internet, translations will need to
be made for those hosts as well. A list of static translations could be made one by one, but a simpler
alternative is to configure a pool of addresses and let the router make one to-one dynamic NAT translations
for these hosts. For example, to map the non-statically mapped hosts in the 192.168.1.0/24 network to
public IP addresses in the range 200.200.100.129 to 200.200.100.250, proceed as follows:

NAT(config) # ip nat pool public 200.200.100.129 200.200.100.250 netmask


255.255.255.128
NAT(config) # ip nat inside source list 1 pool public

This provides a dynamic one-to-one NAT translation between public IP addresses in the “public” pool
and private IP addresses specified by access list 1. The Internal Users IP addresses are configured
independently of the NAT translation. Dynamic NAT translations are made for any internal hosts for
which no static translation has been defined. The configuration above reserves IP addresses
200.200.100.251 to 200.200.100.254 for use in further static NAT mappings. Static translations are often
used with an internal server to enable external access to it by way of a fixed external IP.
Note: If there are more than 128 active hosts on the private network, static NAT translation and/or dynamic
one-to-one NAT translations will prevent more than 128 hosts from accessing the Internet. For these
additional hosts to get on the Internet, “NAT overloading” must be configured

Step 5
Now, designate the inside NAT interface and the outside NAT interface. In more complex
topologies, it is possible to have more than one inside NAT interface.

NAT(config) # interface fastethernet 0/0


NAT(config-if) # ip nat inside

NAT(config-if) # interface serial 0/0


NAT(config-if) # ip nat outside
NAT#show ip nat translations
Pro Inside global Inside local Outside local Outside global
--- 200.200.100.129 192.168.1.5 --- ---
--- 200.200.100.252 192.168.1.2 --- ---
Experiment 13

Lab: Network Address Translation - Port Address Translation and Port Forwarding

Objective
In this lab, Port Address Translation (PAT) and port forwarding are configured.

Scenario
The International Travel Agency is planning to launch an informational Web site on a local Web server
for the general public. However, the one Class C address that has been allocated will not be sufficient for
the users and devices the company has on this network. Therefore, a network is configured that will allow
all internal company users access to the Internet and all Internet users access to the company’s
informational Web server through static NAT and PAT. Internal user addresses must be translated to one
legal global address and all Internet Users must access the informational Web server through the one legal
global address as well.

Step 1

Build and configure the network according to the diagram. If you are using the configuration files from
the previous lab, remove the NAT pool (public) and the static and dynamic NAT configurations. Use a
Cisco router as Webserver if another Web server is not available.
Use ping to test connectivity between the NAT and ISP1 routers, between the Internal User and the NAT
router, and between the Internet User and ISP1.
Also check that Webserver server is accessible by connecting to it from the Internal User workstation
with a browser using the Webserver IP address, 192.168.1.5.

Step 2
Since no routing protocol will be enabled, configure a default route to the Internet from
the NAT router.
NAT(config)# ip route 0.0.0.0 0.0.0.0 200.200.100.2

Step 3
Create a standard Access Control List that would enable all Internal Users access to the Internet.
NAT(config)# access-list 1 permit 192.168.1.0 0.0.0.255

Step 4
Because a single inside global address, 200,200.100.1, will be used to represent multiple inside local
addresses, 192.168.1.x, simultaneously, apply the access list and configure NAT overload on the serial
0/0 interface of the NAT router. In general, NAT can used to overload a pool of public addresses, when a
single external address is overloaded. This is referred to as port address translation (PAT).
NAT(config)#ip nat inside source list 1 interface s0/0 overload
This configuration allows Internal Users to access the Internet, but blocks external users from accessing
internal hosts.

Step 5
Now specify the inside and outside NAT interfaces.

NAT(config)#interface fastethernet 0/0


NAT(config-if)#ip nat inside
NAT(config-if)#interface serial 0/0
NAT(config-if)#ip nat outside

Enter the command ping 200.200.50.2 from the Internal User workstation. Then, on the NAT router, enter
the commands show ip nat translations, show ip nat statistics, and show ip nat translations verbose.
Sample output follows.

NAT#show ip nat translations

Pro Inside global Inside local Outside local


Outside global
icmp 200.200.100.1:516 192.168.1.5:516 200.200.50.2:516
200.200.50.2:516
icmp 200.200.100.1:517 192.168.1.5:517 200.200.50.2:517
200.200.50.2:517
icmp 200.200.100.1:518 192.168.1.5:518 200.200.50.2:518
200.200.50.2:518
icmp 200.200.100.1:519 192.168.1.5:519 200.200.50.2:519

Step 6
Internet users need access to the informational Web server through 200.200.100.1 through port 80.
Configure PAT so that Internet users are directed to the informational Web server, 192.168.1.5, when
they connect to the IP address 200.200.100.1 through a web browser.
NAT(config)#ip nat inside source static tcp 192.168.1.5 80 200.200.100.1 80 extendable

The extendable keyword at the end of this static NAT command causes the router to reuse the global address
of an active translation and save enough information to distinguish it from another translation entry. This
command has the effect of translating external attempts to connect to port 80/IP address 200.200.100.1 to
internal attempts to connect to port 80/IP address 192.168.1.5.
The process of performing NAT translations based on the value of the incoming port number of an
IP packet is called port forwarding.

Step 7

Successful configuration of port forwarding is indicated by being able to reach the informational Web
server from the Internet User workstation with a Web browser using the inside global address of
200.200.100.1.
After successful connection to the web server with a browser from the Internet User workstation, issue
the same three show commands from Step 5 on the NAT router to view the translations. Sample outputs
are shown below.

NAT#show ip nat translations


Pro Inside global Inside local Outside local
Outside global
tcp 200.200.100.1:80 192.168.1.5:80 200.200.50.2:4806
200.200.50.2:4806
tcp 200.200.100.1:80 192.168.1.5:80 200.200.50.2:4809
200.200.50.2:4809
tcp 200.200.100.1:80 192.168.1.5:80 200.200.50.2:481
200.200.50.2:4814
tcp 200.200.100.1:80 192.168.1.5:80 --- ---

PAT and port address translation have now been successfully configured

S-ar putea să vă placă și