華爲兩臺交換機之間vlan通信-靜態路由配置

 

交換機A的配置:
vlan batch 20 30
#
interface Vlanif1
 ip address 192.168.1.1 255.255.255.0
#
interface Vlanif20
 ip address 192.168.20.1 255.255.255.0
#
interface Vlanif30
 ip address 192.168.30.1 255.255.255.0
 
interface Ethernet0/0/1
 port link-type access
 port default vlan 20
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 30
 
ip route-static 192.168.20.0 255.255.255.0 192.168.1.2
ip route-static 192.168.30.0 255.255.255.0 192.168.1.2
 
 
交換機的B配置
vlan batch 40
interface Vlanif1
 ip address 192.168.1.2 255.255.255.0
#
interface Vlanif40
 
ip address 192.168.40.1 255.255.255.0
ip route-static 192.168.40.0 255.255.255.0 192.168.1.1
 
在兩個交換配之間端口做trunk配置,並允許所有的vlan通過
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章