4.2. MAC地址命令¶
4.2.1. set interface gigabit-ethernet static-mac-address¶
4.2.1.1. 命令功能¶
set interface gigabit-ethernet static-mac-address 命令用来配置指定接口的静态MAC地址。
delete interface gigabit-ethernet static-mac-address 命令用来删除配置的指定接口静态MAC地址。
缺省情况下,没有配置静态MAC地址。
4.2.1.2. 命令格式¶
set interface gigabit-ethernet interface-name static-mac-address mac-address [ vlan vlan-id ]
delete interface gigabit-ethernet interface-name static-mac-address mac-address [ vlan vlan-id ]
4.2.1.3. 参数说明¶
interface-name:接口名称。
mac-address:静态MAC地址。取值形式为00:11:22:33:44:55。
vlan-id:VLAN ID,整数形式,取值范围是1~4094。
4.2.1.4. 命令模式¶
配置模式
4.2.1.5. 使用指南¶
无。
4.2.1.6. 配置举例¶
# 配置vlan100下的te-1/1/1口静态MAC地址为00:22:22:22:22:22:
ConnetOS# set interface gigabit-ethernet te-1/1/10 static-mac-address 00:22:22:22:22:22 vlan 100
4.2.2. set forwarding-options mac-aging-time¶
4.2.2.1. 命令功能¶
set forwarding-options mac-aging-time 命令用来配置MAC地址的老化时间。
delete forwarding-options mac-aging-time 命令用来删除配置的MAC地址老化时间,恢复为缺省值。
缺省情况下,MAC地址的老化时间为300s。
4.2.2.2. 命令格式¶
set forwarding-options mac-aging-time aging-time
delete forwarding-options mac-aging-time
4.2.2.3. 参数说明¶
aging-time:MAC地址的老化时间。整数形式,取值范围是60~1000000,单位是秒。
4.2.2.4. 命令模式¶
配置模式
4.2.2.5. 使用指南¶
无