Basic configuration of switch router

Purpose:

(1) Understand several configuration modes of switch routers;

(2) Master the switching methods and common configuration commands between several modes.

 

Experiment requirements:

(1) Complete the conversion of various modes and the use of basic commands on the switch;

(2) Complete the conversion of various modes and the use of basic commands on the router.

 

 

One. Five modes of CLI

 

mode

feature

User mode

Red-Giant>

Privileged mode

Red-Giant#

Global configuration mode

Red-Giant (config)#

Interface configuration mode

Red-Giant (config-if)#

VLAN configuration mode

Red-Giant (config-vlan)#

two. Common commands :

1. In user mode

  Enable: Enter privileged mode.

2. In privileged mode:

  Show interface: Show all port information.

  Show interface: + port type + port number: display the information of a specific port.

  Configure terminal: Enter global mode.

  Write: Save the configuration.

3. In global mode:

  Hostname: Modify the host name.

  Interface: + port type + port number: enter the interface configuration mode.

4. In interface mode:

  Duplex: Set the duplex status of the Ethernet port.

  Speed: Set the working speed of the Ethernet port.

  Description: Add description information for the Ethernet port.

  Shutdown: Shut down the Ethernet port.

  No shutdown: Turn on the Ethernet port.

5. Other:

  Exit: Enter the previous mode.

  End: Enter the privileged mode directly.

  ?: Help.

 

Description of the experiment process

1. Enter privileged mode

Enable in user mode

2. Enter global mode:

In privileged mode: configuer terminal

3. Change the host name:

全局模式下:hostname   + 想要修改成的用户名

4.退回到特权模式下:

全局模式下:exit (返回上一个模式)

5.查看所有端口配置:

特权模式下:show interface

6.进入端口模式:

先进入全局模式,

全局模式下:interface + 端口类型 + 端口号

7.更改端口配置:

更改工作模式:

  端口模式下:duplex + 工作模式

更改工作速率:

  端口模式下:speed  + 速率

为端口增加描述:

  端口模式下:description + 描述语句

8.进入特权模式:

end

9.查看设置的端口信息:

 

show interface fastEthernet + 之前设置过的端口号

10.保存配置:

特权模式下:write

 

 

回答问题

  1. 说明交换机路由器的几种模式。
  • 用户模式:用户可以通过Console口、Telnet会话等连接交换机。默认情况下,第一次访问交换机用户进入的就是用户模式。权限最低,通常只能使用少量查看性质的命令。用户模式标志为">"。
  • 特权模式:在用户模式下,通过输入enable进入特权模式。在特权模式下,除了具体到端口的配置,其他的基本都可以在此模式下完成,我们可以查看交换机的配置信息和调试信息等。特权模式的标志符号位"#"。
  • 全局配置模式:在特权模式下可通过输入configure terminal进入全局配置模式。该配置模式下配置的内容都将影响全局,主要完成全局参数的配置。全局配置模式标志为"(config)#"。
  • 接口配置模式:需要配置具体的内容就需要进入相应的子配置模式。在全局配置模式下输入interface interface-list进入接口配置模式,在该模式下主要完成端口参数的配置。接口配置模式标志为"(config-if)#"。
  • vlan配置模式:在全局配置模式下输入vlan vlan-number即可进入vlan配置模式在该配置模式下可以完成vlan的一些相关配置。vlan配置模式标志为" (config-vlan)#"。

 

 

2.如何配置交换机的默认网关,在哪种配置模式下设置?如何为路由器接口设置IP地址,在哪种配置模式下设置?

Ⅰ.为交换机设置默认网关

  • 在接口模式下进行设置。
  • 具体步骤:

进入全局模式

ip default-gateway  +  网关  进行设置

Ⅱ.为路由器接口配置ip

  • 在接口模式下进行配置
  • 具体步骤

进入接口模式

用ip address  +  ip地址  +  子网掩码  进行设置

 

Guess you like

Origin blog.csdn.net/ldgjzjmzknbn/article/details/108566154