Cisco Routing Configuration Statement Rollup

Source: Internet
Author: User

Routers are packet forwarding devices that work in the third layer of the OSI Reference Model-the network layer. Routers implement network interconnection by forwarding packets. Although routers can support a variety of protocols (such as TCP/IP, ipx/spx, AppleTalk, etc.), most routers in China run TCP/IP protocol. Routers typically connect two or more logical ports identified by an IP subnet or Point-to-Point protocol, with at least one physical port.

The router determines the output port and the next hop address based on the network layer address in the packet and the routing table maintained within the router, and overrides the link layer packet header to implement forwarding packets. Routers reflect the current network topology by dynamically maintaining the routing table, and maintain the routing table by exchanging routing and link information with other routers on the network. The router device manufacturer is most famous for Cisco, and here is a summary of common commands for Cisco router configuration, which I hope will help you in learning and applying Cisco routers.

Start interface, assign IP address:

router>
router>enable
router#
router# Configure terminal router
(config) #
Router (config # interface Type Port
router (config-if) # no Shutdown
Router (config-if) # IP address ip-address subnet-mask
Router (config-if) # ^z

To configure the RIP routing protocol: Update once in 30 seconds

Router (config) # router RIP
router (config-if) # network Network-number router 
(config-if) # ^z

Configure IGRP Routing protocol: 90 second update

Router (config) # router igrp as-number 
router (config-if) # network Network-number router 
(config-if) # ^z

Configuring Novell IPX Routing Protocol: Novell RIP update once 60 seconds

Router (config) # IPX routing [node address]
Router (config) # IPX maximum-paths paths 
Router (config) # interface Type Port
Router (config-if) # IPX network Network-number [encapsulation Encapsulation-type] [secondary];
Router (config-if) # ^z

To configure DDR:

Router (config) # dialer-list group-number protocol protocol-type permit[list Acl-number]
Router (config) # interface BRI 0
Router (config-if) # Dialer-group Group-number
Router (config-if) # Dialer Map Protocol-type Next-hop-address name Hostname telphone-number
Router (config-if) # ^z

To configure ISDN:

Router (config) # ISDN Swith-type swith-type <--Configuration ISDN Switch type, China use basic-net3--> router
(config-if) # ^z

Configure Frame Relay:

Router (config-if) # encapsulation Frame-relay [Cisco | ietf]
router (config-if) # frame-relay Lmi-type [ANSI | cisco | q 933A]
Router (config-if) # bandwidth kilobits
Router (config-if) # Frame-relay Invers-arp [Protocol] [DLCI]

Router (config-if) # ^z

To configure standard ACLs:

Router (config) # access-list Access-list-number [Permit | deny] source [Source-mask]
Router (config) # interface Type Port
Router (config-if) # IP access-group access-list-number [in | out]
router (config-if) # ^z

To configure extended ACLs:

Router (config) # access-list Access-list-number [Permit | deny] [PROTOCOL | Protocol-number] Source Source-wildcard [Source-port] Destination Destination-wildcard [Destination-port] [Establish ED]
Router (config) # interface Type Port
router (config-if) # IP access-group access-list-number [in | out]
RO Uter (config-if) # ^z

To configure a named ACL:

Router (config) # IP access-list [standard | extended] acl-name
Router (config [std-| ext-] NaCl) # [Permit | deny] [Ip-access-list-test-conditions]
Router (config [std-| ext-] NaCl) # no [permit | deny] [ip-access-list-test-conditions]
Router (config [std-| ex T] NaCl) # ^z
Router (config) # interface Type Port
router (config-if) # IP access-group [acl-name | 1~199] [in | o UT]
Router (config-if) # ^z

Configure DCE Clock:

router# Show controllers Type Port
Router (confin-if) # clock rate 64000 Router
(config-if) # ^z

To configure the PPP protocol:

Router (config) # username Name password Set-password-here
Router (config) # interface Type Port
router (config-if # Encapsulation PPP
Router (config-if) # PPP Outhentication [CHAP | CHAP PAP | PAP chap | PAP]
router (config-if # PPP pap sent-username Name password Password
router (config-if) # ^z

PAP One-way Authentication Configuration example:

Verification side:

Router-server (config) # username Client password 12345
router-server (config) # interface serial 0
router-server (config-if) # Encapsulation PPP
Router-server (CONFIG-IF) # PPP authentication pap 
router-server (config-if) # ^z

Authenticated party:

Router-client (CONFIG-IF) # Encapsulation PPP
router-client (config-if) # PPP pap sent-username client password 12345< C5/>router-client (config-if) # ^z

Pap bi-directional authentication configuration instance:

Router A:

Routera (config) # username B password 12345
routera (config) # interface serial 0
Routera (config-if) # Encapsulation PPP
Routera (CONFIG-IF) # PPP authentication pap
Routera (config-if) # PPP pap sent-username A Password 54321
routera (config-if) # ^z

Router B:

Routerb (config) # username A password 54321
routerb (config) # interface serial 1
routerb (config-if) # Encapsulation PPP
Routerb (CONFIG-IF) # PPP authentication pap
Routerb (config-if) # PPP pap sent-username B Password 12345
routerb (config-if) # ^z

CHAP one-way authentication Configuration instance:

Verification side:

Router-server (config) # username router-client password 12345 router-server
(config) # interface serial 0
Router-server (CONFIG-IF) # Encapsulation PPP
Router-server (CONFIG-IF) # PPP authentication chap
ROUTER-SERVER (config-if) # ^z

Authenticated party:

Router-client (CONFIG-IF) # Encapsulation PPP
router-client (CONFIG-IF) # PPP authentication chap
Router-client (CONFIG-IF) # PPP chap hostname router-client
router-client (CONFIG-IF) # PPP chap password 12345
Router-client (config-if) # ^z

CHAP Two-way authentication Configuration instance:

Router A:

Routera (config) # username routerb password 12345 routera
(config) # interface serial 0
Routera (config-if) # Encapsulation PPP
Routera (CONFIG-IF) # PPP authentication chap
Routera (CONFIG-IF) # PPP chap hostname Routera
Routera (CONFIG-IF) # PPP chap password 54321
Routera (config-if) # ^z

Router B:

Routerb (config) # username routera password 54321 routerb
(config) # interface serial 1
routerb (config-if) # Encapsulation PPP
Routerb (CONFIG-IF) # PPP authentication chap
ROUTERB (CONFIG-IF) # PPP chap hostname ROUTERB
Routerb (CONFIG-IF) # PPP chap password 12345
Routerb (config-if) # ^z

Telnet use:

routera# Terminal monitor
routera# telnet ip-address [router-name]
routerb# [Exit | logout]
routerb# + + Press
routera# Show sessions
routera# connect-number routera# disconnect ip-address
[Router-name]
routera# Show user
routera# clear line [0 | 1 | 2 | 3 | 4]

Prohibit any telnet to this machine:

Router (config) # line vty 0 4
Router (config-line) # Access-class acl-number router
(config) # ^z

Set host Name:

Router (config) # hostname set-hostname
Router (config) # ^z
Router (config) # ^z

Set User mode password:

Router (config) # line console 0
router (config-line) # login
Router (config-line) # password Set-password
Router (config-line) # ^z

Set Telnet password:

Router (config) # line vty 0 4
Router (config-line) # login
Router (config-line) # password Set-password
router (config-line) # ^z

To set the privileged mode password:

Router (config) # enable password Set-password 
Router (config) # enable secret Set-password router 
(config) # ^z

To encrypt all passwords:

Router (config) # service password-ancryption set-password-here
Router (config) # no service password-ancryption 
Router (config) # ^z

Set Login banner:

Router (config) # banner MOTD separator set-banner-information-here separator 
N

To set the description information for an interface:

Router (config-if) # description Set-port-information-here
Router (config) # ^z

Control of CDP:

Router (config-if) # CDP enable 
router (config-if) # No CDP enable 
Router (config) # CDP run 
Router (config) # no CDP run

Use of Ping:

router# Ping ip-address
router# ping 
Protocol [ip]:[protocol-type] 
Target IP address:ip-address 
Repeat count [5]: 
Datagram size [MB]: 
Timeout in seconds [2]: 
Extended commands [n]:y 
Sweep range of S izes [n]:

Use of Tracke:

router# trace ip-address [Host-name]

To specify the media type for the Cisco 4000 router:

Router (config-if) # Media-type 10BaseT 
Router (config-if) # ^z

To change the router boot order:

Router (config) # boot system flash ios-filename
Router (config) # boot system tftp ios-filename tftp-ip-address
Router (config) # boot system rom
Router (config) # ^z

To modify register values:

Router (config) # Config-register value

To change the register values in the ROM monitor:

> O/R value

Router Password recovery:

> o/R 0x2142  or > Confreg 0x2142 
router> I
router> n
router> enable
router# copy Startup-config running-config
router# Configure terminal
Router (config) # enable secret New-password
Router (config) # config-register 0x2102
Router (config) # ^z router#
copy running-config
startup-config router# Reload

Cold shutdown, then boot and press < ctrl>+ into ROM monitor mode in 60 seconds
Configuration Name-Host Portal:

Router (config) # IP host Set-name [tcp-port-number] ip-address [ip-address 2] ...
Router (config) # ^z

To define a DNS host:

Router (config) # ip name-server server-address [server-address 2] ...
Router (config) # ^z

To disable DNS:

Router (config) # no IP domain-lookup
Router (config) # ^z

Configure Horizontal split:

Router (config-if) # IP Split-horizon
Router (config-if) # no IP split-horizon
router (config-if) # ^z

To configure a static route:

Router (config) # ip route ip-address subnet-mask [next-hop-address | Local-out-port] [distace]

Router (config) # ^z

To configure the default route:

Router (config) # IP defoult-network ip-address 
Router (config) # ip route 0.0.0.0 0.0.0.0 [next-hop-address | Local-out-port] [distace] 
Router (config) # ^z

Other commands:

router# show version router# show Running-config router# show Startup-config router# show Flash router# show interface [T Ype Port] router# show buffers router# Show Protocol router# show Mem router# show stacks router# Show Processes router# Show CDP entry [Device-name] router# shows CDP neighbors router# showed CDP neighbors detail <---Display all neighbors three-level information-> router # show IP router router# show IPX router router# show host router# show IP protocol router# show ip interface Type Port ro uter# Show IPX interface Type Port router# show IPX servers router# show IPX traffic router# show access-lists [Acl-numbe R] router# Show ISDN status router# Watch dialer <--View ISDN dial-up information--> router# Show ISDN active router# show Frame-relay PVC router# Show Frame-relay map router# show Frame-relay lmi router# erase startup-config router# reload router# setup ro uter# copy running-config startup-config router# copy startup-config running-config copy tftp router# running-config r# copy Running-config tFTP router# Debug IPX Routing Activity router# debug IPX SAP router# Debug ISDN q921 router# Debug ISDN q931 router# Debug Dialer router# Debug IP rip router# clear interface Bri [0 | 1 | 2]

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.