Juniper EX 使用上游网关

网络工程 杜松 杜松-朱诺斯 瞻博网络
2022-03-02 03:25:26

在瞻博网络 EX 系列上,如何设置 L3 IP 范围,但指定上游网关?

VLAN - Subnet - Gateway
10 - 10.1.10.0/24 - 10.1.10.1
20 - 10.1.20.0/24 - 10.1.20.1

如果我像这样进行配置,那么我会在网关 IP 上而不是我的上游网关上获得瞻博网络管理网站。

interfaces {
    vlan {
        unit 10 {
            family inet {
                address 10.1.10.1/24;
            }
        }
        unit 20 {
            family inet {
                address 10.1.20.1/24;
            }
        }
    }
}
vlans {
    admin-vlan {
        vlan-id 10;
        l3-interface vlan.10;
    }
    user-vlan {
        vlan-id 20;
        l3-interface vlan.20;
    }
}
2个回答

您的上游网关是如何配置的?棒上路由器(即 dot1q)还是通过其 .10.1 和 .20.1 接口的单独接口?

这将决定您如何配置 EX 交换机端口。

如果是前者,那么您将需要一个携带两个 L2 vlan 的中继端口并将上游网关插入其中。如果是后者,那么您将需要两个单独的访问端口,一次用于 Vlan 10,另一个用于 Vlan 20,并连接各自的上游网关接口。

这就是我解释您的问题并设想您的拓扑的方式:

[上游 gw](dot1q 10,20) <----> (dot1q 10,20) 瞻博网络交换机

或者

上游 gw <-----> (10) 瞻博网络 ex 交换机 (20) <-----> (20) 瞻博网络 ex 交换机

如果您只需要它们通过 VLAN 流量@L2,则不需要为 ex 交换机上的 VLAN 配置 IP 地址。

因此,根据 APA 帖子的评论,我认为您要问的是“如何在我的交换机上配置 IP 来管理它,同时仍然通过 L2 将流量传递到默认网关”

根据您的配置,最简单的方法是从 user-vlan 中删除 IP,然后为您的 admin-vlan 分配不同的地址:

delete vlans user-vlan l3-interface vlan.20
delete interfaces vlan unit 20
rename interfaces vlan unit 10 family inet address 10.1.10.1/24 to 10.1.10.2/24

然后在连接到您的单臂路由器的接口上,只需:

set interfaces ge-0/0/0 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members user-vlan
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members admin-vlan