Common commands for Cisco routers (recommended for favorites) and Common commands for Cisco Routers

Source: Internet
Author: User

Common commands for Cisco routers (recommended for favorites) and Common commands for Cisco Routers
Common commands vro commands

1. vro password settings:

Router> enable enter privileged mode router # config terminal enter global configuration mode router (config) # hostname
 
  
Set the vswitch host name router (config) # enable secret xxx set the privileged encryption password router (config) # enable password xxb set the privileged non-password router (config) # line console 0 enter the console port router (config-line) # line vty 0 4 enter the virtual terminal router (config-line) # login requires a password to verify the router (config-line) # password xx set the logon password xxrouter (config) # (Ctrl + z) return to the privileged mode router # exit return to the command
 

2. vro Configuration:

Router (config) # int s0/0 enter the Serail interface router (config-if) # no shutdown to activate the current interface router (config-if) # clock rate 64000 set synchronization clock router (config-if) # ip address
  
  
   
Set ip address router (config-if) # ip address
    
    
     
Second sets the second IProuter (config-if) # int f0/0.1 to enter the sub-interface router (config-subif.1) # ip address
      
      
        Set the sub-interface IProuter (config-subif.1) # encapsulation dot1q
       
         Bind vlan relay protocol router (config) # config-register 0x2142 skip the configuration file router (config) # config-register 0x2102 normal use of the configuration file router # reload reboot
       
      
     
    
   
  
 

3. vro file operations:

Router # copy running-config startup-config save configuration router # copy running-config tftp save configuration to tftprouter # copy startup-config tftp boot configuration saved to tftprouter # copy tftp flash: upload the file to flashrouter # copy tftp startup-config to download the ROM status of the configuration file: ctrl + Break go to ROM monitoring status rommon> confreg 0x2142 skip configuration file rommon> confreg 0x2102 restore configuration file rommon> reset reboot rommon> copy xmodem:
 
  
Flash:
  
   
Transmit the file rommon> IP_ADDRESS = 10.65.1.2 from the console and set the router IPrommon> mask = route 255.0.0 to set the router mask rommon> TFTP_SERVER = 10.65.1.1 to specify the TFTP server IPrommon> TFTP_FILE = Specify the downloaded download rommon> dir flash from tftp: view the Flash content rommon> boot IOS
  
 

4. Static Routing:

Ip route
  
   
   
    
Command Format: router (config) # ip route 2.0.0.0 route 0.0.0 1.1.1.2 static route example router (config) # ip route 0.0.0.0 0.0.0 1.1.1.2 default route example
   
  
 

5. Dynamic Routing:

Router (config) # ip routing start route forwarding router (config) # router rip start the RIP route protocol. Router (config-router) # network
 
  
Set publish route router (config-router) # negihbor
  
   
Point-to-Point frame relay.
  
 

6. Frame Relay command:

Router (config) # frame-relay switching enabling frame relay switching router (config-s0) # encapsulation frame-relay enabling frame relay router (config-s0) # fram-relay lm-type cisco settings management type router (config-s0) # frame-relay intf-type DCE set to DCErouter (config-s0) # frame-relay dlci 16 router (config-s0) # frame-relay local-dlci 20 set virtual circuit number router (config-s0) # frame-relay interface-dlci 16 router (config) # log-adjacency-changes record adjacent changes router (config) # int s0/0.1 point-to-point setting sub-interface point-to-point router # show frame pvc display permanent virtual circuit router # show frame map display ing

7. Basic Access Control List:

router(config)#access-list 
 
   permit|deny 
   
   
    router(config)#interface 
    
                  ;default:deny anyrouter(config-if)#ip access-group 
     
       in|out   ;defaultut
     
    
   
  
 
Example 1: router (config) # access-list 1 deny host 10.65.1.1router (config) # access-list 1 permit anyrouter (config) # int f0/0 router (config-if) # ip access-group 4 in Example 2: router (config) # access-list 4 permit 10.8.1.1router (config) # access-list 4 deny 10.8.1.0 0.0.255router (config) # access-list 4 permit 10.8.0.0 0.0.255.255router (config) # access-list 4 deny 10.0.0.0 0.20.255.255router (config) # access-list 4 permit anyrouter (config) # int f0/1 router (config-if) # ip access-group 4 in extended access control list: access-list
 
  
Permit | deny icmp
   
   
    
[Type] access-list
    
     
Permit | deny tcp
      
      
        [Port] Example 1: router (config) # access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter (config) # access-list 101 permit ip any anyrouter (config) # int s0/0 router (config-if) # ip access-group 101 in Example 2: router (config) # access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80 router (config) # access-list 102 permit ip any anyrouter (config) # interface s0/1 router (config-if) # delete an access control instance table from ip access-group 102 out: router (config) # no Access-list 102 router (config-if) # no ip access-group 101 in vronat nat configuration Router (config-if) # The current ip nat inside interface is specified as the internal interface Router (config-if) # The current ip nat outside interface is specified as the external interface Router (config) # ip nat inside source static [p] <private IP> <public IP> [port] Router (config) # ip nat inside source static 10.65.1.2 60.1.1.1Router (config) # ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80 Router (config) # ip nat pool p1 60.1.1.1 60.1.1.2 0 Route 255.255.0router (config) # ip nat inside source list 1 pool p1Router (config) # ip nat inside destination list 2 pool p2Router (config) # ip nat inside source list 2 interface s0/0 overloadRouter (config) # ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotaryRouter # show ip nat translationrotary parameter indicates rotation, the IP address in the address pool matches the IP address allocated by NAT in turn. The overload parameter is used by PAT to map an internal IP address to a port with a different public IP address. Configure routerport (config) for the external gateway protocol # router bgp 100 routerA (config-router) # network 19.0.0.0routerA (config-router) # neighbor 8.1.1.2 remote-as 200 configure PPP Verification: routeconfig # username
       
         Password
        
          Routeconfig # int s0roupid (config-if) # ppp authentication {chap | pap}
        
       
      
     
    
   
  
 

8. The router sub-interface is encapsulated as 8021Q (Supplement)

Encapsulation dot1q 2 is set to 802.1Q as the Encapsulation type, and 2 is the ID of the sub-interface number. Here is an example. You can set it as needed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.