详细图解:
.-------------------------------------+
/ 华为s3526c /|
+---+---+---+----------------------+--+ |
| 1 | 3 | 5 | ... |23| |
+-|-+---+---+----------------------+--+ |
| |2| 4 | 6 | ... |24| /
+-|--+---+---+----------------------+-+
| trunk +------------------+
+---------------------------------------------| Hi-Spider Router |-------- 上级路由 ---- Internet
802.1q +------------------+
172.16.1.2
----------------------------------------+----------------------------------
交换机配置 | Hi-Spider Router 配置
----------------------------------------+----------------------------------
VLAN-ID 端口 IP 地址 | IP 地址 接口
----------------------------------------+----------------------------------
VLAN-1 1-6口 172.16.1.1 | 172.16.1.2 eth0 [主IP VLAN1]
VLAN-2 7-12口 172.16.2.1 | 172.16.2.254 VLAN-2 [逻辑VLAN]
VLAN-3 13-18口 172.16.3.1 | 172.16.3.254 VLAN-3 [逻辑VLAN]
VLAN-4 19-24口 172.16.4.1 | 172.16.4.254 VLAN-4 [逻辑VLAN]
---------------------------------------------------------------------------
1口为中继接口,使用 802.1q 封装,允许所有VLAN访问,交换机的默认路由为172.16.1.2
海蜘蛛路由的LAN口主IP地址为172.16.1.2,并建立了3个逻辑VLAN,和交换机上的相对应。
DHCP服务器对VLAN-2/3/4 提供IP分配,每个VLAN获取对应网段的地址,即:
中继接口1口设置如下,交换机详细设置请参考交换机设置
#
interface Ethernet0/1
port link-type trunk
port trunk permit vlan all
dot1x