Beruflich Dokumente
Kultur Dokumente
Important Commands
R1#
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#
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#
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
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
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)#
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
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
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
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
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
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
IP Address......................: 200.100.100.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 200.100.100.1
PC>ping 200.100.100.1
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)#
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
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]
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#
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