CCNA Command Summary

Command Reference:
1.       Configure hostname and password
         Router> enable
         Router# configure terminal
         Router (config)# hostname Openlab
        Openlab (config)# enable secret ccna
        Openlab (config)# service password-encryption
 
2.       Configure IP address in a interface
        Router> enable
        Router# configure terminal
        Router(config)# interface serial 0
        Router(config-if)# ip address 192.168.1.1 255.255.255.0
        Router(config-if)# no shutdown
 
3.       Configure Telnet in a router
                 Router> enable
                 Router# configure terminal       
                 Router (config)# enable secret openlab
                 Router (config)# line vty 0 4
                 Router (config-line)# password openlab
                 Router (config-line)# login
 
4.       Configure Static route in a router
   Router> enable
   Router# configure terminal       
  Router (config)# ip route 192.168.1.0 255.255.255.0 172.16.1.1
    Router (config)# ip route 0.0.0.0 0.0.0.0 172.16.1.1
 
5.       Configure RIP in a router
                  Router> enable
                 Router# configure terminal
                 Router (config)# router rip
                 Router (config-router)# version 2
                 Router (config-router)# network 10.0.0.0
                 Router (config-router)# network 172.16.0.0
                 Router (config-router)# network 192.168.1.0
                 Router (config-router)# no auto-summary
 
6.       Configure EIGRP 100 in a router
                 Router> enable
                 Router# configure terminal
                 Router (config)# router eigrp 100
                 Router (config-router)# network 10.0.0.0
                 Router (config-router)# network 172.16.0.0
                 Router (config-router)# network 192.168.1.0
                 Router (config-router)# no auto-summary
 
7.       Configure OSPF area 0 in a router
       Router> enable
       Router# configure terminal
      Router (config)# router ospf 1
      Router (config-router)# network 10.0.0.0 0.255.255.255 area 0
      Router (config-router)# network 172.16.0.0 0.0.255.255 area 0
      Router (config-router)# network 192.168.1.0 0.0.0.255 area 0
 
8.       Configure VTP in a switch
                 Switch> enable
                 Switch# vlan database
                 Switch (config-vlan)# vtp server / client / transparent
                 Switch (config-vlan)# vtp domain openlab
                 Switch (config-vlan)# vtp pruning enable
                 Switch (config-vlan)# exit
 
9.       Configure Trunk Interface in a switch
                 Switch> enable
                 Switch# configure terminal
                 Switch (config)# interface fa0/24
                 Switch (config-if)# switchport trunk encapsulation dot1q
                 Switch (config-if)# switchport mode trunk
 
10.   Configure VLAN in a switch
                 Switch> enable
                 Switch# vlan database
                 Switch (config-vlan)# vlan 10 name HR
                 Switch (config-vlan)# vlan 20 name Sales
                 Switch (config-vlan)# exit
          
          
11.   Configure Access Interface in a switch
                 Switch> enable
                 Switch# configure terminal
                 Switch (config)# interface range fa0/1 - 23
                 Switch (config-if)# switchport mode access
                 Switch (config-if)# switchport access vlan 10
                 Switch (config-if)# spanning-tree portfast
                 Switch (config-if)# spanning-tree bpduguard enable
 
12.   Configure Standard access-list in a router
                 Router> enable
                 Router# configure terminal
                 Router (config)# access-list 1 permit 192.168.1.0 0.0.0.255
                 Router (config)# access-list 1 permit host 172.16.1.1
                 Router (config)# interface Ethernet 0
                 Router (config-if)# ip access-group 1 in / out
 
13.   Configure Extended access-list in a router
                 Router> enable
                 Router# configure terminal
                 Router (config)# access-list 100 permit ip 192.168.1.0 0.0.0.255 172.16.1.0 0.0.0.0.255
                 Router (config)# access-list 100 permit tcp host 192.168.1.1 host 172.16.1.1 eq www
                 Router (config)# interface Ethernet 0
                 Router (config-if)# ip access-group 100 in / out
 
14.   Configure PPP & CHAP in a router
                 Router> enable
                 Router# configure terminal
                 Router (config)# hostname Left
                 Left (config)# username Right password openlab
                 Left (config)# interface serial 0
                 Left (config-if)# encapsulation ppp
                 Left (config-if)# ip address 192.168.1.1 255.255.255.0
                 Left (config-if)# ppp authentication chap
                 Left (config-if)# no shutdown
          
                 Router> enable
                 Router# configure terminal
                 Router (config)# hostname Right
                 Right (config)# username Left password openlab
                 Right (config)# interface serial 0
                 Right (config-if)# encapsulation ppp
                 Right (config-if)# ip address 192.168.1.2 255.255.255.0
                 Right (config-if)# ppp authentication chap
                 Right (config-if)# no shutdown
 
15.   Configure Frame-relay in a router, Local DLCI=102
                 Router> enable
                 Router# configure terminal
                 Router (config)# interface serial 0
                 Router (config-if)# encapsulation frame-relay
                 Router (config-if)# ip address 192.168.1.1 255.255.255.0
                 Router (config-if)# no frame-relay inverse-arp
                 Router (config-if)# frame-relay lmi-type ansi
                 Router (config-if)# frame-relay map ip 192.168.1.2 102
                 Router (config-if)# no shutdown
 
16.   Configure DDR in a router
                 Router> enable
                 Router# configure terminal
                 Router (config)# hostname Left
                 Left (config)# username Right password openlab
                 Left (config)# interface bri 0
                 Left (config-if)# encapsulation ppp
                 Left (config-if)# isdn switch-type basic-net5
                 Left (config-if)# ip address 192.168.1.1 255.255.255.0
                 Left (config-if)# dialer map ip 192.168.1.2 name Right br 123
                 Left (config-if)# dialer-group 1
                 Left (config-if)# ppp authentication chap
                 Left (config-if)# no shutdown
                 Left (config)# access-list 20 permit 172.16.0.0 0.0.255.255
                 Left (config)# dial-list 1 ip protocol list 20
                 Router> enable
                 Router# configure terminal
                 Router (config)# hostname Right
                 Right (config)# username Right password openlab
                 Right (config)# interface bri 0
                 Right (config-if)# encapsulation ppp
                 Right (config-if)# isdn switch-type basic-net5
                 Right (config-if)# ip address 192.168.1.2 255.255.255.0
                 Right (config-if)# dialer map ip 192.168.1.1 name Right br 321
                 Right (config-if)# dialer-group 1
                 Right (config-if)# ppp authentication chap
                 Right (config-if)# no shutdown
                 Right (config)# access-list 20 permit 10.0.0.0 0.0.0.255
                 Right (config)# dial-list 1 ip protocol list 20
          
 
          
 

你可能感兴趣的:(职场,休闲,CCNA)