Cisco router commands for configuration

Cisco router commands for configuration


 

Command

 

Explanation

 

Basic mode changing commands

 

router is used for generic router name and Lab-b for name after change

 

router> enable     

 

 

Move from User to Privilege mode.

Prompt changes from Routername> to routername#

 

router# configure terminal   

 

Changes the routers interface from Privileged mode to Global Configuration mode.

Prompt becomes Routername(config)#

 

router(config)#CRTL-Z

 

Will exit Global configuration mode and return to Privileged mode.

 

router(config)#exit

 

Will exit the level of configuration and drop you down one level or back to privileged mode.

 

router# copy running-config startup-config

 

 

Copies the Running-config (ram) to the Startup-config (nvram). The configuration in NVRAM will be saved when the router is powered off

 

Global Configuration Commands

 

Commands entered here affect the entire router.

 

router(config)#no

 

No followed by any command will negate or reverse the command. To unset or set the opposite behavior of a command.

 

router(config)#hostname Lab-B

 

 

Name the router Lab-B

Name is case sensitive

 

Lab-B(config)#enable secret class   

 

 

Sets the encrypted version of the routers password to “class”

 

Secret password overrides standard password.

 

Lab-B(config)#enable password cisco

 

Should not use - enable secret should be used in its place.

 

Sets standard clear text password for router access.

 

Lab-B(config)#logging synchronous

 

Stops unsolicited system messages from interfering with your typing at the console. When a message appears in your typing it will clear the line and echo the keyboard buffer for you to continue working.

 

Lab-B(config)#ip classless

 

Prior to IOS 11.3, no ip classless was the default behavior for Cisco routers. After 11.3 ip classess is the default.

 

Enables classless IP routing behavior on the router. Affects the way certain routing protocols look up network addresses in the routing table.

 

Lab-B(config)# ip domain-lookup

 

 

Enables DNS lookup entered in global configuration mode

 

Interface Configuration –Fast Ethernet port

 

 

 

Lab-B(config)#interface fastethernet 0/0

 

Interface FastEthernet 0/0 -

Changes the configuration mode from Global to Interface for the FastEthernet (100 Mps)

 

Lab-B(config-if)#ip address 219.17.100.1 255.255.255.0

 

 

Assigns the IP address 219.17.100.1 to the interface. Subnet mask for Class C address.

 

Lab-B(config-if)#description Connected to LAN B

 

Provides a description to an interface.

 

Lab-B(config-if)#no shutdown

 

 

Shutdown is the actual command – no shutdown is the most popular use of the command

 

Enables the interface. By default all interface are shutdown. You must use “no shutdown” to remove the shutdown command

 

Interface Configuration –Serial port

 

 

 

Lab-B(config)#interface serial 0/0/0

 

 

Interface Serial 0/0/0 - Changes the configuration mode from Global to Interface for the Serial port.

 

Lab-B(config-if)#ip address 199.6.13.1 255.255.255.0

 

 

Assigns the IP address 199.6.13.1 to the interface. Subnet mask for Class C address.

 

Lab-B(config-if)#clock rate 56000

 

 

For Serial interfaces the DCE side of the interface cable must have the clock rate set. This controls the speed of the serial connection

 

Lab-B(config-if)#no shutdown

 

 

Enables the interface. By default all interface are shutdown. You must use “no shutdown” to remove the shutdown command

 

Routing – Static and Default

 

Default Route = “gateway of last resort”

 

Lab-B(config)# ip route 192.169.1.0 255.255.255.0 Serial0/0/0

 

Static Routes are used to add a route into the routing table manually. The command “ip route” the network address and subnet mask are standard. In the example the exit interface Serial0/0/0 is where the router will send packets out headed for the network.

It is preferred to use the exit interface unless sending out an Ethernet interface.

 

Lab-B(config)# ip route 192.169.1.0 255.255.255.0 219.17.100.2

 

Static routes for Ethernet interfaces need to use the “next hop” routers IP address instead of exit interface. 219.17.100.2 is the interface’s address of the router the packet is to be sent to.

Exit interface should be used on point-to-point links so that a recursive lookup is not required. The router will have to look up in its routing table what interface to send out a packet headed to 219.17.100.2. This added step takes time and should be avoided when possible.

 

Lab-B(config)#ip route 0.0.0.0 0.0.0.0 Serial0/0/0

 

The route of 0.0.0.0 with a subnet mask of 0.0.0.0 is considered the default route. If a network does not match any other route in the routing table the default route should be used.

Certain routing protocols and routing behaviors may cause packets to be dropped before using the default route.

 

Routing Protocol Configuration – Rip

 

 

 

Lab-B(config)#router rip

 

 

Changes from Global configuration to Router configuration for the RIP protocol.

 

Lab-B(config-router)#network 219.17.100.0

 

 

Defines the networks (directly connected) that RIP will advertise

 

Lab-B(config-router)#network 199.6.13.0

 

 

Defines the networks (directly connected) that RIP will advertise

 

Lab-B(config-router)#passive-interface fastethernet 0/0

 

Disables the sending of routing updates out the specific interface.

 

Lab-B(config-router)#version 2

 

Will set the RIP protocol to send and receive version 2 of RIP which allows for CIDR and VLSM

 

Routing Protocol Configuration – OSPF

 

 

 

Lab-B(config)#router rip

 

 

Changes from Global configuration to Router configuration for the RIP protocol.

 

Lab-B(config-router)#network 219.17.100.0

 

 

Defines the networks (directly connected) that RIP will advertise

 

Lab-B(config-router)#network 199.6.13.0

 

 

Defines the networks (directly connected) that RIP will advertise

 

Lab-B(config-router)#passive-interface fastethernet 0/0

 

Disables the sending of routing updates out the specific interface.

 

Lab-B(config-router)#version 2

 

Will set the RIP protocol to send and receive version 2 of RIP which allows for CIDR and VLSM

 

Configure the line con 0 and line vty 0 4 (telnet)

 

 

 

Lab-B(config)#line con 0

 

 

Changes from Global configuration to Line Console 0. Used for initial configuration of the router from the serial port of a PC. Connected by a Roll-over cable.

 

Lab-B(config-line)#login

 

 

Requires that the password be used to log into the post. Requires “password” command

 

Lab-B(config-line)#password cisco

 

 

When used to “login” assigns the password to be used for a port

 

Lab-B(config-line)#line vty 0 4

 

 

Changes from Global configuration to the 5 (0-4) telnet or virtual terminals configuration.

 

Lab-B(config-line)#login

 

 

Requires that the password be used to log into the post. Requires “password” command

 

Lab-B(config-line)#password cisco

 

 

When used with “login” assigns the password to be used for a port

 

Show Commands

 

 

 

Show Version

 

Displays IOS Version, ROM Bootstrap Program, Location of IOS, CPU, all memory amounts, interfaces and configuration register.

 

** Only command that will display the configuration register **

 

Show running-config

 

Displays the router configuration in RAM.

 

Show startup-config

 

Displays the router configuration stored in NVRAM

 

Command History

 

 

 

router# show history

 

Displays the command buffer history. By default the last 10 commands will be displayed

 

router# terminal history size 50

 

Sets the history buffer to store the last 50 commands.

 

The larger the history the more memory it will consume.

 

router# terminal no history size

 

Resets the buffer to the default size 10

 

router# terminal no history

 

Disables history buffer

 

router# terminal history

 

Enables history buffer

 

History buffer enabled by default

 

 

 

My referral Faucets for making money

Cryptotab – bit coin miner runs in a browser, easy to use, not bad payouts

https://get.cryptobrowser.site/4609908

 

COINPOT – centralized collection wallets for multiple faucets, free exchange between coins.

https://coinpot.co/dashboard

Faucets that use COINPOT

DASH - http://moondash.co.in/?ref=E4BEA954C3A7

Doge -  http://moondoge.co.in/?ref=03ba12ae4324

 Bonus botcoin - http://bonusbitcoin.co/?ref=9A98E701B8D3

Litecoin - http://moonliteco.in/?ref=4d0705618635

Bitcoin cash - http://moonbitcoin.cash/?ref=89D896014596

Bitcoin - http://moonbit.co.in/?ref=52f9f423c09c

 

 

How do you rate this article?


0

0

steverobert
steverobert

network professional and real estate investor


Technical IT Tricks and info
Technical IT Tricks and info

Information on Information Technology and computers.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.