Вы находитесь на странице: 1из 4

Router modes

Modes Description

Router> User mode

Router# Privileged mode

Router(config)# Global configuration mode

Router(config-if)# Interface mode

Basic IOS Commands

Command Description Syntax

Enable Puts you into privileged mode Router>enable

Disable Takes you from privileged mode back to Router>disable


user mode

Config Terminal Puts you in global configuration mode and Router#config t


change the running-config

Hostname Sets the name of a router Router(config)#hostname R1

Banner Creates a banner for users who log into the Router(config)#banner motd #
router

Enable Password Sets the encrypted enable password Router(config)#enable password

Enable Secret Sets the encrypted enable secret. Router(config)#enable secret


Supersedes the enable password if set

Line Aux Puts in the auxiliary interface configuration Router(config)#line aux 0


mode
Router(config-line)#login

Router(config)# password cisco

Line Console 0 Puts you in the console configuration mode Router(config)#line console 0

Router(config-line)#login

Router(config)# password cisco

Line Vty Puts you in VTY (Telnet) interface Router(config-line)#line vty 0 4


configuration mode
Router(config-line)#login

Router(config)# password cisco

Service Password- Encrypts the user mode and enable Router(config)#service password-
encryption password encryption

Terminal History Changes your history size from the default Router#terminal history size 25
Size of 10 up to 256

Telnet Tests IP connectivity and configures a Telnet [destination ip]


router
Router#telnet 172.16.10.2

Ping Tests IP connectivity Ping [destination ip]

Router#ping 172.16.10.2
Interface Puts you in interface configuration mode for Router(config)#int fa 0/0
Fastethernet 0/0 a fastethernet port

Interface Serial 1 Puts you in configuration mode for interface Router(config)#int serial 1
serial 1 and can be used for show
commands

Ip Address Sets an IP address on an interface Router(config)#ip address


172.16.10.2 255.255.255.0

Bandwidth Sets the bandwidth on a serial interface Router(config-if)#bandwidth 64

Copy Run Start Short for copy running-config, startup- Router#copy run start
config. Places a configuration into NVRAM

Erase Startup Deletes the startup-config Router#erase startup-config

Show Controllers Show the DTE or DCE status of an interface Router#sh controllers s 0
S0

Show History Shows you the last 10 commands entered Router#sh history
by default

Show Interface S Shows the statistics of interface serial 0 Router#sh int s 0


0

Show Run Short for show running-config. Shows the Router#sh run
configuration currently running on the
router

Show Start Short for show startup-config. Shows the Router#sh start
backup configuration stored in NVRAM

Show Terminal Shows you your configured history size Router#sh terminal

Show Version Shows you statistic of the router Router#sh ver

Shutdown Puts an interface in administratively-down Router(config-if)#shutdown


mode

IP Routing Commands

Command Description Syntax

Ip route Creates static and default routes on a Ip route [destination_network] [mask]


router [next_hop_address or exitinterface]
[administrative_distance] [permanent] 

Example: Router(config)#ip route


172.16.20.0 255.255.255.0 172.16.10.2

No ip route Removes a static default rout Router(config)#no ip route 172.16.20.0


255.255.255.0 172.16.10.2

Router RIP Turns on ip rip routing on a router Router(config)#router rip

Network Tells the routing protocol what Router(config-if)#network 172.16.20.0


network to advertise

Router igrp AS Turns on ip igrp routing on a router Router igrp[Autonomous system no.]

Router(config)#router igrp 10

Debug ip rip Sends console messages displaying Router#debug ip rip


information about rip packets being
sent and received on a router interface

Debug ip igrp Provides a summary of the igrp Router#debug ip igrp events


events routing information running on the
network

Debug ip igrp Shows message requests from Router#debug ip igrp transactions


transactions neighbor routes asking for an update
and the broadcast sent from your
router to that neighbor router

Show ip route Displays the ip routing table Router#sh ip route

Show protocols Shows the routed protocols and Router#sh protocols


network addresses configured on each
interface

Show ip Shows the routing protocols and Router#sh ip protocols


protocols timers associated with each routing
protocol configured on a router

Managing Internetwork

Command Description Syntax

Cdp enable Turns on cdp on an individual interface Router#cdp enable

No cdp enable Turns off cdp on an individual interface Router#no cdp enable

Cdp run Turns on cdp on a router Router#cdp run

No cdp run Turns off cdp completely on router Router#no cdp run

Cdp holdtime Changes the holdtime of cdp packets Router(config)#cdp holdtime 240

Cdp timer Changes the cdp update timer Router(config)#cdp timer 90

Clear line Clears a connection connected via telnet to your Router#clear line 2
router

Config-register Tells the router how to boot and to change the Router(config)#config-register
configuration register setting 0x0101

Copy flash tftp Copies a file from flash memory to a tftp host Router# copy flash tftp

Copy run start Copies the running-config file to the startup- Router#copy run start
config file

Copy run tftp Copies the running-config file to a tftp host Router#copy run tftp

Copy tftp flash Copies a file from a tftp host to flash memory Router#copy tftp flash

Copy tftp run Copies a configuration from a tftp host to the Router#copy tftp run
running-config file

Erase startup- Deletes the contents of NVRAM on a router Router#erase startup-config


config

Ip host Creates a host table on a router Ip host[hostname] [ip address]

Example: Router(config)#ip host


router2 172.16.10.2

No ip host Removes a hostname from a host table Router(config)#no ip host


router2 172.16.10.2

Show cdp Displays the cdp timer and holdtime frequencies Router#sh cdp

Show cdp entry Same as show cdp neighbor detail, but does not Router#sh cdp entry
work on a 1900 switch

Show cdp Shows the individual interfaces enabled with cdp Router#sh cdp interface
interface
Show cdp Shows the directly connected neighbors and the Router#sh cdp nei
neighbor details about them

Show cdp Shows the ip address and IOS version and type, Router#sh cdp neighbor detail
neighbor detail and includes all of the information from the show
cdp neighbor command

Show cdp traffic Shows the cdp packets sent and received on a Router#sh cdp traffic
device and any errors

Show flash Shows the files in flash memory Router#sh flash

Show hosts Shows the contents of the host table Router#sh hosts

Show sessions Shows your connections via telnet to remote Router#sh sessions
device

Вам также может понравиться