JUNPINER交换机设置

     很久没有写博文了,不知道如何开头。

     最近遇到各户的三层交换机机是JUNIPER的3200,我们的矿山三大系统的接入交换机是MOXA二层。本来系统运行的好好的,忽然客户要求与他们的原有系统对接,要求我们的系统划分VLAN,可是我们的系统有几个网段,再改为一个网段的太麻烦了,也没有那么多的IP,而且WIFI手机是一直贯穿整个网络,不能做到根据端口划分VLAN。

    MOXA的交换机也不支持基于IP划分VLAN,后面只能和客户商量更改他们三层交换机的设置,可是客户也不知道如何设置。没有办法,第一次接触JUNIPER的交换机,只能查资料,问客服,JUNIPER的交换机竟然可以在他们的子接口上面配置两个甚至更多的IP,突显灵感,为何不能在一个VLAN设置两个网关类。想到了就开始做,接下来附上我的配置命令(红色部分为主要):

set interfaces ge-0/0/0 unit 0 family ethernet-switching
set interfaces ge-0/0/1 unit 0 family ethernet-switching
set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members 150
set interfaces ge-0/0/3 unit 0 family ethernet-switching
set interfaces ge-0/0/4 unit 0 family ethernet-switching
set interfaces ge-0/0/5 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/6 unit 0 family ethernet-switching
set interfaces ge-0/0/7 unit 0 family ethernet-switching
set interfaces ge-0/0/8 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/8 unit 0 family ethernet-switching vlan members 152
set interfaces ge-0/0/9 unit 0 family ethernet-switching port-mode access
set interfaces ge-0/0/9 unit 0 family ethernet-switching vlan members 152
set interfaces ge-0/0/10 unit 0 family ethernet-switching
set interfaces ge-0/0/11 unit 0 family ethernet-switching
set interfaces ge-0/0/12 unit 0 family ethernet-switching
set interfaces ge-0/0/13 unit 0 family ethernet-switching
set interfaces ge-0/0/14 unit 0 family ethernet-switching
set interfaces ge-0/0/15 unit 0 family ethernet-switching
set interfaces ge-0/0/16 unit 0 family ethernet-switching
set interfaces ge-0/0/17 unit 0 family ethernet-switching
set interfaces ge-0/0/18 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/18 unit 0 family ethernet-switching vlan members 250
set interfaces ge-0/0/18 unit 0 family ethernet-switching native-vlan-id 250
set interfaces ge-0/0/19 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/19 unit 0 family ethernet-switching vlan members 250
set interfaces ge-0/0/19 unit 0 family ethernet-switching native-vlan-id 250
set interfaces ge-0/0/20 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/20 unit 0 family ethernet-switching vlan members all
set interfaces ge-0/0/21 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/21 unit 0 family ethernet-switching vlan members all
set interfaces ge-0/0/22 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/22 unit 0 family ethernet-switching vlan members all
set interfaces ge-0/0/23 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/23 unit 0 family ethernet-switching vlan members all
set interfaces ge-0/1/0 unit 0 family ethernet-switching
set interfaces xe-0/1/0 unit 0 family ethernet-switching
set interfaces ge-0/1/1 unit 0 family ethernet-switching
set interfaces xe-0/1/1 unit 0 family ethernet-switching
set interfaces ge-0/1/2 unit 0 family ethernet-switching
set interfaces ge-0/1/3 unit 0 family ethernet-switching
set interfaces vlan unit 150 family inet address 172.44.198.1/24
set interfaces vlan unit 152 family inet address 172.44.199.1/24
set interfaces vlan unit 152 family inet address 192.168.7.200/24
set interfaces vlan unit 250 family inet address 172.44.250.104/24
set routing-options static route 0.0.0.0/0 next-hop 172.44.250.1
set protocols igmp-snooping vlan all
set protocols rstp
set protocols lldp interface all
set protocols lldp-med interface all
set ethernet-switching-options storm-control interface all level 50
set vlans jiankong description jiangkong
set vlans jiankong vlan-id 150
set vlans jiankong interface ge-0/0/2.0
set vlans jiankong l3-interface vlan.150
set vlans manager vlan-id 250
set vlans manager interface ge-0/0/1.0
set vlans manager interface ge-0/0/0.0
set vlans manager l3-interface vlan.250
set vlans sandaxitong description sangdaxitong
set vlans sandaxitong vlan-id 152
set vlans sandaxitong interface ge-0/0/8.0
set vlans sandaxitong interface ge-0/0/9.0
set vlans sandaxitong l3-interface vlan.152
set poe interface all

问题解决了,把MOXA的交换机当做傻瓜式的交换机使用。

还没有什么更好的解决方式吗?欢迎大家来讨论,一个端口下面有多个不同的VLAN,可以选择三层交换机的型号,做到基于IP来划分VLAN。

之前有个矿山,我用的H3C的交换机是用的他们的HYBIRD端口解决

你可能感兴趣的:(基于IP划分VLAN,交换机设置)