0% found this document useful (0 votes)
12 views99 pages

CN Lab Manual

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 99

List of Experiments

Sr. Page
Aim Date Sign
No. No
1 Basic Introduction about Computer Network. 3
2 To study about various Network Topologies. 7
3 Study of different network devices in detail. 15
Study of different types of network cables and
4 practically implement the cross-wired cable and 24
straight through cable using clamping tool.
Study of basic network command and Network
5 29
configuration commands
Implement different LAN topologies using 41
6
Network Simulator.
Implement the concept of VLAN using Network
7 46
Simulator.
8 Implement the concept of static routing. 58
Implement the concept of dynamic routing (RIP, 68
9
OSPF, BGP)
Packet capture and header analysis by wire- 84
10
shark (TCP, UDP, IP)
Experiment – 1

Aim: Basic Introduction about Computer Network

What is a Computer Network?


 Computer Network is a group of computers connected with each other through wires,
optical fibres or optical links so that various devices can interact with each other through a
network.
 The aim of the computer network is the sharing of resources among various devices.
 In the case of computer network technology, there are several types of networks that vary
from simple to complex level.

Components Of Computer Network:

Major components of a computer network are:

NIC(National interface card)

NIC is a device that helps the computer to communicate with another device. The network
interface card contains the hardware addresses, the data-link layer protocol use this address to
identify the system on the network so that it transfers the data to the correct destination.

pg. 3
There are two types of NIC: wireless NIC and wired NIC.

 Wireless NIC: All the modern laptops use the wireless NIC. In Wireless NIC, a
connection is made using the antenna that employs the radio wave technology.
 Wired NIC: Cables use the wired NIC to transfer the data over the medium.

Hub

Hub is a central device that splits the network connection into multiple devices. When computer
requests for information from a computer, it sends the request to the Hub. Hub distributes this
request to all the interconnected computers.

Switches

Switch is a networking device that groups all the devices over the network to transfer the data
to another device. A switch is better than Hub as it does not broadcast the message over the
network, i.e., it sends the message to the device for which it belongs to. Therefore, we can say
that switch sends the message directly from source to the destination.

Cables and connectors

Cable is a transmission media that transmits the communication signals. There are three types
of cables:

o Twisted pair cable: It is a high-speed cable that transmits the data over 1Gbps or more.
o Coaxial cable: Coaxial cable resembles like a TV installation cable. Coaxial cable is
more expensive than twisted pair cable, but it provides the high data transmission speed.
o Fibre optic cable: Fibre optic cable is a high-speed cable that transmits the data using
light beams. It provides high data transmission speed as compared to other cables. It is
more expensive as compared to other cables, so it is installed at the government level.

Router

Router is a device that connects the LAN to the internet. The router is mainly used to connect
the distinct networks or connect the internet to multiple computers.

Modem

Modem connects the computer to the internet over the existing telephone line. A modem is not
integrated with the computer motherboard. A modem is a separate part on the PC slot found on
the motherboard.

pg. 4
Uses Of Computer Network

 Resource sharing: Resource sharing is the sharing of resources such as programs, printers,
and data among the users on the network without the requirement of the physical location
of the resource and user.
 Server-Client model: Computer networking is used in the server-client model. A server is
a central computer used to store the information and maintained by the system
administrator. Clients are the machines used to access the information stored in the server
remotely.
 Communication medium: Computer network behaves as a communication medium among
the users. For example, a company contains more than one computer has an email system
which the employees use for daily communication.
 E-commerce: Computer network is also important in businesses. We can do the business
over the internet. For example, amazon.com is doing their business over the internet, i.e.,
they are doing their business over the internet.

Advantages of Network:

Central Storage of Data –


Files can be stored on a central node (the file server) that can be shared and made available
to each and every user in an organization.

Anyone can connect to a computer network –


There is a negligible range of abilities required to connect to a modern computer network.
The effortlessness of joining makes it workable for even youthful kids to start exploiting
the data.

Faster Problem solving –


Since an extensive procedure is disintegrated into a few littler procedures and each is taken
care of by all the associated gadgets, an explicit issue can be settled in lesser time.

Reliability –
Reliability implies backing up of information. Due to some reason equipment crash, and so
on, the information gets undermined or inaccessible on one PC, another duplicate of similar
information is accessible on another workstation for future use, which prompts smooth
working and further handling without interruption.

It is highly flexible –
This innovation is known to be truly adaptable, as it offers clients the chance to investigate
everything about fundamental things, for example, programming without influencing their
usefulness.

pg. 5
Security through Authorization –
Security and protection of information is additionally settled through system. As just the
system clients are approved to get to specific records or applications, no other individual
can crack the protection or security of information.

It boosts storage capacity –


Since you will share data, records and assets to other individuals, you need to guarantee all
information and substance are legitimately put away in the framework. With this systems
administration innovation, you can do the majority of this with no issue, while having all
the space you requirement for capacity.

pg. 6
Experiment – 2

Aim: To study about various Network Topologies

There are many types of network topologies as under below

1. Mesh topology
2. Star topology
3. Bus topology
4. Ring topology
5. Tree topology
6. Hybrid topology

pg. 7
1. Mesh Topology

Mesh topology is the kind of topology in which all the nodes are connected with all the other
nodes via a network channel. Mesh topology is a point-to-point connection. It has n(n-
1) /2 network channels to connect n nodes.

Mesh topology has two techniques for transmission of data, i.e. routing and flooding. In the
routing technique, the nodes possess a routing logic, like the logic for the shortest distance to
the destination node or the logic to avoid routes with broken connections. In the flooding
technique, all the network nodes receive the same data. This leaves us no need for routing
logic. This technique makes the network robust but results in unwanted load on the network.

Benefits of Mesh Topology

 Every connection has the ability to carry its particular data load.
 Mesh Topology is very robust.
 It is easy to diagnose faults.
 Mesh Topology provides privacy and security.

Drawbacks of Mesh Topology

 Mesh Topology is challenging to install and configure.

pg. 8
 As all the nodes are connected with each other, cabling is costly.
 Bulk wiring is essential.

2. Star Topology

Star Topology is the kind of network topology in which all the nodes are connected via cables
to a single node called a hub, which is the central node. The hub can be active or passive in
nature. Active hubs contain repeaters, while passive hubs are considered non-intelligent
nodes. Each node contains a reserved connection to the central node, which the central node
acting as a repeater during data transmission.

Benefits of Star Topology

 Star topology boasts fast performance due to low network traffic.


 It is easy to upgrade the Hub as and when required.
 Setup can be done easily and can be easily modified as well.
 Star Topology is easy to troubleshoot.
 In case a node has failed, it can easily be replaced without affecting the working of
the rest of the network.

pg. 9
Drawbacks of Star Topology

 The installation cost is extreme, and it is costly to use.


 All the nodes are dependent on the hub.

3. Bus Topology

Bus topology is the kind of network topology where every node, i.e. every device on the
network, is connected to a solo main cable line. Data is transmitted in a single route, from one
point to the other. We cannot transmit data in both ways. When this topology has precisely
two endpoints, it is known as Linear Bus Topology. It is mostly used for small networks.

Benefits of Bus Topology

 It is cost-effective.
 The Cable length required is the least in comparison to other topologies.
 The working of this topology is easy to understand.
 Expansion can be done easily by linking the cables together.

Drawbacks of Bus Topology

 If the main cable collapses, the complete network collapses.


 The network performance is at stake and reduces if there are numerous nodes and
heavy network traffic.
 The main cable can only be so long. The length of the cable is limited.
 Bus Topology is not as fast as Ring Topology.

pg. 10
4. Ring Topology

Ring Topology is a topology type in which every computer is connected to another computer
on each side. The last computer is connected to the first, thus forming a ring shape. This
topology allows for each computer to have exactly two neighbouring computers.

In this topology, the main computer is known as the monitor station, which is responsible for
all the operations. Data transmission amongst devices is done with the help of tokens. For
transmitting data, the computer station has to hold the token. The token is released only when
the transmission is complete, following which other computer stations can use the token to
transmit data.

Data transmission is done in a sequential method, i.e. bit by bit. Therefore, data has to route
its way through each node in the network to reach the destination node. We use repeaters in a
Ring topology to prevent loss of data during transmission. These repeaters are especially
helpful when the topology has a vast number of nodes, and the data is to reach the very last
node in the network.

The data transmission is unidirectional in a Ring topology, but it can be created to be


bidirectional by connecting each node with another set of connecting lines. This is known as
Dual Ring Topology. Here, two ring networks are created, with the data in each flowing in
opposite directions.

pg. 11
Benefits of Ring Topology

 The network is not affected by numerous nodes or heavy traffic, as only the nodes
possessing tokens can transfer data.
 Ring topology has cheap installation and expansion.

Drawbacks of Ring Topology

 It is a tedious task to troubleshoot in Ring topology.


 It is difficult to add or delete nodes, as it interrupts the network activity.
 If one computer crashes, the entire network activity is disrupted.

5. Tree Topology

Tree topology is the topology in which the nodes are connected hierarchically, with all the
nodes connected to the topmost node or root node. Hence, it is also known as hierarchical
topology. Tree topology has at least three levels of hierarchy.

Tree topology is applied in Wide Area Network. It is an extension of Bus topology and Star
topology. It is best if the workstations are situated in groups, for easy working and managing.

Benefits of Tree Topology

 It is easy to expand the network with more nodes.


 It is easy to maintain and manage.

pg. 12
 It is easy to detect an error in the network.

Drawbacks of Tree Topology

 It is profoundly cabled.
 It is expensive when compared to other topologies.
 If the root node collapses, the network will also collapse.

6. Hybrid Topology
Hybrid Topology is basically a network topology comprising of two or more different types
of topologies. It is a reliable and scalable topology, but simultaneously, it is a costly one. It
receives the merits and demerits of the topologies used to build it.

pg. 13
Benefits of Hybrid Topology

 It is easy to troubleshoot and provides simple error-detecting techniques.


 It is a flexible network topology, making it quite effective.
 It is scalable since the size can be made greater easily.

Drawbacks of Hybrid Topology

 It isn’t very easy to design it.


 It is costly, as it involves more than one topologies.

pg. 14
Experiment – 3

Aim : Study of different network devices in detail.

 Network devices, or networking hardware, are physical devices that are required for
communication and interaction between hardware on a computer network.

Types of Network devices :

 Hub
 Switch
 Router
 Bridge
 Gateway
 Modem
 Repeater
 Network card

1) HUB :

Hubs connect multiple computer networking devices together. A hub also acts as a repeater in
that it amplifies signals that deteriorate after traveling long distances over connecting cables.
A hub is the simplest in the family of network connecting devices because it connects LAN
components with identical protocols.

A hub can be used with both digital and analog data, provided its settings have been configured
to prepare for the formatting of the incoming data. For example, if the incoming data is in

pg. 15
digital format, the hub must pass it on as packets; however, if the incoming data is analog, then
the hub passes it on in signal form.

Hubs do not perform packet filtering or addressing functions; they just send data packets to
all connected devices. Hubs operate at the Physical layer of the Open Systems
Interconnection (OSI) model. There are two types of hubs: simple and multiple port.

2) REPEATER :

A repeater is an electronic device that amplifies the signal it receives. You can think of repeater
as a device which receives a signal and retransmits it at a higher level or higher power so that
the signal can cover longer distances, more than 100 meters for standard LAN cables. Repeaters
work on the Physical layer.

pg. 16
Repeaters are network devices operating at physical layer of the OSI model that amplify or
regenerate an incoming signal before retransmitting it. They are incorporated in networks to
expand its coverage area. They are also known as signal boosters.

3) SWITCH :

Switches generally have a more intelligent role than hubs. A switch is a multiport device that
improves network efficiency. The switch maintains limited routing information about nodes in
the internal network, and it allows connections to systems like hubs or routers. Strands of LANs
are usually connected using switches. Generally, switches can read the hardware addresses of
incoming packets to transmit them to the appropriate destination.

Using switches improves network efficiency over hubs or routers because of the virtual
circuit capability. Switches also improve network security because the virtual circuits are

pg. 17
more difficult to examine with network monitors. You can think of a switch as a device that
has some of the best capabilities of routers and hubs combined.

A switch can work at either the Data Link layer or the Network layer of the OSI model. A
multilayer switch is one that can operate at both layers, which means that it can operate as
both a switch and a router. A multilayer switch is a high-performance device that supports the
same routing protocols as routers.

Switches can be subject to distributed denial of service (DDoS) attacks; flood guards are used
to prevent malicious traffic from bringing the switch to a halt. Switch port security is
important so be sure to secure switches: Disable all unused ports and use DHCP snooping,
ARP inspection and MAC address filtering.

4) BRIDGE :

Bridges are used to connect two or more hosts or network segments together. The basic role
of bridges in network architecture is storing and forwarding frames between the different
segments that the bridge connects. They use hardware Media Access Control (MAC)
addresses for transferring frames. By looking at the MAC address of the devices connected to
each segment, bridges can forward the data or block it from crossing.Bridges can also be used
to connect two physical LANs into a larger logical LAN.

Bridges work only at the Physical and Data Link layers of the OSI model. Bridges are used to
divide larger networks into smaller sections by sitting between two physical network
segments and managing the flow of data between the two.

pg. 18
Bridges are like hubs in many respects, including the fact that they connect LAN components
with identical protocols. However, bridges filter incoming data packets, known as frames, for
addresses before they are forwarded. As it filters the data packets, the bridge makes no
modifications to the format or content of the incoming data. The bridge filters and forwards
frames on the network with the help of a dynamic bridge table. The bridge table, which is
initially empty, maintains the LAN addresses for each computer in the LAN and the
addresses of each bridge interface that connects the LAN to other LANs. Bridges, like hubs,
can be either simple or multiple port.

Bridges have mostly fallen out of favor in recent years and have been replaced by switches,
which offer more functionality. In fact, switches are sometimes referred to as “multiport
bridges” because of how they operate.

5) ROUTER :

Routers help transmit packets to their destinations by charting a path through the sea of
interconnected networking devices using different network topologies. Routers are intelligent
devices, and they store information about the networks they’re connected to. Most routers can

pg. 19
be configured to operate as packet-filtering firewalls and use access control lists (ACLs).
Routers, in conjunction with a channel service unit/data service unit (CSU/DSU), are also
used to translate from LAN framing to WAN framing. This is needed because LANs and
WANs use different network protocols. Such routers are known as border routers. They serve
as the outside connection of a LAN to a WAN, and they operate at the border of your
network.

Router are also used to divide internal networks into two or more subnetworks. Routers can
also be connected internally to other routers, creating zones that operate independently.
Routers establish communication by maintaining tables about destinations and local
connections. A router contains information about the systems connected to it and where to
send requests if the destination isn’t known. Routers usually communicate routing and other
information using one of three standard protocols: Routing Information Protocol (RIP),
Border Gateway Protocol (BGP) or Open Shortest Path First (OSPF).

Routers are your first line of defense, and they must be configured to pass only traffic that is
authorized by network administrators. The routes themselves can be configured as static or
dynamic. If they are static, they can only be configured manually and stay that way until
changed. If they are dynamic, they learn of other routers around them and use information
about those routers to build their routing tables.

pg. 20
6) GATEWAY :

Gateways normally work at the Transport and Session layers of the OSI model. At the
Transport layer and above, there are numerous protocols and standards from different
vendors; gateways are used to deal with them. Gateways provide translation between
networking technologies such as Open System Interconnection (OSI) and Transmission
Control Protocol/Internet Protocol (TCP/IP). Because of this, gateways connect two or more
autonomous networks, each with its own routing algorithms, protocols, topology, domain
name service, and network administration procedures and policies.

pg. 21
Gateways perform all of the functions of routers and more. In fact, a router with added
translation functionality is a gateway. The function that does the translation between different
network technologies is called a protocol converter.

7) NETWORK CARD :
A network interface card (NIC) is a hardware component without which a computer cannot
be connected over a network. It is a circuit board installed in a computer that provides a
dedicated network connection to the computer. It is also called network interface controller,
network adapter or LAN adapter

.
A network interface card (NIC) is a hardware component, typically a circuit board or chip,
which is installed on a computer so that it can connect to a network. Modern NICs provide
functionality to computers such as support for I/O interrupt, direct memory access
(DMA) interfaces, data transmission, network traffic engineering and partitioning.

pg. 22
8) MODEM :

Modems (modulators-demodulators) are used to transmit digital signals over analog


telephone lines. Thus, digital signals are converted by the modem into analog signals of
different frequencies and transmitted to a modem at the receiving location. The receiving
modem performs the reverse transformation and provides a digital output to a device
connected to a modem, usually a computer. The digital data is usually transferred to or from
the modem over a serial line through an industry standard interface, RS-232. Many telephone
companies offer DSL services, and many cable operators use modems as end terminals for
identification and recognition of home and personal users. Modems work on both the
Physical and Data Link layers

pg. 23
Experiment - 4

AIM: Study of different types of network cables and practically


implement the cross-wired cable and straight through cable using
clamping tool.

 Types of Network Cable:

1. Shielded twisted pair :

Shielded twisted pair is a special kind of copper telephone wiring used in some business
installations. An outer covering or shield is added to the ordinary twisted pair telephone
wires; the shield functions as a ground.

Shielded twisted-pair cable encases the signal-carrying wires in a conducting shield as a


means of reducing the potential for electromagnetic interference. How effective the shielding
is depends on the material used for the shield--its thickness and frequency, the type of
electromagnetic noise field, the distance from the noise source to the shield, any shield
discontinuity and the grounding practices. Also, crosstalk and signal noise can increase if the
effects of the shield are not compensated for.

Twisted pair is now frequently installed with two pairs to the home, with the extra pair making
it possible for you to add another line (perhaps for modem use) when you need it. STP Cabling
is twisted-pair cabling with additional shielding to reduce crosstalk and other forms of
electromagnetic interference (EMI).

pg. 24
2.unshielded twisted pair :

Unshielded twisted pair (UTP) cables are widely used in the computer and telecommunications
industry as Ethernet cables and telephone wires.

In an UTP cable, conductors which form a single circuit are twisted around each
other in order to cancel out electromagnetic interference (EMI) from external
sources. Unshielded means no additional shielding like meshes or aluminium foil,
which add bulk, are used.
UTP cables are often groups of twisted pairs grouped together with colour coded
insulators, the number of which depends on the purpose.
They are typically used in computer networking such as Ethernet for short-to-
medium distances because of their relatively cheap price compared to optical
fiber and coaxial cables.

3. coaxial cable:

Coaxial cables are high-frequency transmission cables made up of a single solid-copper core
that transfers data electrically over the inner conductor. Coax has 80X more transmission
capacity than twisted pair cables.

pg. 25
This type of cable is commonly used to deliver TV signals (its higher bandwidth makes it
more suitable for video applications) and to connect computers in a network. Along with
stable transmission of data, coax also has anti-jamming capabilities and can effectively
protect signals from being interfered. The cost is slightly higher than twisted pair but still
more economical than fibre. There are also two types of coaxial cables:
75 Ohm
 Most commonly used to transmit video signals
 Often used to connect video signals between different components like DVDs, VCRs, or
receivers commonly known as A/V cables
50 Ohm
 Primarily utilized to transmit a data signal in a 2-way communication system
 Most commonly used for computer ethernet backbones, AM/FM radio receivers, GPS
antenna, police scanners, and cell phone systems
4. Fiber optic cable:

Fibre is the newest form of transmission cabling technology. Instead of transferring data over
copper wires, these cables contain optical fibres that transmit data via light, rather than pulses
of electricity. Each individual optical fibre is coated with plastic and contained in a protective
tube. This makes fibre optic cables extremely resistant to external interference. The result is a
super reliable, high speed connection with 26,000X more transmission capacity than twisted-
pair cables – but also a much higher cost. Again, there are two types of fibre cables:

Types:

Optical fibers carry light signals down them in what are called modes. That sounds technical
but it just means different ways of traveling: a mode is simply the path that a light beam
follows down the fiber. One mode is to go straight down the middle of the fiber. Another is to
bounce down the fiber at a shallow angle. Other modes involve bouncing down the fiber at
other angles, more or less steep.

Single-mode

 Has a small core and only allows one mode of light to propagate at a time
 Because of this, the number of light reflections decrease as they pass through the core

pg. 26
The result is low attenuation and data that is able to travel further and faster
Commonly used in telecom, CATV networks, and Universities.

Multimode

 Has a larger core diameter that lets multiple modes of light propagate
 The amount of light reflections increase as they travel through the core, which allows
more data to pass through
 Because of its high dispersion, multimode cables have lower bandwidth, higher
attenuation and reduced signal quality further it travels
 Most commonly used for communication over short distances such as LAN, security
systems, and general fibre networks.

practically implementation of the cross-wired cable and straight


through cable using clamping tool.

Apparatus (Components): RJ-45 connector, Clamping Tool, Twisted pair Cable


Procedure: To do these practical following steps should be done :

1. Start by stripping off about 2 inches of the plastic jacket off the end of the cable. Be very
careful at this point, as to not nick or cut into the wires, which are inside. Doing so could
alter the characteristics of your cable, or even worse render is useless. Check the wires,

pg. 27
one more time for nicks or cuts. If there are any, just whack the whole end off, and start
over.
2. Spread the wires apart, but be sure to hold onto the base of the jacket with your other
hand. You do not want the wires to become untwisted down inside the jacket.
Category 5 cable must only have 1/2 of an inch of 'untwisted' wire at the end;
otherwise it will be 'out of spec'. At this point, you obviously have ALOT more than
1/2 of an inch of un-twisted wire.

3. You have 2 end jacks, which must be installed on your cable. If you are using a pre-
made cable, with one of the ends whacked off, you only have one end to install - the
crossed over end. Below are two diagrams, which show how you need to arrange the
cables for each type of cable end. Decide at this point which end you are making and
examine the associated picture below.

[ Diagram shows you how to prepare straight through wired connection ]

pg. 28
Experiment - 5

AIM : Study of basic network command and network configuration


commands.

basic networking commands (such as tracert, traceroute, ping, arp, netstat, nbstat, NetBIOS,
ipconfig, winipcfg and nslookup) and their arguments, options and parameters in details
including how they are used to troubleshoot the computer network.

1) Tracert / traceroute :

 Determines the path taken to a destination by sending Internet Control Message Protocol
(ICMP) Echo Request messages to the destination with incrementally increasing Time to
Live (TTL) field values. The path displayed is the list of near-side router interfaces of the
routers in the path between a source host and a destination. The near-side interface is the
interface of the router that is closest to the sending host in the path. Used without
parameters, tracert displays help.
This diagnostic tool determines the path taken to a destination by sending ICMP Echo
Request messages with varying Time to Live (TTL) values to the destination. Each router
along the path is required to decrement the TTL in an IP packet by at least 1 before
forwarding it.
 Effectively, the TTL is a maximum link counter. When the TTL on a packet reaches 0, the
router is expected to return an ICMP Time Exceeded message to the source computer.
Tracert determines the path by sending the first Echo Request message with a TTL of 1 and
incrementing the TTL by 1 on each subsequent transmission until the target responds or the
maximum number of hops is reached. The maximum number of hops is 30 by default and
can be specified using the -h parameter.
 The path is determined by examining the ICMP Time Exceeded messages returned by
intermediate routers and the Echo Reply message returned by the destination. However,
some routers do not return Time Exceeded messages for packets with expired TTL values
and are invisible to the tracert command. In this case, a row of asterisks (*) is displayed for
that hop.

Example:

pg. 29
To trace the path to the host named www.google.co.in use following command

tracert www.google.co.in

Syntax

tracert [-d] [-h MaximumHops] [-j ] [-w Timeout] [TargetName]

-d Prevents tracert from attempting to resolve the IP addresses of intermediate routers to


their names. This can speed up the display of tracert results.
-h MaximumHops Specifies the maximum number of hops in the path to search for the target
(destination). The default is 30 hops
-j HostList Specifies that Echo Request messages use the Loose Source Route option in the
IP header with the set of intermediate destinations specified in HostList. With loose
source routing, successive intermediate destinations can be separated by one or multiple
routers. The maximum number of addresses or names in the host list is 9. The HostList is
a series of IP addresses (in dotted decimal notation) separated by spaces.
-w Timeout Specifies the amount of time in milliseconds to wait for the ICMP Time
Exceeded or Echo Reply message corresponding to a given Echo Request message to be
received. If not received within the time-out, an asterisk (*) is displayed. The default
time-out is 4000 (4 seconds).

pg. 30
2) Ping :
Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control
Message Protocol (ICMP) Echo Request messages. The receipt of corresponding Echo Reply
messages are displayed, along with round-trip times. Ping is the primary TCP/IP command
used to troubleshoot connectivity, reachability, and name resolution.

You can use ping to test both the computer name and the IP address of the
computer. If pinging the IP address is successful, but pinging the computer name is
not, you might have a name resolution problem. In this case, ensure that the
computer name you are specifying can be resolved through the local Hosts file, by
using Domain Name System (DNS) queries, or through Net BIOS name resolution
techniques.

To test a TCP/IP configuration by using the ping command:

 To quickly obtain the TCP/IP configuration of a computer, 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.
 At the command prompt, ping the loopback address by typing ping 127.0.0.1
 Ping the IP address of the computer.
 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.

pg. 31
 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.
 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.

3) Arp :
Displays and modifies 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 foreach Ethernet or Token Ring network adapter
installed on your computer.
Syntax
Arp [ -a [InetAddr] [-N IfaceAddr]] [ -g [InetAddr] [ -N IfaceAddr]] [ -d InetAddr [
IfaceAdder]] [ -s InetAddr Etheraddr [IfaceAddr]]

Used
without Displays help
parameters
-a Displays current ARP cache tables for all interfaces. To display the ARP
[InetAddr] cache entry for a specific IP address, use arp -a with the InetAddr parameter,
[-N where InetAddr is an IP address. To display the ARP cache table for a
IfaceAddr] specific interface, use the -N IfaceAddr parameter where IfaceAddr is the IP
address assigned to the interface. The -N parameter is case-sensitive.
-g Identical to -a.
[InetAddr]
[-N
IfaceAddr]
-d InetAddr Deletes an entry with a specific IP address, where InetAddr is the IP address.
[IfaceAddr] To delete an entry in a table for a specific interface, use the IfaceAddr
parameter where IfaceAddr is the IP address assigned to the interface. To
delete all entries, use the asterisk (*) wildcard character in place of InetAddr.
-s InetAddr Adds a static entry to the ARP cache that resolves the IP address InetAddr to
EtherAddr the physical address EtherAddr. To add a static ARP cache entry to the table
[IfaceAddr] for a specific interface, use the IfaceAddr parameter where IfaceAddr is an
IP address assigned to the interface.

pg. 32
Example:

To display the ARP cache tables for all interfaces use following command

arp -a

4) Netstat :

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).

pg. 33
Netstat provides statistics for the following:

 Proto - The name of the protocol (TCP or UDP).


 Local Address - The IP address of the local computer and the port number being used. The
name of the local computer that corresponds to the IP address and the name of the port is
shown unless the -n parameter is specified. If the port is not yet established, the port number
is shown as an asterisk (*).
 Foreign Address - The IP address and port number of the remote computer to which the
socket is connected. The names that corresponds to the IP address and the port are shown
unless the -n parameter is specified. If the port is not yet established, the port number is
shown as an asterisk (*).

(state) Indicates the state of a TCP connection. The possible states are as follows:

 CLOSE_WAIT
 CLOSED
 ESTABLISHED
 FIN_WAIT_1
 FIN_WAIT_2
 LAST_ACK
 LISTEN
 SYN_RECEIVED
 SYN_SEND
 TIMED_WAIT

Syntax

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

Used
without displays active TCP connections.
parameter
s
-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 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.
pg. 34
-r Displays the contents of the IP routing table. This is equivalent to the route print
command.
-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.
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.

5) Nbtstat :
Displays NetBIOS over TCP/IP (NetBT) protocol statistics

NetBIOS name tables for both the local computer and remote computers, and the NetBIOS
name cache. Nbtstat allows a refresh of the NetBIOS name cache and the names registered
with Windows Internet Name Service (WINS).

Nbtstat command-line parameters are case-sensitive.

Syntax

nbtstat [-a RemoteName] [-A IPAddress] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [Interval]

pg. 35
Used without
parameters Displays help
-a RemoteName Displays the NetBIOS name table of a remote computer,
where RemoteName is the NetBIOS computer name of the remote computer.
The NetBIOS name table is the list of NetBIOS names that corresponds to
NetBIOS applications
running on that computer.
-A IPAddress Displays the NetBIOS name table of a remote computer, specified
by the IP address (in dotted decimal notation) of the remote computer.
-c Displays the contents of the NetBIOS name cache, the table of NetBIOS names
and
their resolved IP addresses.
-n Displays the NetBIOS name table of the local computer. The status of
Registered
indicates that the name is registered either by broadcast or with a WINS server.
-r Displays NetBIOS name resolution statistics. On a Windows XP computer that
is configured to use WINS, this parameter returns the number of names that
have been resolved and registered using broadcast and WINS.
-R Purges the contents of the NetBIOS name cache and then reloads the #PRE-
tagged
entries from the Lmhosts file.
-RR Releases and then refreshes NetBIOS names for the local computer that is
registered
with WINS servers.
-s Displays NetBIOS client and server sessions, attempting to convert the
destination IP address to a name.
-S Displays NetBIOS client and server sessions, listing the remote computers by
destination IP address only.
Interval Redisplays selected statistics, pausing the number of seconds specified in
Interval
between each display. Press CTRL+C to stop redisplaying statistics. If this
parameter is omitted, nbtstat prints the current configuration information only
once.
/? - Displays help at the command prompt.

6 ) Ipconfig :
Displays all current TCP/IP network configuration values and refreshes Dynamic Host
Configuration Protocol (DHCP) and Domain Name System (DNS) settings. This command is
most useful on computers that are configured to obtain an IP address automatically. This
enables users to determine which TCP/IP configuration values have been configured by DHCP,
Automatic Private IP Addressing (APIPA), or an alternate configuration.

 If the Adapter name contains any spaces, use quotation marks around the adapter name (that
is, "Adapter Name").
 For adapter names, ipconfig supports the use of the asterisk (*) wildcard character to specify
either adapters with names that begin with a specified string or adapters with names that
contain a specified string.
 For example, Local* matches all adapters that start with the string Local and *Con* matches
all adapters that contain the string Con.

pg. 36
Syntax

ipconfig [/all] [/renew [Adapter]] [/release [Adapter]] [/flushdns] [/displaydns]


[/registerdns] [/showclassid Adapter] [/setclassid Adapter [ClassID]]

Parameters

Used
without
parameter displays the IP address, subnet mask, and default gateway for all adapters.
s
/all Displays the full TCP/IP configuration for all adapters. Without this parameter,
ipconfig displays only the IP address, subnet mask, and default gateway values for
each adapter.
Adapters can represent physical interfaces, such as installed network adapters, or
logical interfaces, such as dial-up connections.
/renew Renews DHCP configuration for all adapters (if an adapter is not specified) or for a
[Adapter specific adapter if the Adapter parameter is included. This parameter is available
] only on computers with adapters that are configured to obtain an IP address
automatically. To specify an adapter name, type the adapter name that
appears when you use ipconfig
without parameters.
/release Sends a DHCPRELEASE message to the DHCP server to release the current
[Adapter DHCP configuration and discard the IP address configuration for either all adapters
] (if an adapter is not specified) or for a specific adapter if the Adapter parameter is
included. This parameter disables TCP/IP for adapters configured to obtain an IP
address automatically. To specify an adapter name, type the adapter name that
appears when you use ipconfig
without parameters.
/flushdns Flushes and resets the contents of the DNS client resolver cache. During DNS
troubleshooting, you can use this procedure to discard negative cache entries
from the cache, as well as any other entries that have been added dynamically.
/displaydns Displays the contents of the DNS client resolver cache, which includes both
entries preloaded from the local Hosts file and any recently obtained resource
records for name queries resolved by the computer. The DNS Client service uses
this information to resolve
frequently queried names quickly, before querying its configured DNS servers.
/registerdns Initiates manual dynamic registration for the DNS names and IP addresses that
are configured at a computer. You can use this parameter to troubleshoot a failed
DNS name registration or resolve a dynamic update problem between a client
and the DNS server without rebooting the client computer. The DNS settings in
the advanced properties of
the TCP/IP protocol determine which names are registered in DNS.
/showclassi Adapter Displays the DHCP class ID for a specified adapter. To see the DHCP
d class ID for all adapters, use the asterisk (*) wildcard character in place of
Adapter. This parameter is available only on computers with adapters that are
configured to obtain an IP address
automatically.
/setclassid Adapter [ClassID] Configures the DHCP class ID for a specified adapter. To set
the DHCP class ID for all adapters, use the asterisk (*) wildcard character in
place of Adapter. This parameter is available only on computers with adapters
that are configured to obtain an
IP address automatically. If a DHCP class ID is not specified, the current class ID is
removed.

pg. 37
Examples :

ipconfig To display the basic TCP/IP configuration for all adapters


ipconfig /all To display the full TCP/IP configuration for all adapters
ipconfig /renew "Local To renew a DHCP-assigned IP address configuration
Area Connection" for only the Local Area Connection adapter

ipconfig /flushdns To flush the DNS resolver cache when troubleshooting


DNS
name resolution problems
ipconfig /showclassid Local To display the DHCP class ID for all adapters with names
that
start with Local
ipconfig /setclassid "Local Area To set the DHCP class ID for the Local Area Connection
Connection" TEST adapter
to TEST

6) winipcfg :

This utility allows users or adminstrators to see the current IP address and other useful
information about your network configuration. You can reset one or more IP addresses. The
Release or Renew buttons allow you to release or renew one IP address. If you want to release
or renew all IP addresses click Release All or Renew All. When one of these buttons is clicked,
a new IP address is obtained from either the DHCP service or from the computer assigning
itself an automatic private IP address. To use the winipcfg utility:

 Click Start,and then click Run and type winipcfg


 Click More Info.
 To see the addresses of the DNS servers the computer is configured to use, click the ellipsis
(...) button to the right of DNS Servers.
 To see address information for your network adapter(s), select an adapter from the list in
Ethernet Adapter Information.

8) nslookup :
Nslookup (Name Server lookup) is a UNIX shell command to query Internet domain name
servers.

The syntax for Nslookup is as follows :

pg. 38
Nslookup
or
Nslookup [domain_name]

Definitions

 Nameserver: These are the servers that the internet uses to find out more about the domain.
Usually they are an ISP's computer.
 Mailserver: Where email is sent to.
 Webserver: The domains website.
 FTPserver: FTP is file transfer protocol, this server is where files may be stored.
 Hostname: The name of the host as given by the domain.
 Real Hostname: This is hostname that you get by reverse resolving the IP address, may be
different to the given hostname.
 IP Address: Unique four numbered identifier that is obtained by resolving the hostname.

9) Hostname :
To communicate with each and other, the computer needs a unique address. A hostname can
be alphabetic or alphanumeric, and contain specific symbols used specifically to define a
specific node or device in the network. For example, a hostname should have a domain name
(TLD) of the top-level and a distance of between one and 63 characters, when it is used in a
domain name system (DNS) or on the Internet.

Steps to Determine Your Computer’s Name

Open a terminal window and type the command given below

hostname: It will provide the name of your computer

The first part of the result is the name of a computer and the second part is the name of the
domain.

To get only the computer name, run the following command

hostname -s: The output will be localhost.

pg. 39
Similarly, if a user wants to find out which domain system is running then use the following
command.

hostname -d: The IP address for the hostname can also be retrieved by using the following
command

hostname -i: User can find out all the aliases for the computer by using the command given
below

9) Route :
In IP networks, routing tables are used to direct packets from one subnet to another. The
Route command provides the device’s routing tables. To get this result, just type route print.
The Route command returns the routing table, as well as the user, can make changes by
Commands such as Route Add, Route Delete, and Route Change which allows modifying the
routing table as a requirement.

11) Path Ping :

We discussed the Ping command and the Tracert command. There are similarities between
these commands. The pathping command which provides a combination of the best aspects of
Tracert and Ping.

This command takes 300 seconds to gather statistics and then returns reports on latency and
packet loss statistics at intermediate hops between the source and the target in more detail
than those reports provided by Ping or Tracert commands.

The syntax for path ping is as follows:

path ping [-n] [-h] [-g <Hostlist>] [-p <Period>] [-q <NumQueries> [-w <timeout>] [-i
<IPaddress>] [-4 <IPv4>] [-6 <IPv6>][<TargetName>]

 -n: Prevents path ping functioning from attempting to resolve the IP addresses of
routers to their names.
 -h MaxHops: This tracert option specifies the maximum number of hops in the
search for the target. If the MaxHops option is not specified the target has not been
found by 30 hops then the tracert command will stop looking.
 -w timeout: A timeout value must be specified while executing this ping command. It
adjusts the amount of time in milliseconds.
 -ip <IPaddress>: Indicates the source address.
 target: This is the destination IP address or a hostname user want to ping.

pg. 40
Experiment – 6
AIM : Implement different LAN topologies using Network Simulator.

 INTRODUCTION :

Topology means the shape of a local-area network (LAN) or other communications . system
Topologies are either physical or logical. computer networks with different types of topology
is implemented and simulated using network simulator NS2.

 KEYWORDS: Computer Network, Network Simulator NS2,Ethernet.

 A Computer Network is the group of computers connected together to share


resources. The resource can be hardware or software, if it is hardware example is
printer shared between number of computers and if it is software example can be
application program shared between number of clients. To design the computer
network the important component are sender who generates the information, receiver
who receives the information, link that connects between two stations, information
which travels on link e.g. image, audio, text, video etc , and protocol which is set of
rules defined for successful communication.

 NETWORK TOPOLOGY :

It is the way in which number of computers connected together to share information


or it is geometric representation of number of computers connected together. Types
Of Network Topology:
There are four principal topologies used in LANs:
1) Bus topology
2) Ring topology
3) Star topology
4) Mesh topology

pg. 41
1. Star Topology :
It is the topology in which number of devices are connected to the central hub
by point-to-point link i.e. dedicated link between each device.In star topology, all
the cables run from the computer to central location where they are connected
by a device called Hub.Hub is a device for connecting multiple Ethernet devices
together and
making them act as single network.If one device wants to send data to another
,it sends the data to the Hub , which then sends that data to all other
devices.This is the most common type of topology used in offices, computer
labs.

 Advantages :=
 Easy to install & reconfiguree
 Easy troubleshooting
 Failure of any node does not affect system

 Disadvantages :=
 Failure of hub affects whole system
 Each device requires its own cable

 IMPLEMENTATION OF STAR TOPOLOGY :=

pg. 42
2. Ring Topology :
It is the topology in which each computer is connected to the next
computer, with last one connected to the first computer in circular
fashion. When any device wants to send data , then data is passed along
the ring in one direction , from device to device, until it reaches its
destination. In ring topology, each device consist of repeater which
regenerates the bits and passes them along. Ring topology are used in
high performance networks where large bandwidth is necessary.

 Advantages :=
 Easy to find cable failure
 To add and remove device requires changing only two connections
 Disadvantages :=
 Failure of one computer affects whole network
 Unidirectional traffic

 IMPLEMENTATION OF RING TOPOLOGY :=

pg. 43
3. Bus Topology :

It is the topology in which one long cable acts as a backbone to link all the
devices in a network. In bus topology , multiple devices aare connected one by
one by means of single cable called as bus. Nodes are connected to the bus
cable by drop lines and taps. A drop line is a connection running between the
device and the main cable. A tap is a connector that either splices into main
cable to create a contact with the metallic core. When any computer wants to
send data to other computer, then it will send that data to bus first, all the
computers on the network receives the information but only destination node
accepts it and all other reject that information.

 Advantages :=
 Easy to install
 Easy to use
 Low cost
 Disadvantages :=
 Difficult to troubleshot bus topology
 Heavy network traffic can slow down bus
 Failure of cable affects all devices

 IMPLEMENTATION OF BUS TOPOLOGY :=

pg. 44
4. Mesh Topology:

It is the topology in which every device has a dedicated point-to-point


link to every other device. The term dedicated means that the link
carries traffic only between the two devices it connects. Here Node 1
must be connected to n-1 nodes, Node 2 must be connected to n-1
nodes, finally node n must be connected to n-1 nodes. Therefore for
mesh topology we need n(n-1)/2 duplex mode lines.

 Advantages :=
 Privacy and security
 Easy fault identification & fault isolation

 Disadvantage
s :=
 Difficult to install

 IMPLEMENTATION OF MESH TOPOLOGY :=

pg. 45
Experiment – 7

AIM : Explain the concept of VLAN using Network Simulator.

 To refresh your memory, a Local Area Network (LAN) is a set of connected


devices like computers, hubs, and switches sharing the same pool of logical
address space. Normally, a router is required to route packets from one LAN
to another LAN. Traditionally, all packets within a LAN are broadcast to all
other devices connected to that particular LAN.

 A VLAN is a group of devices on one or more LANs that are configured to


communicate as if they were attached to the same wire, when in fact they are
located on a number of different LAN segments. Because VLANs are based
on logical instead of physical connections, they are extremely flexible.

 VLANs define broadcast domains in a Layer 2 network. A broadcast domain is


the set of all devices that will receive broadcast frames originating from any
device within the set. Broadcast domains are typically bounded by routers
because routers do not forward broadcast frames. Layer 2 switches create
broadcast domains based on the configuration of the switch. Switches are
multiport bridges that allow you to create multiple broadcast domains. Each
broadcast domain is like a distinct virtual bridge within a switch.

 You can define one or many virtual bridges within a switch. Each virtual bridge
you create in the switch defines a new broadcast domain (VLAN). Traffic
cannot pass directly to another VLAN (between broadcast domains) within the
switch or between two switches. To interconnect two different VLANs, you
must use routers or Layer 3 switches. See the "Overview of Layer 3
Interfaces" section for information on inter- VLAN routing on Catalyst 4500
series switches.

 figure shows an example of three VLANs that create logically defined networks.

 Figure Sample VLANs

pg. 46
 VLANs are often associated with IP subnetworks. For example, all of the end
stations in a particular IP subnet belong to the same VLAN. Traffic between
VLANs must be routed. You must assign LAN interface VLAN membership on
an interface-by- interface basis (this is known as interface-based or static
VLAN membership).
 You can set the following parameters when you create a VLAN in the
management domain:

• VLAN number

• VLAN name

• VLAN type

• VLAN state (active or suspended)

• Maximum transmission unit (MTU) for the VLAN

• Security Association Identifier (SAID)

• VLAN number to use when translating from one VLAN type to another
 If you are looking for a simple networked solution for a small office, it may be a
good idea to have a traditional LAN setup with a few hubs or switches.
However, if you are planning for a large building or campus wide LAN for
several individual departments, a VLAN is almost essential.

pg. 47
 +Virtual LANs (VLANs) can be considered as an intelligent LAN consisting of
different physical LAN segments enabling them to communicate with each
other as if they were all on the same physical LAN segment.
 Benefits of VLAN: Several of the disadvantages of traditional LANs can be
eliminated with the implementation of VLANs.

1. Improved Performance: In a traditional LAN, all the hosts within the LAN receive
broadcasts, and contend for available bandwidth. As a result, the bandwidth is shared
among all the connected devices within the LAN segment. If you are running high-
bandwidth consumption applications such as groupware or server forms, a threshold
point may easily be reached. After a threshold, the users may find the LAN too slow
or un-responsive. With the use of VLAN, you can divide the big LAN into several
smaller VLANs. For example, if there are two file servers, each operating at
100Mbps, in a traditional LAN both the servers have to share the LAN bandwidth of
100Mbps. If you put both the servers in separate VLANs, then both have an available
bandwidth of 100Mbps each. Here the available bandwidth has been doubled.

2. Functional separation of an institute or a company: It is often required to


separate the functional groups within a company or institute. For example, it might be
necessary to separate HR department LAN from that of Production LAN.
Traditionally, it requires a router to separate two physical LANs. However, you can
set up two VLANs, one for Finance, and the other for Production without a router. A
switch can route frames from one VLAN to another VLAN. With VLAN's it is easier to
place a workgroup together eventhough they are physically in different buildings. In
this case Finance VLAN does not forward packets to Production VLAN, providing
additional security.

3. Ease of Network Maintenance: Network maintenance include addition, removal,


and changing the network users. With traditional LANs, when ever a User moves, it
may be necessary to re-configure the user work station, router, and the servers.
Some times, it may also be necessary to lay the cable, or reconfigure hubs and
switches. If you are using VLANs, many of these reconfiguration tasks become
unnecessary. For example, you can avoid network address configuration on the work
station and the corresponding router if you use VLAN. This is because, routing traffic
within VLANs doesn't require a router.
However, VLAN's add some administrative complexity, since the administration
needs to manage virtual workgroups using VLANs.

4. Reduced Cost : VLANs minimize the network administration by way of reduced


maintenance on account of workstation addition/deletion/changes. This in turn
reduce the costs associated with LAN maintenance.

pg. 48
5. Security : Using a LAN, all work stations within the LAN get the frames meant for
all other work stations within the broadcast domain. Since a VLAN splits the
broadcast domain into two or more, it is possible to put work stations sharing
sensitive data in one VLAN, and other work station in another VLAN. Of course, if
two VLANs are not sufficient, you can split the work stations into as many VLANs as
required. VLAN's can also be used to set up firewalls, restrict access, and send any
intrusion alerts to the administrator.

 VLAN in Network Simulator :=

pg. 49
1 ) Assign IP address to all PC

pg. 50
2) Now ‘ping’ on off the PC

pg. 51
3) Show VLAN

4 ) Configure VLAN with Database Mode

pg. 52
5) Show VLAN

Configure the VLAN using the Terminal

pg. 53
7) Now assign ports to all the PC

8) Show VLAN With Port numbers

pg. 54
9) If we join the two VLAN ---> we can not communicate within
network for that we have to trunkate the networks.

 Now check with ping command.

 Here we can see that we can’t communicate with the other network with same
VLAN.

pg. 55
10 ) Trunk Two VLAN networks

 Trunk first switch (switch 1):

 Trunk the second switch (switch 0) :

pg. 56
11) Now ping first PC to the fourth PC .

pg. 57
Experiment – 8

AIM : Implement the concept of static routing.

What is static routing ?


 static routing is a form of routing that occurs when a router uses a manually-
configured routing entry, rather than information from a dynamic routing traffic.[1]
In many cases, static routes are manually configured by a network administrator
by adding in entries into a routing table, though this may not always be the
case.[2] Unlike dynamic routing, static routes are fixed and do not change if the
network is changed or reconfigured.
Static routing and dynamic routing are not mutually exclusive. Both dynamic
routing and static routing are usually used on a router to maximize routing
efficiency and to provide backups in the event that dynamic routing information
fails to be exchanged. Static routing can also be used in stub networks, or to
provide a gateway of last resort.

Use of static routing :


 Static routing may have the following uses:

 Static routing can be used to define an exit point from a router when no other
routes are available or necessary. This is called a default route.
 Static routing can be used for small networks that require only one or two routes.
This is often more efficient since a link is not being wasted by exchanging
dynamic routing information.
 Static routing is often used as a complement to dynamic routing to provide a
failsafe backup in the event that a dynamic route is unavailable.
 Static routing is often used to help transfer routing information from one
routing protocol to another (routing redistribution).

Advantages of static routing :


 Static routing, if used without dynamic routing, has the following advantages

 Static routing causes very little load on the CPU of the router, and produces no
traffic to other routers.
 Static routing leaves the network administrator with full control over the
routing behavior of the network.
 Static Routing Is very easy to configure on small networks.

pg. 58
Implementation of static routing :

 To configure , we will take two routers (that is 2620 – which is version of router) , two
switches and four PCs. Let’s connect all the devices.

 If we try to connect two routers via serial DCE cable, then this happen .

 There is no serial port available in router, this is because we have to add


serial port manually in router.

 Now , let’s find out how to add serial port in router .

pg. 59
a) Click on the router, there a dialogue box is open , remember before
adding serial port just turn off the router.

b) On the left side, we will see lots of ports available. Among them , we will
select WIC-1T. Drag it over place and hence, we have successfully
added serial port to the router.

c) Our requirement is only one serial port , so that we have added only
one serial port.

d) Then turn the router on.

pg. 60
Apply the same setting on the router number 2.

 Now, try to connect the routers, we can see the routers are connected.

 Now, once you add the cables to all devices . Next step is to add the IP address
to all the ports of router and IP address to the fast ethernet port of the router no.
1

pg. 61
 Apply the same process , on router no.2

 Now , add IP address to the PCs and add the IP address of fastethernet of
related router as a default gateway.

pg. 62
pg. 63
pg. 64
 This is because whatever data the PC send to another network or whatever
data the PC will receive from the another network , all the communication will
happen by a particular port that is the fastethernet port of the router and it will
act as a Default Gateway.

 Now, first we check if two PCs from different network can ping or not (it means
the reply from another network is coming or not).

 The reply is not coming from another network , it means we have to take
static route for communication.

 Now, configure the static route for router no. 1

pg. 65
 Apply the same on router no. 2

 Now, try to ping two PC from different network.

pg. 66
 And as here, we can see, we are able to communicate with PC of another network.

pg. 67
Experiment – 9

AIM : Implement the concept of dynamic routing (RIP, OSPF,


BGP).

1. RIP
Step:1:
First we will take 6 devices for 3 different network . then we will take a switch and
connect them. An then we will take 3 routers and will connect them .

Step:2:
We need more than 2 port to connect 3 router. So, will go in physicalWIC-2T .

pg. 68
And we will do the same thing in Router 1.

And we will do the same thing in Router 2.

pg. 69
Step:3:
We will connect routers with serial DT line by serial port .

To configure them ,we will need to give them ip address.

pg. 70
Now we will need same net-id in whole network and the host id will be different.

We had done it in 1st PC .Now do same in 2nd PC.

pg. 71
And this way, we have to do it for other router and all pc and make a note of ip-
address under that network .
Step:4:
Now configure roots.

Step:5:
Now we will add all networks to each router as per below.

pg. 72
We had done this in Router 1 in below picture. Do the same way in all routers.

Step:6:
Then simulate it.

We can see that it is successful.


Step:7:
Now we will connect Router 0 to Router 2.and do the same this as we had done before.

pg. 73
Step:8:
We will see now if we can send the data from 1st pc to 3rd pc or any other.

We can send data successfully.

pg. 74
2. Ospf
Step:1:
First of all connect the routers and pc and give them ip address and make a note as
given in below image.

Step:2:
Give ip address to routers and config Router 0 by serial 2/0 and 3/0 as given below.

Do the same way in other routers.

pg. 75
Step:3:
Now check the connection is right or not.

And we can see that it is successful.

Step:4:
Now go in Router0CLI for ospf protocol. And write the commands as below.

Do the same in other routers.

pg. 76
Step:5:
Now we will check the connections from pc0 to Router0,PC0 to Router1 , PC0 to Router2.

Now run the simulator.

pg. 77
Step:6:
Below picture shows that ospf is successful.

pg. 78
3. BGP
Step:1:
First of all connect the routers and pc and give them ip address and make a note as
given in below image.

step:2:
select palette dialog and make a round as given below to highlite the AS.

pg. 79
Step:3:
Now set serial 2/0 in Router 0 and Router1.

pg. 80
Step:4:
Now we will check that two pc can send message or not.means is it configure or
not. It will fail because we had not yet configure them.

pg. 81
Step:5:
For configuring , go to Router0CLI and write the code as given below.

Do the same process in Router1.

pg. 82
Step:6:
Now we will check that it is message can be send or not.
So we have checked it for Pc0 to Router 0,Pc0 to Router1, Pc0 to Pc1. And
these 3 are successful.

We can now simulate it and play it.

We can see that it is successful.

pg. 83
Experiment – 10

AIM : Packet capture and header analysis by wire-shark (TCP, UDP, IP)

What is wireshark?

- Wireshark is a network packet analyzer. A network packet analyzer


presents captured packet data in as much detail as possible.
- You could think of a network packet analyzer as a measuring device for
examining what’s happening inside a network cable, just like an
electrician uses a voltmeter for examining what’s happening inside an
electric cable (but at a higher level, ofcourse).
- In the past, such tools were either very expensive, proprietary, or
both. However, with the advent of Wireshark, that has changed.
Wireshark is available for free, is open source, and is one of the
best packet analyzers available today.

Why we use wireshark?

Here are some reasons people use Wireshark:

 Network administrators use it to troubleshoot network problems


 Network security engineers use it to examine security problems
 QA engineers use it to verify network applications
 Developers use it to debug protocol implementations
 People use it to learn

network protocol internals

Wireshark can also be

helpful in many other

situations.

Features

The following are some of the many features Wireshark provides:

 Available for UNIX and Windows.


 Capture live packet data from a network interface.
 Open files containing packet data captured with
tcpdump/WinDump, Wireshark, and many otherpacket capture
programs.

pg. 84
 Import packets from text files containing hex dumps of packet data.
 Display packets with very detailed protocol information.
 Save packet data captured.
 Export some or all packets in a number of capture file formats.
 Filter packets on many criteria.
 Search for packets on many criteria.
 Colorize packet display based on filters.
 Create various statistics.
 …And a lot more!

Capturing Packets in wireshark

After downloading and installin


g Wireshark, you can launch it and double-click the
name of a network interface under Capture to start capturing packets on that
interface. For example, if you want tocapture traffic on your 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.
 o mode enabled—it’s enabled by default—you’ll also
If you have promiscuous
see all the other packets on the network instead of only packets addressed
to your network adapter. To chec if promiscuous mode is enabled, click
Capture > Opti ns and verify the “Enable promiscuous mode on all
interfaces” checkbox is activated at

pg. 85
the bottom of this window.

pg. 86
pg. 87
pg. 88
pg. 89
File Edit View Go Capture Analyze Statistics Telephony \'\”ireless Tools Help

tqpvbeameq 35
No. Tme Source Destnaâon PoMol Length Int
10542.79B483 192 . 168 . 29. 2.50 131.253.61.56 TCP 6660375-443
I078z.89 63 in-V3-61,&6 Tcp s844a”-•w3za
10792.B91359 192.168.29.250 131.253.61.66 TCP 5460375 ’443
1BB02.891527 192.168.29.250 131.253.61.66 TLSvl.2 288ClientHellc

* Frame2B54:66bytesonwire(528bits),66byte captured(528bits)oninterface0 Interface id: 0


(\Device\NPF_{D32D7F0S-Ag?8-44EE-88DC-DFD58F65SBA7/) Encapsulation type: Ethernet (1)
ArriUalTiwe:Jun 9,201712:40:BO.l4Bl4l0B0Pacific Daylight Time [Time shift forthis
packet: 0.000BBB000 ,econds]
Epoch Tire: l4970372B4.148141000 ,econds

1c 87 2c 35 e4 c8 7c 5 c +838 be bd B8 0045 B0 ..,5..|\ .8 .................... E.


B0340b 5d 40 008006 4T B5 c0a8 ld fa 83 fd .4.]@.. .0....
3d 42 eb d7 01 bb 22 52 7b 69 B808 00 B88802 =B....“R {i......
la 8 48 ed 80 000204 05 b40103 03 0801 OI . .H.
0402

'." ” Encapsulation type (Name.encap_typey Packets: 8J36 • Displayed: 21 {0.3°t) I

pg. 90
1. TCP Wireshark

pg. 91
pg. 92
Source Port
Number

Source I: 5S075 (5507S)

Desfi lion ports 50100


(50100) [S am index:
10]
Header length: 20 bytes
quince number: 1381 (rulalzve sequence numbur}
flags: 0xJ0 lACf)

000 ........... = Ru served: Not set

..0 .......... = N once: Not set

.. 0........ = Comedian Window Reduced (CWR|. Not set

. 0. ...... = ECN- E cho. Not set

.0. ..... = Urgen t : Plot set

.... ..1 ..... = Act nowludgem en t: SeI

... 0. .. = Push: Not s et

... . .0. = bese t. Plot s et

pg. 93
2. UDP wireshark

pg. 94
pg. 95
3. IP wireshark

pg. 96
IN Wireshark:

pg. 97

You might also like