Вы находитесь на странице: 1из 78

Computer Communications and Networks SESSIONAL ©Dept.

of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No. 1
Study of different types of Networking cables and Practically implement the cross-wire cable
and straight through cable using clamping tool.

OBJECTIVE:

 To do the following Cabling works in a network


a) Cable Crimping
b) Standard Cabling and
c) Cross Cabling
d) Testing the crimped cable using a cable tester.

Apparatus/Tools/Equipment’s/Components:
 RJ-45 connector,
 Crimping Tool,
 Twisted pair Cable,
 Cable Tester.

THEORY

There are several classifications of twisted pair cable. Let’s skip right over them and state that
we’ll use Category 5 (or CAT 5) cable for all new installations. Likewise, there are several fire
code classifications for the outer insulation of CAT 5 cable. We’ll use CMR cable, or ―riser
cable, ‖ for most of the wiring we do. You should also be aware of CMP or plenum cable (a
plenum is used to distribute air in a building) you may be required by local or national codes
to use the more expensive plenum-jacketed cable if it runs through suspended ceilings, ducts,
or other areas, if they are used to circulate air or act as an air passage from one room to another.
If in doubt, use plenum. CMR cable is generally acceptable for all applications not requiring
plenum cable.
CAT 5 cable is available in reel-in-box packaging. This is very handy for pulling the wire
without putting twists in it. Without this kind of package or a cable reel stand, pulling wire is
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

a two-person job. Before the advent of the reel-in-box, we used to put a reel
of wire on a broom handle to pull it. One person would hold the broom
handle and the other would pull broom handle to pull it. You will produce
a tangled mess, if your pull the wire off the end of the reel alone.
Standard wire patch cables are often specified for cable segments running
form a wall jack to a PC and for patch panels. They are more flexible than
solid core wire. However, the rationale for using it
is that the constant flexing of patch cables may wear-out solid core cable
and break it. This is not a real concern in the average small network.
Most of the wiring we do simply connects computers directly to other
computers or hubs. Solid core cable is quite suitable for this purpose and
for many home and small business network. It is also quite acceptable for
use as patch cables. You might consider a stranded wire patch cable if you
have a notebook computer you are constantly moving around.
CAT 5 cable has four twisted pairs of wire for a total of eight individually
insulated wires. Each pair is color coded with one wire having solid color
(blue, orange, green, or brown) twisted around a second wire with a white
background and a stripe of the same color. The solid color may have white
Figure 1: stripe in some cables. Cable colors are commonly described using the
UTP Cable background color followed by the color of the stripe; e.g; white-orange is
a wire with a white background and an orange stripe.

Connectors

The straight through and cross-over patch cables are


discussed in this article which are terminated with CAT 5
RJ-45 modular plugs. RJ-45 plugs are similar to those you
‘ll see on the end of your telephone cable except they have
eight as opposed to four or six contacts on the end of the
plug and they are about twice as big. Make sure they are
Figure 2: RJ-45
Connector rated for CAT 5 wiring. (RJ stands for ―Registered Jack‖).
Also, there are RJ-45 plugs designed for both solid core
wire and stranded wire. Others are designed specifically for
one kind of wire or the other. Be sure you buy plugs
appropriate for the wire you are going to use. We normally
use plugs designed to accommodate both kinds of wire.

Network cabling tools

1. Modular Plug Crimp Tool


You will need a modular crimp tool. This is very similar to the ones which have been used for
many years for all kinds of telephone cable work and it works just fine for Ethernet cables. You
don’t need a lot of bells and whistles, just a tool which will
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

securely crimp RJ-45 connectors. Some crimpers have cutters which can be
used to cut the cable and individual wires, and possibly stripping the outer
jacket.

2. Universal UTP Stripping Tool (Eclipse)

It makes a much neater cut. It is highly


recommending for anyone who will
make a lot of cables.

3. Diagonal Cutters

It is easier to use diagonal cutters (―diags


or ―dikes‖) to cut the cable off at the reel and to
fine- tune the cable ends during assembly. Also,
if you don ‘t has a stripper, you can strip the cable Figure 3: Diagonal cutters
by using a small knife to carefully slice the outer jacket
longitudinally and use the diags to cut it off around the circumference.

UTP basics

The 10BASE-T and 100BASE-TX Ethernet consist of two transmission lines.


Each transmission line is a pair of twisted wires. One pair receives data signals
and the other pair transmits data signals. A balanced line driver or transmitter is
at one end of one of these lines

and a line receiver is at the other end. A (much) simplified schematic for one of
these lines and its transmitter and receiver follows:
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Figure 4: Schematic diagram of transmission line

Pulses of energy travel down the transmission line at about the speed of light
(186,000 miles/second). The principal components of these pulses of energy are
the potential difference between the wires and the current flowing near the
surface of the wires. This energy can also be considered as residing in the
magnetic field which surrounds the wires and the electric field between the wires.
In other words, an electromagnetic wave which is guided by, and travels down
the wires.

The main concern are the transient magnetic fields which surround the wires and
the magnetic fields generated externally by the other transmission lines in the
cable, other network cables, electric motors, fluorescent lights, telephone and
electric lines, lightning, which may literally bury the Ethernet pulses, the
conveyor of the information being sent down the line.

The twisted-pair Ethernet employs two principal means for combating noise. The
first is the use of balanced transmitters and receivers. A signal pulse actually
consists of two simultaneous pulses relative to ground: a negative pulse on one
line and a positive pulse on the other. The receiver detects the total difference
between these two pules. Since a pulse of noise usually produces pulses of the
same polarity on both lines, it is essentially canceled out at the receiver. Also, the
magnetic field surrounding one wire from a signal pulse is a mirror of the one on
the other wire. At a very short distance from the two wires the magnetic fields
are opposite and tend to cancel the effect of each other out. This reduces the line
‘s impact on the other pairs of wires and the rest of the world.

The second and the primary means of reducing cross-talk (the term cross-talk
came from the ability to overhear conversations on other lines on your phone)
between the pairs in the cable, is the double helix configuration produced by
twisting the wires together. This configuration produces symmetrical (dentinal)
noise signals in each wire. Ideally, their difference as detected at the receiver, is
zero. In actuality it is much reduced.

Straight through and cross over cable

Again, the wire with colored backgrounds may have white stripes and may be
denoted that way in diagrams found elsewhere. For example, the green wire may
be labeled Green-White. The background color is always specified first.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Figure 5: Straight through and crossover cable wire scheme

A Straight-through cable has identical ends, whereas a Crossover cable has different ends.

EIA/TIA 568A and 568B standards

Figure 6: Cable connector standard ordering

It makes no functional difference which standard you


use for a straight-through cable. You can start a
crossover cable with either standard as long as the other
end is the other standard. It makes no functional
difference which end is which. Despite what you may
have read elsewhere, a 568A patch cable will work in a
network with 568B wiring and 568B patch cable will
work in a 568A network. The electrons couldn’t care less.
Figure 7: EIA/TIA 568A and 568B
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

PROCEDURE
To Make Cable
1. Pull the cable off the reel to the desired length and cut the total length of wire
segments between a PC and a hub or between two PC’s cannot exceed 100
Meters (328 feet or about the length of a football field) for 100BASE-TX and
300 Meters for 100BASE-T.
2. Strip one end of the cable with the stripper or a knife and diags. If you are
using the stripper, place the cable in the groove on the blade (left) side of the
stripper and align the end of the cable with the right side of the stripper. This
will strip about ½‖ of the jacket off the cable. Turn the stripper about 1 ¼ turn
and pull. If you turn it more, you will probably nick the wires. If you are using
knife and diags, carefully slit the cable for about an inch or so and neatly trim
around the circumference of the cable with diags to remove the jacket.

3. Inspect the wires for nicks. Cut off the end and start over if you see any. You
may have to adjust the blade with the screw at the front stripper. Cable
diameters and jacket thicknesses vary.

4. Spread and arrange the pairs roughly in the order of the desired cable end.

5. Untwist the pairs and arrange the wires in the order of the desired cable end. Flatten
the end between your thumb and forefinger. Trim the ends of the wires so they are
even with one another.
It is very important that the unstripped (untwisted) end be slightly less than ½‖ long.
If it is longer than ½‖ it will be out-of-spec and susceptible ot crosstalk. If it is less
than ½‖ it will not be properly clinched when RJ-45 plug is crimped on. Flatten again.
There should be little or no space between the wires.
6. Hold the RJ-45 plug with the clip facing down or away from you. Push the wire
firmly into the plug. Now, inspect before crimping and wasting the plug!
Looking through the bottom of the plug, the wire on the far-left side will have a
white background. The wires should alternative light and dark from left to right.
The furthest right wire is brown. The wires should all end evenly at the front of the
plug. The jacket should end just about where you see it in the diagram-right on the
line
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Figure 8: Preparing the RJ-45 Connector

7. Hold the wire near the RJ-45 plug with the clip down and firmly push it into
the left side of the front of the Crimper (it will only go in one way). Hold the
wire in place and squeeze the crimper handles quite firmly. This is what will
happen:

Figure 9: Crimping
(Crimp it once). The crimper pushes two plungers down on the RJ-45 plug. One forces,
what amounts to, a cleverly designed plastic plug/wedge onto the cable jacket and very
firmly clinches it. The other seats the ―pins‖, each with two teeth at its end, through
the insulation and into the conductors of their respective wires.

8. Test the crimp… if done properly an average person will not be able to pull
the plug off the cable with his or her bare hands. And that quite simply,
besides lower cost, is the primary advantage of twisted-pair cables over the
older thin wire, coaxial cables. In fact, the ease of installation and the modular
RJ-45 plug is the main reason coaxial cable is no longer widely used for small
Ethernet. But, don’t pull that hard on the plug. It could stretch the cable and
change its characteristics. Look at the side of the plug and see if it looks like
the diagram and give it a fairly firm tug to make sure it is crimped well.

9. Prepare the other end of the cable so it has the desired end and crimp.

10. If both ends of the cable are within reach, hold them next to each other and
with RJ-45 clips facing away. Look through the bottom of the plugs. If the
plugs are wired correctly, and they are identical, it is a straight-through cable.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

If they are wired correctly and they are different, it is a crossover cable.

PRECAUTIONS

1. Try to avoid running cables parallel to power cables.

2. If you bundle a group of cables together with cable ties (zip ties), do not over-
clinch them. It’s okay to snug them together firmly; but don‘t tighten them
so much that you deform the cables.

3. Keep cables away from devices which can introduce noise into them. Here’s
a short list: electric heaters, loud speakers, printers, TV sets, fluorescent light,
copiers, welding machines, microwave ovens, telephones, fans, elevator
motors, electric ovens, dryers, washing machines, and shop equipment.

4. Avoid stretching UTP cables (the force should not exceed 24 LBS).

5. Do not use a stapler to secure UTP cables. Use telephone wire hangers, which
are available at most hardware stores.

Testing the crimped cable using a cable tester:

Step 1: Skin off the cable jacket 3.0 cm long cable stripper up to cable
Step 2: Untwist each pair and straighten each wire 190 0 1.5 cm long.
Step 3: Cut all the wires
Step 4: Insert the wires into the RJ45 connector right white orange left brown the pins
facing up
Step 5: Place the connector into a crimping tool, and squeeze hard so that the handle
reaches its full swing.
Step 6: Use a cable tester to test for proper continuity
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.2
Study of Networking Devices in Detail.

OBJECTIVE: Study of following Network Devices in Detail


• Repeater
• Hub
• Switch
• Bridge
• Router
• Gate Way
Apparatus (Software): No software or hardware needed.

REPEATER

A Repeater is a purely electrical device that extends maximum distance a LAN cable can span
by Amplifying signals passing through it. A Repeater connects two segments and broadcasts
packets between them. Since signal loss is a factor in the maximum length of a segment, a
Repeater is used to amplify the signal and extend the usable length.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

A common Ethernet rule is that no more than four repeaters may be used to join segments
together. This is a physical limitation designed to keep collision detection working properly.
Repeaters operate at layer 1 (Physical layer) of the OSI model.

BRIDGES

The networks bridge provides an inexpensive and easy way to connect network segments. A
bridge provides Amplification function of a repeater plus, ability to select filter packets based
on their addresses. When network grows in size, it is often necessary to partition it in to smaller
group of nodes to help isolate traffic
and improve performance. One way to do this is to use bridge, the operation of it is to keep one
segment traffic to that side and other side will cross
the bridge. The bridge learns which packets should
cross it as it is used.

ROUTERS

A router is a device that connects two LANs together to form an inter-network. A router is the
basic building block of the Internet. Each router connects two or more networks together by
providing an interface for an Ethernet network and ring network to which it is connected.

Routers

The router examines each packet of information to detection weather the packet must be
translated form on one network to another network performing a function similar to a bridge.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Unlike a ridge, a router can connect network that use different technologies, addressing
methods, media type, frame format and speeds. A router is a special purpose device designed
to interconnect networks. Such that three networks can be connected using two routers. Routers
maintain routing tables in their memories to store information about the physical connection
on the networks; the router examines each packet of data, checks the routing table and then
forwards the packet if necessary. Every other router in the path (between any state destinations)
performs a similar procedure. Note that a router does not maintain any state information about
the packets; it simply moves them along the network. Routers are operated at layer 3(network)
of OSI model.

GATEWAYS

A gateway is node in a network that serves as an entrance to another network. In enterprises,


the gateway node often acts as a proxy server and a firewall. The gateway is also associated
with both a switch, which provides the actual path for the packet in and out of the gateway. It
is also known as a computer system located on earth that switches
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Gateway

data signals and voice signals between satellites and terrestrial networks. A gateway can
operate at any layer of the OSI or TCP/IP reference model. The hub of a gateway, also called
a protocol converter, is much more complex than that of a router or switch. Typically, a
gateway must convert from one protocol stack to another. E.g. a gateway may connect a TCP/IP
network to an IPX. /SPX network. A Circuit Level Gateway function provided by Application
level gateway products enables trusted users on private network to access Internet services with
all security of a proxy server. An Application Level Gateway provide much stricter form of
security that packet filters, but they are designed to regulate access only for a particular
application.

HUBS

Hubs are also called concentrators; expand one Ethernet connection into many. For example, a
four-port hub connects up to four machines via UTP cables. The hub provides a star connection
for the four ports. Many hubs contain a single BNC connector as well to connect the hub to
existing 10base2 network wiring, the hub can also be connected via one of its ports. One pot is
desired to operate

in either straight through or crossover mode, selected by a switch on the hub. Hubs that can
connect in this fashion are called stackable hubs. A hub is similar to a repeater, expect it
broadcasts data received by any port to all other ports on the hub. Most hubs contain a small
amount of intelligence as well. Examining received packets and checking them for integrity. If
a bad packet arrives or the hub determines that a port is unreliable. It will shut down the line
under the error condition is appears. The hub also acts like a repeater. Because of its slight
delay when processing a packet, the numbers of hubs that may be connected in a series are
limited.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

There are three types of HUB passive hub, active hub and intelligent hub.

The Passive hubs do not process data signals with only purpose to combine the signal from
several networks cables segments. All devices attached to the passive hub receive another
packets that pass through the hub. Hub does not clear up or amplify the signals, on the contrary
absorbs a small part of the signals that is why the distance between a hub and a computer should
not be more than half of the permissible distance between two computers. Passive hubs have
limited functionality so are inexpensive and easy to configure. It has four ports with four BNC
(British Naval Connectors) female connectors to configure networks station or terminated with
a 93 Ω BNC Terminator. The active hubs incorporate electronic components that amplify and
cleanup the signals, that flaw between devices on the network. The process of cleaning up
signal is called “signal regeneration”. The benefits of signals regeneration are:

 A network is more robust i.e. less sensitive errors.


 Distance between devices can be increased.

Active hubs cost is considerably more than passive hub (active hub function imparts as multi-
port repeaters). Intelligent hubs are enhanced active hubs the following functions add
intelligence to a hub. Intelligent Hubs are units have form of integrated management capability.

Hub Management

A hub supports networks network management protocols that enable the hub to send packets
to central network console. Theses protocols enable network console to manage or control hub.

Switching hubs

Switching hubs include circuitry that quickly routes signals between ports on the hub. Insured
of repeating a packet to all ports on the hub, it repeats a packet only to the port that connects to
the destination computer for the packet.

SWITCHES

It is similar to a bridge, with some important enhancement. First, as which may have multiple
ports, thus directing packets to several different segments further partitioning and isolating
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

network traffic in as way similar to router. For example, if 8-port n way switch is there it can
route packets from any input to any output.

Some or all of incoming packet is called store and forward, which stores the received packet
before examining it to for error before retransmitting. Bad packets are not forwarded. A switch
typically has auto-sensing 10/100 mbps ports and will just the speed of each port accordingly;
furthermore, a managed switch supports SNMP for further control over network traffic.
Switches operated at layer 2 (Data Link) of OSI model.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.3
Overview of IP Addressing and sub-netting, static IP.

OBJECTIVE:

To understand theoretical knowledge of IPv4 addressing and sub-netting.

THEORY:

 IPv4 address: a 32-bit number, usually written in dotted decimal form, that uniquely
identifies an interface of some computer
 Host Address: another term for IP address
 Network: a group of hosts, all of which have an identical beginning position of their ip
addresses.
 Network Number: a 32-bit number that represent a network and it can't be assigned as
ip address of a host
 Network address: another term for the network number.
 Broadcast address: a 32-bit number that is used to address all hosts in the network. It
can't be assigned as an ip address of a host.
 Subnet: a group of hosts, all of which have an identical portion of their ip addresses, a
subnet differs from a network in that a subnet is a further subdivision of a network.
 Subnet number: a 32-bit number that represent a subnet. It can't be assigned as ip
address of host.
 Subnet address: another term for the subnet number.
 Subnet broadcast address: a 32-bit number that is used to address all hosts in the subnet.
It can't be assigned into a host’s IP address.
 Sub-netting: the process of subdividing networks into smaller subnets.
 Subnet mask: A 32-bit combination used to describe which portion of an address refers
to the subnet and which part refers to the host.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

 Network mask: 32-bit number. The mask is used by computers to calculate the network
number of a given IP address by performing a Boolean AND operation of the address
and mask.
 Address mask: another term for a mask
 Interface: A network connection.

Understanding IPv4 Addresses and classes

An IP address is an address used to uniquely identify a device on an IP network. The address


is made up of 32 binary bits which can be divisible into a network portion and host portion
with the help of a subnet mask. The 32 binary bits are broken into four octets (1 octet = 8 bits).
Each octet is converted to decimal and separated by a period (dot).

For this reason, an IP address is said to be expressed in dotted decimal format (for example,
172.16.81.100). The value in each octet ranges from 0 to 255 decimal, or 00000000 - 11111111
binary.

Here is how binary octets convert to decimal: The right most bit, or least significant bit, of an
octet holds a value of 20. The bit just to the left of that holds a value of 21. This continues until
the left-most bit, or most significant bit, which holds a value of 27.

So, if all binary bits are a one, the decimal equivalent would be 255 as shown here:
11111111
128 64 32 16 8 4 2 1 (128+64+32+16+8+4+2+1=255)

Here is a sample octet conversion when not all of the bits are set to 1.

01000001
0 64 0 0 0 0 0 1 (0+64+0+0+0+0+0+1=65)

And this sample shows an IP address represented in both binary and decimal.
10. 1. 23. 19 (decimal)
00001010.00000001.00010111.00010011 (binary)

These octets are broken down to provide an addressing scheme that can accommodate large
and small networks.

There are five different classes of networks, A to E. This document focuses on addressing
classes A to C, since classes D and E are reserved and discussion of them is beyond the scope
of this document.

Note: Also note that the terms "Class A, Class B" and so on are used in this document to help
facilitate the understanding of IP addressing and subnetting. These terms are rarely used in the
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

industry anymore because of the introduction of Variable Length Subnet Masking (VLSM) &
Classless Inter-Domain Routing (CIDR).

IP address classes

Given an IP address, its class can be determined from the three high-order bits. Figure 1 shows
the significance in the three high order bits and the range of addresses that fall into each class.
For informational purposes, Class D and Class E addresses are also shown.

In a Class A address, the first octet is the network portion, so the Class A example in Figure 1
has a major network address of 10. Octets 2, 3, and 4 (the next 24 bits) are for the network
manager to divide into subnets and hosts as he/she sees fit. Class A addresses are used for
networks that have more than 65,536 hosts (actually, up to 16777214 hosts!).

In a Class B address, the first two octets are the network portion, so the Class B example in
Figure 1 has a major network address of 172.16. Octets 3 and 4 (16 bits) are for local subnets
and hosts. Class B addresses is used for networks that have between 256 and 65534 hosts.

In a Class C address, the first three octets are the network portion. The Class C example in
Figure 1 has a major network address of 193.18.9. Octet 4 (8 bits) is for local subnets and hosts
- perfect for networks with less than 254 hosts.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Class of IPv4 Network

Network Masks

A network mask helps you know which portion of the address identifies the network and which
portion of the address identifies the node. Class A, B, and C networks have default masks, also
known as natural masks, as shown here:
 Class A: 255.0.0.0
 Class B: 255.255.0.0
 Class C: 255.255.255.0

An IP address on a Class A network that has not been sub-netted would have an address/mask
pair similar to:
 8.20.15.1 255.0.0.0.

To see how the mask helps you identify the network and node parts of the address, convert the
address and mask to binary numbers.
8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000

Once you have the address and the mask represented in binary, then identifying the network
and host ID is easier.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Any address bits which have corresponding mask bits set to 1 represent the network ID. Any
address bits that have corresponding mask bits set to 0 represent the node ID.

8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
-----------------------------------
net id | host id
netid = 00001000 = 8
hostid = 00010100.00001111.00000001 = 20.15.1

Understanding Subnetting

Subnetting allows you to create multiple logical networks that exist within a single Class A, B,
or C network. If you do not subnet, you are only able to use one network from your Class A,
B, or C network, which is unrealistic.

When sub-netting, a third part of IP address appears in the middle of the address—namely, the
subnet part of the address. The size of the network part never shrinks.

Network (8) Subnet (24-x) Host (x) Class A


Network (16) Subnet (16-x) Host (x) Class B
Network (24) Subnet (8-x) Host (x) Class C

Each data link on a network must have a unique network ID, with every node on that link being
a member of the same network. If you break a major network (Class A, B, or C) into smaller
subnetworks, it allows you to create a network of interconnecting subnetworks. Each data link
on this network would then have a unique network/subnetwork ID. Any device, or gateway,
connecting n networks/subnetworks has n distinct IP addresses, one for each network /
subnetwork that it interconnects.

In order to subnet a network, extend the natural mask using some of the bits from the host ID
portion of the address to create a subnetwork ID.

For example, given a Class C network of 204.17.5.0 which has a natural mask of
255.255.255.0, you can create subnets in this manner:
204.17.5.0 - 11001100.00010001.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
--------------------------|sub|----
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

By extending the mask to be 255.255.255.224, you have taken three bits (indicated by "sub")
from the original host portion of the address and used them to make subnets. With these three
bits, it is possible to create eight subnets.

With the remaining five host ID bits, each subnet can have up to 32 host addresses, 30 of which
can actually be assigned to a device since host ids of all zeros or all ones are not allowed (it is
very important to remember this).

So, with this in mind, these subnets have been created.


204.17.5.0 255.255.255.224 host address range 1 to 30
204.17.5.32 255.255.255.224 host address range 33 to 62
204.17.5.64 255.255.255.224 host address range 65 to 94
204.17.5.96 255.255.255.224 host address range 97 to 126
204.17.5.128 255.255.255.224 host address range 129 to 158
204.17.5.160 255.255.255.224 host address range 161 to 190
204.17.5.192 255.255.255.224 host address range 193 to 222
204.17.5.224 255.255.255.224 host address range 225 to 254

Note: There are two ways to denote these masks.

 First, since you are using three bits more than the "natural" Class C mask, you can
denote these addresses as having a 3-bit subnet mask.

 Or, secondly, the mask of 255.255.255.224 can also be denoted as /27 as there are 27
bits that are set in the mask. This second method is used with CIDR.

Using this method, one of these networks can be described with the notation prefix/length.

For example, 204.17.5.32/27 denotes the network 204.17.5.32 255.255.255.224. The network
sub-netting scheme in this section allows for eight subnets, and the network might appear as:

Figure 1
Notice that each of the routers in Figure 1 is attached to four subnetworks, one subnetwork is
common to both routers. Also, each router has an IP address for each subnetwork to which it
is attached. Each subnetwork could potentially support up to 30 host addresses.

This brings up an interesting point. The more host bits you use for a subnet mask, the more
subnets you have available.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

However, the more subnets available, the less host addresses available per subnet. For example,
a Class C network of 204.17.5.0 and a mask of 255.255.255.224 (/27) allows you to have eight
subnets, each with 32 host addresses (30 of which could be assigned to devices).

If you use a mask of 255.255.255.240 (/28), the break down is:


204.17.5.0 - 11001100.00010001.00000101.00000000
255.255.255.240 - 11111111.11111111.11111111.11110000
--------------------------|sub |---

Since you now have four bits to make subnets with, you only have four bits left for host
addresses. So, in this case you can have up to 16 subnets, each of which can have up to 16 host
addresses (14 of which can be assigned to devices).

Take a look at how a Class B network might be subnetted. If you have network 172.16.0.0,
then you know that its natural mask is 255.255.0.0 or 172.16.0.0/16. Extending the mask to
anything beyond 255.255.0.0 means you are subnetting.

You can quickly see that you have the ability to create a lot more subnets than with the Class
C network.

If you use a mask of 255.255.248.0 (/21), how many subnets and hosts per subnet does this
allow for?
172.16.0.0 - 10101100.00010000.00000000.00000000
255.255.248.0 - 11111111.11111111.11111000.00000000
-----------------|sub|-----------

You are using five bits from the original host bits for subnets. This allows you to have 32
subnets (25). After using the five bits for subnetting, you are left with 11 bits for host addresses.
This allows each subnet so have 2048 host addresses (211), 2046 of which could be assigned
to devices.

Note: In the past, there were limitations to the use of a subnet 0 (all subnet bits are set to zero)
and all one’s subnet (all subnet bits set to one). Some devices would not allow the use of these
subnets. Cisco Systems devices allow the use of these subnets when the ip subnet zero
command is configured.

Examples
 Given the network number and a mask, how many subnets are there and how many
hosts per subnet.
 Given an address and mask, what is the subnet number
 Given an address and mask, what is the subnet broadcast address and valid ip address
on the subnet
 Subnet bits=32- (network bits+ hosts bits)
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

8.1.4.5/16 130.4.102.1/2 199.1.1.1/24 130.4.102.1/2 199.1.1.100/27


4 2
Mask 255.255.0. 255.255.255.0 255.255.255. 255.255.252.0 255.255.255.22
0 0 4
Network 8 16 24 16 24
bits
Hosts bits 16 8 8 10 5
Subnet 8 8 0 6 3
bits
hosts per 216 − 2 28 − 2 28 − 2 210 − 2 25 − 2
subnets
No. of 28 − 2 28 − 2 0 26 − 2 23 − 2
subnets
Subnet 8.1.0.0 130.4.102.0 199.1.1.0 130.3.100.0 199.1.1.96
number

1st valid 8.1.0.1 130.4.102.1 199.1.1.1 130.3.100.1 199.1.1.96


IP addr.

Broadcast 8.1.255.25 130.4.102.255 199.1.1.255 130.3.103.255 199.1.1.127


addr. 5
Last valid 8.1.255.25 130.4.102.254 199.1.1.254 130.3.103.254 199.1.1.126
addr. 4

Sample Exercise 1

Now that you understand subnetting, put this knowledge to use. In this example, you are given
two address / mask combinations, written with the prefix/length notation, which have been
assigned to two devices. Your task is to determine if these devices are on the same subnet or
different subnets. You can do this by using the address and mask of each device to determine
to which subnet each address belongs.
Device A: 172.16.17.30/20
Device B: 172.16.28.15/20

Determining the Subnet for Device A:


172.16.17.30 - 10101100.00010000.00010001.00011110
255.255.240.0 - 11111111.11111111.11110000.00000000
-----------------| sub|------------

subnet = 10101100.00010000.00010000.00000000 = 172.16.16.0

Looking at the address bits that have a corresponding mask bit set to one, and setting all the
other address bits to zero (this is equivalent to performing a logical "AND" between the mask
and address), shows you to which subnet this address belongs.
In this case, Device A belongs to subnet 172.16.16.0.

Determining the Subnet for Device B:


172.16.28.15 - 10101100.00010000.00011100.00001111
255.255.240.0 - 11111111.11111111.11110000.00000000
-----------------| sub|------------
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

subnet = 10101100.00010000.00010000.00000000 = 172.16.16.0


From these determinations, Device A and Device B have addresses that are part of the same
subnet.

Sample Exercise 2
Given the Class C network of 204.15.5.0/24, subnet the network in order to create the network
in Figure 2 with the host requirements shown.

Figure 2
Looking at the network shown in Figure 3, you can see that you are required to create five
subnets. The largest subnet must support 28 host addresses. Is this possible with a Class C
network? And if so, then how?

You can start by looking at the subnet requirement. In order to create the five needed subnets
you would need to use three bits from the Class C host bits. Two bits would only allow you
four subnets (22).

Since you need three subnet bits, that leaves you with five bits for the host portion of the
address. How many hosts does this support? 25 = 32 (30 usable). This meets the requirement.
Therefore, you have determined that it is possible to create this network with a Class C network.
An example of how you might assign the subnetworks is:
netA: 204.15.5.0/27 host address range 1 to 30
netB: 204.15.5.32/27 host address range 33 to 62
netC: 204.15.5.64/27 host address range 65 to 94
netD: 204.15.5.96/27 host address range 97 to 126
netE: 204.15.5.128/27 host address range 129 to 158

EXERCISES

1. Find the class of each address.


a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
2. Subnets the following addresses and verify your results using any online IPv4 Addressing &
Sub-netting Calculator and attach their screen shots.

a. 192.168.10.0 (/26)
b. 192.168.10.0 (/27)
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.4
Connect the Computer in Local Area Network.

OBJECTIVE: To connect the computers in Local Area Network

PROCEDURE ON THE HOST COMPUTER

On the host computer, follow these steps to share the Internet connection:
1. Log on to the host computer as Administrator or as Owner.
2. Click Start, and then click Control Panel.
3. Click Network and Internet Connections.
4. Click Network Connections.
5. Right-click the connection that you use to connect to the Internet. For example, if you
connect to the Internet by using a modem, right-click the connection that you want
under Dial-up / other network available.
6. Click Properties.
7. Click the Advanced tab.
8. Under Internet Connection Sharing, select the Allow other network users to
connect through this computer's Internet connection check box.
9. If you are sharing a dial-up Internet connection, select the Establish a dial-up
connection whenever a computer on my network attempts to access the Internet
check box if you want to permit your computer to automatically connect to the Internet.
10. Click OK. You receive the following message:
11. When Internet Connection Sharing is enabled, your LAN adapter will be set to use IP
address 192.168.0.1.
12. Your computer may lose connectivity with other computers on your network. If these
other computers have static IP addresses, it is a good idea to set them to obtain their IP
addresses automatically. Are you sure you want to enable Internet Connection Sharing?
13. Click Yes.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

The connection to the Internet is shared to other computers on the local area network (LAN).
The Network adapter that is connected to the LAN is configured with a static IP address of
192.168.0.1 and a subnet mask of 255.255.255.0

PROCEDURE ON THE CLIENT COMPUTER

To connect to the Internet by using the shared connection, you must confirm the LAN adapter
IP configuration, and then configure the client computer.
To confirm the LAN adapter IP Configuration, follow these steps:
1. Log on to the client computer as Administrator or as Owner.
2. Click Start, and then click Control Panel.
3. Click Network and Internet Connections.
4. Click Network Connections.
5. Right-click Local Area Connection and then click Properties.
6. Click the General tab, click Internet Protocol (TCP/IP) in the connection uses the
Following items list, and then click Properties.
7. In the Internet Protocol (TCP/IP) Properties dialog box, click Obtain an IP address
automatically (if it is not already selected), and then click OK.
8. Note: You can also assign a unique static IP address in the range of 192.168.0.2 to
192.168.0.254.
9. For example, you can assign the following static IP address, subnet mask, and default
gateway:
10. IP Address 192.168.31.202
11. Subnet mask 255.255.255.0
12. Default gateway 192.168.31.1
13. In the Local Area Connection Properties dialog box, click OK.
14. Quit Control Panel.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.5
Configure Host IP, Subnet Mask and Default Gateway in a
System in LAN (TCP/IP Configuration).

OBJECTIVE: To assign IP address to the PC connected to the internet.

Assigning IP address in Windows 7 or Windows 10

Step-1

To assign or change the computer’s IP address in Windows, type network and sharing into the
Search box in the Start Menu and select Network and Sharing Center when it comes up. If
you’re in Windows 7 or 10 it’ll be in the start menu.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Step-2
Then when the Network and Sharing Center opens, click on Change adapter settings. This will
be the same on Windows 7 or 10.

Step-3
Right-click on your local adapter and select Properties.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Step-4

In the Local Area Connection Properties window highlight Internet Protocol Version 4
(TCP/IPv4) then click the Properties button.

Now select the radio button Use the following IP address and enter in the correct IP, Subnet
mask, and Default gateway that corresponds with your network setup. Then enter your
Preferred and Alternate DNS server addresses. Here we’re on a home network and using a
simple Class C network configuration and Google DNS.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Step-5
Check Validate settings upon exit so Windows can find any problems with the addresses you
entered. When you’re finished click OK.

Step-6
Now close out of the Local Area Connections Properties window.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Windows will run network diagnostics and verify the connection is good. Here we had no
problems with it, but if you did, you could run the network troubleshooting wizard.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Step-7
Now you can open the command prompt and do an ipconfig to see the network adapter settings
have been successfully changed.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.6
Configure Internet connection and use IPCONFIG, PING / Tracer and Net stat utilities to
debug the network issues.

OBJECTIVE: To Configure to Configure Internet connection and use IPCONFIG, PING /


Tracer and Net stat utilities to debug the network issues establish interconnection between
systems.

Procedure:

Configure Internet connection and use IPCONFIG, PING:

1. Open Command Prompt, and then type ipconfig. From the display of the ipconfig
command, ensure that the network adapter for the TCP/IP configuration you are testing
is not in a Media disconnected state.
2. At the command prompt, ping the loopback address by typing ping 127.0.0.1.
3. Ping the IP address of the computer.
4. Ping the IP address of the default gateway. If the ping command fails, verify that the
default gateway IP address is correct and that the gateway (router) is operational.
5. Ping the IP address of a remote host (a host that is on a different subnet).
If the ping command fails, verify that the remote host IP address is correct, that the
remote host is operational, and that all of the gateways (routers) between this computer
and the remote host are operational.
6. Ping the IP address of the DNS server.
If the ping command fails, verify that the DNS server IP address is correct that the
DNS server is operational, and that all of the gateways (routers) between this computer
and the DNS server are operational.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Tracer to debug the network issues.

Tracer network:
Open Command Prompt, and type the following:
tracert host_name
Or
tracert ip_address

where host_name or ip_address is the host name or IP address, respectively, of the remote
computer.

If you do not want the tracert command to resolve and display the names of all routers in the
path, use the -d parameter.

This expedites the display of the path. For example, to trace a path from this computer to
www.microsoft.com without displaying the router names, type the following at a command
prompt:

Net stat utilities to debug the network issues:

Displays active TCP connections, ports on which the computer is listening, Ethernet statistics,
the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6
statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without
parameters, netstat displays active TCP connections Syntax

netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval]

Parameters
-a
Displays all active TCP connections and the TCP and UDP ports on which the computer is
listening.

-e
Displays Ethernet statistics, such as the number of bytes and packets sent and received. This
parameter can be combined with -s.

-n
Displays active TCP connections, however, addresses and port numbers are expressed
numerically and no attempt is made to determine names.

-o
Displays active TCP connections and includes the process ID (PID) for each connection. You
can find the application based on the PID on the Processes tab in Windows Task Manager. This
parameter can be combined with -a, -n, and -p.

-p
Protocol
Shows connections for the protocol specified by Protocol. In this case, the Protocol can be tcp,
udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, Protocol
can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

-s
Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and
IP protocols. If the IPv6 protocol for Windows XP is installed, statistics are shown for the TCP
over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -p parameter can be used to
specify a set of protocols.

-r
Displays the contents of the IP routing table. This is equivalent to the route print command.

Interval
Redisplays the selected information every Interval seconds. Press CTRL+C to stop the
redisplay. If this parameter is omitted, netstat prints the selected information only once.

/?
Displays help at the command prompt
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

IVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.7
Study of Basic Network Command and Network Configuration Commands.

OBJECTIVE: To study the working of Basic Networking Commands.

Networking Commands:
All commands related to Network configuration which includes how to switch to privilege
mode and normal mode and how to configure router interface and how to save this
configuration to flash memory or permanent memory.
This command includes
 Configuring the Router commands
 General Commands to configure network
 Privileged Mode commands of a router
 Router Processes & Statistics
 IP Commands
 Other IP Commands e.g. show ip route etc.

The following commands are essentially used for network management.

hostname
This command is used for finding host/domain name and IP address.

Example:
hostname with no options displays the machines host name
hostname –d displays the domain name the machine belongs to
hostname –f displays the fully qualified host and domain name
hostname –i displays the IP address for the current machine

ifconfig
This command will display the assigned IP address of ETHERNET adapter.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Ubuntu: ifconfig | grep inet


Windows: ipconfig

ping
This command is used for checking the network connectivity.

Ping verifies IP-level connectivity to another TCP/IP device by sending Internet Control
Message Protocol (ICMP) Echo Request messages. If received, the corresponding Echo Reply
messages are displayed, along with round-trip times. Otherwise, a timed-out request or an
ICMP unreachable message is displayed. (i.e. You can “ping” an IP address to see if a machine
is alive. If there is no response, you know something is wrong)

Traceroute:

Tracert is a command which can show you the path a packet of information takes from your
computer to one you specify. It will list all the routers it passes through until it reaches its
destination, or fails to and is discarded. In addition to this, it will tell you how long each 'hop'
from router to router takes.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

pathping:
A better version of tracert that gives you statics about packet lost and latency
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Getting Help
In any command mode, you can get a list of available commands by entering a question mark
(?).

Router>?
To obtain a list of commands that begin with a particular character sequence, type in those
characters followed immediately by the question mark (?).

Router#co?
configure connect copy to list keywords or arguments, enter a question mark in place of a
keyword or argument. Include a space before the question mark.

Router#configure?
memory Configure from NV memory network Configure from a TFTP network host terminal
Configure from the terminal.
You can also abbreviate commands and keywords by entering just enough characters to make
the command unique from other commands. For example, you can abbreviate the show
command to sh.

Configuration Files
Any time you make changes to the router configuration, you must save the changes to memory
because if you do not they will be lost if there is a system reload or power outage. There are
two types of configuration files: the running (current operating) configuration and the startup
configuration.

Use the following privileged mode commands to work with configuration files.

• configure terminal – modify the running configuration manually from the terminal.
• show running-config – display the running configuration.
• show startup-config – display the startup configuration.
• copy running-config startup-config – copy the running configuration to the startup
configuration.
• copy startup-config running-config – copy the startup configuration to the running
configuration.
• erase startup-config – erase the startup-configuration in NVRAM.
• copy tftp running-config – load a configuration file stored on a Trivial File Transfer
Protocol (TFTP) server into the running configuration.
• copy running-config tftp – store the running configuration on a TFTP server.

IP Address Configuration
Take the following steps to configure the IP address of an interface.
Step 1: Enter privileged EXEC mode:
Router>enable password
Step 2: Enter the configure terminal command to enter global configuration mode.
Router#config terminal
Step 3: Enter the interface type slot/port (for Cisco 7000 series) or interface type port (for
Cisco 2500 series) to enter the interface configuration mode.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Example:
Router (config)#interface ethernet 0/1
Step 4: Enter the IP address and subnet mask of the interface using the ip address ipaddress
subnetmask command.
Example,
Router (config-if)#ip address 192.168.10.1 255.255.255.0
Step 5: Exit the configuration mode by pressing Ctrl-Z
Router(config-if)#[Ctrl-Z]

host

This command is used for mapping name to IP addresses?


Example: host www.google.com
www.google.com has address 74.125.200.147
www.google.com has address 74.125.200.106
www.google.com has address 74.125.200.103
www.google.com has address 74.125.200.104
www.google.com has address 74.125.200.105
www.google.com has address 74.125.200.99
www.google.com has IPv6 address 2404:6800:4003:c00::69

telnet

This command is used for connecting to a host on a particular port.

Example: telnet osou.ac.in 80


telnet command is also used to make a connection to a remote machine and execute programs
as if one were physically present. telnet (data are travelled without encryption; not secured)

ftp

This command allows you to send and receive files between two computers.

net

net command is used for checking/starting/stopping networking services, users, messaging,


configuration and so on...?

arp

This command is used for displaying or manipulating the ARP (Address Resolution Protocol)
information on a network device or computer.

Explanation: The ARP protocol maps Layer 3 IP addresses to Layer 2 MAC addresses. If a
packet must move across networks, the Layer 2 MAC address changes with each hop across a
router, but the Layer 3 address never changes. ARP cache stores ARP address mappings.
If the entry was learned dynamically, it will eventually be deleted from cache.
If the entry was manually inserted in ARP cache, it is a static entry and will remain until the
computer is turned off or the ARP cache is manually flushed.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

On Windows, arp displays and modifies entries in the Address Resolution Protocol (ARP)
cache, which contains one or more tables that are used to store IP addresses and their resolved
Ethernet or Token Ring physical addresses. There is a separate table for each Ethernet or Token
Ring network adapter installed on your computer. Used without parameters, arp displays help.

Winipcg

This command is used to know the IP configuration of the PC in a graphical form. It shows the
following in the windows command prompt.
 IP Address
 Subnet Mask
 Type of H/W used for communication & it’s address

nslookup
This command displays information from Domain Name System (DNS) name servers.
NOTE: If you write the command as above it shows as default your pc's server name firstly.

netstat
This command is used for finding connection to and from the host?

Example:
netstat nap| grep port will display process id of application which is using that port
netstat a or netstat –all will display all connections including TCP and UDP
netstat tcp or netstat –t will display only TCP connection
netstat udp or netstat –u will display only UDP connection
netstat g will display all multicast network subscribed by this host.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION
ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.8
Configure a Network Topology Using Packet Tracer Software.

OBJECTIVE: To configure a network topology using packet tracer software.

Interface overview
The layout of Packet Tracer is divided into several components similar to a photo editor. Match
the numbering in the following screenshot with the explanations given after it:

The components of the Packet Tracer interface are as follows:


Area 1: Menu bar – This is a common menu found in all software applications; it is used to
open, save, print, change preferences, and so on.
Area 2: Main toolbar – This bar provides shortcut icons to menu options that are commonly
accessed, such as open, save, zoom, undo, and redo, and on the right-hand side is an icon for
entering network information for the current network.
Area 3: Logical/Physical workspace tabs – These tabs allow you to toggle between the
Logical and Physical work areas.
Area 4: Workspace – This is the area where topologies are created and simulations are
displayed.
Area 5: Common tools bar – This toolbar provides controls for manipulating topologies, such
as select, move layout, place note, delete, inspect, resize shape, and add simple/complex PDU.
Area 6: Realtime/Simulation tabs – These tabs are used to toggle between the real and
simulation modes. Buttons are also provided to control the time, and to capture the packets.
Area 7: Network component box – This component contains all of the network and end
devices available with Packet Tracer, and is further divided into two areas:
Area 7a: Device-type selection box – This area contains device categories
Area 7b: Device-specific selection box – When a device category is selected, this selection
box displays the different device models within that category
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Area 8: User-created packet box – Users can create highly-customized packets to test their
topology from this area, and the results are displayed as a list.

Make sure you are familiar with these names, because moving forward we will be referring to
them frequently.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Configure a Network Topology


Step 1: Start Packet Tracer

Step 2: Choosing Devices and Connections


We will begin building our network topology by selecting devices and
the media in which to connect them. Several types of devices and
network connections can be used. For this lab we will keep it simple
by using End Devices, Switches, Hubs, and Connections.
Single click on each group of devices and connections to display the
various choices. The devices you see may differ slightly.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Step 3: Building the Topology – Adding Hosts

Single click on the End Devices.

Single click on the Generic host.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Move the cursor into topology area. You will notice it turns into a plus “+” sign.

Single click in the topology area and it copies the device.

Add three more hosts.

Step 4: Building the Topology – Connecting the Hosts to Hubs and

Switches Adding a Hub

Select a hub, by clicking once on Hubs and once on a Generic hub.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Add the hub by moving the plus sign “+” below PC0 and PC1 and click once.

Connect PC0 to Hub0 by first choosing Connections.

Click once on the Copper Straight-through cable.

Perform the following steps to connect PC0 to Hub0:


1. Click once on PC0
2. Choose FastEthernet
3. Drag the cursor to Hub0
4. Click once on Hub0 and choose Port 0
5. Notice the green link lights on both the PC0 Ethernet NIC and
the Hub0 Port 0 showing that the link is active.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

1 2 3 4 5

Repeat the steps above for PC1 connecting it to Port 1 on Hub0.


(The actual hub port you choose does not matter.)

Adding a Switch

Select a switch, by clicking once on Switches and once on a 2950-24 switch.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Add the switch by moving the plus sign “+” below PC2 and PC3 and click once.

Connect PC2 to Hub0 by first choosing Connections.

Click once on the Copper Straight-through cable.

Perform the following steps to connect PC2 to Switch0:

1. Click once on PC2


2. Choose Fast Ethernet
3. Drag the cursor to Switch0
4. Click once on Switch0 and choose FastEthernet0/1
5. Notice the green link lights on PC2 Ethernet NIC and amber
light Switch0 FastEthernet0/1 port. The switch port is
temporarily not forwarding frames, while it goes through the
stages for the Spanning Tree Protocol (STP) process.
6. After a about 30 seconds the amber light will change to green
indicating that the port has entered the forwarding stage.
Frames can now forwarded out the switch port.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

1 2 3 4 5 6

Repeat the steps above for PC3 connecting it to Port 3 on Switch0 on port
FastEtherent0/2. (The actual switch port you choose does not matter.)

Move the cursor over the link light to view the port number. Fa means
FastEthernet, 100 Mbps Ethernet.

Step 5: Configuring IP Addresses and Subnet Masks on the Hosts

Before we can communicate between the hosts we need to configure


IP Addresses and Subnet Masks on the devices.

Click once on PC0.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Choose the Config tab and click on Settings. It is here that you can change the name of
PC0. It is also here where you would enter a Gateway IP Address, also known as the
default gateway and the DNS Server IP Address. We will discuss this later, but this
would be the IP address of the local router. If you want, you can enter the Gateway IP
Address 172.16.1.1 and DNS Server IP Address 172.16.1.100, although it will not be
used in this lab.

Click on Interface and then Fast Ethernet. Although we have not yet discussed IP
Addresses, add the IP Address to 172.16.1.10. Click once in the Subnet Mask field to
enter the default Subnet Mask. You can leave this at 255.255.0.0. We will discuss this
later.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Also, notice this is where you can change the Bandwidth (speed) and Duplex of the
Ethernet NIC (Network Interface Card). The default is Auto (auto negotiation), which
means the NIC will negotiate with the hub or switch. The bandwidth and/or duplex can
be manually set by removing the check from the Auto box and choosing the specific
option.

Bandwidth - Auto

If the host is connected to a hub or switch port which can do 100 Mbps, then the Ethernet
NIC on the host will choose 100 Mbps (Fast Ethernet). Otherwise, if the hub or switch
port can only do 10 Mbps, then the Ethernet NIC on the host will choose 10 Mbps
(Ethernet).

Duplex - Auto

Hub: If the host is connected to a hub, then the Ethernet NIC on the host will choose
Half Duplex.

Switch: If the host is connected to a switch, and the switch port is configured as Full
Duplex (or Auto negotiation), then the Ethernet NIC on the host will choose Full Duplex.
If the switch port is configured as Half Duplex, then the Ethernet NIC on the host will
choose Half Duplex. (Full Duplex is a much more efficient option.)

The information is automatically saved when entered.

To close this dialog box, click the “X” in the upper right.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Repeat these steps for the other hosts. Use the information below for IP Addresses and
Subnet Masks.

Host IP Address Subnet Mask

PC0 172.16.1.10 255.255.0.0

PC1 172.16.1.11 255.255.0.0

PC2 172.16.1.12 255.255.0.0

PC3 172.16.1.13 255.255.0.0

Verify the information

To verify the information that you entered, move the Select tool (arrow) over each host.

Deleting a Device or Link

To delete a device or link, choose the Delete tool and click on the item you wish to delete.

Step 6: Connecting Hub0 to Switch0

To connect like-devices, like a Hub and a Switch, we will use a Cross-over cable. Click
once the Cross-over Cable from the Connections options.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Move the Connections cursor over Hub0 and click once.

Select Port 5 (actual port does not matter).

Move the Connections cursor to Switch0.

Click once on Switch0 and choose FastEthernet0/4 (actual port does not matter).
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

The link light for switch port FastEthernet0/4 will begin as amber and eventually
change to green as the Spanning Tree Protocol transitions the port to forwarding.

Step 7: Verifying Connectivity in Real-time Mode


Be sure you are in Real-time mode.

Select the Add Simple PDU tool used to ping devices.

Click once on PC0, then once on PC3.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

The PDU Last Status should show as Successful.

Retting the Network

At this point we will want to reset the network, whenever you want to reset the network
and begin the simulation again, perform the following tasks:

Click Delete in the PDU area.

Now, Power Cycle Devices and confirm the action.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Waiting for Spanning Tree Protocol (STP)

Note: Because Packet Tracer also simulates the Spanning Tree Protocol (later), at times
the switch may show amber lights on its interfaces. You will need to wait for the lights
to turn green on the switches before they will forward any Ethernet frames.

Step 8: Verifying Connectivity in Simulation Mode


Be sure you are in Simulation mode.

Deselect all filters (All/None) and select only ICMP.


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Select the Add Simple PDU tool used to ping devices.

Click once on PC0, then once on PC3.

Continue clicking Capture/Forward button until the ICMP ping is completed. You
should see the ICMP messages move between the hosts, hub and switch. The PDU Last
Status should show as Successful. Click on Clear Event List if you do not want to look
at the events or click Preview Previous Events if you do. For this exercise it does not
matter.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Step 9: Saving the Topology


Perform the following steps to save the topology (uses .pkt file extension).

Opening Existing Topologies


Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Opening Existing PT Topologies

*****
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Task
1. Consider the following setup, Set IP addresses (192.168.50.0/27) on computers and verify the connectivity
between PC2 to PC5, PC3 to PC4
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.9
Configure static and RIP routing protocols.

OBJECTIVE: to configure static and RIP routing protocols.

Static routing
Static routing is the no-brainer method for configuring routing even though it requires more work. With Packet
Tracer, static routing can be configured using the GUI alone. In this method, we configure a router with a
destination and a gateway to reach it. So, each router in a topology should know the means to reach all destinations
in the network, which requires manual work. Similarly, if a router is added or removed from the topology, all
routers must be manually updated to reflect this.

Static routing with GUI


Even if you do not know Cisco commands, this feature of Packet Tracer comes in handy. For this exercise, we
will be using the topology shown in the following screenshot:
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Because we will be using only the GUI here, configuration will be kept to a minimum. The topology can be
configured by performing the following steps:
1. Click on a router icon, go to the Config tab, select an interface, and configure the IP address. Make sure that
you select the On checkbox in this section to bring the port state up. For this example, we'll be using the
following IP addresses:

Router Interface IP Address


R1 FastEthernet0/0 192.168.10.1
FastEthernet0/1 192.168.20.1
R2 FastEthernet0/0 192.168.10.2
FastEthernet0/1 192.168.30.1
R3 FastEthernet0/0 192.168.20.2
FastEthernet0/1 192.168.40.1
R4 FastEthernet0/0 192.168.30.2
FastEthernet0/1 192.168.40.2

2. Under the ROUTING section, click on Static. The following screenshot is displayed:
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

3. The following settings will be used for configuring static routing using the GUI. The concept here
is to enter all routes that are not directly connected to a router and a gateway IP that belongs to a network
that is directly connected.

Device Network/Mask Next Hop


R1 192.168.30.0 / 255.255.255.0 192.168.10.2
192.168.40.0 / 255.255.255.0 192.168.20.2
R2 192.168.20.0 / 255.255.255.0 192.168.10.1
192.168.40.0 / 255.255.255.0 192.168.30.2
R3 192.168.10.0 / 255.255.255.0 192.168.20.1
192.168.30.0 / 255.255.255.0 192.168.40.2
R4 192.168.10.0 / 255.255.255.0 192.168.30.1
192.168.20.0 / 255.255.255.0 192.168.40.1
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

4. Now use simple PDU and test the connectivity between all of the routers. Then use the simulation
mode to find the route taken by the packets.

5. How about taking a look at the routing table? For this, too, the GUI has an option; click on the
inspect icon or press I and select a router. A table containing four routes will appear for each router, as
shown in the following screenshot:

Dynamic routing protocols


When we learned about static routing we found that a lot of manual configuration was involved and a change to
the topology also required manual configuration changes. Dynamic protocols work by advertising routes to each
other.
The configuration is the opposite of static routing; here, we enable dynamic routing on the required interfaces.
The routing protocol then forms "neighborship" with other routers and sends them the directly-connected routes
and other received routes. In this way, all routers exchange updates with one another. When a topology change
occurs, those updates are also sent out by routers that learn about this loss of connectivity.

Configuring RIP with the GUI


Packet Tracer offers a GUI to configure a dynamic routing protocol called RIP (Routing Information Protocol).
This GUI section is similar to the static routing section. It has only one textbox for entering the network address
of the directly connected network.
You may think that the rest of the configuration is similar to the Static configuration, but it isn't. Whereas in the
static configuration we entered routes of other routers, in RIP, we enter the network IP addresses of the router's
interfaces. By doing this, you are enabling that routing protocol on a particular interface. To configure dynamic
routing with the GUI, perform the following steps:

1. Create the same four-router topology we used previously and assign the same IP addresses through the
Config tab.
2. Click on RIP—now, configuring this is very easy, with each router requiring only the Network IP of its
own interfaces, as shown in the following screenshot:
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

3. Enter the following network IP addresses:

Device RIP Network


R1 192.168.10.0
192.168.20.0
R2 192.168.10.0
192.168.30.0
R3 192.168.20.0
192.168.40.0
R4 192.168.30.0
192.168.40.0

4. Once the topology is configured, use the simple PDU to check for connectivity. Let's check for two
indirectly connected routers (R1 and R4 or R2 and R3). Once the connection is successful, let's see how
dynamic routing works on topology changes.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

5. Use the delete tool and remove either the link between R1 and R2 or the link between R1 and R3. Use the
simulation mode and test connectivity with the simple PDU. You'll find that the packet takes the alternate,
longer route and succeeds in reaching the destination.

If you have tried step 5 of the static routing topology, the packet would've failed as we did not enter any alternate
gateway to each destination network. This is the biggest advantage of using a dynamic routing protocol.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.10
Packet capture applications (Wireshark).

OBJECTIVE

1. Understand the packet analysis tool


2. Understand TCPU/UDP/IP header

Background

Wireshark, a network analysis tool formerly known as Ethereal, captures packets in real time and display
them in humanreadable format. Wireshark includes filters, color-coding and other features that let you dig
deep into network traffic and inspect individual packets.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

This tutorial will get you up to speed with the basics of capturing packets, filtering them, and inspecting
them. You can use Wireshark to inspect a suspicious program’s network traffic, analyze the traffic flow
on your network, or troubleshoot network problems.

Capturing Packets
After downloading and installing Wireshark, you can launch it and click the name of an interface under
Interface List to start capturing packets on that interface. For example, if you want to capture traffic on
the wireless network, click your wireless interface. You can configure advanced features by clicking
Capture Options, but this isn’t necessary for now.

As soon as you click the interface’s name, you’ll see the packets start to appear in real time. Wireshark
captures each packet sent to or from your system. If you’re capturing on a wireless interface and have
promiscuous mode enabled in your capture options, you’ll also see other the other packets on the network.

Click the stop capture button near the top left corner of the window when you want to stop capturing
traffic.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Color Coding
You’ll probably see packets highlighted in green, blue, and black. Wireshark
uses colors to help you identify the types of traffic at a glance. By default,
green is TCP traffic, dark blue is DNS traffic, light blue is UDP traffic, and
black identifies TCP packets with problems — for example, they could have
been delivered out-of-order.

Sample Captures
If there’s nothing interesting on your own network to inspect, Wireshark’s
wiki has you covered. The wiki contains a page of sample capture files that
you can load and inspect.
Opening a capture file is easy; just click Open on the main screen and
browse for a file. You can also save your own captures in Wireshark and
open them later.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Filtering Packets
If you’re trying to inspect something specific, such as the traffic a program
sends when phoning home, it helps to close down all other applications using
the network so you can narrow down the traffic. Still, you’ll likely have a
large amount of packets to sift through. That’s where Wireshark’s filters
come in.

The most basic way to apply a filter is by typing it into the filter box at the
top of the window and clicking Apply (or pressing Enter). For example, type
“dns” and you’ll see only DNS packets. When you start typing, Wireshark will
help you auto-complete your filter.

You can also click the Analyze menu and select Display Filters to create a new filter.

Another interesting thing you can do is right-click a packet and select Follow TCP
Stream.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

You’ll see the full conversation between the client and the server.

Close the window and you’ll find a filter has been applied automatically —
Wireshark is showing you the packets that make up the conversation.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Inspecting Packets

Click a packet to select it and you can dig down to view its details.

You can also create filters from here — just right-click one of the details and
use the Apply as Filter submenu to create a filter based on it.

Wireshark is an extremely powerful tool, and this tutorial is just scratching


the surface of what you can do with it. Professionals use it to debug network
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

protocol implementations, examine security problems and inspect network


protocol internals.

Your Task: Capture the TCP, UDP and IP traffic and analyze the headers
with the meaning of every headers field described.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

CHITTAGONG UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION ENGINEERING
CHITTAGONG-4349, BANGLADESH
COURSE NO.: ETE-316
COURSE TITLE: Computer Communications and Networks SESSIONAL

Experiment No.11
Firewall Configuration.

OBJECTIVE: To Configure Windows Firewall in Windows 10/8/7

A firewall is a software or hardware that checks information coming from the Internet or a network,
and then either blocks it or allows it to pass through to your computer, depending on your firewall
settings. A firewall can help prevent hackers or malicious software from gaining access to your
computer through a network or the Internet. A firewall can also help stop your computer from
sending malicious software to other computers.

Configure Windows Firewall


You can customize most settings of your Windows Firewall through the left pane of the Firewall
applet in Control Panel.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

1. Turn on Windows Firewall


This setting is selected by default. When Windows Firewall is On, most programs are blocked
from communicating through the firewall. Clicking on the Turn Firewall On or Off will let you
enable or disable the Windows Firewall on your computer.

2. Block all incoming firewall connections, including those in the list of allowed programs
This setting blocks all unsolicited attempts to connect to your computer. Use this setting when you
need maximum protection for your computer, such as when you connect to a public network in a
hotel or airport, or when a computer worm is spreading over the Internet. With this setting, you
are not notified when Windows Firewall blocks programs, and programs in the list of allowed
programs are ignored. When you block all incoming connections, you can still view most web
pages, send and receive e-mail, and send and receive instant messages.

3. Turn off Windows Firewall


Avoid using this setting unless you have another firewall running on your computer. Turning off
Windows Firewall might make your computer more vulnerable to damage from hackers and
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

malicious software. Clicking on the Turn Firewall On or Off will let you enable or disable the
Windows Firewall on your computer.

4. Block or Allow Programs through the Windows Firewall


By default, most programs are blocked by Windows Firewall to help make your computer more
secure. To work properly, some programs might require you to allow them to communicate
through the firewall. Here’s how to do that:
Click Allow an app or feature through Windows Firewall. If you are prompted for an
administrator password or confirmation, type the password or provide confirmation.

Select the check box next to the program you want to allow, select the network location types you
want to allow communication on, and then click OK.
If you want to allow a program to communicate through the firewall, you can add it to the list of
allowed programs. For example, you might not be able to send photos in an instant message until
you add the instant messaging program to the list of allowed programs. To add or remove a
program to the list, click on the Allow an app or feature through Windows Firewall link to open
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

the following panel, where you will be able to get more details about allowed programs and allow
another app to communicate through the firewall.

5. How to open a port in Windows Firewall


You can also block or open a Port in Windows Firewall. If Windows Firewall is blocking a
program and you want to allow that program to communicate through the firewall, you can usually
do that by selecting the program in the list of allowed programs (also called the exceptions list) in
Windows Firewall. To learn how to do this, see Allow a program to communicate through
Windows Firewall.
However, if the program isn’t listed, you might need to open a port. For example, to play a
multiplayer game with friends online, you might need to open a port for the game so that the
firewall allows the game information to reach your computer. A port stays open all the time, so be
sure to close ports that you don’t need anymore.
Click to open Windows Firewall. In the left pane, click Advanced settings.

In the Windows Firewall with Advanced Security dialog box, in the left pane,
click Inbound Rules, and then, in the right pane, click New Rule.
Computer Communications and Networks SESSIONAL ©Dept. of ETE, CUET

Next, follow the instructions on your screen to its logical conclusion.

Вам также может понравиться