Computer Network Lab File
Computer Network Lab File
Objective:
To be familiar with basic networking command
Commands
Ping 8.8.8.8
Netstat -a
Ifconfig :
NSLOOKUP:
Route print –4
tracert prashantshah.info.np
Introduction to Packet tracer
OBJECTIVES:
- To know about packet tracer.
- To know the working environment of packet tracer and how to work with it.
BACKGROUND THEORY:
Packet Tracer is a Cisco Systems cross-platform visual simulation application for creating
network topologies and simulating modern computer networks. Users can use the software to
replicate Cisco router and switch configurations using a simulated command line interface.
Packet Tracer’s user interface is drag-and–drop, allowing users to add and remove simulated
network devices as needed. The interface of cisco packet tracer is shown below in figure.
OBSERVATIONS AND FINDING
Connecting to Router, Switch, PC, Laptop and server and testing their connectivity.
Output:
DISCUSSION:
The basic use of Cisco Packet Tracer is demonstrated in this lab. We also use many tools like
Routers, PC, Server and Switch to know about the working environment of the cisco packet
tracker.
CONCLUSION:
The aim of this lab is to become familiar with Cisco Packet Tracer and its working
environment.
Basic LAN setup
Connection verifications:
Conclusion: Using above procedure we can set up and verify LAN connections
DHCP, DNS and WEB Server setup with Router Setup
Objective: Learning about DHCP ,DNS and WEB server setup simulation in cisco packet tracer
Theory:
• DHCP (Dynamic Host Configuration Protocol): Imagine DHCP as the landlord in a network
apartment building. When a new device (tenant) joins the network, DHCP automatically assigns it
an IP address (apartment number) and other settings it needs to communicate with others. This
saves time and avoids address conflicts.
• DNS (Domain Name System): Think of DNS as the phonebook of the internet. It translates user-
friendly website names (like "[invalid URL removed]") into numerical IP addresses (like
"142.250.184.196") that computers can understand. This makes accessing websites much easier
for people.
• Web Server: A web server is like a storehouse for websites. It stores webpages (products) and
delivers them to users' web browsers (customers) when they request them by entering a website
address (store location). The web server communicates using HTTP (Hypertext Transfer Protocol),
the language of the web.
Procedure:
Router Configuration:
1. Select router and Go to CLI tab
2. Write command en : you will go to router#
3. After that command: config t
4. After that command hostname R1 (as my router name is R1)
5. After that command int f0/0
6. ip add 192.168.2.1 255.255.255.0 and then no sh
7. int f0/1
8. ip add 192.168.1.1 255.255.255.0 and then no sh command
9. Int f0/1(cable connection switch and router i.e. those switch which is not connected to dHcp
server in my case Switch sw1 and Router r1)
10. Ip helper-address 192.168.2.2 (DHCP server ip)
11. Exit -->Open any pc and check using ping command (ping 192.168.1.1)
Pc ip assign verification:
1. Select PC
2. Go to desktop tab
3. Go to ip config tab
4. Click in DHCP
5. IF ip assigned then DNCP is working
6. From desktop tab go to web browser
7. Enter your domain (in my case: Prashantshah.info.np)
8. If you see page then its working
Connection figure:
Conslusion : Applying above procedure we can configure WEB ,DHCP ,DNS server
Static Routing Implementation in Cisco Packet Tracer
Objective:
Static Router Implementation
Static Route Configuration
Theory:
Static routes manually define paths for routers, directing traffic to specific networks. They offer
granular control but require manual updates for topology changes.
Ip assign:
Figure of configurations:
Objective :
• Understanding RIP fundamentals
• Configuring RIP features
• Verifying RIP operation
Theory: IP (Routing Information Protocol) is a distance-vector routing protocol that dynamically exchanges routing
information between routers.
1. Exchange: Routers advertise reachability information to their neighbors, specifying the hop count
(distance) to reach different networks.
2. Update: Routers update their routing tables based on received advertisements, selecting paths with the
lowest hop count.
3. Loop Prevention: RIP uses mechanisms like split horizon and timers to prevent routing loops.
Procedure:
Open Cisco packet tracer
Choose router from Network Device tab
Choose switch from Network Device tab
Choose pc from End Device tab
Choose automatically choose connection type from connection tab
Connect pc to switch from wire selected
(Since I have 2 switch and 4 pc I will connect 2 pc to switch 1 and rest to switch 2)
Connect switch to router (In my case I have 2 router and 1 switch is connected to 1 router)
Connect all router to each other (In My case I have 2 router and connected to each other)
PC ip assign:
• Select pc and got to desktop tab
• After that go to Ip config tab
• Choose static and enter ip manually
• Enter gateway ip manually
Router Config:
• Select router and then Config tab
• Select FastEthernet / GigaEthernet
• Then click in port status ON
• Manually type ip4 address (i.e gateway ip )
• Type gateway in GigaEthernet 0/0 if cable is connected to switch I
• Type router Ip in GigaEthernet 0/1 if cable is connected to another router
Verification:Send simple PDU from pc0 or pc 1 to router1 and repeat for router 2
Figure of Connections:
Objective:
VLAN Creation and Management
Inter-VLAN Routing
Theory:
VLAN setup and inter-VLAN routing:
Segment: Divide your network into logical broadcast domains using VLANs. This isolates traffic and
improves security. (Think: Create separate "neighborhoods" for different departments)
Restrict: Block traffic between VLANs by default. Only allow communication between specific VLANs if
needed, using a router. (Think: Build walls between neighborhoods, with controlled access points)
Route: Configure a router to connect VLANs and provide a path for authorized traffic to flow between
them. (Think: Designate specific gates for controlled movement between neighborhoods)
Procedure:
1. From End Device tab choose 2 or more pc(In my case 2 pc)
2. From Network Device section choose one switch and one router
3. From connections tab choose automatic connection cable / straight through cable
4. Connect pc to switch
5. Connect switch to Router
PC ip config:
1. Choose PC
2. Go to display tab and select ip config
3. For pc 1 : Ip : 192.168.10.2 and gateway : 192.168.10.1
4. Enter Ip and Gateway ip manually
5. Ip must be different from each other (Different IP class)
6. For pc 2 : Ip : 192.168.20.2 and gateway : 192.168.20.1
Switch VLAN Config (for 2 pc and 1 router) :
1. Select switch and go to CLI tab
2. Command: EN /enable
3. Command: Conf t
4. Command: VLAN 10 and then Exit
5. Command VLAN 3 and then Exit
6. Command: int f0/1
7. Command: Switchport access vlan 10
8. Command: Switchport mode access
9. Command : int f0/2
10. Command: switchport access vlan 20
11. Command : Switchport mode access
12. Command: int f 0/3 if fast ethernet connection else int GigaEthernet port value
13. Command: no shutdown
14. Command: switchport access trunk
15. Command: Exit until get into switch
16. Command: copy running-config startup-config
Router Configurations:
1. Select Router and go to cli
2. Enter no
3. Command: Enable
4. Command: conf t
5. Command: int f 0/0 (if used GigabiteEthernet then GigabiteEthernet 0/0)
6. Command: no shutdown
7. Command: Exit
8. Command: int f 0/0.10
9. Command: encapsulation dot1Q 10 (10 is vlan id)
10. Command: ip add 192.168.10.1 255.255.255.0 (assign ip address for vlan 10 and netmask)
11. Commnd :Exit
12. Command: int f 0/0.20
13. Command: encapsulation dot1Q 20 (20 is vlan id)
14. Command: ip add 192.168.20.1 255.255.255.0 (assign ip address for vlan 20 and netmask)
15. Command: Exit till enter router not config
16. Command: show ip route (For verify )
17. Command ping (for verify)
Figure of connections:
Conclusion: Using above procedure we can create vlan and inter routing