默认给s5120交换机配置好vlan和vlan_dhcp,ping vlan的网关是不通的,解决办法:


1、[H3C]display ip interface brief    查看vlan虚拟接口是否up

 

*down: administratively down

(s): spoofing

Interface                     Physical Protocol IP Address      Description

Vlan-interface1               up       up       192.168.100.252 Vlan-inte...

Vlan-interface60              down     down       188.188.60.1    Vlan-inte...

Vlan-interface80              down     down       188.188.80.1    Vlan-inte...


说明:60 和80 是我创建的vlan,状态是down,需要手动开启


2、[H3C]interface GigabitEthernet 1/0/1   进入一号端口 这是是5120交换机端口链接上面三层或者防火墙的端口,如果不是1号端口,则需要根据实际端口配置。


3、[H3C-GigabitEthernet1/0/1]port link-type trunk    将端口设置成trunk


4、[H3C-GigabitEthernet1/0/1]port trunk permit vlan all 

Please wait........................................... Done.


5、[H3C]dis ip interface brief   查看虚拟接口状态

*down: administratively down

(s): spoofing

Interface                     Physical Protocol IP Address      Description

Vlan-interface1               up       up       192.168.100.252 Vlan-inte...

Vlan-interface60              up       up       188.188.60.1    Vlan-inte...

Vlan-interface80              up       up       188.188.80.1    Vlan-inte...


6、然后ping 60 80 网段下的网关,能ping通 ok