设定LAN标签

VLAN标签功能、是将SWX2200的端口分组、对每个组颁发不同的网络地址的功能。不同网络地址之间的通信,通过雅马哈路由器进行。这里对以下结构举例说明。

RTX1200:在LAN1上设置SWX2200
  • VLAN-ID 101的网络地址设为192.168.101.0/24
  • VLAN-ID 102的网络地址设为192.168.102.0/24
  • VLAN-ID 103的网络地址设为192.168.103.0/24
SWX2200-24G
  • 端口1:与RTX1200连接
  • 端口2:与SWX2200-8G连接
  • 端口3~8 : 组1(设为VLAN-ID 101)
  • 端口9~16 : 组2(设为VLAN-ID 102)
  • 端口17~24 : 组3(设为VLAN-ID 103)
SWX2200-8G
  • 端口1:与SWX2200-24G连接
  • 端口2~4: 组1(设为VLAN-ID 101)
  • 端口5~8: 组3(设为VLAN-ID 103)

RTX1200的设定例(指定SWX2200的MAC设定例时)

用switch select指令指定SWX2200的MAC地址,将设定的SWX2200进行选择时的设定例。

可以提取以下的设定(Config)

LAN接口的设定
(使用LAN1端口)

ip lan1 address 192.168.100.1/24

VLAN的设定

vlan lan1/1 802.1q vid=101 name=VLAN101
ip lan1/1 address 192.168.101.1/24
vlan lan1/2 802.1q vid=102 name=VLAN102
ip lan1/2 address 192.168.102.1/24
vlan lan1/3 802.1q vid=103 name=VLAN103
ip lan1/3 address 192.168.103.1/24

DHCP的设定

dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.100.2-192.168.100.191/24
dhcp scope 101 192.168.101.2-192.168.101.191/24
dhcp scope 102 192.168.102.2-192.168.102.191/24
dhcp scope 103 192.168.103.2-192.168.103.191/24

控制交换机的设定

switch control use lan1 on

SWX2200-8G的设定

switch select(SWX2200-8G的MAC地址)
switch control function set vlan-port-mode 1 hybrid
switch control function set vlan-access 2 101
switch control function set vlan-access 3 101
switch control function set vlan-access 4 101
switch control function set vlan-access 5 103
switch control function set vlan-access 6 103
switch control function set vlan-access 7 103
switch control function set vlan-access 8 103
switch control function set vlan-trunk 1 101 join
switch control function set vlan-trunk 1 103 join

SWX2200-24G的设定

switch select(SWX2200-24G的MAC地址)
switch control function set vlan-port-mode 1 hybrid
switch control function set vlan-port-mode 2 hybrid
switch control function set vlan-access 3 101
switch control function set vlan-access 4 101
switch control function set vlan-access 5 101
switch control function set vlan-access 6 101
switch control function set vlan-access 7 101
switch control function set vlan-access 8 101
switch control function set vlan-access 9 102
switch control function set vlan-access 10 102
switch control function set vlan-access 11 102
switch control function set vlan-access 12 102
switch control function set vlan-access 13 102
switch control function set vlan-access 14 102
switch control function set vlan-access 15 102
switch control function set vlan-access 16 102
switch control function set vlan-access 17 103
switch control function set vlan-access 18 103
switch control function set vlan-access 19 103
switch control function set vlan-access 20 103
switch control function set vlan-access 21 103
switch control function set vlan-access 22 103
switch control function set vlan-access 23 103
switch control function set vlan-access 24 103
switch control function set vlan-trunk 1 101 join
switch control function set vlan-trunk 1 102 join
switch control function set vlan-trunk 1 103 join
switch control function set vlan-trunk 2 101 join
switch control function set vlan-trunk 2 103 join

RTX1200的设定例(指定SWX2200的连接端口时)

对以switch select指令连接LSWX2200的端口进行指定时的设定例。
将SWX2200-24G连接到RTX1200的LAN1端口,将SWX2200-8G连接到SWX2200-24G的端口2时的设定例如下。

可以提取以下的设定(Config)

LAN接口的设定
(使用LAN1端口)

ip lan1 address 192.168.100.1/24

VLAN的设定

vlan lan1/1 802.1q vid=101 name=VLAN101
ip lan1/1 address 192.168.101.1/24
vlan lan1/2 802.1q vid=102 name=VLAN102
ip lan1/2 address 192.168.102.1/24
vlan lan1/3 802.1q vid=103 name=VLAN103
ip lan1/3 address 192.168.103.1/24

DHCP的设定

dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.100.2-192.168.100.191/24
dhcp scope 101 192.168.101.2-192.168.101.191/24
dhcp scope 102 192.168.102.2-192.168.102.191/24
dhcp scope 103 192.168.103.2-192.168.103.191/24

控制交换机的设定

switch control use lan1 on

SWX2200-8G的设定

switch select lan1:1-2
switch control function set vlan-port-mode 1 hybrid
switch control function set vlan-access 2 101
switch control function set vlan-access 3 101
switch control function set vlan-access 4 101
switch control function set vlan-access 5 103
switch control function set vlan-access 6 103
switch control function set vlan-access 7 103
switch control function set vlan-access 8 103
switch control function set vlan-trunk 1 101 join
switch control function set vlan-trunk 1 103 join

SWX2200-24G的设定

switch select lan1:1
switch control function set vlan-port-mode 1 hybrid
switch control function set vlan-port-mode 2 hybrid
switch control function set vlan-access 3 101
switch control function set vlan-access 4 101
switch control function set vlan-access 5 101
switch control function set vlan-access 6 101
switch control function set vlan-access 7 101
switch control function set vlan-access 8 101
switch control function set vlan-access 9 102
switch control function set vlan-access 10 102
switch control function set vlan-access 11 102
switch control function set vlan-access 12 102
switch control function set vlan-access 13 102
switch control function set vlan-access 14 102
switch control function set vlan-access 15 102
switch control function set vlan-access 16 102
switch control function set vlan-access 17 103
switch control function set vlan-access 18 103
switch control function set vlan-access 19 103
switch control function set vlan-access 20 103
switch control function set vlan-access 21 103
switch control function set vlan-access 22 103
switch control function set vlan-access 23 103
switch control function set vlan-access 24 103
switch control function set vlan-trunk 1 101 join
switch control function set vlan-trunk 1 102 join
switch control function set vlan-trunk 1 103 join
switch control function set vlan-trunk 2 101 join
switch control function set vlan-trunk 2 103 join

返回顶部Return to Top

网络相关产品

服务支持

事业绍介