Sie sind auf Seite 1von 26

Labs

1. Logging into a Cisco Router


2. Router Modes
3. Editing and Help Features
4. Gathering Basic Router Information
5. Setting the Passwords
6. Encrypting your Passwords
7. Setting Router Banners
8. Configuring Router Interfaces
9. Bringing up An Interface
10. Configuring an IP Address on an Interface
11. Serial Interface Commands
12. Setting The Router hostnames
13. Setting interface descriptions
14. Saving You r Configurations
15. Verifying Your Configurations
16. Connecting to the switch and setting the passwords
17. Setting the Switch hostname
18. Configuring the IP address information
19. Configuring Switch Interfaces
20. Configuring Interface Descriptions
21. Verifying IP Connectivity
22. Erasing the Switch and Router Configuration
23. Backing up a Cisco IOS to a TFTP server
24. Backing up a Cisco router configuration using a TFTP server
25. Restoring a Cisco router configuration from a TFTP server
26. Using the Cisco Discovery Pr otocol to gather information about neighbor devices
27. Using Telnet and SSH
28. Configuring Static Routing
29. Verifying Static Routing
30. Configuring and Verifying The Hosts
31. Configuring and verifying Default Routing
32. Configuring and verifying RIP v1 and RIP v2 Routing
33. Configuring and verifying EIGRP Routing
34. Configuring and verifying OSPF Routing
35. Configuration and Verification of Standard IP Access - Lists
36. Configuration and Verification of Extended IP Access - Lists
37. Configuring VLANs and Trunk ports
38. Configuring Inter VLAN Routing
39. Configuring VTP domain
40. Configuring static NAT
41. Configuring Dynamic NAT
42. Configuring NAT Overload or PAT
43. Configuring and Verifying PPP Encapsulation
44. Configuring and verifying PPP Authentication with PAP and CHAP
45. Configuring Frame Relay Switching

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 1


Lab Topology

Important Commands

Router>enable ## To Enter into Privileged mode of Router or Switch ##

Router#configure terminal ## To Enter into Global Configuration mode of Router or Switch ##

Router(config)#hostname R1 ## To Change Hostname to R1 of Router or Switch ##

R1(config)#banner motd $ ## To Configure Welcome Banner of Router or Switch ##


Enter TEXT message. End with the character '$'.
Welcome to Computer Collegiate, Cisco Networking Academy $

R1(config)#enable password cisco ## To enable a privileged mode password ##

R1(config)#enable secret cisco ## To enable a privileged mode secret password ##

R1(config)#exit ## To return back to user mode ##

R1(config)#? # To view help for Commands#


Configure commands:
aaa Authentication, Authorization and Accounting.
hostname Set system's network name
interface Select an interface to configure
ip Global IP configuration subcommands

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 2


ipv6 Global IPv6 configuration commands

R1#show version ## To view router hardware information ##


Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version
12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team
ROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
System returned to ROM by power-on
System image file is "c2800nm-advipservicesk9-mz.124-15.T1.bin"

R1#copy running-config startup-config ## To Save Router Configuration into Startup##


Destination filename [startup-config]?
Building configuration...
[OK]
R1#
R1#show running-config ## To view Router running-configuration
Building configuration...
Current configuration : 1868 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
enable password cisco
!

R1#show startup-config ## To view startup configuration of Router or Switch##


Using 1868 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
enable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0
enable password cisco

R1#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 3


How to Assign IP address to interface?
R1#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 200.100.100.1 255.255.255.0
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
R1(config)#interface serial 0/0/0
R1(config-if)#ip address 202.101.50.1 255.255.255.0
R1(config-if)#no shut

R1(config-if)#description Serial Connection to R2 ## Description of Interfaces

R1#show ip route ## To view Router configuration


Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is not set

C 200.100.100.0/24 is directly connected, FastEthernet0/0

R1#erase startup-config # Erase Router or Switch Configuration #

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 4


To Backup and Restore Configuration Files using TFTP Server

Router>
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 200.100.100.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
************* Backup Method ***************
Router#copy startup-config tftp:
Address or name of remote host []? 200.100.100.10
Destination filename [Router-confg]?
Writing startup-config....!!
[OK - 489 bytes]
489 bytes copied in 3.078 secs (0 bytes/sec)
************* Restore Method ***************
Router#copy tftp: flash:
Address or name of remote host []? 200.100.100.10
Source filename []? Router-confg
Destination filename [Router-confg]? FromTFTP-config
Accessing tftp://200.100.100.10/Router-confg...
Loading Router-confg from 200.100.100.10: !
[OK - 489 bytes]
489 bytes copied in 0.031 secs (15774 bytes/sec)
Router#show flash:
System flash directory:
File Length Name/status
4 489 FromTFTP-config
3 33591768 c1841-advipservicesk9-mz.124-15.T1.bin
2 28282 sigdef-category.xml
1 227537 sigdef-default.xml
[33848076 bytes used, 30168308 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
Router#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 5


How to Configure Telnet and SSH Server?

Telnet Configuration
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password cisco
Router(config)#interface f
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 202.101.50.1 255.255.255.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#line vty 0 4
Router(config-line)#password ccna
Router(config-line)#login
Router(config-line)#^Z
Router#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
Router#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 6


SSH Configuration
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname SSH-SERVER
SSH-SERVER(config)#interface f
SSH-SERVER(config)#enable password cisco
SSH-SERVER(config)#interface fastEthernet 0/0
SSH-SERVER(config-if)#ip address 200.100.100.1 255.255.255.0
SSH-SERVER(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
SSH-SERVER(config-if)#exit
SSH-SERVER(config)#ip domain-name cisco.com
SSH-SERVER(config)#crypto key generate rsa
The name for the keys will be: SSH-SERVER.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...[OK]
*Mar 1 0:10:28.827: %SSH-5-ENABLED: SSH 1.99 has been enabled
SSH-SERVER(config)#line vty 0 4
SSH-SERVER(config-line)#password ccna
SSH-SERVER(config-line)#transport input ssh
SSH-SERVER(config-line)#login
SSH-SERVER(config-line)#exit
SSH-SERVER(config)#username king password king
SSH-SERVER(config)#^Z
SSH-SERVER#
%SYS-5-CONFIG_I: Configured from console by console
SSH-SERVER#wr
Building configuration...
[OK]
SSH-SERVER#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 7


How to configure Static Routing?

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 200.100.100.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface serial 0/0/0
R1(config-if)#ip addr 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R1(config-if)#exit
R1(config)#ip route 202.101.50.0 255.255.255.0 192.168.1.2
R1(config)#
R1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0/0
C 200.100.100.0/24 is directly connected, FastEthernet0/0
S 202.101.50.0/24 [1/0] via 192.168.1.2

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 8


R1#

Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 202.101.50.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface serial 0/0/0
R2(config-if)#ip addr 192.168.1.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#ip route 200.100.100.0 255.255.255.0 192.168.1.1
R2(config)#
R2#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0/0
S 200.100.100.0/24 [1/0] via 192.168.1.1
C 202.101.50.0/24 is directly connected, FastEthernet0/0
R2#
PC>ipconfig

IP Address......................: 200.100.100.10
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 200.100.100.1

PC>ping 202.101.50.1
Pinging 202.101.50.1 with 32 bytes of data:
Reply from 202.101.50.1: bytes=32 time=94ms TTL=254
Reply from 202.101.50.1: bytes=32 time=94ms TTL=254
Reply from 202.101.50.1: bytes=32 time=93ms TTL=254
Reply from 202.101.50.1: bytes=32 time=94ms TTL=254

Ping statistics for 202.101.50.1:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 93ms, Maximum = 94ms, Average = 93ms

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 9


COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 10
Configure RIPv1

Configuration of R1 Configuration of R2

Router>en Router>en
Router#conf t Router#conf t
Router(config)#hostname R1 Router(config)#hostname R2
R1(config)#interface fastEthernet 0/0 R2(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0 R2(config-if)#ip address 200.100.100.1 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#no shutdown
R1(config-if)#int R2(config-if)#exit
R1(config-if)#interface serial 0/0/0 R2(config)#interface serial 0/0/0
R1(config-if)#ip address 202.101.50.1 255.255.255.0 R2(config-if)#ip address 202.101.50.2 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#clock rate 64000
R1(config-if)#exit R2(config-if)#no shutdown
R1(config)# R2(config-if)#exit
R1(config)#router rip R2(config)#
R1(config-router)#ne R2(config)#router rip
R1(config-router)#network 192.168.1.0 R2(config-router)#network 200.100.100.0
R1(config-router)#network 202.101.50.0 R2(config-router)#network 202.101.50.0
R1(config-router)#^Z R2(config-router)#^Z
R1(config)#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 11


Configure RIPv2

Configuration of R1 Configuration of R2

Router>en Router>en
Router#conf t Router#conf t
Router(config)#hostname R1 Router(config)#hostname R2
R1(config)#interface fastEthernet 0/0 R2(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0 R2(config-if)#ip address 200.100.100.1 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#no shutdown
R1(config-if)#int R2(config-if)#exit
R1(config-if)#interface serial 0/0/0 R2(config)#interface serial 0/0/0
R1(config-if)#ip address 202.101.50.1 255.255.255.0 R2(config-if)#ip address 202.101.50.2 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#clock rate 64000
R1(config-if)#exit R2(config-if)#no shutdown
R1(config)# R2(config-if)#exit
R1(config)#router rip R2(config)#
R1(config)#version 2 R2(config)#router rip
R1(config-router)#network 192.168.1.0 R2(config)#version 2
R1(config-router)#network 202.101.50.0 R2(config-router)#network 200.100.100.0
R1(config-router)#^Z R2(config-router)#network 202.101.50.0
R1(config)# R2(config-router)#^Z

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 12


Configure EIGRP

Configuration of R1 Configuration of R2

Router>en Router>en
Router#conf t Router#conf t
Router(config)#hostname R1 Router(config)#hostname R2
R1(config)#interface fastEthernet 0/0 R2(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0 R2(config-if)#ip address 200.100.100.1 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#no shutdown
R1(config-if)#exit R2(config-if)#exit
R1(config)#interface serial 0/0/0 R2(config)#interface serial 0/0/0
R1(config-if)#ip address 202.101.50.1 255.255.255.0 R2(config-if)#ip address 202.101.50.2 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#clock rate 64000
R1(config-if)#exit R2(config-if)#no shutdown
R1(config)# R2(config-if)#exit
R1(config)#router eigrp 555 R2(config)#
R1(config-router)#network 192.168.1.0 R2(config)#router eigrp 555
R1(config-router)#network 202.101.50.0 R2(config-router)#network 200.100.100.0
R1(config-router)#^Z R2(config-router)#network 202.101.50.0
R1(config)# R2(config-router)#^Z

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 13


Configure OSPF

Configuration of R1 Configuration of R2

Router>en Router>en
Router#conf t Router#conf t
Router(config)#hostname R1 Router(config)#hostname R2
R1(config)#interface fastEthernet 0/0 R2(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0 R2(config-if)#ip address 200.100.100.1 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#no shutdown
R1(config-if)#exit R2(config-if)#exit
R1(config)#interface serial 0/0/0 R2(config)#interface serial 0/0/0
R1(config-if)#ip address 202.101.50.1 255.255.255.0 R2(config-if)#ip address 202.101.50.2 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#clock rate 64000
R1(config-if)#exit R2(config-if)#no shutdown
R1(config)# R2(config-if)#exit
R1(config)#router ospf 1 R2(config)#
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0 R2(config)#router ospf 1
R1(config-router)#network 202.101.50.0 0.0.0.255 area 0 R2(config-router)#network 200.100.100.0 0.0.0.255 area 0
R1(config-router)#^Z R2(config-router)#network 202.101.50.0 0.0.0.255 area 0
R1(config)# R2(config-router)#^Z

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 14


VLAN

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname VLAN-SWITCH
VLAN-SWITCH(config)#vlan 10
VLAN-SWITCH(config-vlan)#name students
VLAN-SWITCH(config-vlan)#exit
VLAN-SWITCH(config)#vlan 20
VLAN-SWITCH(config-vlan)#name staff
VLAN-SWITCH(config-vlan)#exit
VLAN-SWITCH(config)#vlan 30
VLAN-SWITCH(config-vlan)#name servers
VLAN-SWITCH(config-vlan)#exit
VLAN-SWITCH(config)#interface range fastEthernet 0/1-10
VLAN-SWITCH(config-if-range)#switchport mode access
VLAN-SWITCH(config-if-range)#switchport access vlan 10
VLAN-SWITCH(config-if-range)#exit
VLAN-SWITCH(config)#interface range fastEthernet 0/11-20
VLAN-SWITCH(config-if-range)#switchport mode access
VLAN-SWITCH(config-if-range)#switchport access vlan 20
VLAN-SWITCH(config-if-range)#exit
VLAN-SWITCH(config)#interface range fastEthernet 0/21-24
VLAN-SWITCH(config-if-range)#switchport mode access
VLAN-SWITCH(config-if-range)#sw
VLAN-SWITCH(config-if-range)#switchport access vlan 30
VLAN-SWITCH(config-if-range)#exit
VLAN-SWITCH(config)#^Z
VLAN-SWITCH#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gig1/1, Gig1/2
10 students active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10
20 staff active Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20
30 servers active Fa0/21, Fa0/22, Fa0/23, Fa0/24

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 15


VLAN Trunking Protocol

Configuration of Switch-1
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname VLAN-SWITCH
VLAN-SWITCH(config)#vlan 10
VLAN-SWITCH(config-vlan)#name students
VLAN-SWITCH(config-vlan)#exit
VLAN-SWITCH(config)#vlan 20
VLAN-SWITCH(config-vlan)#name staff
VLAN-SWITCH(config-vlan)#exit
VLAN-SWITCH(config)#vlan 30
VLAN-SWITCH(config-vlan)#name servers
VLAN-SWITCH(config-vlan)#exit
VLAN-SWITCH(config)#interface range fastEthernet 0/1-10
VLAN-SWITCH(config-if-range)#switchport mode access
VLAN-SWITCH(config-if-range)#switchport access vlan 10
VLAN-SWITCH(config-if-range)#exit
VLAN-SWITCH(config)#interface range fastEthernet 0/11-20
VLAN-SWITCH(config-if-range)#switchport mode access
VLAN-SWITCH(config-if-range)#switchport access vlan 20
VLAN-SWITCH(config-if-range)#exit
VLAN-SWITCH(config)#interface range fastEthernet 0/21-24
VLAN-SWITCH(config-if-range)#switchport mode access
VLAN-SWITCH(config-if-range)#switchport access vlan 30
VLAN-SWITCH(config-if-range)#exit
VLAN-SWITCH(config)#^Z
Configuration of Switch-2
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname VLAN-SWITCH2
VLAN-SWITCH2(config)#vlan 10
VLAN-SWITCH2(config-vlan)#name students
VLAN-SWITCH2(config-vlan)#exit
VLAN-SWITCH2(config)#interface range fastEthernet 0/1-24
VLAN-SWITCH2(config-if-range)#switchport mode access
VLAN-SWITCH2(config-if-range)#switchport access vlan 10
VLAN-SWITCH2(config-if-range)#exit
VLAN-SWITCH2(config)#interface gigabitEthernet 1/1
VLAN-SWITCH2(config-if)#switchport mode trunk

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 16


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

VTP PROTOCOL

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname vtp-server
vtp-server(config)#vlan 10
vtp-server(config-vlan)#vlan 20
vtp-server(config-vlan)#vlan 30
vtp-server(config-vlan)#exit
vtp-server(config)#int fa 0/1
vtp-server(config-if)#switchport mode trunk
vtp-server(config-if)#exit
vtp-server(config)#vtp domain cisco
Changing VTP domain name from NULL to cisco
vtp-server(config)#vtp mode server
Device mode already VTP SERVER.
vtp-server(config)#vtp password ccna
Setting device VLAN database password to ccna
vtp-server(config)#

Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname vtp-client
vtp-client(config)#vtp mode client
Setting device to VTP CLIENT mode.
vtp-client(config)#vtp domain cisco
Domain name already set to cisco.
vtp-client(config)#vtp password ccna
Setting device VLAN database password to ccna
vtp-client(config)#^Z
vtp-client#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 17
Gig1/2
10 VLAN0010 active
20 VLAN0020 active
30 VLAN0030 active

Standard ACL

Router>en
Router#conf t
Router(config)#hostname Standard-ACL
Standard-ACL(config)#interface fastEthernet 0/0
Standard-ACL(config-if)#ip address 200.100.100.1 255.255.255.0
Standard-ACL(config-if)#no shutdown
Standard-ACL(config-if)#exit
Standard-ACL(config)#ip access-list standard 1
Standard-ACL(config-std-nacl)#den
Standard-ACL(config-std-nacl)#deny host 200.100.100.2
Standard-ACL(config-std-nacl)#permit any
Standard-ACL(config-std-nacl)#exit
Standard-ACL(config)#int fastEthernet 0/0
Standard-ACL(config-if)#ip access-group 1 in
Standard-ACL(config-if)#

PC>ipconfig
IP Address......................: 200.100.100.3
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 200.100.100.1

PC>ping 200.100.100.1

Pinging 200.100.100.1 with 32 bytes of data:


Reply from 200.100.100.1: bytes=32 time=15ms TTL=255
Reply from 200.100.100.1: bytes=32 time=9ms TTL=255
Ping statistics for 200.100.100.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 7ms, Maximum = 15ms, Average = 10ms
PC>
PC>ipconfig

IP Address......................: 200.100.100.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 200.100.100.1

PC>ping 200.100.100.1

Pinging 200.100.100.1 with 32 bytes of data:

Reply from 200.100.100.1: Destination host unreachable.

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 18


Reply from 200.100.100.1: Destination host unreachable.
Reply from 200.100.100.1: Destination host unreachable.
Reply from 200.100.100.1: Destination host unreachable.

Ping statistics for 200.100.100.1:


Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 19


Extended ACL

Router(config)#interface fastEthernet 0/0


Router(config-if)#ip address 10.10.10.1 255.0.0.0
Router(config-if)#no shutdown
Router(config)#interface fastEthernet 0/1
Router(config-if)#ip address 20.20.20.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#access-list 111 deny tcp host 10.10.10.2 host 20.20.20.2 eq www
Router(config)#access-list 111 permit tcp any any
Router(config)#int fa 0/0
Router(config-if)#ip access-group 111 in
Router(config-if)#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 20


Static NAT

Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface serial 0/0/0
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip nat inside source static 10.0.0.10 200.100.100.1
Router(config)#

Packet Tracer PC Command Line 1.0


PC>ping 10.0.0.10
Pinging 10.0.0.10 with 32 bytes of data:

Reply from 200.100.100.1: bytes=32 time=156ms TTL=126


Reply from 200.100.100.1: bytes=32 time=156ms TTL=126
Reply from 200.100.100.1: bytes=32 time=156ms TTL=126

Ping statistics for 10.0.0.10:


Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 156ms, Maximum = 156ms, Average = 156ms

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 21


Dynamic NAT

Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip nat pool dyn_nat 200.100.100.1 200.100.100.10 netmask 255.255.255.0
Router(config)#ip nat inside source list 10 pool dyn_nat
Router(config)#access-list 10 permit 10.0.0.0 0.255.255.255
Router(config)#int fa 0/0
Router(config-if)#ip nat inside
Router(config-if)#int se 0/0/0
Router(config-if)#ip nat outside
Router(config-if)#do wr
Router(config-if)#

PC>ping 10.0.0.20
Reply from 200.100.100.3: bytes=32 time=125ms TTL=126

PC>ping 10.0.0.30
Reply from 200.100.100.1: bytes=32 time=141ms TTL=126

PC>ping 10.0.0.10
Reply from 200.100.100.2: bytes=32 time=125ms TTL=126

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 22


Port Address Translation

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in
Router(config)#interface f
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#interface serial 0/0/0
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#ip nat pool nat_pat 200.100.100.1 200.100.100.1 netmask 255.255.255.0
Router(config)#access-list 1 permit 10.0.0.0 0.255.255.255
Router(config)#ip nat inside source list 1 pool nat_pat overload

Router#debug ip nat
IP NAT debugging is on
Router#
NAT: s=10.0.0.10->200.100.100.1, d=20.0.0.10 [1]

NAT: s=10.0.0.10->200.100.100.1, d=20.0.0.10 [2]

Router#sh ip nat translations


Pro Inside global Inside local Outside local Outside global
icmp 200.100.100.1:2 10.0.0.10:2 20.0.0.10:2 20.0.0.10:2
icmp 200.100.100.1:6 10.0.0.20:6 20.0.0.10:6 20.0.0.10:6
icmp 200.100.100.1:10 10.0.0.30:10 20.0.0.10:10 20.0.0.10:10
icmp 200.100.100.1:14 10.0.0.40:14 20.0.0.10:14 20.0.0.10:14

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 23


Configuration of PPP

Router>en
Router#conf t
Router(config)#hostname Karachi
Karachi(config)#int ser 0/0/0
Karachi(config-if)#ip addr 200.100.100.1 255.255.255.252
Karachi(config-if)#no shut
Karachi(config-if)#encapsulation ppp
Karachi(config-if)#
Karachi(config-if)#^Z
Karachi#

Router>en
Router#conf t
Router(config)#hostname Lahore
Lahore(config)#int ser 0/0/0
Lahore(config-if)#ip addr 200.100.100.2 255.255.255.252
Lahore(config-if)#clock rate 64000
Lahore(config-if)#no shut
Lahore(config)#interface serial 0/0/0
Lahore(config-if)#^Z
Lahore#

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 24


Frame Relay

Router>en
Router#conf t
Router(config)#hostname FRSWITCH
FRSWITCH(config)#frame-relay switching
FRSWITCH(config)#int ser 0/0
FRSWITCH(config-if)#clock rate 64000
FRSWITCH(config-if)#encapsulation frame-relay
FRSWITCH(config-if)#frame-relay intf-type dce
FRSWITCH(config-if)#frame-relay route 102 interface serial 0/1 201
FRSWITCH(config-if)#exit
FRSWITCH(config)#int ser 0/1
FRSWITCH(config-if)#encapsulation frame-relay
FRSWITCH(config-if)#frame-relay intf-type dce
FRSWITCH(config-if)#frame-relay route 201 interface serial 0/0 102
FRSWITCH(config-if)#no shutdown
FRSWITCH(config-if)#
FRSWITCH#show frame-relay pvc
FRSWITCH#sh frame-relay route

Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#int serial 0/1
R1(config-if)#encapsulation frame-relay
R1(config-if)#no frame-relay inverse-arp
R1(config-if)#ip addr 10.1.1.1 255.255.255.252
R1(config-if)#frame-relay map ip 10.1.1.2 102 broadcast
R1(config-if)#frame-relay map ip 10.1.1.1 102
R1(config-if)#no shutdown
R1#ping 10.1.1.2
R1#sh frame-relay pvc
R1#sh frame-relay map
R1#

R2>en
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface serial 0/1
R2(config-if)#ip addr 10.1.1.2 255.255.255.252
R2(config-if)#encapsulation frame-relay
R2(config-if)#no frame-relay inverse-arp
R2(config-if)#frame-relay map ip 10.1.1.1 201 broadcast
R2(config-if)#frame-relay map ip 10.1.1.2 201
R2(config-if)#no shutdown
R2#ping 10.1.1.1

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 25


R2#sh frame-relay pvc
R2#sh frame-relay map

COMPUTER COLLEGI@TE | BBSYDP LAB MANUAL 26

Das könnte Ihnen auch gefallen