eNSP V100R003C00SPC100版本
全网互通
配置PC1,PC2,PC3,PC4,SW1,SW2,SW3,R1--------在R1上配置回环地址测试--------验证需求
<LSW1>sys
Enter system view, return user view with Ctrl+Z.
[LSW1] undo info-center enable #关闭华为信息提示
Info: Information center is disabled.
[LSW1]vlan b 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]int e0/0/1
[LSW1-Ethernet0/0/1]p l a
[LSW1-Ethernet0/0/1]p d v 10 ##将接口加入vlan
[LSW1-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[LSW1-Ethernet0/0/1]int e0/0/2
[LSW1-Ethernet0/0/2]p l a
[LSW1-Ethernet0/0/2]p d v 20
[LSW1-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[LSW1-Ethernet0/0/2]int e0/0/3
[LSW1-Ethernet0/0/3]p l t
[LSW1-Ethernet0/0/3]p t a v a
[LSW1-Ethernet0/0/3]un sh
Info: Interface Ethernet0/0/3 is not shutdown.
[LSW2]undo info-center enable #关闭华为信息提示
Info: Information center is disabled.
[LSW2]int e0/0/1 ##将接口加入vlan
[LSW2-Ethernet0/0/1]p l t
[LSW2-Ethernet0/0/1]p t a v a
[LSW2-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[LSW2-Ethernet0/0/1]int e0/0/2
[LSW2-Ethernet0/0/2]p l a
[LSW2-Ethernet0/0/2]p d v 10
[LSW2-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[LSW2-Ethernet0/0/2]int e0/0/3
[LSW2-Ethernet0/0/3]p l a
[LSW2-Ethernet0/0/3]p d v 20
[LSW2-Ethernet0/0/3]un sh
Info: Interface Ethernet0/0/3 is not shutdown.
[LSW2-Ethernet0/0/3]
[LSW3]undo info-center enable
[LSW1]int g0/0/1
[LSW3-GigabitEthernet0/0/1]p l t #设置接口链路模式
[LSW3-GigabitEthernet0/0/1]p t a v a
[LSW3-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[LSW3]vlan b 10 20 1000 ##添加vlan
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW3]int vlanif10 #配置虚拟接口
[LSW3-Vlanif10]ip add 192.168.10.1 24
[LSW3-Vlanif10]int vlanif20
[LSW3-Vlanif20]ip add 192.168.20.1 24
[LSW3-Vlanif20]int vlanif 1000
[LSW3-Vlanif1000]ip add 11.0.0.1 30
[LSW3-Vlanif1000]int g0/0/2
[LSW3-GigabitEthernet0/0/2]p l a
[LSW3-GigabitEthernet0/0/2]p d v 1000
[LSW3-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[LSW3-GigabitEthernet0/0/2]q
[LSW3]ip rou
[LSW3]ip route
[LSW3]ip route-static 0.0.0.0 0.0.0.0 11.0.0.2 #向上配置默认路由出去
[R1]undo info-center enable ###关闭华为信息提示
Info: Information center is disabled.
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 11.0.0.2 30 ###接口配置IP地址
[R1-GigabitEthernet0/0/0]un sh
[R1]int loo 0 ###配置回环地址测试
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]q
[R1]ip route-static 192.168.10.0 24 11.0.0.1 ###向下配置静态路由
[R1]ip route-static 192.168.20.0 24 11.0.0.1
三层交换机的上层口为access,出去的数据不带标签。
版权说明:如非注明,本站文章均为 扬州驻场服务-网络设备调试-监控维修-南京泽同信息科技有限公司 原创,转载请注明出处和附带本文链接。
请在这里放置你的在线分享代码