配置管理接口
IBM Cloud® Juniper vSRX 节点提供内置管理接口 ("fxp0") 缺省情况下未配置。 配置后,这些专用接口可用于与单个节点通信,这在高可用性集群中可能有用,用于通过 SSH,ping 和 SNMP 等来监视辅助节点的状态。 由于 vSRX 的专用 IP 会浮动到主节点,因此无法直接访问辅助节点。
fxp0 接口的配置要求子网中的 IP 连接到网关的专用传输 VLAN。 虽然网关随附的主子网具有可能可用的 IP,但建议不要用于此用途。 这是因为主子网是为网关供应基础结构保留的,如果在同一 pod 中部署了其他网关,那么可能会发生 IP 冲突。
您可以为专用传输 VLAN 分配辅助子网,并使用此子网中的 IP 来配置 fxp0 和主机网桥接口以进行 PING 和 SSH 访问。 为此,请执行以下步骤:
-
订购可移植专用子网,并将其分配给 vSRX 专用传输 VLAN。 您可以在网关详细信息页面上找到专用传输 VLAN。
确保子网至少包含 8 个地址,以支持 2 个 IP 用于主机网桥接口,2 个 IP 用于 vSRX fxp0 接口。
-
使用新子网中的 2 IP 来配置主机
br0:0
网桥接口。 例如:在 Ubuntu 主机 0 上:
ifconfig br0:0 10.177.75.140 netmask 255.255.255.248
在 Ubuntu 主机 1 上:
ifconfig br0:0 10.177.75.141 netmask 255.255.255.248
-
通过在每个 Ubuntu 主机上修改
/etc/network/interfaces
,在重新引导之间持久存储网桥接口配置。 例如:auto br0:0 iface br0:0 inet static address 10.177.75.140 netmask 255.255.255.248 post-up /sbin/ifconfig br0:0 10.177.75.140 netmask 255.255.255.248
-
将 2 IP 分配给 vSRX fxp0 接口,并创建备份路由器配置以访问辅助节点的 fxp0 接口:
set groups node0 interfaces fxp0 unit 0 family inet address 10.177.75.138/29 set groups node1 interfaces fxp0 unit 0 family inet address 10.177.75.139/29 set groups node0 system backup-router 10.177.75.137 destination [ 0.0.0.0/1 128.0.0.0/1 ] set groups node1 system backup-router 10.177.75.137 destination [ 0.0.0.0/1 128.0.0.0/1 ]
可在 此 Juniper 文章中找到有关配置备份路由器的其他信息。
-
创建到子网的静态路由。 例如:
set routing-options static route 10.177.75.136/29 next-hop 10.177.75.137
-
创建防火墙过滤器以允许 PING 和 SSH 连接到 fxp0 管理接口:
set firewall filter PROTECT-IN term PING from destination-address 10.177.75.136/29 set firewall filter PROTECT-IN term SSH from destination-address 10.177.75.136/29