简友广场想法哲思

华为交换机场景以太网接口操作整理 (下)第十二天

2021-03-18  本文已影响0人  大海的成长记录

1、配置接口速率

  (1)自协商模式下,手动配置接口速率。

  脚本:

  system-view

  interface gigabitethernet 1/0/1

  negotiation auto

  auto speed 1000

  (2)非自协商模式下,配置接口速率。

  脚本:

  system-view

  interface gigabitethernet 1/0/1

  undo negotiation auto

  speed 1000

  注意:GE光接口不支持在自协商模式下手动配置接口速率,插入GE光电模块的GE光接口除外。

2、配置双工模式

  (1)自协商模式下,手动配置双工模式。

  脚本:

  system-view

  interface gigabitethernet 1/0/1

  negotiation auto

  auto duplex full

  (2)非自协商模式下,配置双工模式。

  脚本:

  system-view

  interface gigabitethernet 1/0/1

  undo negotiation auto

  duplex half

3、配置接口切换到三层模式

  接口视图下执行命令undo portswitch,配置接口切换到三层模式。

  脚本:

  system-view

  interface gigabitethernet 1/0/1

  undo portswitch

  ip address 10.10.1.2 255.255.255.0

  缺省情况下,以太网接口处于二层模式。

  使用该命令进行接口的二三层模式切换时,接口下只能存在属性配置信息(如:shutdown、description配置),模式切换功能才可以生效。如果已经有业务配置存在时(如port link-type access),需要先将该接口下的业务配置全部清除再执行该命令。

4、一键清除接口下的配置。

  在系统视图下执行命令clear configuration interface清除GE1/0/1接口下的配置。

  脚本:

  system-view

  clear configuration interface gigabitethernet 1/0/1

  在接口视图下执行命令clear configuration this清除GE1/0/1接口下的配置。

  脚本:

  system-view

  interface gigabitethernet 1/0/1

  clear configuration this

  注意:执行命令一键式清除接口下配置后,接口的状态将被置为shutdown状态。

上一篇 下一篇

猜你喜欢

热点阅读