0% found this document useful (0 votes)
18 views51 pages

CN File All The Practicals For The Subject Compter Networks For Semester 3

Uploaded by

232149
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views51 pages

CN File All The Practicals For The Subject Compter Networks For Semester 3

Uploaded by

232149
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

lOMoARcPSD|47712742

CN File - All the practicals for the subject "COMPTER


NETWORKS" for semester 3.
Bachelor of Computer Applications (I. K. Gujral Punjab Technical University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PAGE
S.NO. TITLE
NO.
Familiarization With Networking Components And Devices:
1 2-5
LAN Adapters, Hubs, Switches, Routers Etc.
Familiarization With Transmission Media And Tools: Co-Axial
2 6-12
Cable, UTP Cable, Crimping Tool, Connectors Etc.

3 Preparing Straight And Cross Cables. 13-14

Study Of Various LAN Topologies And Their Creation Using


4 15-21
Network Devices, Cables And Computers.

5 Configuration Of TCP/IP Protocols In Windows And Linux 22-27

6 Implementation Of File And Printer Sharing 28-29

7 Designing And Implementing Class A, B, And C Networks. 30-32

8 Subnet Planning And Its Implementation. 33

To Configure Dynamic IP Address For A Computer Connected


9 34-36
To LAN.
Use Of Commands Like ping, ipconfig For Troubleshooting
10 37-38
Networks Related Problems.
Develop A Program To Compute The Hamming Distance
11 39-40
Between Any Two Code Words.

12 Installation Of FTP Server And Client. 41-44

13 To Configure Proxy Server 45-46

14 Familiarization With Network Simulation Tool. 47-50

1
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 1

Familiarization with Networking Components anddevices:


LAN Adapters, Hubs, Switches, and Routers etc.

LAN Adapter:-
LAN Adapter is an expansion board that is used to connect a computer or computing device to a network. LANadapter
is the most common and generic alternate name for a Network Interface Card (NIC).
However, many similar products, such as a Wireless USB LAN Adapter is also called a LAN Adapter.

• Wireless USB LAN adapter:-


It is a high-speed wireless network card that is used to access a network through a USB port on a computer or laptop.
Most wireless USB LAN adapters look like small USB flash drives and usually are based on the 802.11g standard
which provides a data rate up to 54-Mbps in a wireless LAN environment. Some wireless USB LAN adapters may
also support the 802.11b standard. Awireless USB LAN adapter basically enables the user to share files, folders,
printers, other network resources and Internet access.

2
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Network Hub:-

▪ In computer networking, a hub is a small, simple, inexpensive device that joins multiple computers together.
▪ Hubs work as a central connection between all network equipment and handle a data type, which is
called frames.
▪ If a frame is received, it is transmitted to the port of the destination computer after amplifying it. A frame is
passed to each of its ports in the hub, whether it is destined only for one port.
▪ There exist two types of Hubs.

HUB

ACTIVE PASSIVE

1. Passive hubs do not amplify the electrical signal of incoming packets before broadcasting themout to the
network.
2. Active hubs, on the other hand, do perform this amplification, as does a different type of dedicated network
device called a repeater.

How Hub Works?


❖ Hub works like an electric wire, it receives data signals from one device in his one port and forwards to all the
other ports, except the source port.
❖ It does not have any capability to identify any frames to know where it should forward because it does not
maintain any kind of table like switch.
❖ So there is a lot of traffic on the network and network performance is also very poor, only one device transmits
information at a particular time.

3
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Network switch:-
▪ Switch is a network device that has multiple ports that are used to connect devices and create a network.
▪ A switch can actually learn the physical addresses of the devices, that are connected to it and it stores these
physical addresses (called MAC address) in its table.
▪ It is an intelligent device because it has a memory where it maintains the table called CAM table (Content
Accessible Memory), and stores the port number and MAC addresses of all devices which helps to identify
every device on a network.

How Switch Work?


➢ It works on star topology because all the devices are connected to the central node. Data from the source
device is first arrived at the switch and then transferred to the destination device.
➢ When first-time devices are connected to the switch, it broadcast the message, where it identifies the port
number and MAC address and store it on its table, this information helps to identify destination device on the
network and sends it directly to that device
➢ So after the broadcast, the switch knows which device is connected to which port number, so next time it
does not need to broadcast the message, it will forward the information with the help of port number and
MAC addresses.

Router:-

▪ A router is an internetworking device, that receives IP packets from one computer network and forwards it to
another computer network.
▪ It is used to establish connections between two or more different computer networks.
▪ It can be a physical or virtual networking device, which is designed to receive the data packets from one
network, analyze it, and forward it to another computer network.

4
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

How Router Works?

➢ Internet is the group of networks, means many smaller and bigger networks create the internet, and the router
is the only device that can connect to these networks with each other. Router is connected to other routers
also, and the data packets are forward to one router to another router until it reaches its destination node.
➢ When a computer sends a message, the message brakes in IP packets which contains sender and receiver
network information and the router has the capability to read this information, using this information, it
calculates the best route for IP packets to travel on the network.
➢ It is an intelligent device because it maintains a routing table which decides the packet's next route
➢ and also helps to find the best route to transmit the IP packets from source to destination.
➢ A router can be used in LAN and WAN environments. For example, a router can be used in homes and
offices for connecting devices, and can also be used to create a connection between different networks

5
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 2

Familiarization with Transmission media and Tools:Co-


axial cable, UTP Cable, Crimping Tool, Connectors etc.

What is transmission media?

Transmission media is a pathway that carries the information from sender to receiver. We use different types of
cables or waves to transmit data. Data is transmitted normally through electrical or electromagnetic signals.
An electrical signal is in the form of current. An electromagnetic signal is series of electromagnetic energy pulses at
various frequencies. These signals can be transmitted through copper wires, optical fibers, atmosphere, water and
vacuum Different Medias have different properties like bandwidth, delay, cost and ease of installation and
maintenance. Transmission media is also called Communication channel.

TWISTED PAIR

GUIDED COAXIAL CABLE

OPTICAL FIBRE
TRANSMISSION
MEDIA
RADIOWAVE

UNGUIDED MICROWAVE

INFRARED

Wired or Guided Media or Bound Transmission Media

• Guided transmission media are cables that are tangible or have a physical existence.
• Wired transmission media use cable or wires for sending the data from one place to another. Cables can be
twisted pair cables, coaxial cables or fiber optic cables.
• It is also referred to as guided transmission media because the data guide goes through cables
from one place to another.
• It is also known as bounded transmission media because the data signals are bound by the cabling system.
6
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

7 COMPUTER NETWORKS LAB

• Bounded transmission refers to the connectivity between a source and a destination using cables or wires.
The signals have to travel through this channel i.e. physical medium.
• There are three types of wire media:-
➢ Twisted Pair Cable
➢ Coaxial Cable
➢ Fiber Optics Cable

Twisted Pair Cable

▪ Twisted-pair cabling is the most popular network cable for data transmission.
▪ It is lightweight, easy to install, inexpensive, and supports data speeds up to 100 Mbps.
▪ It is a pair of copper wires. Copper wires are the most common and widely used wire for transmitting signals
due to good performance at low cost.
▪ A twisted pair cable consists of two conductors (normally copper), each pair of cable twisted together to
form a single media with its own plastic insulation.
▪ Out of these two wires, one wire carries the actual signal and the other is used for ground reference.
▪ To identify each cable, these cables are color coated.
▪ A twist between wires is helpful in reducing noise (electromagnetic interference) and crosstalk.
▪ This type of cable is mostly used to provide voice and data transmission in telephone networks.

▪ It is of two types –
➢ Unshielded Twisted Pair (UTP)
➢ Shielded Twisted Pair (STP)

• Unshielded twisted pair (UTP)


❖ There is no shield in unshielded twisted pair means no metal foil in UTP.
❖ UTP cable is more common than STP cables because it costs less than STP and is easily available.
❖ Due to its low cost, UTP cabling is widely used for local-area networks (LANS) and telephone connections .
❖ Unshielded twisted-pair cables do not provide high bandwidth or good protection from interference like
coaxial or fiber optic cables, but UTP cables are low cost and easier to work with.

7
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

• Shielded twisted pair (STP)


❖ These types of cable have a metal foil covering each pair of insulator conductors.
❖ Shielding in STP cable helps to prevent electromagnetic noise and also eliminates Crosstalk
❖ The Data transmission rate is higher in STP.
❖ Because of metal foil covering, these cables are more expensive than coaxial and unshielded twisted pair.

Coaxial Cable

• Coaxial cable has two wires of copper.


• The core/inner copper wire in the center and is made of the solid conductor which is used actual data
transmission. It is enclosed in an insulating sheath.
• The second/external copper wire is wrapped around and used to protect against external electromagnetic
interference (noise).
• This all is covered by plastic cover used to protect the inner layers from physical damage such as fire or
water

Fiber Optic Cable

• A fiber optic cable is made of high quality of thin glass or plastic and is used to transfer digital data signals in
the form of light over thousands of miles
• Fiber optic cables are not affected by electromagnetic interference, so noise and distortion are much less.
• Fiber optic cables provide high data transmission and designed for long-distance.
• Fiber optic cables transmit data signals using light pulses generated by small lasers or light emitting diodes
(LEDs).
• The cable consists of one or more strands of glass, each slightly thicker than a human hair.
• The center of each strand is called the core, which provides a pathway for light to travel.
8
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

• The core is surrounded by a layer of glass known as cladding that reflects light inward to avoid loss of signal
and allow the light to pass through bends in the cable. Because of this reflective cladding, no light can escape
the glass core.
• Most of the world's Internet uses fiber optic cables because it provides higher bandwidth and transmits data
over longer distances.

Wireless or Unguided Media or Unbound Transmission Media

• Wireless Transmission Media does not establish a physical link between two or more devices, it helps to
communicate wirelessly.
• Data transmits through electromagnetic waves without using any physical medium. Hence it is known as
wireless transmission.
• Wireless signals are transmitted over the air and are received and interpreted by suitable antennas. Air is the
medium through which electromagnetic energy can flow easily.
• When an antenna is attached to the electrical circuit of a computer or wireless device, it converts digital data
into a wireless signal and spreads all over its frequency range. The receptor at the other end receives these
signals and converts them back into digital data.
• It is also referred to as unguided transmission media because data do not guide through cables, data transmit
wirelessly through the air unguided.
• The main features of wireless media are- less secure, the signal can be transmitted through the air, and can be
applied for larger distances.
• Broadly classifying, there are three types of wireless media-
➢ Radio wave
➢ Microwave
➢ Infrared

Radio Waves

• Radio waves are electromagnetic waves which have the longest wavelengths in the electromagnetic
spectrum.
• The radio frequency is easy to generate because it has a large wavelength and can travel long distances.

9
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

• Transmitters are used to generate radio waves artificially which are received by radio receivers using
antennas.
• Radio stations transmit radio signals using transmitters, and these signals are received by receivers installed
in our devices. In simple words, transmitters transmit radio signals and receivers capture those radio signals
using antennas which installed in our devices.
• Radio waves are omni-directional means they travel in all directions from the source. So when a sending
antenna sends radio-signals, it can be received by any receiving antenna.

Microwaves

• Microwave is a type of radio wave that has high frequencies. It can be classified as a subclass of radio waves.
• The frequencies range of microwaves is between from 300 MHz to 300 GHz.
• Microwave is the subpart of radio waves, means it's a high frequency of radio waves.
• When the frequency exceeds 100 MHz, EM waves travel in a straight line so the signals can be sent by
beaming those waves towards one particular station.
• Microwaves are unidirectional because it has a higher frequency and travels in straight lines.
• For sending signals to another antenna, both sender and receiver antennas should be mounted on the towers
and must be aligned to be strictly in line-of-sight
• It is used for satellite communications, navigation, radar, remote sensing, and other short-range
communications systems.

Infrared Waves

• Infrared waves are also a part of wireless transmission.


• These waves are used for very short-range communication because its frequency range is very high from 300
GHz to 400 THz that cannot travel in the longer distances.
• Infrared waves are mostly used very short distance communication like TV remote, wireless mouse, wireless
printer, automatic doors, handheld devices, etc.
10
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

• Because if very high frequency, these waves cannot penetrate walls.


• Its short-range communication does not affect two communication devices in one room to the next room.
That's the reason when we are using an infrared TV remote in one room than the infrared signals do not
interfere with in the next room infrared TV remote control.
• The data transfer rate is very high because it has a very high frequency.

Crimping tool

A crimping tool is a tool designed to crimp or connect a connector to the end of a cable. For example, network
cables and phone cables are created using a crimping tool to connect the RJ-45and RJ-11 connectors to the end of
the cable. In the example below picture, this crimper is capable of crimping a RJ-11 (6-Pin) and RJ-45 (8-Pin)
connectors and also includes a wire cutternear the handles that can be used to cut phone or CAT5 cable.

RJ-45 Connecter

The RJ-45 connector is a form of telephone connector. It sees its most frequent use as a local-area network
11
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

connector, and is frequently referred to simply as an Ethernet connector.

BNC Connecter
This connector is commonly used on a Token Ring network. BNC is also short for Bayonet NutConnector or
British Naval/Navy Connector although more appropriately known as the Bayonet Neill Concelman.

12
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 3
Preparing straight and cross cables.

Straight-Through Wired Cables

• In this cable, wires are placed in the same position at both ends. The wire at pin 1 on one end of the cable
connects to pin 1 at the other end of the cable. The wire at pin 2 connects to pin 2 on the other end of the
cable; and so on.
• Straight-Through wired cables are most commonly used to connect a host to client.
• A straight-through cable is used to connect the following devices-
➢ PC to Switch
➢ PC to Hub
➢ Router to Switch
➢ Switch to Server
➢ Hub to Server

Crossover Wired Cables

• In this cable, transmitting pins of one side connect with the receiving pins of the other side.
• The wire at pin 1 on one end of the cable connects to pin 3 at the other end of the cable. The wire at pin 2
connects to pin 6 on the other end of the cable. Remaining wires connect in the same positions at both ends.
• The cross-over cable is used to connect the following devices-
➢ Two computers
➢ Two hubs
➢ A hub to a switch
➢ A cable modem to a router
➢ Two router interfaces

13
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

14
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 4
Study of various LAN topologies and their designs using
network devices, cables and computers.

TOPOLOGY
• Topology defines the structure of the network of how all the components are interconnected to each other.
• There are 6 types of topologies:

TOPOLOGIES

BUS STAR RING TREE MESH HYBRID


TOPOLOGY TOPOLOGY TOPOLOGY TOPOLOGY TOPOLOGY TOPOLOGY

❖ Bus topology
Bus Topology is the simplest of network topologies. In this type of topology, all the nodes (computers as well as
servers) are connected to the single cable (called bus), by the help of interface connectors. This central cable is the
backbone of the network and is known as Bus (thusthe name). Every workstation communicates with the other
device through this Bus.

15
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Advantages (benefits) of Bus Topology


• It is easy to set-up and extend bus network.
• Cable length required for this topology is the least compared to other networks.
• Bus topology costs very less.
• Linear Bus network is mostly used in small networks. Good for LAN.

Disadvantages (Drawbacks) of Bus Topology


• There is a limit on central cable length and number of nodes that can be connected.
• Dependency on central cable in this topology has its disadvantages. If the main cable (i.e. bus) encounters
some problem, whole network breaks down.
• Proper termination is required to dump signals. Use of terminators is must.
• It is difficult to detect and troubleshoot fault at individual station.
• Maintenance costs can get higher with time.
• Efficiency of Bus network reduces, as the number of devices connected to it increases.
• It is not suitable for networks with heavy traffic.
• Security is very low because all the computers receive the sent signal from the source

❖ Star topology
In Star topology, all the components of network are connected to the central device called “hub” which may be a
hub, a router or a switch. Unlike Bus topology, where nodes were connected to central cable, here all the
workstations are connected to central device with a point-to-point connection. So it can be said that every computer
is indirectly connected toevery other node by the help of “hub”.

Advantages of Star Topology

• As compared to Bus topology it gives far much better performance, signals don’t necessarilyget transmitted
to all the workstations.
• Easy to connect new nodes or devices. In star topology new nodes can be added easilywithout affecting rest
of the network. Similarly components can also be removed easily.
16
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

• Centralized management. It helps in monitoring the network.


• Failure of one node or link doesn’t affect the rest of network. At the same time its easy todetect the failure
and troubleshoot it.

Disadvantages of Star Topology

• Too much dependency on central device has its own drawbacks. If it fails whole network goes down.
• The use of hub, a router or a switch as central device increases the overall cost of thenetwork.
• Performance and as well number of nodes which can be added in such topology is dependedon capacity of
central device.

❖ Ring Topology
In Ring Topology, all the nodes are connected to each-other in such a way that they make a closed loop. Each
workstation is connected to two other components on either side, and it communicates with these two adjacent
neighbors. Data travels around the network, in one direction. Sending and receiving of data takes place by the help
of TOKEN.

Advantages of Ring Topology

• This type of network topology is very organized. Each node gets to send the data when it receives an empty
token. This helps to reduces chances of collision. Also in ring topology all the traffic flows in only one
direction at very high speed.
• Even when the load on the network increases, its performance is better than that of Bustopology.
• There is no need for network server to control the connectivity between workstations.
• Additional components do not affect the performance of network.
• Each computer has equal access to resources.

17
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Disadvantages of Ring Topology

• Each packet of data must pass through all the computers between source and destination.This makes it slower
than Star topology.
• If one workstation or port goes down, the entire network gets affected.
• Network is highly dependent on the wire which connects different components.
• MAU’s and network cards are expensive as compared to Ethernet cards and hubs.

❖ Mesh Topology
In a mesh network topology, each of the network node, computer and other devices, are interconnected with one
another. Every node not only sends its own signals but also relays data from other nodes. In fact a true mesh
topology is the one where every node is connected to everyother node in the network. This type of topology is very
expensive as there are many redundant connections, thus it is not mostly used in computer networks. It is commonly
used in wireless networks. Flooding or routing technique is used in mesh topology.

Advantages of Mesh topology

• Data can be transmitted from different devices simultaneously. This topology can withstandhigh traffic.
• Even if one of the components fails there is always an alternative present. So data transfer doesn’t get
affected.
• Expansion and modification in topology can be done without disrupting other nodes.

Disadvantages of Mesh topology

• There are high chances of redundancy in many of the network connections.

18
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

• Overall cost of this network is way too high as compared to other network topologies.
• Set-up and maintenance of this topology is very difficult. Even administration of the networkis tough.

❖ Tree Topology
Tree Topology integrates the characteristics of Star and Bus Topology. In Tree Topology, the numbers of Star
networks are connected using Bus. This main cable seems like a main stem of a tree, and other star networks as the
branches. It is also called Expanded Star Topology. Ethernet protocol is commonly used in this type of topology.

Advantages of Tree Topology

• It is an extension of Star and bus Topologies, so in networks where these topologies can't be implemented
individually for reasons related to scalability, tree topology is the best alternative.
• Expansion of Network is possible and easy.
• Here, we divide the whole network into segments (star networks), which can be easily managed and
maintained.

Disadvantages of Tree Topology


• Because of its basic structure, tree topology, relies heavily on the main bus cable, if it breakswhole network
is crippled.
• As more and more nodes and segments are added, the maintenance becomes difficult.
• Scalability of the network depends on the type of cable used.

19
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

❖ Hybrid Topology
Hybrid, as the name suggests, is mixture of two different things. Similarly in this typeof topology we integrate two or
more different topologies to form a resultant topology which has good points (as well as weaknesses) of all the
constituent basic topologies rather than having characteristics of one specific topology. This combination of
topologies is done according to therequirements of the organization.

For example, if there exists a ring topology in one office department while a bus topology in another department,
connecting these two will result in Hybrid topology. Remember connectingtwo similar topologies cannot be termed
as Hybrid topology. Star-Ring and Star-Bus networks are most common examples of hybrid network.

Advantages of Hybrid Network Topology

• Reliable: Unlike other networks, fault detection and troubleshooting is easy in this type of topology. The
part in which fault is detected can be isolated from the rest of network and required corrective measures
can be taken, WITHOUT affecting the functioning of rest of thenetwork.
• Scalable: Its easy to increase the size of network by adding new components, without disturbing existing
architecture.
• Flexible: Hybrid Network can be designed according to the requirements of the organization and by
optimizing the available resources. Special care can be given to nodes where traffic is high as well as where
chances of fault are high.
• Effective: Hybrid topology is the combination of two or more topologies, so we can design it in such a way
that strengths of constituent topologies are maximized while there weaknesses are neutralized. For
example we saw Ring Topology has good data reliability (achieved by use of tokens) and Star topology has
high tolerance capability (as each node is not directly connected toother but through central device), so
these two can be used effectively in hybrid star-ring topology.

Disadvantages of Hybrid Topology

• Complexity of Design: One of the biggest drawback of hybrid topology is its design. Its noteasy to design
this type of architecture and its a tough job for designers. Configuration and installation process needs to
be very efficient.
• Costly Hub: The hubs used to connect two distinct networks, are very expensive. These hubsare different
20
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

from usual hubs as they need to be intelligent enough to work with different architectures and should be
function even if a part of network is down.
• Costly Infrastructure: As hybrid architectures are usually larger in scale, they require a lotof cables, cooling
systems, sophisticate network devices, etc.

21
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 5
Configuration of TCP/IP Protocols in Windows and Linux

Configuration of TCP/IP protocols in Windows XP & Windows 7:-

For Windows XP
Step 1
Click Start > Control Panel > select and double click Network and internet connections > select and double click
Network Connections.
Step 2
Double-click the Local Area Connection icon; highlight Internet Protocol (TCP/IP) tab in theLocal Area Connection
Properties window that appears:

Step 3
Double click it or click Properties. The TCP/IP Properties window will display.
Step 4
Now you have two ways to configure the TCP/IP protocol below:
1. Assigned by DHCP Sever
Select Obtain an IP address automatically and Obtain DNS Server address automatically,as shown in the figure
below. These may be selected by default. Then click OK to save setting.

22
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

2. Assigned manually
• Select Use the following IP address, as shown in the following figure.
If the router’s LAN IP address is 192.168.1.1, please type in IP address 192.168.1.x (x is from 2 to 253), subnet
mask 255.255.255.0, and default gateway 192.168.1.1.
• Select Use the following DNS server addresses, as shown in the following figure. And then type the DNS
server IP address, which should be provided by your ISP. Finally rememberto click OK to save settings.
Note: In most cases, type your local area DNS server IP addresses into it.
The Preferred DNS server is same to default gateway. For Secondary DNS server, you couldleave it blank or type in
8.8.8.8.

23
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Step 5
Click OK to save and apply your settings.

For Windows Vista & Windows 7


Step 1
Click on windows key+ R key on the keyboard at the same time.
Step 2
Type ncpa.cpl in the box, then press OK.

Step 3
Select the local area connection, right click it and select Properties.

Step 4
Select Internet Protocol Version 4(TCP/IPv4), double click it or click Properties.

24
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Step 5
There are two ways to configure the TCP/IP Properties, Assigned by DHCP serverautomatically or manually.
1. Assigned by DHCP server
Select Obtain an IP address automatically and Obtain DNS server address automatically. Ifnecessary, then
click OK to save the settings.

25
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

2. Assigned manually
• Select Use the following IP address, type IP address, subnet mask and default gateway IPaddress into
it.
If the router’s LAN IP address is 192.168.1.1, please type in IP address 192.168.1.x (x is from 2 to 253),
subnet mask 255.255.255.0, and default gateway 192.168.1.1.

• Select Use the following DNS server addresses, as shown in the following figure. And then type the
DNS server IP address, which should be provided by your ISP. If necessary, thenclick OK to save the
settings.
Note: In most cases, type your local area DNS server IP addresses into it.
The Preferred DNS server is same to default gateway. For Secondary DNS server, you couldleave it blank or
type in 8.8.8.8.

Step 6
Click OK to save and apply your settings.

26
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Configuration of TCP/IP protocols in Linux:-

On most Linux systems, you can access the TCP/IP connection details within 'X Windows' fromApplications >
Others > Network Connections. The same may also be reached through Application > System Settings >
Network > Configure. This opens up a window, which offers configuration of IP parameters for wired,
wireless, mobile broadband, VPN and DSL connections:

The Basic Commands for Networking

• The basic commands used in Linux are common to every distro:

• ifconfig - Configures and displays the IP parameters of a network interface

• route - Used to set static routes and view the routing table

• hostname - Necessary for viewing and setting the hostname of the system

• netstat - Flexible command for viewing information about network statistics, current connections,
listening ports

• arp - Shows and manages the arp table

• ip - Multi-purpose command for viewing and setting TCP/IP parameters and routes.

• tc - Traffic control command, used for classifying, prioritizing, sharing, and limiting bothinbound and
outbound traffic.

27
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 6
Implementation of file and printer sharing
Instructions for Installing “File and Printer Sharing” in Windows XP
STEP 1
Click on Start > My Network Place> Properties

STEP 2;
File and Printer Sharing for Microsoft Networks has already been installed on yourscreen it should not be
listed, if it is, it is already installed. Now hit the Install button.

28
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

STEP3
Now select Service form the list of component types and hit OK.

STEP 4
On the next screen select File and Printer Sharing for Microsoft Networks and hit OK.

STEP 5
File and Printer Sharing for Microsoft Networks should now be added to the list. Hit Close to exit. Reboot
your system.

29
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 7
Designing and implementing Class A, B, and C Networks.

IP Address Classes:-
IP addressing supports five different address classes: A, B, C, D and E. Only classes A, B and C are
available for commercial use.

Class A addresses

➢ Class A addresses are designed for large organizations with a large number of hosts or routers.

➢ In this the first octet of the address identifies the network and the next three octets are used to
identify the host.

➢ The first bit of first octet is always 0 and the remaining 7 bits are used to identify the network
address.

➢ The next three octets i.e. 24 bits are used to identify the host.

➢ The class support addresses from 0.0.0.0 to 0.255.255.255

➢ The first block of network address starts with 1.0.0.0 and the last block of network address
starts with 127.0.0.0.

➢ As there are 7 bits in network address, 27 = 128 blocks of network address are possible. Out of
these two network blocks are reserved. Hence total 126 address blocks are used.

➢ Each network blocks can have 224--- 2 hosts i.e. 16,777,214 host address. Two addresses are
less as one address is reserved for the broadcast address and one address is reserved for the
network.

➢ A block in class A is too large for almost any organization. This means most of the addresses
in class A are wasted and are not used.

Class B address

➢ The class B addresses are designed for medium sized organizations with tens of thousands of
attached hosts or routers.

➢ In this, the first two octets of the address identify the network and the next two octets identify
the host within the network.

➢ The first two bits (high order bits) of first octet are always 1, 0. Thus the remaining 14 bits
identify the network

30
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

➢ The third and fourth octet i.e. 6 bits are used to identify the host.

➢ The first network block of this class covers the addresses from 128.0.0.0 to 128.0.255.255 (netid 128.0).
The last network block of this class covers addresses from 191.255.255.255 (net id 191.255)

➢ The maximum number of network blocks in class B is 214 = 16384.

➢ 7 Each network block in class B can have 216--- 2 = 65,534 hosts.

➢ 8. A block in class B is also very large and most of the address in class B is also wasted.

Class C address

➢ The class C addresses is designed for small organizations with a small number of attached
hosts or routers.

➢ In class C, the first three octets of address are used for network and the last octet is used to
identify the host.

➢ The first three bits of first octet are always set to 1, 1, 0.

➢ The remaining 24 - 3 = 21 bits are used for network identification and only 8 bits are used for
host.

➢ In class C, 221 = 2,097,152 network blocks are possible.

➢ Thus, each block in class C address can have 28 - 2 = 254 hosts.

➢ The first block of network covers addresses from 192.0.0.0 to 192.0.0.255.

➢ The last block of network covers the addresses form 223.255.255.0 to 223.255.255.255

➢ The class C addresses are too less for many organizations as it supports only 254 hosts in a
network.

Class D address

➢ Class D addresses are used for multicast groups (multicasting)

➢ The concept of division of octets into network id and host id does not apply to class D.

➢ The first four bits of first octet in class D are always set to 1,1,1,0.

➢ The address range is 224.0.0.0 to 239.255.255.255

31
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Class E address

➢ The Class E address is reserved for future use and is experimental.

➢ The concept of network id and host id does not apply on class E also.

➢ The first four bits of first octet are always set to 1,1,1,1.

➢ The address range for class E is 240.0.0.0 to 255.255.255.255.

32
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 8
Subnet Planning And Its Implementation.

Sub-Netting - What is Sub-netting?


➢ The process of sub-netting involves dividing a network into smaller networks called sub-nets or sub-
networks. Each of these subnets has its own specific address. To create these additional networks we use
a subnet mask. The subnet mask simply determines which portion of the IP address belongs to the host.
The subnet address is created by dividing the host address into network address and host address.

➢ The network address specifies the type of sub-network in the network and the host address specifies the
host of that subnet. Subnets are under local administration. As such, the outside world sees an
organization as a single network and has no detailed knowledge of the organization's intema1 structure.

➢ Sub-netting provides the network administrator with several benefits, including extra flexibility, more
efficient use of network address and the capability to contain broadcast traffic.

➢ A given .network address can be broken up into many sub-networks.

➢ For example, 172.16.1.0, 172.16.2.0, 172.16.3.0 and 172.16.4.0 are all subnets within network
171.16.0.0.

A subnet address is created by Borrowing bits from the host field and designating them as subnet field. The
number of bits borrowed varies and is specified by the subnet mask. Fig. showshow bits are borrowed from the
host address field to create the subnet address field.

The subnet mask does not alter the class of the IP address; it simply "borrows" bits from the host portion and
uses these to create subnets. This naturally reduces the maximum number of hosts your network can have,
because you are using some of your host bits for your subnet bits.

33
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 9

To Configure Dynamic IP Addresses For A Computer


Connected To a LAN.
STEPS TO CONFIGURE IP ADDRESSES TO A LAN

1. Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the
toolbar.

2. In Network And Sharing Center, click Manage Network Connections.

3. In Network Connections, right-click the connection you want to work with and then select Properties.

4. In the Local Area Connection Status dialog box, click Properties. This displays the Local Area
Connection Properties dialog box.

5. Double-click Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) as


appropriate for the type of IP address you are configuring.

6. Select Obtain An IPv6 Address Automatically or Obtain An IP Address Automatically as appropriate for
the type of IP address you are configuring. If desired, select Obtain DNS Server Address Automatically.
Or select Use The Following DNS Server Addresses and then type a preferred and alternate DNS server
address in the text boxes provided.

7. When you use dynamic IPv4 addressing with desktop computers, you should configure an automatic
alternative address. To use this configuration, on the Alternate Configuration tab, select Automatic
Private IP Address. Click OK twice, click Close, and then skip the remaining steps.

8. When you use dynamic IPv4 addressing with mobile computers, you'll usually want to configure the
alternative address manually. To use this configuration, on the Alternate Configuration tab, select User
Configured. Then in the IP Address text box, type the IP address you want to use. The IP address that
you assign to the computer should be a private IP address, as shown in Table and it must not be in use
anywhere else when the settings are applied.

9. With dynamic IPv4 addressing, complete the alternate configuration by entering a subnet mask, default
gateway, DNS, and WINS settings. When you're finished, click OK twice and then click Close.

How to configure dynamic IP address (DHCP) using Settings

34
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

To configure a network adapter to request a DHCP configuration instead of a static IP address, use these steps:

1. Open Settings.

2. Click on Network & Internet.

3. Click on Ethernet or Wi-Fi.

4. Click the network connection.

5. Under the “IP settings” section, click the Edit button.

6. Use the Edit IP settings drop-down menu and select the Automatic (DHCP) option.

35
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

7. Click the Save button.

Once you complete the steps, the networking stack configuration will reset and your device will
request an IPaddress from the DHCP server (usually your router).

36
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 10

USE OF COMMANDS LIKE PING AND CONFIG TO


TROUBLESHOOT NETWORK RELATED PROBLEMS.

Network troubleshooting with ping

The “ping” command ping command allows you to send a signal to another device, and if that device is active,
it will send a response back to the sender. The “ping” command is a subset of the ICMP (Internet Control
Message Protocol), and it uses what is called an “echo request”. So, when you ping a device you send out an
echo request, and if the device you pinged is active or online, you get an echo response.

However, since we used domain name, we now see the resolved IP address of www.google.com. We sent out
32 bytes of data but, because Google server is far away it took 82 milliseconds to send and receive 4 packets
from Google. We sent and received 4 packets so the connection was stable

Network troubleshooting with IPCONFIG


The “ipconfig” displays the current information about your network such as your your IP and MAC address,
and the IP address of your router. It can also display information about your DHCP and DNS servers.
Information gathering is a part of troubleshooting. For example, if you’re trying to troubleshoot the DNS server,
you can beforehand type in the “ipconfig” command and find where the DNS server is.

37
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

It will give you all the details which are required to exactly understand what your IP address is, what is your
DNS, what is your gateway, all those kind of information, and there is a special switch, if you use ipconfig /all
switch, then it will give you much more information than a standard ipconfig command. It will also give you the
hostname of your particular machine. And this will definitely help you understand that “OK, what exactly the
network configurations are there on your machine.”

So whenever you are finding any kind of networking issues, you should first try to understand the IP address, the
subnet masks, the default gateway, all this kind of information.

38
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 11

DEVELOP A PROGRAM TO COMPUTE HAMMING


DISTANCE BETWEEN TWO CODE WORDS.
Hamming Distance
Hamming distance is a metric for comparing two binary data strings. While comparing two binary strings of
equal length, Hamming distance is the number of bit positions in which the two bits are different.
The Hamming distance between two strings, a and b is denoted as d(a,b).
It is used for error detection or error correction when data is transmitted over computer networks.

Calculation of Hamming Distance


In order to calculate the Hamming distance between two strings, and , we perform their XOR operation, (a⊕ b),
and then count the total number of 1s in the resultant string.

Example
Suppose there are two strings 1101 1001 and 1001 1101.
11011001 ⊕ 10011101 = 01000100. Since, this contains two 1s, the Hamming distance, d(11011001,
10011101) = 2.

PROGRAM TO COMPUTE HAMMING DISTANCE (IN C++)

#include<bits/stdc++.h>
using namespace std;
int hammingDist(char *str1, char *str2)
{
int i = 0, count = 0;
while (str1[i] != '\0')
{
if (str1[i] != str2[i])
count++;
i++;
}
return count;
}
int main()
{
char str1[]="NIDHI";
char str2[]="SHARMA";
cout << hammingDist (str1, str2);
return 0;

39
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

OUTPUT:

40
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 12
Installation of ftp server and client.
STEPS TO INSTALL FTP SERVER AND CLIENT

STEP1:
First, you should start by retrieving your Windows XP CD.

STEP2:
Next, click the Start button and go to the Control Panel.

41
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

STEP3:
After that, select "Add/Remove Windows Components."

STEP4:
Select "Internet Information Services" under "Windows Components."

42
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

STEP 5:
Click "details" and select the "File Transfer Protocol (FTP)" service. (Remember that this will also
automatically select "Common Files" and "InternetInformation Services Snap-In.")

STEP6:
Click OK and follow the instructions for the install Wizard (or you can just push next if you don't feel
like reading). Be prepared with your Windows XP CD, because it might prompt you for it if you haven't
already installed it. Once it is done, youmight have to restart your computer after this.

43
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

STEP 7:
After that, all you need to do is just paste the files you want to be public into"C:\INETPUB\FTPROOT."
Note that by default, these files are read-only and public. Public meaning that anyone who knows the IP
addresses may download copies from it.

STEP 8:
There's more to go! Now, you need to configure your router's firewall to let FTPtraffic through. This can be
done through your router's administration menu. Note that this will vary depending on your router.

STEP 9:
After letting your router firewall let FTP connections in, you will have to configure your regular firewall
to let FTP connections in through a certain port.

STEP 10:
Finally, after done with everything, you may access your FTP site through your browser. All you need to
do is type ftp://xxx.xxx.xxx.xxx/ in the URL where "xxx.xxx.xxx.xxx" is the WAN address of your computer.

44
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 13

configuring proxy server


A proxy is a server that acts as an intermediary between a protected Local Area Network (firewall) and the
Internet. Some home networks, corporate intranets, and Internet Service Providers (ISPs) use proxy servers. The
proxy server ensures that all data transmission between the Internet and a user on the LAN is authorized.
If you are behind a firewall, you can use the advanced preferences to customize your access. You can choose
from the following:
▪ Use the proxy server settings in Windows Internet Options
▪ Bypass the proxy server settings in Windows Internet Options
▪ Configure the proxy server settings

How to set up a proxy server in Windows


Here's how to set up your Windows PC to use a proxy server on Windows 8 or Windows 10:

1.Press the Windows + I keys simultaneously to access the Windows Settings menu.
2. On Windows 10, click Settings > Network & Internet > Proxy. On Windows 8,
click Settings > Network Proxy.
3. Under the Manual Setup section, set the “Use a Proxy Server” toggle to On. Make sure the
“Automatically detect settings” toggle is also on.
4. By default, Windows automatically checks to see if your business, school, or local network already has
an automatic proxy server setup ready to run for you. If it does, Windows tells you its name, and
encourages you to follow its instructions.
5. Assuming that Windows finds a PAC file, in the Automatic Proxy Setup, set the Use Setup
Script switch to On.

6. Enter the script address and click Save.

45
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

CONFIGURING A PROXY SERVER:


Before you configure a proxy server, obtain the host name and port number of your proxy server. If you do not
know the host name or port number of your proxy server, ask your firewall administrator.

Steps
• Select Account > Preferences.
• Click the Advanced button.
• The Advanced Settings dialog box appears.
• Select the Use these proxy server settings option.
• Enter your proxy Server Address.
• The proxy server address can be the server's name or IP address.
• Enter the Port number.
• Typically, this number is 8080.
• Enter your User Name, if required.
• Enter your Password, if required.
• Click OK twice to save the proxy preference settings.

46
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

PRACTICAL 14

FAMILARIZATION WITH NETWORK SIMULATIONTOOLS.


What is Network Simulation?
Network simulation is one kind of method in the research of a COMPUTER NETWORK where a software
program forms the performance of a network by analyzing the relations between the various network entities
such as links, switched, routers, nodes, access points. The network performance, different applications, services
& supports can be monitored in an analysis lab. Different features of the surroundings can also be changed in a
controlled way to evaluate how the network or protocols would perform beneath different conditions.

Network Simulator
Software that is used to predict the performance of a computer network is known as a network simulator. These
are used when communication networks have turned into too difficult for fixed analytical techniques to offer a
precise understanding of system performance. In a simulator, the computer network can be molded with the
help of links, devices and applications and the performance of a network can be reported. These are available by
using new networks and technologies which are used today like IoT, 5G, WLANs, ad hoc networks of mobile,
WSNs, LTE, ad hoc networks of vehicles, etc.

Different Network Simulations


The different types of network simulators/ network simulation tools are open source and
commercial
• Cisco packet tracer
• Network Simulator version 2 (NS-2)
• Ns3
• Netkit
• Marionnet
• JSIM (Java-based Simulation)
• OPNET
• QualNet
• The open-source simulators are Marrionet, Netkit, NS2, JSIM
• The commercial simulators are OPNET and QualNet

47
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Familiarization With Cisco Packet Tracer


The Cisco Packet Tracer is an e-learning software to allow users to simulate modern computer networks and
create network topologies.
Packet Tracer is a networking simulation tool (as stated above) used for practice, discovery, and troubleshooting
designed by Cisco. Cisco’s official website describes Packet Tracer as:
“A powerful network simulation program that allows students to experiment with network behavior and ask
‘what if’ questions.”

48
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

Key Features
• Packet Tracer Modes

Cisco Packet Tracer offers two operating modes to envision the network behavior:

1. Real-time Mode – Network behaves like real devices. It gives an immediate, real-time response to
all network activities.
2. Simulation Mode – The user can watch and control time intervals. They can view the inside
operation of data transfer and delivery of data across the networks.

• Packet Tracer Workspaces

Cisco Packet Tracer has two workspaces:

1. Logical – Users can create a logical network topology by connecting and clustering the virtual
network devices.
2. Physical – Provides an illustrious physical side of the logical network. It helps to fathom a sense of
placement and scale of devices like a router in real-time.

• Activity Wizard

49
Downloaded by Vinod Kumar ([email protected])
lOMoARcPSD|47712742

The Activity Wizard enables a user to design their learning activities. They can do so by creating
scenarios using instructional text. And eventually, they can develop the first and final network topology
as well as predesigned packets. This Wizard also offers feedback and grading skills

• Multiuser Functionality

Cisco Packet Tracer is a network-capable application. It has a multiuser peer-to-peer


mode to enable the collaborative construction of digital networks on the real systems. This multiuser
feature facilitates incredible competitive interactions and collaborations. People can use it for social
interactions, gaming, and learning

Services of Desktop in PC and


gateway to PC

IPV4 configuration-assigning
IP address

50
Downloaded by Vinod Kumar ([email protected])

You might also like