eNSP不同网段实现全网互通

2022-10-01 13:37:32 浏览数 (1)

大家好,又见面了,我是你们的朋友全栈君。

【实验拓扑】

【实验要求】 实现跨网段互通 【实验配置】 SW1:system-view [SW1]vlan batch 100 200 [SW1]interface Ethernet0/0/2 [SW1-Ethernet0/0/2]port link-type access [SW1-Ethernet0/0/2]port default vlan 100 [SW1-Ethernet0/0/2]quit [SW1]interface Ethernet0/0/3 [SW1-Ethernet0/0/3]port link-type access [SW1-Ethernet0/0/3]port default vlan 100 [SW1-Ethernet0/0/3]quit [SW1]interface Ethernet0/0/4 [SW1-Ethernet0/0/4]port link-type access [SW1-Ethernet0/0/4]port default vlan 200 [SW1-Ethernet0/0/4]quit [SW1]interface Ethernet0/0/5 [SW1-Ethernet0/0/5]port link-type access [SW1-Ethernet0/0/5]port default vlan 200 [SW1-Ethernet0/0/5]quit

[SW1]interface Ethernet0/0/6 [SW1-Ethernet0/0/6]port link-type trunk [SW1-Ethernet0/0/6]port trunk allow-pass vlan all [SW1-Ethernet0/0/6]quit

SW2:system-view [SW2]vlan batch 100 200 [SW2]interface Ethernet0/0/2 [SW2-Ethernet0/0/2]port link-type access [SW2-Ethernet0/0/2]port default vlan 100 [SW2-Ethernet0/0/2]quit [SW2]interface Ethernet0/0/3 [SW2-Ethernet0/0/3]port link-type access [SW2-Ethernet0/0/3]port default vlan 200 [SW2-Ethernet0/0/3]quit [SW2]interface Ethernet0/0/1 [SW2-Ethernet0/0/1]port link-type trunk [SW2-Ethernet0/0/1]port trunk allow-pass vlan all [SW2-Ethernet0/0/1]quit

SW3-3L:system-view [SW3-3L]vlan batch 10 20 30 [SW3-3L]interface GigabitEthernet 0/0/1 [SW3-3L-GigabitEthernet0/0/1]port link-type access [SW3-3L-GigabitEthernet0/0/1]port default vlan 30 [SW3-3L-GigabitEthernet0/0/1]quit [SW3-3L]interface GigabitEthernet 0/0/2 [SW3-3L-GigabitEthernet0/0/2]port link-type access [SW3-3L-GigabitEthernet0/0/2]port default vlan 10 [SW3-3L-GigabitEthernet0/0/2]quit [SW3-3L]interface GigabitEthernet 0/0/3 [SW3-3L-GigabitEthernet0/0/3]port link-type access [SW3-3L-GigabitEthernet0/0/3]port default vlan 20 [SW3-3L-GigabitEthernet0/0/3]quit

[SW3-3L]interface vlanif 10 [SW3-3L-Vlanif10]ip address 192.168.10.254 255.255.255.0 [SW3-3L-Vlanif10]undo shutdown [SW3-3L-Vlanif10]quit [SW3-3L]interface vlanif 20 [SW3-3L-Vlanif20]ip address 192.168.20.254 255.255.255.0 [SW3-3L-Vlanif20]undo shutdown [SW3-3L-Vlanif20]quit [SW3-3L]interface vlanif 30 [SW3-3L-Vlanif30]ip address 192.168.30.254 255.255.255.0 [SW3-3L-Vlanif30]undo shutdown [SW3-3L-Vlanif30]quit [SW3-3L]ip route-static 192.168.100.0 255.255.255.0 192.168.30.01 [SW3-3L]ip route-static 192.168.200.0 255.255.255.0 192.168.30.01

R1:system-view [R1]interface GigabitEthernet 0/0/0.1 [R1-GigabitEthernet0/0/0.1]dot1q termination vid 100 [R1-GigabitEthernet0/0/0.1]arp broadcast enable [R1-GigabitEthernet0/0/0.1]ip address 192.168.100.254 255.255.255.0 [R1-GigabitEthernet0/0/0.1]quit [R1]interface GigabitEthernet 0/0/0.2 [R1-GigabitEthernet0/0/0.2]dot1q termination vid 200 [R1-GigabitEthernet0/0/0.2]arp broadcast enable [R1-GigabitEthernet0/0/0.2]ip address 192.168.200.254 255.255.255.0 [R1-GigabitEthernet0/0/0.2]quit [R1]interface GigabitEthernet 0/0/1 [R1-GigabitEthernet0/0/1]ip address 192.168.30.1 255.255.255.0 [R1-GigabitEthernet0/0/1]undo shutdown [R1-GigabitEthernet0/0/1]quit

[R1]ip route-static 0.0.0.0 0.0.0.0 192.168.30.254

【验证】PC8pingPC1

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/194890.html原文链接:https://javaforall.cn

0 人点赞