<4f-03-09>sys //进入系统视图模式
[4f-03-09]display current-configuration //在视图模式下查看当前配置信息
[4f-03-09]sysname huawei //修改交换机名字
[4f-03-09]dis ver //查看交换机型号
配置交换机管理地址
[huawei]interface Vlanif 1
[huawei-Vlanif1]ip address ip地址 子网掩码
[huawei-Vlanif1]quit //退出下一模式
[huawei]
创建用户并启用aaa认证
[huawei]aaa
[huawei-aaa]local-user 用户名 password cipher 密码
[huawei-aaa]local-user 用户名 privilege level 3
[huawei-aaa]local-user 用户名 service-type telnet
[huawei-aaa]quit
[huawei]user-interface vty 0 4
[huawei-ui-vty0-4]authentication-mode aaa
[huawei-ui-vty0-4]user privilege level 3
[huawei-ui-vty0-4]quit
[huawei]
配置默认路由
[huawei]ip route-static 0.0.0.0 0.0.0.0 网关
=====================================================================================
一.绑定ip(华为2326-ei)
[4-03-09]ping 183.60.203.17 //ping要绑定的ip地址可以获取它的arp信息
PING 183.60.203.17: 56 data bytes, press CTRL_C to break
Reply from 183.60.203.17: bytes=56 Sequence=1 ttl=128 time=12 ms
[4-03-09]display arp | include 183.60.203.17 //显示要绑定ip的具体信息,mac地址及端口号
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN
------------------------------------------------------------------------------
183.60.203.17 50e5-49ca-271f 18 D-0 Eth0/0/11
------------------------------------------------------------------------------
Total:25 Dynamic:24 Static:0 Interface:1
(华为2326-ei设置方法)
[4-03-09]user-bind static ip-address 183.60.203.17 mac-address 50e5-49ca-271f interface Ethernet0/0/11
[4-03-09]interface Ethernet 0/0/11
[4-03-09-Ethernet0/0/11]arp anti-attack check user-bind enable //开启arp检测
[4-03-09-Ethernet0/0/11]ip source check user-bind enable //开启ip检测
[4-03-09-Ethernet0/0/11]quit
[4-03-09]
(华为2326-si设置方法)
[4-03-09]arp static 183.60.204.124 902b-3420-1df3 vid 1 interface Ethernet0/0/23
[4-03-09]interface Ethernet 0/0/11
[4-03-09-Ethernet0/0/11]broadcast-suppression 5 //开启arp抑制
[4-03-09-Ethernet0/0/11]quit
[4-03-09]
二.解绑ip(华为2326-ei)
[4-03-09]display this //查看ip是否绑定
user-bind static ip-address 183.60.203.17 mac-address 50e5-49ca-271f interface Ethernet0/0/11
4-03-09]undo user-bind static ip-address 183.60.203.17
[4-03-09-Ethernet0/0/11]undo arp anti-attack check user-bind enable //取消arp检测
[4-03-09-Ethernet0/0/11]undo ip source check user-bind enable //取消ip检测
[4-03-09-Ethernet0/0/11]quit
[4-03-09]
三.限速(2326-si不支持)
第一种方式:
[4-03-09]interface Ethernet0/0/1
[4-03-09-Ethernet0/0/1]qos lr inbound cir 10240 cbs 102400 //限速为10240K=10M,102400是突发值,一般突发值是所要限速值的10倍
[4-03-09-Ethernet0/0/1]quit
[4-03-09]
第二种方式:
[4-03-09]interface Ethernet0/0/1
[4-03-09-Ethernet0/0/1]traffic-policy p20m inbound //p20m是定义好的限速策略
[4-03-09-Ethernet0/0/1]quit
[4-03-09]
如果原来有设置限速要先运行undo traffic-policy inbound取消原来的设置再重新设置。
四.查看交换端口流量
[4-03-09]dis int brief
Interface Physical Protocol InUti OutUti inErrors outErrors
Ethernet0/0/1 down -- 0% 0% 0 0 //Ethernet0/0/1是端口号,down是代表没连接或者服务器死机关机,up代表服务器正常连接网络;
Ethernet0/0/2 down -- 0% 0% 0 0 //InUti是交换机进来的流量,相当于服务器出去的流量,反之OutUti就是服务器进来的流量。
Ethernet0/0/3 up -- 0.01% 0.01% 0 0
Ethernet0/0/4 up -- 0% 0.01% 0 0
Ethernet0/0/5 up -- 0.05% 0.01% 0 0
?
[4f-03-09]display current-configuration //在视图模式下查看当前配置信息
[4f-03-09]sysname huawei //修改交换机名字
[4f-03-09]dis ver //查看交换机型号
配置交换机管理地址
[huawei]interface Vlanif 1
[huawei-Vlanif1]ip address ip地址 子网掩码
[huawei-Vlanif1]quit //退出下一模式
[huawei]
创建用户并启用aaa认证
[huawei]aaa
[huawei-aaa]local-user 用户名 password cipher 密码
[huawei-aaa]local-user 用户名 privilege level 3
[huawei-aaa]local-user 用户名 service-type telnet
[huawei-aaa]quit
[huawei]user-interface vty 0 4
[huawei-ui-vty0-4]authentication-mode aaa
[huawei-ui-vty0-4]user privilege level 3
[huawei-ui-vty0-4]quit
[huawei]
配置默认路由
[huawei]ip route-static 0.0.0.0 0.0.0.0 网关
=====================================================================================
一.绑定ip(华为2326-ei)
[4-03-09]ping 183.60.203.17 //ping要绑定的ip地址可以获取它的arp信息
PING 183.60.203.17: 56 data bytes, press CTRL_C to break
Reply from 183.60.203.17: bytes=56 Sequence=1 ttl=128 time=12 ms
[4-03-09]display arp | include 183.60.203.17 //显示要绑定ip的具体信息,mac地址及端口号
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN
------------------------------------------------------------------------------
183.60.203.17 50e5-49ca-271f 18 D-0 Eth0/0/11
------------------------------------------------------------------------------
Total:25 Dynamic:24 Static:0 Interface:1
(华为2326-ei设置方法)
[4-03-09]user-bind static ip-address 183.60.203.17 mac-address 50e5-49ca-271f interface Ethernet0/0/11
[4-03-09]interface Ethernet 0/0/11
[4-03-09-Ethernet0/0/11]arp anti-attack check user-bind enable //开启arp检测
[4-03-09-Ethernet0/0/11]ip source check user-bind enable //开启ip检测
[4-03-09-Ethernet0/0/11]quit
[4-03-09]
(华为2326-si设置方法)
[4-03-09]arp static 183.60.204.124 902b-3420-1df3 vid 1 interface Ethernet0/0/23
[4-03-09]interface Ethernet 0/0/11
[4-03-09-Ethernet0/0/11]broadcast-suppression 5 //开启arp抑制
[4-03-09-Ethernet0/0/11]quit
[4-03-09]
二.解绑ip(华为2326-ei)
[4-03-09]display this //查看ip是否绑定
user-bind static ip-address 183.60.203.17 mac-address 50e5-49ca-271f interface Ethernet0/0/11
4-03-09]undo user-bind static ip-address 183.60.203.17
[4-03-09-Ethernet0/0/11]undo arp anti-attack check user-bind enable //取消arp检测
[4-03-09-Ethernet0/0/11]undo ip source check user-bind enable //取消ip检测
[4-03-09-Ethernet0/0/11]quit
[4-03-09]
三.限速(2326-si不支持)
第一种方式:
[4-03-09]interface Ethernet0/0/1
[4-03-09-Ethernet0/0/1]qos lr inbound cir 10240 cbs 102400 //限速为10240K=10M,102400是突发值,一般突发值是所要限速值的10倍
[4-03-09-Ethernet0/0/1]quit
[4-03-09]
第二种方式:
[4-03-09]interface Ethernet0/0/1
[4-03-09-Ethernet0/0/1]traffic-policy p20m inbound //p20m是定义好的限速策略
[4-03-09-Ethernet0/0/1]quit
[4-03-09]
如果原来有设置限速要先运行undo traffic-policy inbound取消原来的设置再重新设置。
四.查看交换端口流量
[4-03-09]dis int brief
Interface Physical Protocol InUti OutUti inErrors outErrors
Ethernet0/0/1 down -- 0% 0% 0 0 //Ethernet0/0/1是端口号,down是代表没连接或者服务器死机关机,up代表服务器正常连接网络;
Ethernet0/0/2 down -- 0% 0% 0 0 //InUti是交换机进来的流量,相当于服务器出去的流量,反之OutUti就是服务器进来的流量。
Ethernet0/0/3 up -- 0.01% 0.01% 0 0
Ethernet0/0/4 up -- 0% 0.01% 0 0
Ethernet0/0/5 up -- 0.05% 0.01% 0 0
?