Ilovepdf Merged
Ilovepdf Merged
TECHNOLOGY
PRACTICAL FILE
Introduction
Cisco Packet Tracer is an innovative network simulation and visualization tool. This free
software helps you to practice your network configuration and troubleshooting skills via your
desktop computer or an Android or iOS based mobile device. Packet Tracer is available for
both the Linux and Windows desktop environments.
With Packet Tracer you can choose to build a network from scratch, use a pre-built sample
network, or complete classroom lab assignments. Packet Tracer allows you to easily explore
how data traverses your network. Packet Tracer provides an easy way to design and build
networks of varying sizes without expensive lab equipment.
Packet Tracer User Interface
When you open Packet Tracer, by default you will be presented with the following interface:
1|Page
This initial interface contains ten components which are as follows:
This bar provides shortcut icons to the File and Edit menu
commands. This bar also provides buttons for Copy,
Paste, Undo, Redo, Zoom, the Drawing Palette, and the
2 Main Tool Bar Custom Devices Dialog. On the right, you will also find
the Network Information button, which you can use to
enter a description for the current network (or any text
you wish to include).
2|Page
This box is where you choose devices and connections to
Network
7 put into the workspace. It contains the Device-Type
Component Box
Selection Box and the Device-Specific Selection Box.
3|Page
Cisco 2811: This ISR comes with two Fast Ethernet ports, four WIC slots, and a dual slot for
AIM.
Cisco 2901: This router has two Gigabit Ethernet ports, four WIC slots, and two Digital Signal
Processor (DSP) slots. This router uses Cisco IOS Version 15.
Cisco 2911: This router has three Gigabit Ethernet ports and all the other features of the
previous router. It runs on IOS Version 15.
Generic Router-PT: This is a custom router running on Cisco IOS. It contains 10 slots and
has separate modules with a naming convention beginning with PT.
SWITCHES
A switch, also called a multiport bridge, connects more than two end devices together. Each
switch port is a collision domain.
The following switches are available in Packet Tracer:
Cisco 2950-24: This managed switch comes with 24 Fast Ethernet ports.
Cisco 2950T-24: This switch is a member of the Catalyst 2590 Intelligent Switch family and
has two Gigabit Ethernet ports in addition to the 24 Fast Ethernet ports.
Cisco 2960-24TT: This is another 24-port switch; the previous switch has Gigabit Interface
Converter (GBIC) for Gigabit Ethernet ports, whereas this switch has Small Form-factor
Pluggable (SFP) modules for the same.
Cisco 3560-24PS: This switch is different from the others because it is a layer 3 switch that
can be used to perform routing in addition to switching. The PS suffix implies support for
Power over Ethernet (PoE), which can be used to power up IP phones without using power
adapters.
Bridge PT: This is a device used to segment a NETWORK and it has only two ports (which
is why it is a bridge; if it had more, it'd be called a switch).
Generic Switch PT: This is a Packet-Tracer-designed switch running on Cisco IOS. This is
only customizable switch with 10 slots and several modules.
CONNECTORS
4|Page
straight through PC, Server, Laptop, or
Printer to Switch
PC, Server, Laptop, or
Printer to Hub
PC, Server, Laptop, or
Printer to Modem
PC, Server, Laptop, or
Printer to Cloud
Router to Switch
Router to Hub
Router to Modem
Router to cloud
Crossover PC, Server, Laptop, or
printer to PC
PC, Server, Laptop, or
printer to Server PC, Server,
Laptop, or printer to Laptop
PC, Server, Laptop, or
printer to Printer
Switch to Hub
Switch to Switch
Hub to Hub
Router w/o Serial to Router
PC to PC
Fiber All with fiber ports
5|Page
Coaxial Cloud to Cable Modem
Cable Modem to Co-Ax
Splitter (hub)
Co-Ax Splitter to TV
Cable Modem to TV
Cloud to TV
TV to TV
Serial DCE Router to Router Cloud to
Router
Console PC/Laptop/Generic to
Router/Switch
6|Page
Fig 1.2 Packet Tracer User Profile
Algorithm Settings
The Algorithms Settings dialog allows the user to make configurations that are otherwise
not available in IOS. It also allows tweaking of algorithm settings to make visualization of
certain algorithm/protocol behaviours more easily viewable.
CBAC Half-Open Session Multiplier: If the number of half-open CBAC sessions multiplied
by this number exceeds the configured max half-open session count, new sessions would not
be opened.
TCP Maximum Number of Connections: If the number of connections in SYN-RECEIVED
state exceeds this number, any new connections would be rejected.
TCP Maximum Number of Opened Sessions: If the number of connections exceeds this
number, any new connections would be rejected.
TCP Maximum Retransmission Timeout in Milliseconds: If a TCP connection does not
receive an acknowledgement to a segment it transmitted in this number, it would retransmit
the segment.
Switching Storm Control Multiplier: If the bandwidth percentage of broadcast frames used
multiplied by this number exceeds the configured threshold, the broadcast frame would be
dropped.
7|Page
Fig 1.3 Packet Tracer Algorithm Settings
Saving a PKZ
Packet Tracer allows you to save your topology (PKT) as well as any custom device icons
and backgrounds that you applied to on the Logical Workspace and Physical Workspace to a
save file called a PKZ. A PKZ is able to retain any external files you add in a single save file,
which allows for portability and compactness from computer to computer. To create a PKZ,
go to File > Save as Pkz. Enter a file name for the PKZ and click on Save. In the Pkz Select
Files dialog, you will be able to add and remove files that you want to save along with PKT.
To add a file, click on the Add button and browse to the file you want to add then click
Open. To remove a file, select the file from the list then click Remove. Once you are done
adding and removing files, click OK to create the PKZ file.
8|Page
Experiment – 2
We need to perform some initial configurations on router before it can be used for routing.
Cisco IOS supports various command modes, among those followings are the main command
modes.
User EXEC Mode
Privileged EXEC Mode
Global Configuration Mode
Interface Configuration Mode
Setup Mode
You need to execute specific commands to navigate from one mode to another.
9|Page
Global Config Modify From privileged Router(config)#
configuration that EXEC, enter
affect the system as configure terminal.
a whole.
Interface Config Modify the From global mode, Router(config-if)#
operation of an enter interface type
interface. number.
Setup Create the initial From privileged . Prompted dialog
configuration. EXEC mode, enter
command setup.
User Exec mode => Privileged Exec mode => Global Configuration mode => Interface
Configuration mode => Sub Interface Configuration mode
Router will enter in setup mode only if it fails to load a valid running configuration.
10 | P a g e
Step 2. Click on the router and access CLI prompt of the router.
Step 3. Enter the following commands to configure, change hostname and secure the router
with a password.
configure terminal : Enters global configuration mode, when using the console port.
Router> enable
Router# configure terminal
Router(config)#
Command Description
11 | P a g e
Step 4. Return to the console mode by using the exit command.
Router(config-line) #exit
Router(config) #exit
Router #exit
OUTPUT :
After executing the above commands. Now your router (Lab1) is secured with a password.
12 | P a g e
Fig.2.4 Router Secured
13 | P a g e
Experiment – 3
Bus Topology:
Bus topology uses one main cable to which all nodes are directly connected. The main cable
acts as a backbone for the network. One of the computers in a network typically acts s the
computer server.
Advantage of bus topology is that it is easy to connect a computer or peripheral device. The
second advantage is that the cable requirements are relatively small, resulting in lower cost.
This type of topology is not suitable for large networks.
Steps as follows:
Step 1: Launch the packet tracer
Step 2: Build the Topology
First select three switches, three clients and connect them by FastEthernet wires.
Configure PC1
Click on PC1. Then configure it as follows:
h. Click on the Desktop tab.
i. Click on the IP Configuration Icon.
j. Click on the IP Address dialog box.
k. Type in 192.168.1.2 as the IP address and press enter.
l. A default value of 255.255.255.0 should appear in the Subnet Mask.
m. Type in 192.168.1.1 as the default gateway address.
15 | P a g e
Fig 3.3 IP Configuration of PC1
Configure PC2
Click on PC2. Then configure it as follows:
h. Click on the Desktop tab.
i. Click on the IP Configuration Icon.
j. Click on the IP Address dialog box.
k. Type in 192.168.1.3 as the IP address and press enter.
l. A default value of 255.255.255.0 should appear in the Subnet Mask.
m. Type in 192.168.1.1 as the default gateway address.
16 | P a g e
Fig 3.4 IP Configuration of PC2
17 | P a g e
Fig 3.5 Message Transferred in Realtime Mode
Star Topology:
In star topology, each computer is connected to a central hub using a point-to-point connection.
The central hub can be a server that manages the network, or it can be a much simpler device
that only makes the connections between computers over the network possible.
Advantage of star topology is that it is easy to add new nodes to the network.
Steps as follows:
Step 1: Launch the packet tracer
Step 2: Build the Topology
First select a switch, 4 clients and connect them by FastEthernet wires.
18 | P a g e
Fig 3.6 Star Topology
19 | P a g e
Fig 3.7 IP Configuration of PC0
Configure PC1
Click on PC1. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Then click on the IP Address dialog box.
d. Type in 192.168.1.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC2
Click on PC2. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Then click on the IP Address dialog box.
d. Type in 192.168.1.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC3
20 | P a g e
Click on PC3. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Then click on the IP Address dialog box.
d. Type in 192.168.1.4 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
21 | P a g e
Experiment – 4
• IP address
• net mask
The Dynamic Host Configuration Protocol (DHCP) provides all the above functionalities of
BOOTP alongwith static and dynamic address allocation that can be manual or automatic.
1. Select one router, switch and number of clients for connection setup. And connect them
through fast Ethernet wire with each other.
22 | P a g e
2. Check the properties of each client by going in there config window after selecting DHCP
other than STATIC. It will return unable to connect. Because router is not set up.
R1#config t
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastethernet 1/0
R1(config-if)#ip address 192.168.1.0 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
23 | P a g e
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#exit
4. Now, Click on any of the PC > Desktop > IP configuration > Choose DHCP.
24 | P a g e
Experiment – 5
When a new machine is setup or any machine which don’t have memory to store IP address,
needs an IP address for its own use. So, the machine sends a RARP broadcast packet which
contains its own MAC address in both sender and receiver hardware address field.
25 | P a g e
Fig 5.1 Network Topology (ARP)
Step 3: Configure the End Devices:
Configure PC5
Click on PC5. Then configure it as follows:
m. Click on the Desktop tab.
n. Click on the IP Configuration Icon.
o. Click on the IP Address dialog box.
p. Type in 192.168.1.1 as the IP address and press enter.
q. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC1
Click on PC1. Then configure it as follows:
n. Click on the Desktop tab.
o. Click on the IP Configuration Icon.
p. Click on the IP Address dialog box.
q. Type in 192.168.1.2 as the IP address and press enter.
r. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC2
Click on PC2. Then configure it as follows:
n. Click on the Desktop tab.
o. Click on the IP Configuration Icon.
p. Click on the IP Address dialog box.
26 | P a g e
q. Type in 192.168.1.3 as the IP address and press enter.
r. A default value of 255.255.255.0 should appear in the Subnet Mask.
Step 4: ARP configuration:
Click on PC5. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the Command Prompt.
c. Type the following command in the prompt: ping 192.168.1.3 and press enter.
d. If everything is done correctly, then one should see the following output:
27 | P a g e
Fig 5.3 PC2 Command Prompt
e. On typing the arp -a command, we get the IP Address and MAC Address of
PC5.
Step 5: To check whether the PC5 has received back the message, go to Command Prompt of
PC0 and type the command arp -a.
28 | P a g e
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
PC5 N/A 192.168.1.1 255.255.255.0 0.0.0.0
PC1 N/A 192.168.1.2 255.255.255.0 0.0.0.0
PC2 N/A 192.168.1.3 255.255.255.0 0.0.0.0
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. 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.
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 maximise 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.
29 | P a g e
Steps are as follows for static routing:
Step 1: Launch the packet tracer
Step 2: Build the Topology
a. Add network devices and End Devices to the workspace.
Using the device selection box, add the network devices and End Devices to the workspace.
b. Add the physical cabling between devices on the workspace.
Using the device selection box, add the physical cabling between devices on the workspace.
Configure PC1
Click on PC1. Then configure it as follows:
a. Click on the Desktop tab.
30 | P a g e
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.1.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.1.1 as the default gateway address.
Configure PC2
Click on PC2. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.2.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.2.1 as the default gateway address.
Configure PC3
Click on PC3. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.2.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.2.1 as the default gateway address.
Configure PC4
Click on PC4. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.3.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.3.1 as the default gateway address.
31 | P a g e
Configure PC5
Click on PC5. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.3.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.3.1 as the default gateway address.
32 | P a g e
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 10.10.0.3 as the IP address.
g. A default value of 255.0.0.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate to 64000ms.
j. Save these settings.
Step 5: Static routing configuration:
Click on the Router0. Then configure it as follows:
a. Click the config tab and then Static tab.
b. Add network address 192.168.3.0
c. Add mask as 255.255.255.0
d. Add next hop as 10.10.0.3
e. Click the add button.
f. Then click the settings tab and then click the save button.
g. The equivalent IOS commands of the above steps are as follows:
Router(config-if)#exit
Router(config)#
Router(config)#ip route 192.168.3.0 255.255.255.0 10.10.0.3
Router(config)#
Click on the Router1. Then configure it as follows:
a. Click the config tab and then Static tab.
b. Add network address 192.168.1.0
c. Add mask as 255.255.255.0
d. Add next hop as 10.10.0.2
e. Click the add button.
f. add network address 192.168.2.0
g. Add mask as 255.255.255.0
h. Add next hop as 10.10.0.2
33 | P a g e
i. Click the add button.
j. Then click the settings tab and then click the save button.
k. The equivalent IOS commands of the above steps are as follows:
Router(config-if)#exit
Router(config)#
Router(config)#ip route 192.168.1.0 255.255.255.0 10.10.0.2
Router(config)#ip route 192.168.2.0 255.255.255.0 10.10.0.2
Router(config)#
Step 6: Check the configuration of the topology:
In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC4 and
check the status at the bottom right corner of packet tracer.
If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
34 | P a g e
Fig 5.8 Simulation mode
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Fa1/0 192.168.2.1 255.255.255.0 N/A
Router0 Se2/0 10.10.0.2 255.0.0.0 N/A
Router1 Fa0/0 192.168.3.1 255.255.255.0 N/A
Router1 Se2/0 10.10.0.3 255.0.0.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.1.3 255.255.255.0 192.168.1.1
PC2 N/A 192.168.2.2 255.255.255.0 192.168.2.1
PC3 N/A 192.168.2.3 255.255.255.0 192.168.2.1
PC4 N/A 192.168.3.2 255.255.255.0 192.168.3.1
PC5 N/A 192.168.3.3 255.255.255.0 192.168.3.1
35 | P a g e
Experiment – 6
36 | P a g e
t. Click on the IP Address dialog box.
u. Type in 192.168.1.2 as the IP address and press enter.
v. A default value of 255.255.255.0 should appear in the Subnet Mask.
w. Type in 192.168.1.1 as the default gateway address.
Configure PC1
Click on PC1. Then configure it as follows:
s. Click on the Desktop tab.
t. Click on the IP Configuration Icon.
u. Click on the IP Address dialog box.
v. Type in 192.168.2.2 as the IP address and press enter.
w. A default value of 255.255.255.0 should appear in the Subnet Mask.
x. Type in 192.168.2.1 as the default gateway address.
Step 4: Configure the Network Devices:
Configure Router0
Click on Router0. Then configure it as follows:
x. Click on config tab and then click on the FastEthernet 0/0.
y. Type in 192.168.1.1 as the IP address.
z. A default value of 255.255.255.0 should appear in the Subnet Mask.
aa. Tick the Port Status as On.
bb. Click on the Serial 2/0.
cc. Type in 10.10.0.2 as the IP address.
dd. A default value of 255.0.0.0 should appear in the Subnet Mask.
ee. Tick the Port Status as On.
ff. Set the clock rate to 64000ms.
gg. Save these settings.
Configure Router1
Click on Router1. Then configure it as follows:
a. Click on config tab and then click on the FastEthernet 0/0.
b. Type in 192.168.2.1 as the IP address.
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
37 | P a g e
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 10.10.0.3 as the IP address.
g. A default value of 255.0.0.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate as not set.
j. Save these settings.
Step 5: RIP routing configuration:
Click on the Router0. Then configure it as follows:
h. Click the config tab and then RIP tab.
i. Add network address 10.0.0.0
j. Add network address 192.168.1.0
k. Then go to settings and click the save button.
l. The equivalent IOS commands of the above steps are as follows:
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
Click on the Router1. Then configure it as follows:
a. Click the config tab and then RIP tab.
b. Add network address 10.0.0.0
c. Add network address 192.168.2.0
d. Then go to settings and click the save button.
e. The equivalent IOS commands of the above steps are as follows:
Router>enable
Router#
38 | P a g e
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 192.168.2.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
Step 6: Check the configuration of the topology:
g. In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC1 and
check the status at the bottom right corner of packet tracer.
h. If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Se2/0 10.10.0.2 255.0.0.0 N/A
Router1 Fa0/0 192.168.2.1 255.255.255.0 N/A
Router1 Se2/0 10.10.0.3 255.0.0.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.2.2 255.255.255.0 192.168.2.1
39 | P a g e
Open Shortest Path First (OSPF):
OSPF is a link-state routing protocol which is used to find the best path between the source
and the destination router using its own Shortest Path First). OSPF is developed by Internet
Engineering Task Force (IETF) as one of the Interior Gateway Protocol (IGP), i.e, the protocol
which aims at moving the packet within a large autonomous system or routing domain. It is a
network layer protocol which works on the protocol number 89 and uses AD value 110. OSPF
uses multicast address 224.0.0.5 for normal communication and 224.0.0.6 for update to
designated router(DR)/Backup Designated Router (BDR).
Steps are as follows for OSPF:
Step 1: Launch the packet tracer
Step 2: Build the Topology
a. Add network devices and End Devices to the workspace.
Using the device selection box, add the network devices and End Devices to the workspace.
b. Add the physical cabling between devices on the workspace.
Using the device selection box, add the physical cabling between devices on the workspace.
40 | P a g e
c. Click on the IP Address dialog box.
d. Type in 192.168.1.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.1.1 as the default gateway address.
Configure PC1
41 | P a g e
Configure Router1
Click on Router1. Then configure it as follows:
k. Click on config tab and then click on the FastEthernet 0/0.
l. Type in 192.168.2.1 as the IP address.
m. A default value of 255.255.255.0 should appear in the Subnet Mask.
n. Tick the Port Status as On.
o. Click on the Serial 2/0.
p. Type in 10.10.0.3 as the IP address.
q. A default value of 255.0.0.0 should appear in the Subnet Mask.
r. Tick the Port Status as On.
s. Set the clock rate to 64000ms.
t. Click on the Serial 3/0.
u. Type in 12.10.0.3 as the IP address.
v. A default value of 255.0.0.0 should appear in the Subnet Mask.
w. Tick the Port Status as On.
x. Set the clock rate to 64000ms.
y. Save these settings.
Configure Router2
Click on Router1. Then configure it as follows:
a. Click on the config tab and then on the Serial 2/0.
b. Type in 11.10.0.3 as the IP address.
c. A default value of 255.0.0.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Set the clock rate to 64000ms.
f. Click on the Serial 3/0.
g. Type in 12.10.0.2 as the IP address.
h. A default value of 255.0.0.0 should appear in the Subnet Mask.
i. Tick the Port Status as On.
j. Set the clock rate to 64000ms.
k. Save these settings.
42 | P a g e
Step 5: OSPF routing configuration:
Click on the Router0. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 11.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Click on the Router1. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 12.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Click on the Router2. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 11.0.0.0 0.255.255.255 area 0
Router(config-router)#network 12.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
43 | P a g e
Click the config tab and then goto settings tab and click save button.
Step 6: Check the configuration of the topology:
In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC1 and
check the status at the bottom right corner of packet tracer.
If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
44 | P a g e
Fig 6.5 Simulation Mode
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Se2/0 10.10.0.2 255.0.0.0 N/A
Router0 Se3/0 11.10.0.2 255.0.0.0 N/A
Router1 Fa0/0 192.168.2.1 255.255.255.0 N/A
Router1 Se2/0 10.10.0.3 255.0.0.0 N/A
Router1 Se3/0 12.10.0.3 255.0.0.0 N/A
Router2 Se2/0 11.10.0.3 255.0.0.0 N/A
Router2 Se3/0 12.10.0.2 255.0.0.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.2.2 255.255.255.0 192.168.2.1
45 | P a g e
Fig 6.6 Network Topology (BGP)
Step 3: Configure the End Devices:
Configure PC0
Click on PC0. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.1.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.1.1 as the default gateway address.
Configure PC1
Click on PC1. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.3.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.3.1 as the default gateway address.
Step 4: Configure the Network Devices:
Configure Router0
46 | P a g e
Click on Router0. Then configure it as follows:
a. Click on config tab and then click on the FastEthernet 0/0.
b. Type in 192.168.1.1 as the IP address.
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 192.168.2.2 as the IP address.
g. A default value of 255.255.255.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate to 64000ms.
j. Save these settings.
Configure Router1
Click on Router1. Then configure it as follows:
a. Click on config tab and then click on the FastEthernet 0/0.
b. Type in 192.168.3.1 as the IP address.
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 192.168.2.3 as the IP address.
g. A default value of 255.255.255.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate as not set.
j. Save these settings.
Step 5: BGP routing configuration:
Click on the Router0. Then configure it as follows:
47 | P a g e
Router(config-router)#network 192.168.2.0
Router(config-router)#neighbor 192.168.2.3 remote-as 200
Router(config-router)#neighbor 192.168.3.2 remote-as 200
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Click on the Router1. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router bgp 200
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.3.0
Router(config-router)#neighbor 192.168.2.2 remote-as 100
Router(config-router)#neighbor 192.168.1.2 remote-as 100
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Step 6: Check the configuration of the topology:
a. In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC1 and
check the status at the bottom right corner of packet tracer.
b. If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
48 | P a g e
Fig 6.7 Realtime Mode
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Se2/0 192.168.2.2 255.255.255.0 N/A
Router1 Fa0/0 192.168.3.1 255.255.255.0 N/A
Router1 Se2/0 192.168.2.3 255.255.255.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.3.2 255.255.255.0 192.168.3.1
49 | P a g e
Experiment – 7
The file transfer protocol (FTP) is a standard network protocol used to transfer computer files
between client and server on a computer network. FIP is built on a client-server model
architecture and used separate control and data connections between the client and the server.
Steps as follows:
Step 1: Launch the packet tracer
Step 2: Build the Topology
Select one router, two switches, two clients and one server and name that server as FTP.
Select a module in the router, keep it in mind server must be switched OFF while
installing module, and ON it after the installation of the module.
50 | P a g e
Fig 7.2 Network Topology
Step 3: Configure the FTP server
Click on FTP server. Then configure it as follows:
Select Desktop>IP configuration tab. Type the IP Address as 192.168.1.2, subnet mask
as 255.255.255.0 and default gateway as 192.168.1.1.
51 | P a g e
Then click on the services tab and select FTP and provide username and password of
your own choice, also select all the checkboxes provided below and after that click on
ADD.
52 | P a g e
Fig 7.5 PC0 IP Configuration
Click on the router and click on Config tab, select FastEthernet 0/0 and put the port
status “ON” and also type IP Address as 192.168.2.1 and subnet mask as 255.255.255.0.
53 | P a g e
Similarly, in case of FastEthernet 1/0 put the port status “ON” and type IP Address as
192.168.3.1 and subnet mask as 255.255.255.0. For FastEthernet 6/0 type IP Address
as 192.168.1.1.
54 | P a g e
Fig 7.8 PC0 Command Prompt
55 | P a g e
Fig 7.10 Commands Executing
56 | P a g e
Experiment – 8
import
java.io.IOException;
import
java.net.InetAddress;
import java.net.Socket;
57 | P a g e
Experiment – 9
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.Socket;
58 | P a g e
FileOutputStream fos = new FileOutputStream("s.pdf");
BufferedOutputStream bos = new BufferedOutputStream(fos);
int bytesRead = is.read(mybytearray, 0, mybytearray.length);
bos.write(mybytearray, 0, bytesRead);
bos.close();
sock.close();
}
}
59 | P a g e
Experiment – 10
import java.net.*;
import java.io.*;
public class client
{
public static void main(String args[])throws Exception
{
byte b[]=new byte[1024];
FileInputStream f=new FileInputStream("D:/raj.txt");
DatagramSocket dsoc=new DatagramSocket(2000);
int i=0;
while(f.available()!=0)
{
b[i]=(byte)f.read();
i++;
}
f.close();
dsoc.send(new DatagramPacket(b,i,InetAddress.getLocalHost(),1000));
}
import java.net.*;
import java.io.*;
public class server
{
public static void main(String args[])throws IOException
{
byte b[]=new byte[3072];
DatagramSocket dsoc=new DatagramSocket(1000);
FileOutputStream f=new FileOutputStream("D:/nandha.txt");
while(true)
{
DatagramPacket dp=new DatagramPacket(b,b.length);
60 | P a g e
dsoc.receive(dp);
System.out.println(newString(dp.getData(),0,dp.getLength()));
}
}
61 | P a g e
MAHARAJA SURAJMAL INSTITUTE OF
TECHNOLOGY
PRACTICAL FILE
Introduction
Cisco Packet Tracer is an innovative network simulation and visualization tool. This free
software helps you to practice your network configuration and troubleshooting skills via your
desktop computer or an Android or iOS based mobile device. Packet Tracer is available for
both the Linux and Windows desktop environments.
With Packet Tracer you can choose to build a network from scratch, use a pre-built sample
network, or complete classroom lab assignments. Packet Tracer allows you to easily explore
how data traverses your network. Packet Tracer provides an easy way to design and build
networks of varying sizes without expensive lab equipment.
Packet Tracer User Interface
When you open Packet Tracer, by default you will be presented with the following interface:
1|Page
This initial interface contains ten components which are as follows:
This bar provides shortcut icons to the File and Edit menu
commands. This bar also provides buttons for Copy,
Paste, Undo, Redo, Zoom, the Drawing Palette, and the
2 Main Tool Bar Custom Devices Dialog. On the right, you will also find
the Network Information button, which you can use to
enter a description for the current network (or any text
you wish to include).
2|Page
This box is where you choose devices and connections to
Network
7 put into the workspace. It contains the Device-Type
Component Box
Selection Box and the Device-Specific Selection Box.
3|Page
Cisco 2811: This ISR comes with two Fast Ethernet ports, four WIC slots, and a dual slot for
AIM.
Cisco 2901: This router has two Gigabit Ethernet ports, four WIC slots, and two Digital Signal
Processor (DSP) slots. This router uses Cisco IOS Version 15.
Cisco 2911: This router has three Gigabit Ethernet ports and all the other features of the
previous router. It runs on IOS Version 15.
Generic Router-PT: This is a custom router running on Cisco IOS. It contains 10 slots and
has separate modules with a naming convention beginning with PT.
SWITCHES
A switch, also called a multiport bridge, connects more than two end devices together. Each
switch port is a collision domain.
The following switches are available in Packet Tracer:
Cisco 2950-24: This managed switch comes with 24 Fast Ethernet ports.
Cisco 2950T-24: This switch is a member of the Catalyst 2590 Intelligent Switch family and
has two Gigabit Ethernet ports in addition to the 24 Fast Ethernet ports.
Cisco 2960-24TT: This is another 24-port switch; the previous switch has Gigabit Interface
Converter (GBIC) for Gigabit Ethernet ports, whereas this switch has Small Form-factor
Pluggable (SFP) modules for the same.
Cisco 3560-24PS: This switch is different from the others because it is a layer 3 switch that
can be used to perform routing in addition to switching. The PS suffix implies support for
Power over Ethernet (PoE), which can be used to power up IP phones without using power
adapters.
Bridge PT: This is a device used to segment a NETWORK and it has only two ports (which
is why it is a bridge; if it had more, it'd be called a switch).
Generic Switch PT: This is a Packet-Tracer-designed switch running on Cisco IOS. This is
only customizable switch with 10 slots and several modules.
CONNECTORS
4|Page
straight through PC, Server, Laptop, or
Printer to Switch
PC, Server, Laptop, or
Printer to Hub
PC, Server, Laptop, or
Printer to Modem
PC, Server, Laptop, or
Printer to Cloud
Router to Switch
Router to Hub
Router to Modem
Router to cloud
Crossover PC, Server, Laptop, or
printer to PC
PC, Server, Laptop, or
printer to Server PC, Server,
Laptop, or printer to Laptop
PC, Server, Laptop, or
printer to Printer
Switch to Hub
Switch to Switch
Hub to Hub
Router w/o Serial to Router
PC to PC
Fiber All with fiber ports
5|Page
Coaxial Cloud to Cable Modem
Cable Modem to Co-Ax
Splitter (hub)
Co-Ax Splitter to TV
Cable Modem to TV
Cloud to TV
TV to TV
Serial DCE Router to Router Cloud to
Router
Console PC/Laptop/Generic to
Router/Switch
6|Page
Fig 1.2 Packet Tracer User Profile
Algorithm Settings
The Algorithms Settings dialog allows the user to make configurations that are otherwise
not available in IOS. It also allows tweaking of algorithm settings to make visualization of
certain algorithm/protocol behaviours more easily viewable.
CBAC Half-Open Session Multiplier: If the number of half-open CBAC sessions multiplied
by this number exceeds the configured max half-open session count, new sessions would not
be opened.
TCP Maximum Number of Connections: If the number of connections in SYN-RECEIVED
state exceeds this number, any new connections would be rejected.
TCP Maximum Number of Opened Sessions: If the number of connections exceeds this
number, any new connections would be rejected.
TCP Maximum Retransmission Timeout in Milliseconds: If a TCP connection does not
receive an acknowledgement to a segment it transmitted in this number, it would retransmit
the segment.
Switching Storm Control Multiplier: If the bandwidth percentage of broadcast frames used
multiplied by this number exceeds the configured threshold, the broadcast frame would be
dropped.
7|Page
Fig 1.3 Packet Tracer Algorithm Settings
Saving a PKZ
Packet Tracer allows you to save your topology (PKT) as well as any custom device icons
and backgrounds that you applied to on the Logical Workspace and Physical Workspace to a
save file called a PKZ. A PKZ is able to retain any external files you add in a single save file,
which allows for portability and compactness from computer to computer. To create a PKZ,
go to File > Save as Pkz. Enter a file name for the PKZ and click on Save. In the Pkz Select
Files dialog, you will be able to add and remove files that you want to save along with PKT.
To add a file, click on the Add button and browse to the file you want to add then click
Open. To remove a file, select the file from the list then click Remove. Once you are done
adding and removing files, click OK to create the PKZ file.
8|Page
Experiment – 2
We need to perform some initial configurations on router before it can be used for routing.
Cisco IOS supports various command modes, among those followings are the main command
modes.
User EXEC Mode
Privileged EXEC Mode
Global Configuration Mode
Interface Configuration Mode
Setup Mode
You need to execute specific commands to navigate from one mode to another.
9|Page
Global Config Modify From privileged Router(config)#
configuration that EXEC, enter
affect the system as configure terminal.
a whole.
Interface Config Modify the From global mode, Router(config-if)#
operation of an enter interface type
interface. number.
Setup Create the initial From privileged . Prompted dialog
configuration. EXEC mode, enter
command setup.
User Exec mode => Privileged Exec mode => Global Configuration mode => Interface
Configuration mode => Sub Interface Configuration mode
Router will enter in setup mode only if it fails to load a valid running configuration.
10 | P a g e
Step 2. Click on the router and access CLI prompt of the router.
Step 3. Enter the following commands to configure, change hostname and secure the router
with a password.
configure terminal : Enters global configuration mode, when using the console port.
Router> enable
Router# configure terminal
Router(config)#
Command Description
11 | P a g e
Step 4. Return to the console mode by using the exit command.
Router(config-line) #exit
Router(config) #exit
Router #exit
OUTPUT :
After executing the above commands. Now your router (Lab1) is secured with a password.
12 | P a g e
Fig.2.4 Router Secured
13 | P a g e
Experiment – 3
Bus Topology:
Bus topology uses one main cable to which all nodes are directly connected. The main cable
acts as a backbone for the network. One of the computers in a network typically acts s the
computer server.
Advantage of bus topology is that it is easy to connect a computer or peripheral device. The
second advantage is that the cable requirements are relatively small, resulting in lower cost.
This type of topology is not suitable for large networks.
Steps as follows:
Step 1: Launch the packet tracer
Step 2: Build the Topology
First select three switches, three clients and connect them by FastEthernet wires.
Configure PC1
Click on PC1. Then configure it as follows:
h. Click on the Desktop tab.
i. Click on the IP Configuration Icon.
j. Click on the IP Address dialog box.
k. Type in 192.168.1.2 as the IP address and press enter.
l. A default value of 255.255.255.0 should appear in the Subnet Mask.
m. Type in 192.168.1.1 as the default gateway address.
15 | P a g e
Fig 3.3 IP Configuration of PC1
Configure PC2
Click on PC2. Then configure it as follows:
h. Click on the Desktop tab.
i. Click on the IP Configuration Icon.
j. Click on the IP Address dialog box.
k. Type in 192.168.1.3 as the IP address and press enter.
l. A default value of 255.255.255.0 should appear in the Subnet Mask.
m. Type in 192.168.1.1 as the default gateway address.
16 | P a g e
Fig 3.4 IP Configuration of PC2
17 | P a g e
Fig 3.5 Message Transferred in Realtime Mode
Star Topology:
In star topology, each computer is connected to a central hub using a point-to-point connection.
The central hub can be a server that manages the network, or it can be a much simpler device
that only makes the connections between computers over the network possible.
Advantage of star topology is that it is easy to add new nodes to the network.
Steps as follows:
Step 1: Launch the packet tracer
Step 2: Build the Topology
First select a switch, 4 clients and connect them by FastEthernet wires.
18 | P a g e
Fig 3.6 Star Topology
19 | P a g e
Fig 3.7 IP Configuration of PC0
Configure PC1
Click on PC1. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Then click on the IP Address dialog box.
d. Type in 192.168.1.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC2
Click on PC2. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Then click on the IP Address dialog box.
d. Type in 192.168.1.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC3
20 | P a g e
Click on PC3. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Then click on the IP Address dialog box.
d. Type in 192.168.1.4 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
21 | P a g e
Experiment – 4
• IP address
• net mask
The Dynamic Host Configuration Protocol (DHCP) provides all the above functionalities of
BOOTP alongwith static and dynamic address allocation that can be manual or automatic.
1. Select one router, switch and number of clients for connection setup. And connect them
through fast Ethernet wire with each other.
22 | P a g e
2. Check the properties of each client by going in there config window after selecting DHCP
other than STATIC. It will return unable to connect. Because router is not set up.
R1#config t
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastethernet 1/0
R1(config-if)#ip address 192.168.1.0 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
23 | P a g e
R1(dhcp-config)#default-router 192.168.1.1
R1(dhcp-config)#exit
4. Now, Click on any of the PC > Desktop > IP configuration > Choose DHCP.
24 | P a g e
Experiment – 5
When a new machine is setup or any machine which don’t have memory to store IP address,
needs an IP address for its own use. So, the machine sends a RARP broadcast packet which
contains its own MAC address in both sender and receiver hardware address field.
25 | P a g e
Fig 5.1 Network Topology (ARP)
Step 3: Configure the End Devices:
Configure PC5
Click on PC5. Then configure it as follows:
m. Click on the Desktop tab.
n. Click on the IP Configuration Icon.
o. Click on the IP Address dialog box.
p. Type in 192.168.1.1 as the IP address and press enter.
q. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC1
Click on PC1. Then configure it as follows:
n. Click on the Desktop tab.
o. Click on the IP Configuration Icon.
p. Click on the IP Address dialog box.
q. Type in 192.168.1.2 as the IP address and press enter.
r. A default value of 255.255.255.0 should appear in the Subnet Mask.
Configure PC2
Click on PC2. Then configure it as follows:
n. Click on the Desktop tab.
o. Click on the IP Configuration Icon.
p. Click on the IP Address dialog box.
26 | P a g e
q. Type in 192.168.1.3 as the IP address and press enter.
r. A default value of 255.255.255.0 should appear in the Subnet Mask.
Step 4: ARP configuration:
Click on PC5. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the Command Prompt.
c. Type the following command in the prompt: ping 192.168.1.3 and press enter.
d. If everything is done correctly, then one should see the following output:
27 | P a g e
Fig 5.3 PC2 Command Prompt
e. On typing the arp -a command, we get the IP Address and MAC Address of
PC5.
Step 5: To check whether the PC5 has received back the message, go to Command Prompt of
PC0 and type the command arp -a.
28 | P a g e
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
PC5 N/A 192.168.1.1 255.255.255.0 0.0.0.0
PC1 N/A 192.168.1.2 255.255.255.0 0.0.0.0
PC2 N/A 192.168.1.3 255.255.255.0 0.0.0.0
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. 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.
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 maximise 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.
29 | P a g e
Steps are as follows for static routing:
Step 1: Launch the packet tracer
Step 2: Build the Topology
a. Add network devices and End Devices to the workspace.
Using the device selection box, add the network devices and End Devices to the workspace.
b. Add the physical cabling between devices on the workspace.
Using the device selection box, add the physical cabling between devices on the workspace.
Configure PC1
Click on PC1. Then configure it as follows:
a. Click on the Desktop tab.
30 | P a g e
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.1.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.1.1 as the default gateway address.
Configure PC2
Click on PC2. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.2.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.2.1 as the default gateway address.
Configure PC3
Click on PC3. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.2.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.2.1 as the default gateway address.
Configure PC4
Click on PC4. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.3.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.3.1 as the default gateway address.
31 | P a g e
Configure PC5
Click on PC5. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.3.3 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.3.1 as the default gateway address.
32 | P a g e
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 10.10.0.3 as the IP address.
g. A default value of 255.0.0.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate to 64000ms.
j. Save these settings.
Step 5: Static routing configuration:
Click on the Router0. Then configure it as follows:
a. Click the config tab and then Static tab.
b. Add network address 192.168.3.0
c. Add mask as 255.255.255.0
d. Add next hop as 10.10.0.3
e. Click the add button.
f. Then click the settings tab and then click the save button.
g. The equivalent IOS commands of the above steps are as follows:
Router(config-if)#exit
Router(config)#
Router(config)#ip route 192.168.3.0 255.255.255.0 10.10.0.3
Router(config)#
Click on the Router1. Then configure it as follows:
a. Click the config tab and then Static tab.
b. Add network address 192.168.1.0
c. Add mask as 255.255.255.0
d. Add next hop as 10.10.0.2
e. Click the add button.
f. add network address 192.168.2.0
g. Add mask as 255.255.255.0
h. Add next hop as 10.10.0.2
33 | P a g e
i. Click the add button.
j. Then click the settings tab and then click the save button.
k. The equivalent IOS commands of the above steps are as follows:
Router(config-if)#exit
Router(config)#
Router(config)#ip route 192.168.1.0 255.255.255.0 10.10.0.2
Router(config)#ip route 192.168.2.0 255.255.255.0 10.10.0.2
Router(config)#
Step 6: Check the configuration of the topology:
In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC4 and
check the status at the bottom right corner of packet tracer.
If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
34 | P a g e
Fig 5.8 Simulation mode
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Fa1/0 192.168.2.1 255.255.255.0 N/A
Router0 Se2/0 10.10.0.2 255.0.0.0 N/A
Router1 Fa0/0 192.168.3.1 255.255.255.0 N/A
Router1 Se2/0 10.10.0.3 255.0.0.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.1.3 255.255.255.0 192.168.1.1
PC2 N/A 192.168.2.2 255.255.255.0 192.168.2.1
PC3 N/A 192.168.2.3 255.255.255.0 192.168.2.1
PC4 N/A 192.168.3.2 255.255.255.0 192.168.3.1
PC5 N/A 192.168.3.3 255.255.255.0 192.168.3.1
35 | P a g e
Experiment – 6
36 | P a g e
t. Click on the IP Address dialog box.
u. Type in 192.168.1.2 as the IP address and press enter.
v. A default value of 255.255.255.0 should appear in the Subnet Mask.
w. Type in 192.168.1.1 as the default gateway address.
Configure PC1
Click on PC1. Then configure it as follows:
s. Click on the Desktop tab.
t. Click on the IP Configuration Icon.
u. Click on the IP Address dialog box.
v. Type in 192.168.2.2 as the IP address and press enter.
w. A default value of 255.255.255.0 should appear in the Subnet Mask.
x. Type in 192.168.2.1 as the default gateway address.
Step 4: Configure the Network Devices:
Configure Router0
Click on Router0. Then configure it as follows:
x. Click on config tab and then click on the FastEthernet 0/0.
y. Type in 192.168.1.1 as the IP address.
z. A default value of 255.255.255.0 should appear in the Subnet Mask.
aa. Tick the Port Status as On.
bb. Click on the Serial 2/0.
cc. Type in 10.10.0.2 as the IP address.
dd. A default value of 255.0.0.0 should appear in the Subnet Mask.
ee. Tick the Port Status as On.
ff. Set the clock rate to 64000ms.
gg. Save these settings.
Configure Router1
Click on Router1. Then configure it as follows:
a. Click on config tab and then click on the FastEthernet 0/0.
b. Type in 192.168.2.1 as the IP address.
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
37 | P a g e
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 10.10.0.3 as the IP address.
g. A default value of 255.0.0.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate as not set.
j. Save these settings.
Step 5: RIP routing configuration:
Click on the Router0. Then configure it as follows:
h. Click the config tab and then RIP tab.
i. Add network address 10.0.0.0
j. Add network address 192.168.1.0
k. Then go to settings and click the save button.
l. The equivalent IOS commands of the above steps are as follows:
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 192.168.1.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
Click on the Router1. Then configure it as follows:
a. Click the config tab and then RIP tab.
b. Add network address 10.0.0.0
c. Add network address 192.168.2.0
d. Then go to settings and click the save button.
e. The equivalent IOS commands of the above steps are as follows:
Router>enable
Router#
38 | P a g e
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 192.168.2.0
Router(config-router)#network 10.0.0.0
Router(config-router)#exit
Step 6: Check the configuration of the topology:
g. In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC1 and
check the status at the bottom right corner of packet tracer.
h. If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Se2/0 10.10.0.2 255.0.0.0 N/A
Router1 Fa0/0 192.168.2.1 255.255.255.0 N/A
Router1 Se2/0 10.10.0.3 255.0.0.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.2.2 255.255.255.0 192.168.2.1
39 | P a g e
Open Shortest Path First (OSPF):
OSPF is a link-state routing protocol which is used to find the best path between the source
and the destination router using its own Shortest Path First). OSPF is developed by Internet
Engineering Task Force (IETF) as one of the Interior Gateway Protocol (IGP), i.e, the protocol
which aims at moving the packet within a large autonomous system or routing domain. It is a
network layer protocol which works on the protocol number 89 and uses AD value 110. OSPF
uses multicast address 224.0.0.5 for normal communication and 224.0.0.6 for update to
designated router(DR)/Backup Designated Router (BDR).
Steps are as follows for OSPF:
Step 1: Launch the packet tracer
Step 2: Build the Topology
a. Add network devices and End Devices to the workspace.
Using the device selection box, add the network devices and End Devices to the workspace.
b. Add the physical cabling between devices on the workspace.
Using the device selection box, add the physical cabling between devices on the workspace.
40 | P a g e
c. Click on the IP Address dialog box.
d. Type in 192.168.1.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.1.1 as the default gateway address.
Configure PC1
41 | P a g e
Configure Router1
Click on Router1. Then configure it as follows:
k. Click on config tab and then click on the FastEthernet 0/0.
l. Type in 192.168.2.1 as the IP address.
m. A default value of 255.255.255.0 should appear in the Subnet Mask.
n. Tick the Port Status as On.
o. Click on the Serial 2/0.
p. Type in 10.10.0.3 as the IP address.
q. A default value of 255.0.0.0 should appear in the Subnet Mask.
r. Tick the Port Status as On.
s. Set the clock rate to 64000ms.
t. Click on the Serial 3/0.
u. Type in 12.10.0.3 as the IP address.
v. A default value of 255.0.0.0 should appear in the Subnet Mask.
w. Tick the Port Status as On.
x. Set the clock rate to 64000ms.
y. Save these settings.
Configure Router2
Click on Router1. Then configure it as follows:
a. Click on the config tab and then on the Serial 2/0.
b. Type in 11.10.0.3 as the IP address.
c. A default value of 255.0.0.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Set the clock rate to 64000ms.
f. Click on the Serial 3/0.
g. Type in 12.10.0.2 as the IP address.
h. A default value of 255.0.0.0 should appear in the Subnet Mask.
i. Tick the Port Status as On.
j. Set the clock rate to 64000ms.
k. Save these settings.
42 | P a g e
Step 5: OSPF routing configuration:
Click on the Router0. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 11.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Click on the Router1. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 192.168.2.0 0.0.0.255 area 0
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router(config-router)#network 12.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Click on the Router2. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router ospf 1
Router(config-router)#network 11.0.0.0 0.255.255.255 area 0
Router(config-router)#network 12.0.0.0 0.255.255.255 area 0
Router(config-router)#exit
43 | P a g e
Click the config tab and then goto settings tab and click save button.
Step 6: Check the configuration of the topology:
In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC1 and
check the status at the bottom right corner of packet tracer.
If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
44 | P a g e
Fig 6.5 Simulation Mode
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Se2/0 10.10.0.2 255.0.0.0 N/A
Router0 Se3/0 11.10.0.2 255.0.0.0 N/A
Router1 Fa0/0 192.168.2.1 255.255.255.0 N/A
Router1 Se2/0 10.10.0.3 255.0.0.0 N/A
Router1 Se3/0 12.10.0.3 255.0.0.0 N/A
Router2 Se2/0 11.10.0.3 255.0.0.0 N/A
Router2 Se3/0 12.10.0.2 255.0.0.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.2.2 255.255.255.0 192.168.2.1
45 | P a g e
Fig 6.6 Network Topology (BGP)
Step 3: Configure the End Devices:
Configure PC0
Click on PC0. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.1.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.1.1 as the default gateway address.
Configure PC1
Click on PC1. Then configure it as follows:
a. Click on the Desktop tab.
b. Click on the IP Configuration Icon.
c. Click on the IP Address dialog box.
d. Type in 192.168.3.2 as the IP address and press enter.
e. A default value of 255.255.255.0 should appear in the Subnet Mask.
f. Type in 192.168.3.1 as the default gateway address.
Step 4: Configure the Network Devices:
Configure Router0
46 | P a g e
Click on Router0. Then configure it as follows:
a. Click on config tab and then click on the FastEthernet 0/0.
b. Type in 192.168.1.1 as the IP address.
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 192.168.2.2 as the IP address.
g. A default value of 255.255.255.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate to 64000ms.
j. Save these settings.
Configure Router1
Click on Router1. Then configure it as follows:
a. Click on config tab and then click on the FastEthernet 0/0.
b. Type in 192.168.3.1 as the IP address.
c. A default value of 255.255.255.0 should appear in the Subnet Mask.
d. Tick the Port Status as On.
e. Click on the Serial 2/0.
f. Type in 192.168.2.3 as the IP address.
g. A default value of 255.255.255.0 should appear in the Subnet Mask.
h. Tick the Port Status as On.
i. Set the clock rate as not set.
j. Save these settings.
Step 5: BGP routing configuration:
Click on the Router0. Then configure it as follows:
47 | P a g e
Router(config-router)#network 192.168.2.0
Router(config-router)#neighbor 192.168.2.3 remote-as 200
Router(config-router)#neighbor 192.168.3.2 remote-as 200
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Click on the Router1. Then configure it as follows:
Click the CLI Tab.
Type the following commands:
Router(config-if)#exit
Router(config)#router bgp 200
Router(config-router)#network 192.168.2.0
Router(config-router)#network 192.168.3.0
Router(config-router)#neighbor 192.168.2.2 remote-as 100
Router(config-router)#neighbor 192.168.1.2 remote-as 100
Router(config-router)#exit
Click the config tab and then goto settings tab and click save button.
Step 6: Check the configuration of the topology:
a. In Realtime mode or in Simulation mode, add a simple PDU from PC0 to PC1 and
check the status at the bottom right corner of packet tracer.
b. If the status is given as Successful then the configuration of the topology is correct
otherwise there is some error in the IP configuration of the topology.
48 | P a g e
Fig 6.7 Realtime Mode
Addressing Table
Device Interface IP Address Subnet Mask Def. Gateway
Router0 Fa0/0 192.168.1.1 255.255.255.0 N/A
Router0 Se2/0 192.168.2.2 255.255.255.0 N/A
Router1 Fa0/0 192.168.3.1 255.255.255.0 N/A
Router1 Se2/0 192.168.2.3 255.255.255.0 N/A
PC0 N/A 192.168.1.2 255.255.255.0 192.168.1.1
PC1 N/A 192.168.3.2 255.255.255.0 192.168.3.1
49 | P a g e
Experiment – 7
The file transfer protocol (FTP) is a standard network protocol used to transfer computer files
between client and server on a computer network. FIP is built on a client-server model
architecture and used separate control and data connections between the client and the server.
Steps as follows:
Step 1: Launch the packet tracer
Step 2: Build the Topology
Select one router, two switches, two clients and one server and name that server as FTP.
Select a module in the router, keep it in mind server must be switched OFF while
installing module, and ON it after the installation of the module.
50 | P a g e
Fig 7.2 Network Topology
Step 3: Configure the FTP server
Click on FTP server. Then configure it as follows:
Select Desktop>IP configuration tab. Type the IP Address as 192.168.1.2, subnet mask
as 255.255.255.0 and default gateway as 192.168.1.1.
51 | P a g e
Then click on the services tab and select FTP and provide username and password of
your own choice, also select all the checkboxes provided below and after that click on
ADD.
52 | P a g e
Fig 7.5 PC0 IP Configuration
Click on the router and click on Config tab, select FastEthernet 0/0 and put the port
status “ON” and also type IP Address as 192.168.2.1 and subnet mask as 255.255.255.0.
53 | P a g e
Similarly, in case of FastEthernet 1/0 put the port status “ON” and type IP Address as
192.168.3.1 and subnet mask as 255.255.255.0. For FastEthernet 6/0 type IP Address
as 192.168.1.1.
54 | P a g e
Fig 7.8 PC0 Command Prompt
55 | P a g e
Fig 7.10 Commands Executing
56 | P a g e
Experiment – 8
import
java.io.IOException;
import
java.net.InetAddress;
import java.net.Socket;
57 | P a g e
Experiment – 9
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.Socket;
58 | P a g e
FileOutputStream fos = new FileOutputStream("s.pdf");
BufferedOutputStream bos = new BufferedOutputStream(fos);
int bytesRead = is.read(mybytearray, 0, mybytearray.length);
bos.write(mybytearray, 0, bytesRead);
bos.close();
sock.close();
}
}
59 | P a g e
Experiment – 10
import java.net.*;
import java.io.*;
public class client
{
public static void main(String args[])throws Exception
{
byte b[]=new byte[1024];
FileInputStream f=new FileInputStream("D:/raj.txt");
DatagramSocket dsoc=new DatagramSocket(2000);
int i=0;
while(f.available()!=0)
{
b[i]=(byte)f.read();
i++;
}
f.close();
dsoc.send(new DatagramPacket(b,i,InetAddress.getLocalHost(),1000));
}
import java.net.*;
import java.io.*;
public class server
{
public static void main(String args[])throws IOException
{
byte b[]=new byte[3072];
DatagramSocket dsoc=new DatagramSocket(1000);
FileOutputStream f=new FileOutputStream("D:/nandha.txt");
while(true)
{
DatagramPacket dp=new DatagramPacket(b,b.length);
60 | P a g e
dsoc.receive(dp);
System.out.println(newString(dp.getData(),0,dp.getLength()));
}
}
61 | P a g e
MAHARAJA SURAJMAL INSTITUTE OF
TECHNOLOGY
C-4, JANAKPURI, NEW DELHI-110058
1
MAHARAJA SURAJMAL INSTITUTE OF
TECHNOLOGY
C-4, JANAKPURI, NEW DELHI-110058