Router Switch Command summary

Source: Internet
Author: User

Privileged Mode:enable (en)

Global configuration mode:config terminal (conf t)

interface mode:interface fastethernet module number / port number (int f0/1)

simultaneous access to multiple interfaces int range F0/0–4

Terminate Domain name resolution:CTRL+SHIFT+6

exit to Privileged mode:Crtl+z End

exit to the previous level:exit

CTRL + a cursor to the command line start position

Ctrl+e cursor to the command line end position

Command under Privileged mode

Show version displays the system iOS name and version information

View current configuration information: show running-config (Sh run)

View the configuration information to save: show Startup-config (Shstar)

Save current configuration information:copy running-config startup-config (copy run star) = Write

Delete saved configuration information:erase NVRAM Erasestartup-config

Tracert 192.168.1.1 The process of seeing 192.168.1.1

Restart :Reload

View VLAN:Show VLAN Brief

Global Mode command:

Host XX modifies hostname to XX

The default configuration for the Restore interface is:default interface F0/1

Configure Duplex mode:deplex "full|half|auto"

Configure interface rate: Speed "10|100|100"

Never timeout:

Line con 0

Exec-timeout 0 0

Information synchronization:

Line con 0

Logging Synchronous (Logg SYN)

Disabled DNS Query:no IP domain-lookup

Switch:

View Mac Address table:show mac-address-table

View F0/1 information (including duplex mode and rate):Show int F0/1

Enable routing on layer three switches:IP Routing

View interface mode status: show interface Interface-id switchport

To create a VLAN:

1.vlan Database

VLAN vlan-id [name vlan-name]

Exit

2.conf T

VLAN Vlan-id

Name vlan-name

Exit

Assign Port f0/1 to VLAN 2:

Conf t

int F0/1

Switchport mode access

Switchport Access VLAN 2

Exit

Configure IP for the switch virtual interface :

int VLAN 1

IP Add 192.168.1.1 255.255.255.0

No sh

Configure the default gateway: IP default-gateway 192.168.1.254

Configure the Switch console port password:

Global mode:

Line Console 0

Password Cisco

Login

To configure the privileged mode password:

In the global mode:

Enable password Cisco ( plaintext )/Enablesecret Cisco ( ciphertext )

encrypted plaintext Password:service password-encryption

Configure vty password ;

Line vty 0 4

Password Cisco

Login

with the vty password and enable password set, you can remotely manage the switch via Telnet. Configuring a default gateway for a switch when managing different network segments remotely

Trunk Configuration :

int F0/1

Switchport Trunk Encapsulation dot1q

Switchport mode Trunk

prohibit trunk from transmitting data from a VLAN , remove this vlan:switchport trunk allowed VLAN remove vlan-id

allow trunk to transmit data from a VLAN, add this vlan:switchport trunk allowed VLAN add vlan-id

To configure an Ethernet channel:

Interface Range F0/1–2

Channel-group 1 mode on

View Ethernet Channel Configuration : Show EtherChannel 1 Summary

VTP Configuration:

Create a VTP domain:Switch (config) # VTP domain domain-name

Configure the VTP mode of the switch :switch (config) # VTP mode {server|client|transparent}

Configure VTP password:Switch (config) # VTP password password

Configuring VTP Pruning : Switch (config) # VTP pruning

Configure VTP version:Switch (config) # VTP version 2 ( run version 1 by default )

View VTP configuration information:switch# show VTP status

View VTP password:switch# show VTP password

Switch password recovery:

1. Press the mode key to boot

2. Initialize flash : flash_init

3. Change the Config.text to config.old

Rename Flash:config.text flash:config.old

4. Restart :boot

5. change the profile name back to

Rename Flash:config.old flash:config.text

6. manually load the configuration file

Copy Flash:config.text system:running-config

7. View the configuration and modify

8. Save:WR

Router:

viewing the ARP cache table:show ARP

Clear the ARP cache table:clear Arp-cache

View all interfaces ip:sh IP int Brief

View routing table:show ip route (C- link route,S- static route,s*- default route )

Configure static routes: IP route destination segment subnet mask address (the interface addresses of the next hop router that arrives at the destination network )

Configure default route: IP Route 0.0.0.0 0.0.0.0 address ( next hop )

No IP routing: turn off router routing function, analog switch

Configure IP:

int f0/0

IP Add 10.0.0.10 255.255.255.0

No shut down

Configuring a single-arm route: A package structure that requires the configuration of sub-interfaces , VLANs and IPs

int f0/0.1

Encapsulatation dot1q (vlan-id)

IP add 10.0.0.1 255.255.255.0

int f0/0.2

...

Configuration DHCP:

define IP address pool:Router (config) # ip dhcp pool pool-name

dynamically assigned IP address segment : Router (dhcp-config) # network segment mask

To set the gateway address: Router (dhcp-config) # Default-router gateway address

Configuring for Clients DNS Address:Router (dhcp-config) # dns-server Dns-ip

set the address lease period: Router (dhcp-config) # lease days

reserved statically assigned IP address : Router (dhcp-config) # ip dhcp excluded-address low-address[high-address]

Router Password recovery:

1. Interrupt boot:ctrl+break

2. change the value of the register:confreg0x2142

3. Restart :reset

4. manually load the configuration file:copy startup-confg Running-config

5. View the configuration and modify

6. Value of recovery register:config-register 0x2102

7. Save configuration:copy Run star


Router Switch Command summary

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.