第9章 VLAN间路由

图片[1]-第9章 VLAN间路由-大赛人网
图9-1 VLAN间路由配置网络拓扑

1.SW1配置VLAN

[SW1]vlan batch 10 30
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 10
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 10
[SW1]interface GigabitEthernet 0/0/24
[SW1-GigabitEthernet0/0/24]port link-type trunk 
[SW1-GigabitEthernet0/0/24]port trunk allow-pass vlan all 

[SW1]interface Vlanif 10
[SW1-Vlanif10]IP address 192.168.10.254 24
[SW1]interface Vlanif 30
[SW1-Vlanif30]ip address 192.168.30.254 24

2.SW2配置VLAN

[SW2]vlan batch 20 30
[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type access 
[SW2-GigabitEthernet0/0/1]port default vlan 20
[SW2]interface GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type access          
[SW2-GigabitEthernet0/0/2]port default vlan 20 
[SW2]interface GigabitEthernet 0/0/24
[SW2-GigabitEthernet0/0/24]port trunk allow-pass vlan all 

[SW2]interface Vlanif 20
[SW2-Vlanif20]ip address 192.168.20.254 24 
[SW2]interface Vlanif 30
[SW2-Vlanif30]ip address 192.168.30.253 24

3.SW1、SW2配置静态路由

[SW1]ip route-static 192.168.20.0 24 192.168.30.253
[SW2]ip route-static 192.168.10.0 24 192.168.30.254
© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容