前言

以下内容除基础命令外,仅记录工作中现场设备基础配置,方便新加设备上架前配置,非专业网络工程师,如有错误敬请指点!

常用配置命令

1、system-view 进入系统视图模式

2、sysname xxx 为设备命名xxx

3、display current-configuration 当前配置情况

4、interface GigabitEthernet1/0/1 进入1/0/1接口

5、poe enablb 开机接口poe功能

6、 port link-type Access|Trunk|Hybrid 设置端口访问模式

7、 quit 退出当前视图模式

8、 vlan 9 创建VLAN 9并进入VLAN 9的视图模式

9、 undo vlan 9 删除VLAN 9

10、display vlan 查看当前所有vlan

11、port access vlan 9 在端口模式下将当前端口加入到vlan 9 中

12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中

13、port trunk permit vlan all 允许所有的vlan通过

14、display interface brief 查看所有端口的状态信息

15、undo 已配置命令 删除当前配置过的命令

现场接入交换机配置记录

配置现场接入层交换机《H3C S1》

  • 设置设备名H3C S1

    sysname H3C S1 
  • 创建vlan9到vlan20

    vlan 9 to 20 
  • 配置生成树协议

    stp region-configuration
    region-name JR100
    revision-level 100
    active region-configuration
  • 创建链路聚合端口1

    interface Bridge-Aggregation1
    port link-type trunk
    port trunk permit vlan all
    dhcp snooping trust
  • 设置管理vlan20添加IP10.10.20.10

    interface Vlan-interface20
    ip address 10.10.20.10 255.255.255.0
  • 配置Access接口1,添加vlan17,开启POE以及DHCP功能

    interface GigabitEthernet1/0/1
    port access vlan 17
    stp edged-port
    poe enable
    dhcp snooping binding record 
  • 配置Trunk接口23,允许所有vlan通行,接口加入聚合1

    interface GigabitEthernet1/0/23
    port link-type trunk
    port trunk permit vlan all
    port link-aggregation group 1
    dhcp snooping trust
  • 设置静态路由

    ip route-static 0.0.0.0 0 10.10.10.1
  • 开启ssh功能

    ssh server enable 
  • 配置Console接口

    user-interface aux 0
    authentication-mode password
    set authentication password simple 1999001
    user-role level-15
  • 创建新用户配置ssh功能

    local-user admin2010 
    password simple admin2010
    service-type ssh
    authorization-attribute user-role network-admin
    authorization-attribute user-role network-operator
  • 开启全局DHCP功能

    dhcp enable
  • 批量设置接口2-10信息

    interface range GigabitEthernet 1/0/2 to GigabitEthernet 1/0/10
    port access vlan 17
    stp edged-port
    poe enable
    dhcp snooping binding record 
版权声明 ▶ 本网站名称:网友小宋
▶ 本文链接:https://www.xyzbz.cn/archives/820/
▶ 本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行核实删除。
▶ 转载本站文章需要遵守:商业转载请联系站长,非商业转载请注明出处!!

最后修改:2022 年 12 月 22 日
如果觉得我的文章对你有用,请随意赞赏