eNSP实验-05 一、Vlan间通信-单臂路由

一、Vlan间通信-单臂路由

eNSP实验-05 一、Vlan间通信-单臂路由_第1张图片

实验概述

最终需要实现全网互通。

交换机Lsw4只能转发属于VLAN 30的数据帧。

命令
R1

[r1]int g0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 10
[r1-GigabitEthernet0/0/0.1]arp broadcast enable      //开启接口的ARP广播功能
[r1-GigabitEthernet0/0/0.1]q
[r1]int g0/0/0.2
[r1-GigabitEthernet0/0/0.2]ip add 192.168.2.1 24
[r1-GigabitEthernet0/0/0.2]dot1q termination vid 20
[r1-GigabitEthernet0/0/0.2]arp broadcast enable   
[r1-GigabitEthernet0/0/0.2]q
[r1]int g0/0/0.3
[r1-GigabitEthernet0/0/0.3]ip add 192.168.3.1 24
[r1-GigabitEthernet0/0/0.3]dot1q termination vid 30
[r1-GigabitEthernet0/0/0.3]arp broadcast enable
[r1-GigabitEthernet0/0/0.3]q

Lsw2

[sw2]vlan batch 10 20
[sw2]int e0/0/1
[sw2-Ethernet0/0/1]port link-type trunk 
[sw2-Ethernet0/0/1]port trunk allow-pass vlan 10 20
[sw2-Ethernet0/0/1]q
[sw2]int e0/0/2
[sw2-Ethernet0/0/2]port link-type trunk 
[sw2-Ethernet0/0/2]port trunk allow-pass vlan 10 20
[sw2-Ethernet0/0/2]q
[sw2]int e0/0/3
[sw2-Ethernet0/0/3]port link-type access 
[sw2-Ethernet0/0/3]port default vlan 10
[sw2-Ethernet0/0/3]q

Lsw3

[sw2]vlan batch 10 20 30
[sw3]int e0/0/2
[sw3-Ethernet0/0/2]port link-type trunk 
[sw3-Ethernet0/0/2]port trunk allow-pass vlan 10 20
[sw3-Ethernet0/0/2]q
[sw3]int e0/0/1
[sw3-Ethernet0/0/1]port link-type trunk 
[sw3-Ethernet0/0/1]port trunk allow-pass vlan 30
[sw3-Ethernet0/0/1]q
[sw3]int e0/0/3
[sw3-Ethernet0/0/3]port link-type access 
[sw3-Ethernet0/0/3]port default vlan 20
[sw3-Ethernet0/0/3]q
[sw3]int g0/0/1
[sw3-GigabitEthernet0/0/1]port link-type trunk 
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 30 10 20
[sw3-GigabitEthernet0/0/1]q

Lsw4

[sw4]vlan 30
[sw4-vlan30]q
[sw4]int e0/0/2
[sw4-Ethernet0/0/2]port link-type trunk 
[sw4-Ethernet0/0/2]port trunk allow-pass vlan 30
[sw4-Ethernet0/0/2]q
[sw4]int e0/0/1
[sw4-Ethernet0/0/1]port link-type access 
[sw4-Ethernet0/0/1]port default vlan 30
[sw4-Ethernet0/0/1]q

实验结果

全网可达(略)

你可能感兴趣的:(eNSP实验-05 一、Vlan间通信-单臂路由)