Sei sulla pagina 1di 11

Computer Network Lab -1 (CISCO Packet Tracer)

1. Build a peer to peer network between two PCs


Procedure:
Step 1: Choose Network Components:
1. End user devices: PC (2)
2. Ethernet cables (Copper cross over cable for same type of devices)

Step 2: Assign Addresses:


1. Select PC0
Click the device- select Desktop Tab- Select IP configuration- Select Static- Write IP
address- 192.168.1.1
Click on Subnet mask and Packet Tracer automatically select subnet mask 255.255.255.0
2. Select PC1 and do the same. Write IP address as 192.168.1.2

Step 3: Check the connectivity by PING


Go to PC0
Select Command Prompt
Type ping 192.168.1.2
Success!!!!!!

Go to PC1
Select Command Prompt
Type ping 192.168.1.1
Success!!!!!!

Check using sending a packet from PC0 to PC1 and watch is its successful in the realtime
window.

2. Build a peer to peer network between two PCs using a switch


Procedure:
Step 1: Choose Network Components:
1. End user devices: PC (2)
2. A switch
3. Ethernet cables (Copper straight cable between switch and PC)

Step 2: Assign Addresses:


1. Select PC0
Click the device- select Desktop Tab- Select IP configuration- Select Static- Write IP
address- 192.168.1.1
Click on Subnet mask and Packet Tracer automatically select subnet mask 255.255.255.0
2. Select PC1 and do the same. Write IP address as 192.168.1.2
Step 3: Check the connectivity by PING
Go to PC0
Select Command Prompt
Type ping 192.168.1.2
Success!!!!!!

Go to PC1
Select Command Prompt
Type ping 192.168.1.1
Success!!!!!!
Check using sending a packet from PC0 to PC1 and watch is its successful in the realtime
window.

3. Design a LAN with a PC and a server connected by a switch


Step 1: Choose Network Components:
1. End user devices: a PC and a server
2. A switch
3. Ethernet cables (Copper straight cable between switch and PC and switch and
server)
Step 2: Assign Addresses:
1. Select PC0
Click the device- select Desktop Tab- Select IP configuration- Select Static- Write IP
address- 192.168.1.100
Click on Subnet mask and Packet Tracer automatically select subnet mask 255.255.255.0
2. Select Server and do the same. Write IP address as 192.168.1.254

Step 3: Check the connectivity by PING


Go to PC0
Select Command Prompt
Type ping 192.168.1.200
Success!!!!!!
Step4: Prepare the server as FTP server
Go to server, go to Config, select FTP
Give Username and Password
Now select Write/Read/Delete/Rename/List
Add
Now go to PC
Open Command prompt
Write ftp 192.168.1.254
Give username and password and you will be in ftp server
ftp>
Success!!!
4. Build a network using router.
Step 1: Choose Network Components:
1. End user devices: PC (2)
2. A router
3. Ethernet cables (Copper cross over cable between switch and PC)

Step 2: Assign Addresses:

1. Select router. Select CLI (command line interface)


Continue with configuration dialogue? Write “no”
Enter
Router> enable
Router#config t (to enter global configuration mode) now we can configure the router
Router(config)#hostname router0
Router0(config)#enable secret class
Router0(config)#line con 0
Router0(config-line)#password cisco
Router0(config-line)#login
Router0(config-line)#exit
Router0(config)#line vty 0 4 (configure password for virtual terminal line)
Router0(config-line)#password cisco
Router0(config-line)#login
Router0(config-line)#exit
Router0(config)#interface fastEthernet 0/0
Router0(config-if)#ip address 192.168.1.1 255.255.255.0
Router0(config-if)#description Router0 FastEthernet 0/0
Router0(config-if)#no shutdown (to start the interface)

Exit
Router0(config)#interface fastEthernet 0/1
Router0(config-if)#ip address 192.168.2.1 255.255.255.0
Router0(config-if)#description Router 0 fastEthernet 0/1
Router0(config-if)#no shutdown

exit
Router0(config)#exit
Router0#show running-config
Router0#copy running-config startup-config
Destination filename (startuo-config)? Enter

Close CLI window

2. Select PC0
Click the device- select Desktop Tab- Select IP configuration- Select Static- Write IP
address- 192.168.1.10
Click on Subnet mask and Packet Tracer automatically select subnet mask 255.255.255.0
Default Gateway: 192.168.1.1
3. Select PC1 and do the same. Write IP address as 192.168.2.10
Default Gateway: 192.168.2.1

In command prompt of PC0


PC0>ipconfig (to show ip, subnet and gateway address)
PC0>ping 192.168.1.2
To check real time packet movement
Click realtime simulation at the bottom
Click Edit filters- check only ICMP
Take the PDU(packet) and click on PC0 and PC1 to travel from PC0 to PC1
Click on AutoCapture/Play- see the Event list

5. Build a network between two LANs using a router. Each LAN consists
of three PCs and a switch

Step1: Connect the network as shown above. Use straight through cable for connection
between PC to switch and switch to router.
Step2: Configure the router as shown in problem 4.
Step 3: Configure IP address, subnet mask and default Gateway for all the PCs as shown
before. For default gateway, use the IP address of the router’s Ethernet port where the
corresponding LAN’s switch has been connected. For example, for the network, 192.168.1,
the IP address of the left connecting port of the router should be used. For the network
192.168.2, the IP address of the port at right side of the router should be used.
6. Static routing between two different networks using two routers

Step 1: Choose Network Components:


1. End user devices: 4 PCs
2. 2 switches
3. 2 routers

Step 2: Connect all the devices with copper cross over cable

Step 3: Configure IP address, subnet mask and default Gateway for PC1, PC2, PC3 and PC4.
The default gateway should be the IP address of the interface of the router with which the
PC is connected.

Step 4: Configure Router1 and Router2

Assign IP address of Router1


Go to CLI of Router1
Continue with configuration dialogue? Write “no”
Enter
Router> enable
Router#config t
Router(config)#interface fa0/0
Router(config-if)#ip address 192.1.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#interface fa0/1
Router(config-if)#ip address 192.1.3.1 255.255.255.0
Router(config-if)#no shutdown

Assign IP address of Router2


Go to CLI of Router2
Continue with configuration dialogue? Write “no”
Enter
Router> enable
Router#config t
Router(config)#interface fa0/0
Router(config-if)#ip address 192.1.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config)#interface fa0/1
Router(config-if)#ip address 192.1.3.2 255.255.255.0
Router(config-if)#no shutdown

Step 5: Static IP routing

Go to Router1
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 192.1.2.0 255.255.255.0 192.1.3.2
Router(config)#exit

Go to Router2
Router#enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 192.1.1.0 255.255.255.0 192.1.3.1
Router(config)#exit

Step 6:
Check with ping command from PC1 to PC3 and PC4 for connectivity
Check with ping command from PC3 to PC1 and PC2 for connectivity
7. Configure Internet access on Cisco Router

Equipments:

1. Router :2811
2. ISP IP address: 203.1.1.1
3. LAN IP address: 172.16.1.1
4. Console Cable

Connections:
Take Router 2811 as ISP and connect HWIC-2T (The HWIC-2T is a Cisco 2-Port Serial High-Speed
WAN Interface Card, providing 2 serial ports.).

Take another copy of the same router as customer

Take a switch (2950-24)


Connect switch (FastEthernet0/24) to Router customer (FastEthernet0/1) with copper
straight through cable.
Connect Router customer to Router ISP using serial DCE cable (serial0/0 to serial0/0).
Take three generic PCs
Connect the PCs with the switch using copper straight though cable
Take a generic server
Connect ISP router with the server using copper cross over cable
Assign IP address of server in the IP configuration window. Use IP address 8.8.8.8 and
default Gateway as 8.8.8.1
Take another generic PC (PC3) to connect to the Router (customer) connecting with
console cable (connect console cable to RS232 port of the PC and console port of the
router).

Step to configure internet access:

Assign IP on all the routers:

Click on PC3. Go to Desktop and chose Terminal.


Click ok.

Router>enable
Router#conf
Configuring from terminal, memory, or network [terminal]? t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Customer
Customer(config)#int f0/1
Customer(config-if)#ip address 200.1.1.1 255.255.255.0
Customer(config-if)#no shutdown

Customer(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Customer(config-if)#int se0/0/0
Customer(config-if)#ip address 203.1.1.2 255.255.255.0
Customer(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down


Customer(config-if)#

Now go to Router ISP


Go to CLI

Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname ISP
ISP(config)#int se0/0/0
ISP(config-if)#ip address 203.1.1.1 255.255.255.0
ISP(config-if)#no shutdown
ISP(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

ISP(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

ISP(config-if)#int fa0/0
ISP(config-if)#ip address 192.1.1.2 255.255.255.0
ISP(config-if)#no shutdown

ISP(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Configure DHCP server on Router Customer:

Go to PC3 and click Terminal

Customer>enable
Customer#config t
Enter configuration commands, one per line. End with CNTL/Z.
Customer(config)#ip dhcp excluded-address 200.1.1.1 200.1.1.99
Customer(config)#ip dhcp pool Internal-LAN
Customer(dhcp-config)#network 200.1.1.0 255.255.255.0
Customer(dhcp-config)#default-router 200.1.1.1
Customer(dhcp-config)#dns-server 192.1.1.1
Customer(dhcp-config)#exit
Customer(config)#exit
Customer#

Check DHCP IP addresses of PC0, PC1 and PC2:


Go to PC0. Go to Desktop and IP Configuration
Click on DHCP and wait for IP addresses. You will see new IP addresses and default gteway
assigned to this PC
Do the same for PC1 and PC2

Configure default on the Router Customer and Static route from ISP:

Go to PC3 terminal to configure Router Customer

Customer>enable
Customer#config t
Enter configuration commands, one per line. End with CNTL/Z.
Customer(config)#ip route 0.0.0.0 0.0.0.0 203.1.1.1
Customer(config)#exit
Customer#

Go to Router ISP to configure IP route:

ISP>enable
ISP#config t
Enter configuration commands, one per line. End with CNTL/Z.
ISP(config)#ip route 200.1.1.0 255.255.255.0 203.1.1.2
ISP(config)#exit
ISP#

To IP routing from ISP type


ISP#show ip route

Configure Interface inside and outside:

Customer>enable
Customer#config t
Enter configuration commands, one per line. End with CNTL/Z.
Customer(config)#int Fa0/1
Customer(config-if)#ip nat inside
Customer(config-if)#exit
Customer(config)#int Se0/0/0
Customer(config-if)#ip nat outside
Customer(config-if)#exit
Customer(config)#

Create Access list 100 on Router Customer:

Customer(config)#access-list 100 permit ip any any


Customer(config)#

Call Access-list:

Customer(config)#ip nat inside source list 100 interface Se0/0/0 overload


Customer(config)#

Testing and Verify:

From PC1 to web server (192.1.1.1)

C:\> ping 192.1.1.1

Successful ???
Go to Web Browser of PC1
Write 192.1.1.1 in the address and enter. Check if web page is available or not.

Do the same for PC1 and PC2

To see the traffic go to PC3 Terminal and write


Customer#show ip nat translations

Pro Inside global Inside local Outside local Outside global


icmp 203.1.1.2:1024 200.1.1.100:5 192.1.1.1:5 192.1.1.1:1024
icmp 203.1.1.2:1025 200.1.1.100:6 192.1.1.1:6 192.1.1.1:1025
icmp 203.1.1.2:1026 200.1.1.100:7 192.1.1.1:7 192.1.1.1:1026
icmp 203.1.1.2:1027 200.1.1.100:8 192.1.1.1:8 192.1.1.1:1027
icmp 203.1.1.2:1028 200.1.1.102:5 192.1.1.1:5 192.1.1.1:1028
icmp 203.1.1.2:1029 200.1.1.102:6 192.1.1.1:6 192.1.1.1:1029
icmp 203.1.1.2:1030 200.1.1.102:7 192.1.1.1:7 192.1.1.1:1030
icmp 203.1.1.2:1031 200.1.1.102:8 192.1.1.1:8 192.1.1.1:1031
tcp 203.1.1.2:1025 200.1.1.100:1025 192.1.1.1:80 192.1.1.1:80
tcp 203.1.1.2:1026 200.1.1.100:1026 192.1.1.1:80 192.1.1.1:80

Potrebbero piacerti anche