组网模型案例:
两端交换机配置:
默认用户名密码:admin/12345
串口波特率:9600
A端S4800交换机配置:
①添加所需VLAN
S4800(config)#vlan 800-802
--
②配置对接PTN接口:
S4800(config)#interface gig 1/0/26
S4800(config-ge-1/0/26)#port link-type trunk
S4800(config-ge-1/0/26)#port trunk allow-pass vlan 800-802
--
关闭自协商-固定速率
S4800(config-ge-1/0/26)#negotiation auto disable
S4800(config-ge-1/0/26)#speed 1000
S4800(config-ge-1/0/26)#exit
--
③配置客户侧接口
S4800(config)#interface gig 1/0/1
S4800(config-ge-1/0/1)#port link-type access
S4800(config-ge-1/0/1)#port defaule vlan 800
S4800(config-ge-1/0/1)#exit
S4800(config)#
--
S4800(config)#interface gig 1/0/2
S4800(config-ge-1/0/2)#port link-type access
S4800(config-ge-1/0/2)#exit
S4800(config)#
--
S4800(config)#interface gig 1/0/3
S4800(config-ge-1/0/3)#port link-type access
S4800(config-ge-1/0/3)#port default vlan 802
S4800(config-ge-1/0/3)#exit
S4800(config)#
--
查看所有配置
S4800(config)#show run
查看接口状态
S4800(config)#show interface
查看光功率
S4800(config)#show laser hardware gig 1/0/26 detailed
保存
S4800#write file
保存配置选择“y”(yes/no)
--
Z端S4700:
默认登录用户名密码:admin/12345
①添加VLAN
S4700(config)#vlan 802
②配置对接PTN接口
S4700(config)#interface gig 1/0/9
S4700(config-gig-1/0/9)#port link-type trunk
S4700(config-gig-1/0/9)#port trunk allow-pass vlan 802
--
配置接口速率
S4700(config-gig-1/0/9)#negotiation auto disable
S4700(config-gig-1/0/9)#spees 1000
--
③配置客户侧下联接口
S4700(config)#interface gig 1/0/1
S4700(config-gig-1/0/1)#port link-type access
S4700(config-gig-1/0/1)#port defaule vlan 802
S4700(config-gig-1/0/1)#exit
④查看配置状态
S4700(config)#show run
S4700(config)#show interface
S4700(config)#show laser hardware gig 1/0/9 detailed
⑤保存
S4700#write file
保存配置选择“y”
-----------------恢复配置------------------
access口恢复
S4700(config-gig-1/0/1)#no port default vlan
S4700(config-gig-1/0/1)#port link-type default
trunk口恢复
S4700(config-gig-1/0/1)#no port allow-pas vlan all
S4700(config-gig-1/0/1)#port trunk allow-pas vlan 1
S4700(config-gig-1/0/1)#port link-type default
《恢复接口默认模式hybrid 添加缺省VLAN》
-----------------清空配置------------------
S4700#erase config
《清空交换机所有配置 Y后重启生效》
-----------------查看配置------------------
S4700(config)#show run //查看所有配置//
S4700(config)#show interface //查看所有接口状态//
S4700(config)#
S4700(config-gig-1/0/1)#show laser hardware detailed
《查看光模块详细信息》
S4700(config-1/0/24)#laser rx-power-threshold [rx-low-threshold rx-high-threshold]
《24口光膜块光功率阈值》
S4700(config-1/0/24)#laser rx-power-threshold auto
《24口光膜块光功率阈值为自动获取》
S4700(config-1/0/24)#laser tx-power-threshold [tx-low-threshold tx-high-threshold]
《24口光膜块光功率阈值》
S4700(config-1/0/24)#laser tx-power-threshold auto
《24口光模块光功率阈值自动获取》
S4700(config-1/0/1)#mtu 1500
《设置MTU值(最大传输单元)为1500》
S4700(config)#interface gigaetherate 1/0/24 《进入接口24》
S4700(config-gig1/0/24)#negotiation auto disable
《关闭自协商》
S4700(config-gig1/0/24)#speed 1000 《设置强制速率-1000M》
--启用VLAN mapping
S4700(config)#vlan 1000 《添加需要转换的VLAN》
S4700(config)#interface gigaetherate 1/0/2 《进入接口2》
S4700(config-1/0/24)#vlan-mapping enable 《使能VLAN Mapping功能》
S4700(config-1/0/24)#port link-type trunk 《将接口模式设置为Trunk》
S4700(config-1/0/24)#port trunk allow-pass 10,20,30,1000 《将需要映射和被映射的VLAN一同添加TRUNK》
S4700(config-1/0/24)#vlan-mapping vlan 10 map-vlan 1000 《将10VLAN映射为1000》
S4700(config-1/0/24)#vlan-mapping vlan 20 map-vlan 1000 《将20VLAN映射为1000》
S4700(config-1/0/24)#vlan-mapping vlan 30 map-vlan 1000 《将30VLAN映射为1000》
S4700(config-1/0/24)#exit
--此时将24接口收到的10,20,30的VLAN全部映射为1000的VLAN,然后在对接的接口将1000剥离掉即可:
S4700(config)#interface gigaethernet 1/0/1 《进入接口1》
S4700(config-1/0/1)#port link-type access 《配置接口模式为access》
S4700(config-1/0/1)#port default vlan 1000 《配置接口VLAN1000》
---此时1口可接收10,20,30的untag数据包
--Hybird模式的应用(例:两个电口之间添加VLAN的互通隔离)
S4700(config)#vlan 100,200 《添加所需VLAN》
S4700(config)#interface gigaethernet 1/0/1 《进入1口》
S4700(config-gig1/0/1)#port link-type hybird 《配置接口模式hybird》
S4700(config-gig1/0/1)#port hybird vlan 100,200 untagged 《发送100,200VLAN的Untag数据包》
S4700(config-gig1/0/1)#port hybird pvid 100 《在接收的数据包打上100的VLANtag》
S4700(config-gig1/0/1)#exit
--
S4700(config)#interface gigaethernet 1/0/24 《进入接口24》
S4700(config-gig1/0/24)#port link-type hybird 《配置接口模式为hybird》
S4700(config-gig1/0/24)#port hybird vlan 100,200 untagged 《发送100,200VLAN的Untag数据包》
S4700(config-gig1/0/24)#port hybird pvid 200 《在接收的数据包打上200的VLANtag》
S4700(config-gig1/0/24)#exit
S4700(config)#
--此时仅1,2,口主机可互通,与其他端口隔离。
接口模式注意事项:
①配置Trunk和Hybird模式 注意本端端口和对端缺省VLAN ID(PVID)要保持一致(缺省VLAN是1)
②当使用isolate-user-vlan来进行二层端口隔离时,会自动变成hybird模式。即Trunk端口不能和isolate-user-vlan同时配置,要用Hybird模式配置。
S4720-28T-GF-PE
S4720 PoE 交换机只支持信号线供电
查看↓
S4700(config)#show pse information //查看 PSE相关配置信息//
S4700(config)#show pse interface gigaethernet 1/0/1 //查看接口详细供电信息//
S4700(config)#show pse interface //查看所有接口供电信息//
S4700(config)#show pse config
S4700(config)#show pse slot
配置↓
S4700(config)#interface gigaethernet 1/0/1
S4700(config-ge1/0/1)#pse enable //打开POE供电//
S4700(config-ge1/0/1)#pse power-priority critical //设置最高供电优先级//
S4700(config-ge1/0/1)#pse max power 36000 //缺省功率36000毫瓦//
S4700(config-ge1/0/1)#pse description PD1 //备注描述//
S4700(config-ge1/0/1)#exit
S4700(config)#
S4700(config)#interface gigaethernet 1/0/2
S4700(config-ge1/0/2)#pse enable //打开POE供电//
S4700(config-ge1/0/2)#pse power-priority high //设置一般供电优先级//
S4700(config-ge1/0/2)#pse max power 15000 //设置功率15000毫瓦(1~36000)//
S4700(config-ge1/0/2)#pse description PD2 //备注描述//
S4700(config-ge1/0/2)#exit
S4700(config)#
S4700(config)#interface gigaethernet 1/0/3
S4700(config-ge1/0/3)#pse enable //打开POE供电//
S4700(config-ge1/0/3)#pse power-priority low //设置最低供电优先级//
S4700(config-ge1/0/3)#pse max power 100 //设置功率100毫瓦(设置粒度为100)//
S4700(config-ge1/0/3)#pse description PD3 //备注描述//
S4700(config-ge1/0/3)#exit
S4700(config)#
S4700(config)#interface gigaethernet 1/0/4
S4700(config-ge1/0/4)#pse power-priority default //设置默认供电优先级//
S4700(config-ge1/0/4)#exit
S4700(config)#
------供电管理方式----------
S4700(config-ge1/0/5)#pse power-management {auto|force|default}
①缺省为auto
②非标准PD在half-auto模式不能正常供电就改成force-standard或者force-high模式。
S4700(config-ge1/0/5)#show pse interface
-------非标准PD检测开关-------
S4700(config)#pse legacy enable //使能检测非标准PD功能//
S4700(config)#pse legacy disable //去使能检测非标准PD功能//
①符合802.af协议标准的PD设备为标准PD设备。
②通常PSE只能检测到标准PD,为其供电。
③执行本命令使能 PSE 检测非标准 PD 功能后,PSE 才能检测到非标准PDE,并为其供电。
--------限制电源利用率----------
S4700(config)#pse usage-threshold 90 //限制电源利用率90%(1~99)//
-------清除接口POE统计信息--------
S4700(config-ge1/0/1)#no pse statistical Information
S4700(config-ge1/0/1)#
------打开告警上报(SNMP-TRAP)-------------
S4700(config)#pse snmp-trap enable
-------调试POE端口(默认关着)-------
打开→S4700#debug pse all
关闭→S4700#no debug stp all
--------供电同级优先级按照接口序号来排序,1→2→3→……