华为S2300 配置
配置脚本
首先删除默认管理vlan 1:
system-view
interface vlanif 1
undo interface vlanif 1
quit
修改交换机名:
sysname qilaidawsha2F
super password level 3 simple cncsh
设置远程登录用户数:
user-interface vty 0 4
设置远程登录级别:
user privilege level 3
设置登录验证方式:
authentication-mode password
set authentication password simple cncsh
quit
user-interface console 0
authentication-mode password
set authentication password simple cncsh
quit
设置管理vlan和ip地址:
vlan 9
description administratorvlan
quit
interface vlanif 9
ip address 192.168.48.234 255.255.255.0
quit
设置静态路由:
ip route-static 0.0.0.0 0 192.168.48.1
配置端口:
interface GigabitEthernet 0/0/1
port default vlan 9
port link-type trunk
port trunk allow-pass vlan all
quit
interface GigabitEthernet 0/0/2
port link-type trunk
port default vlan 9
port trunk allow-pass vlan all
quit
interface GigabitEthernet 0/0/3
port link-type trunk
port default vlan 9
port trunk allow-pass vlan all
quit
interface GigabitEthernet 0/0/4
port link-type trunk
port default vlan 9
port trunk allow-pass vlan all
quit
配置网口
interface Ethernet 0/0/48
port default vlan 9
port link-type trunk
port trunk allow-pass vlan all
quit
配置和S2403H基本相同:
<quidway>clock clock datetime 15:47:00 2009-4-16
system
sysname xhp-2f-S2326-01
[xhp-2f-S2326]
vlan 2
description nms
vlan 801
description xxx
interface vlan 2
description nms
ip add 192.168.2.2 255.255.255.0
interface ethernet 0/0/1
description xxx
port default vlan 801
interface ethernet 0/0/24
description xxx
port link-type trunk
port trunk allow-pass 2 801
配置静态路由
quidway]ip rou 0.0.0.0 0.0.0.0 x..x..x..x,一般只需要配置一条指向网关的默认路由即可。
配置用户名和密码:考虑到维护简单,假设配置为密码维护方式。
[quidway]user-interface vty 0 4
[quidway-ui-vty0-4]user privilege level 3
[quidway-ui-vty0-4]authentication-mode password
[quidway-ui-vty0-4]set authentication password cipher xxx
[quidway-ui-vty0-4]quit
保存数据:<quidway>save
限速部分
interface ethernet 0/0/1
car cir xxx cbs xxx 入方向 cir单位是kbit/s
qos lr cir xxx cbs xxx 出方向 cir单位是kbit/s
cbs=cir*1000/8
例如限速4M
car cir 4096 cbs 512000
qos lr cir 4096 cbs 512000
环回检测功能
[quidway]loopback-detect enable
下行端口 配置接口检测到环路后,将端口shutdown。(建议)
interface ethernet 0/0/1
loopback-detect action shutdown
缺省情况下,接口发生外部环路时,处理动作为将接口堵塞。
s2300配置脚本
该交换机为2层交换,只能有一个3层vlan,所以要把vlan1给删除!
interface vlanif 1
undo interface vlanif 1
interface vlanif 2000
ip address 1.1.1.1 255.255.255.0
dis curr
删除配置文件
undo startup saved-configuration
静态路由
ip route-static 0.0.0.0 0 192.168.48.1
配置ARP代理
Internet vlanif 1
ip address 192.168.39.23 255.255.255.0
ARP-proxy enable
转载于:https://blog.51cto.com/jiaozhi/716740