Configuring Cisco switch port configuration chapter of the novice

With you on the back describes how to properly connect the switch today with some configuration fragment to tell you about port configuration. Given the results of the Internet most of the configuration examples are show-run out. It is not conducive to know as a new command configuration process, so I will configure fragment and caveats are noted for a moment, hoping to help the novice to learn how to properly configure the switch as soon as possible.

  Whenever abbreviation degree in the IOS command input does not cause confusion, use configuration commands can use the abbreviated form. For example: Switch> enable, in user mode with command en the beginning of only enable, it can be abbreviated to Switch> en. TAB key can also be used to auto-completion command, such as Switch> en, press the TAB keyboard automatically fill the whole of Switch> enable.

Shortcuts:

1.Ctrl + A: rapidly moving the cursor to the beginning of the entire row
2.Ctrl + E: fast moving the cursor to the end of most of the entire row
3.Esc + B: a reverse word
4.Ctrl + B : Back a character
5.Esc + F: forward one word
6.Ctrl + F: forward a character
7.Ctrl + D: delete a single character
8.Backspace: delete a single character
9.Ctrl + R : re-1 line
10.Ctrl + U: 1 to erase the entire line

11.Ctrl + W: delete a word
12. Ctrl + Z to exit from the global mode to privileged mode
13.Up arrow or Ctrl + P: before the last show entered commands
14.Down arrow or Ctrl + N: displays the command just entered before

Enable password name and a host configuration, the switch can configure two passwords

(a) enable password (enable password), the password in clear text
(ii) enable password (enbale secret), cipher text password to
both ships only configure one of, if both configurations, only the enable password to take effect.
Switch.> / * prompt the user straight mode
Switch.> enable / * enter privileged mode
Switch. # / * privileged mode prompt
Switch. # config terminal / * enter configuration mode
Switch. (config) # / * configuration mode
Switch. (config) # hostname Pconline / * set the host name Pconline
Pconline (config) # enable password PConline / * set the enable password PConline
Pconline (config ) # enable secret network / * set the network password to enable
Pconline (config) # line vty 0 15 / * set the virtual terminal line
Pconline (config-line) # login / * set the login authentication
Pconline (config-line) # password skill / * set up a virtual terminal login password
 
Note: If you do not set up a virtual terminal password is not possible from the remote telnet By default, the remote telnet carried out when you are prompted to set login password. Many novice would think no login can not log in remotely, in fact, no login is the representative is not required to verify the password you can telnet to the switch from a remote, anyone can telnet to this switch is dangerous, do pay attention.

Configure the switch IP address, default gateway, the domain name, the domain name server:

  It should be noted that the information in the IP address setting switch, gateway, domain name is provided for managing the switch, regardless of the switch connected to the network device, or That even if you do not configure the IP information, the network cable inserted into the port, can still work.

Pconline (config) # ip address 192.169.1.1 255.255.255.0 / * set the switch IP address /
PConline (config) # default-IP Gateway 192.169.1.254 / * set the default gateway
Pconline (config) # ip domain- name pconline.com / * set domain
Pconline (config) # ip name- server 200.0.0.1 / * set domain name server

configuration switch port properties:

  The default setting switch port to automatically detect the port speed and duplex state, i.e. Auto-speed, Auto-duplex, generally do not need to be provided for each port. However, according to the Cisco technical white paper, where the information access ports to change a network device, the proposed direct configuration information corresponding to the speed and duplex.

  speed command and can be selected with 10,100 auto, representing 10Mb / s, 100Mb / s auto-negotiation and speed. duplex command can also select full, half and auto, represent the full-duplex, half-duplex and the duplex auto-negotiation state. the description command for describing a particular port name, port special recommendations described:

Suppose now that the speed of access port device 1 is 100Mb / s, full-duplex duplex mode:

to Pconline (config) # interface FastEthernet 0/1 / * enter interface configuration mode 0/1
Pconline (config-if) # speed 100 / * set the port speed is 100Mb / S
to Pconline (config-IF) Full Duplex # / * set the port is full-duplex
Pconline (config- if) # description up_to_mis / * set the port is described as up_to_mis
Pconline (config-IF) # End / * return to privileged mode
Pconline # show interface fastethernet 0/1 / * query the configuration port 0/1

 Configuration Mode switch port:

  the port of the switch the operating mode can generally be divided into three types: Access, Multi, Trunk. port trunk mode for switches and switch, switches and routers, network equipment mostly for cascade mode is also called roads. Access for Multi-access layer is also called an access mode. We first introduce temporary mode and Access Trunk mode, Multi mode since we introduced VLAN settings when the re-introduction together.



   interface range can be unified configuration for a group of ports, if the fast-known port is provided with a port spanning-tree portfast command is connected directly to a PC without Routing switches and hubs, are no longer subjected to the rapid spanning tree port four states, enter the forwarding state, improving the access speed.

Pconline1 (config) # interface range fastethernet 0 / 1-20 / * Configuration of the ports 1-20
Pconline1 (config-if-range) # switchport mode access / * Set the port to access mode
Pconline1 (config-if-range) # spanning-tree portfast / * set 1-20 port for quick port
 
  switches in trunk mode, but in accordance with the requirements if the port belongs to the main road should clearly identify the port belongs to Trunk mode by auto-negotiation:

Pconline1 (config) # interface the FastEthernet 0/24 / * port 24 is configured
Pconline1 (config-if) # switchport mode trunk / * port trunk mode
 
   introduces some basic configuration and precautions port today. Extensive use will be launched in the future Intermediate switch chapter configured VLAN, though they are a few simple commands, but if you want to reach a professional level, it is required to reach the proficient stage.

Reproduced in: https: //www.cnblogs.com/licheng/archive/2008/06/25/1229838.html

Guess you like

Origin blog.csdn.net/weixin_33696106/article/details/92631218