在瞻博网络 SRX 上配置 VLAN - 无法弄清楚

网络工程 局域网 杜松 srx
2022-02-21 02:19:00

这一定非常简单,但我每次都会出错。

我有一个非常基本的设置。

SRX 300

ge-0/0/0= 不信任

ge-0/0/1虽然ge-0/0/5=信任

ge-0/0/0并且0/0/4正在使用中。

我有一个接入点,可以托管多个 SSID,并为每个 SSID 分配一个 VLAN。

我想创建一个分配有 DHCP 服务器的 VLAN,用于不安全的访客 Internet 访问。

理想情况下,该 VLAN 可以分配给ge-0/0/4.

到目前为止,我已经回滚了所有更改。

我试图尽可能多地包含相关信息。

root@HSRX300# show interfaces
        ge-0/0/0 {
            unit 0 {
                family inet {
                    address xxx.xxx.xxx.xxx/xx;
                    address xxx.xxx.xxx.xxx/xx;
                }
            }
        }
        ge-0/0/1 {
            unit 0 {
                family inet {
                    address 192.168.1.1/24;
                }
            }
        }
        ge-0/0/2 {
            unit 0 {
                family inet {
                    address 192.168.2.1/24;
                }
            }
        }
        ge-0/0/3 {
            unit 0 {
                family inet {
                    address 192.168.3.1/24;
                }
            }
        }
        ge-0/0/4 {
            unit 0 {
                family inet {
                    address 192.168.4.1/24;
                }
            }
        }
        ge-0/0/5 {
            unit 0 {
                family inet {
                    address 192.168.5.1/24;
                }
            }
        }
        ge-0/0/6 {
            unit 0;
        }
        ge-0/0/7 {
            unit 0;
        }
        st0 {
            unit 1 {
                family inet {
                    mtu 1436;
                    address xxx.xxx.xxx.xxx/xx;
                }
            }
            unit 2 {
                family inet {
                    mtu 1436;
                    address xxx.xxx.xxx.xxx/xx;
                }
            }
        }


        root@HSRX300# show protocols
        l2-learning {
            global-mode switching;
        }

    root@HSRX300# show security zones
    security-zone trust {
        address-book {
            address Some-Server xxx.xxx.xxx.xxx/xx;
            address Some-Server-II xxx.xxx.xxx.xxx/xx;
        }
        host-inbound-traffic {
            system-services {
                all;
            }
            protocols {
                all;
                bgp;
            }
        }
        interfaces {
            ge-0/0/1.0;
            ge-0/0/2.0;
            ge-0/0/3.0;
            ge-0/0/4.0;
            ge-0/0/5.0;
            st0.1;
            st0.2;
        }
    }
    security-zone untrust {
        screen untrust-screen;
        host-inbound-traffic {
            system-services {
                ike;
            }
        }
        interfaces {
            ge-0/0/0.0 {
                host-inbound-traffic {
                    system-services {
                        dhcp;
                        tftp;
                    }
                }
            }
        }
    }
1个回答

好的,从顶部开始:

  1. 强烈15.1X49-D60.7建议您在开始之前将代码升级到。

  2. 您需要在盒子上全局启用切换模式(这将需要重新启动但保存它直到您添加了所有配置):

set protocols l2-learning global-mode switching

  1. 接下来,创建您的 VLAN - 让我们假设 VLAN-ID 4 和一个匹配的 irb(路由)接口与之配套。我们还将把 irb 接口放入信任安全区域,以便主机入站配置适用于它:

set vlans WLAN-HOME vlan-id 4

set vlans WLAN-HOME l3-interface irb.4

set interfaces irb unit 4 family inet address 192.168.4.1/24

set security zones security-zone trust interface irb.4

  1. 现在,删除您当前的接口ge-0/0/4,将其从信任安全区域中删除,然后将其重新创建为新 VLAN 中的交换接口。 注意:这假设您的 AP 期望向它标记 VLAN 4 - 您可能无法访问管理接口,除非您还向该端口添加了 native-vlan-id,这将需要另一个单独的 VLAN:

delete interfaces ge-0/0/4

delete security zones security-zone trust interface ge-0/0/4.0

set interfaces ge-0/0/4 unit 0 family ethernet-switching interface-mode trunk

set interfaces ge-0/0/4 unit 0 family ethernet-switching vlan members WLAN-HOME

  1. 为您的新子网设置 DHCP 范围并将其配置为在 irb.4 上提供地址:

set system services dhcp-local-server group jdhcp-group interface irb.4

set access address-assignment pool WLAN-HOME-POOL family inet network 192.168.4.0/24

set access address-assignment pool WLAN-HOME-POOL family inet range junosRange low 192.168.4.10

set access address-assignment pool WLAN-HOME-POOL family inet range junosRange high 192.168.4.80

set access address-assignment pool WLAN-HOME-POOL family inet dhcp-attributes router 192.168.4.1

set access address-assignment pool WLAN-HOME-POOL family inet dhcp-attributes maximum-lease-time 3600

set access address-assignment pool WLAN-HOME-POOL family inet dhcp-attributes name-server 192.168.1.10

  1. 完毕。