Configure the router's basic command _ server

Source: Internet
Author: User
Tags sessions
Several basic commands for routers:

Router>enable into privileged mode

Router#disable from privileged mode back to user mode

Router#configure terminal into global configuration mode

Router (config) #interface Ethernet 1 into the Ethernet port with router number 1

Exit return to Upper mode
End returns directly to privileged mode

=========================================================

Attention:

1. CISCO CATALYST (switch), if the user configuration file is not found during initialization, the default settings file is automatically loaded and the switch is initialized to ensure the switch is working properly.

2, CISCO Router (Router) when initializing, if not found "User Configuration" file, the system will automatically enter the "Initialization configuration Mode" (System Configuration Dialog mode, Setup mode, step by the Step config mode), not working!

=========================================================

1, console port (Management Console interface): Distance on the limit, exclusive way. This is generally used when you start to configure.

2, AUX port (Auxiliary management Interface): Can hook modem to achieve remote management, exclusive way.

3, Telnet: Multiple people Remote management (determined by performance, vty line number) is not safe. Post maintenance, remote management login.

=========================================================

Attention:

Switch, router configuration commands are immediately executed after carriage return and take effect immediately. Pay special attention when modifying commands on a running machine.

=========================================================

Router (config) #hostname?
WORD This system ' s network name

To modify the local identity of the current host in configuration mode, for example:
------------------
Router (config) #hostname R11
R11 (config) #
------------------

R11 (config-if) #ip address?
A.B.C.D IP Address
Set the IP address for the current port and enter the port you want to configure before using:
------------------
R11 (config) #interface Ethernet 1
R11 (config-if) #ip address 172.16.1.1 255.255.255.0
------------------

R11>show version
R11#show version to watch iOS versions, equipment working time, related interface list

R11#show Running-config View the currently active configuration, this profile is stored in RAM

R11#show Interfaces Ethernet 1 View Ethernet interface status, working status, etc. ...

=========================================================

R11#reload Reload Router (reboot)

R11#setup manually into Setup configuration mode

R11#show History View History commands (recently used commands)

R11#terminal History Size <0-256> set command buffer size 0: On behalf of not caching

R11#copy running-config Startup-config Save current configuration

Note the concept:

NVRAM: nonvolatile memory, power off information not lost <--User Configuration <--Save Startup-config

RAM: Random memory, blackout information all lost <--currently in effect configuration <--save Running-config

Startup-config: Actively load every time a router or switch is started (by default)

=========================================================

Several commands for setting instructions and passwords:

R11 (config) #banner motd [Char c] ends with a separate line in [Char c], describing how the machine landed

R11 (CONFIG-IF) #description describes interface annotations, which need to be in Port configuration mode

Configure the console port password:
------------------
R11 (config) #line console 0 access to Consolo 0

R11 (config-line) #password Eliuzd set a password of "Eliuzd"

R11 (config-line) #login set Login (login) with password
------------------

To configure the Enable password:
------------------
R11 (config) #enable password Cisco set clear-Text enable password

R11 (config) #enable secret eliuzd Set the Enable password for the ciphertext (precedence over plaintext)

R11 (config) #service password-encryption encryption system all plaintext passwords (weak)
------------------

To configure the Telnet password:
------------------
R11 (config) #line vty 0

R11 (config-line) #password Cisco

R11 (Config-line) #login
------------------

=========================================================

To configure the virtual loopback interface:(Loopback interface defaults to up state)

(config) # below, virtual one port

------------------
R11 (config) #interface loopback 0 To create a loopback interface loopback 0

R11 (config-if) #ip address 192.168.1.1 255.255.255.0 configure its IP addresses

No * Configure reverse operation (Delete configuration)
------------------

=========================================================

Router Dce/dte only exists in WAN

R11#show controllers serial 0 for viewing DCE and DTE Properties, serial 0 router WAN port

The router of DCE needs to be configured with clock frequency

R11 (config-if) #clock rate? Configure the clock frequency of the DCE interface (System-specific frequency)

In general, this does not need to be configured, because DCE devices are in the carrier.

=========================================================

R11#show Interfaces Serial 1
View the port status, the first line indicates

Serial1 is administratively down, line protocol are down
The port is not activated using the no shutdown command

Serial1 is down, line protocol are down
1, the other party does not have no shutdown activation port
2, the line is damaged, the interface does not have any connection cable

Serial1 is up, line protocol are down
1, the other side did not configure the same two-layer protocol, serial interface default ENCAPSULATION:HDLC
2, may not configure the clock frequency
3, may not have the correct configuration three-level address (possible)

Serial1 is up,line protocol are up
Interface works fine

=========================================================

Several commands for viewing CDP information:

R11#show CDP Neighbors View CDP neighbors (excluding IP)

R11#show CDP Neighbors detail View CDP's neighbors (with three-level IP addresses)

R11#show CDP Entry * View the CDP's neighbors (including the three-level IP address) Old command

R1 (config) #no CDP run shutdown CDP protocol in global configuration mode (affects all interfaces)

R1 (CONFIG-IF) #no CDP enable the CDP protocol to be closed under the interface (only affects the specified interface)

R11#clear CDP table clears CDP neighbor tables

R11#show CDP Interface Serial 1 View CDP information for an interface

Note Two tips:

Sending CDP packets every seconds (send CDP packets every 60 seconds)

Holdtime 180 seconds (180 seconds per CDP packet)

=========================================================

R11 (config) #ip host <name> <ip> set a static hostname mapping

R11#show Sessions View the mapped host names that have been set

=========================================================

Telnet *.*.*.* The device that is Telnet, need to set line vty password, if need to enter privileged mode need to configure enable password

Cases:
------------------
Router#telnet 192.168.1.1
------------------

Router#show users view logged on to a local user
Router#show Sessions view outgoing sessions from local Telnet

Router#clear Line * Force interrupt "telnet to local" session
Router#disconnect * Force interrupt "Telnet out" session

=========================================================

The following is just a command to switch the landing router on the switch during the experiment, which can be skipped.

>show hosts display the current host name configuration
>show Sessions Displays the current outgoing Telnet session

>clear Line XXX Clear lines

<ctrl>+<z> return directly to privileged mode
<ctrl>+<shift>+<6> + x

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.