配置本地路由器

本页面介绍如何为跨站互连配置本地路由器。

使用一个或多个线缆群组创建跨站网络后,您需要在站点 A 和站点 B 上配置本地路由器,以建立彼此之间的连接。

拓扑

本文档提供了一个拓扑的示例配置,在该拓扑中,一个或多个跨站互连连接终结于本地路由器。

在配置本地路由器时,请使用本文档各个部分中的示例作为指南。

本文档中的示例假定跨站互连连接的速度为 10 Gbps。

如需查看拓扑图,请参阅跨站互连概览

配置接口

Juniper

请查看以下示例配置:

set interfaces xe-1/1/0 unit 0 description NEIGHBOR_ROUTER:INTERFACE_NAME
set interfaces xe-1/1/0 unit 0 bandwidth 9500000000
set interfaces xe-1/1/0 unit 0 family inet mtu MTU
set interfaces xe-1/1/0 unit 0 family inet address SOURCE_IPv4_ADDRESS
set interfaces xe-1/1/0 unit 0 family iso mtu MTU
set interfaces xe-1/1/0 unit 0 family inet6 mtu MTU
set interfaces xe-1/1/0 unit 0 family inet6 address SOURCE_IPv6_ADDRESS
set interfaces xe-1/1/0 unit 0 family mpls mtu MTU

替换以下值:

  • NEIGHBOR_ROUTERINTERFACE_NAME:要建立连接的邻居路由器和接口。
  • MTU:MTU 大小。设置的值不能大于跨站互连的 MTU(9,000 字节)。
  • SOURCE_IP_ADDRESS:此接口的 IPv4 和 IPv6 地址。

Cisco

请查看以下示例配置:

interface TenGigE/1/0
 description NEIGHBOR_ROUTER:INTERFACE_NAME
 bandwidth 9500000
 mtu MTU
 ip address SOURCE_IPv4_ADDRESS SUBNET_MASK  // Assuming you have a subnet mask
 ipv6 mtu MTU
 ipv6 address SOURCE_IPv6_ADDRESS/PREFIX_LENGTH // Assuming you have a prefix length
 mpls mtu MTU
 mpls ip  // Enable MPLS on the interface

替换以下值:

  • NEIGHBOR_ROUTERINTERFACE_NAME:要建立连接的邻居路由器和接口。
  • MTU:MTU 大小。设置的值不能大于跨站互连的 MTU(9,000 字节)。
  • SOURCE_IP_ADDRESS:此接口的 IPv4 和 IPv6 地址。

配置流量整形器

为帮助避免丟包,请对流量进行整形,使其低于跨站互连连接容量,以处理额外的封装开销。如果您不配置流量整形器,当流量达到或接近连接的容量上限时,取决于帧大小,有可能会出现丢包。

Juniper

请查看以下示例配置:

set interfaces xe-1/1/0 unit 0 description NEIGHBOR_ROUTER:INTERFACE_NAME
set class-of-service interfaces xe-1/1/0 scheduler-map qos-scheduler
set class-of-service interfaces xe-1/1/0 shaping-rate 9500000000

Cisco

请查看以下示例配置:

interface TenGigE/1/0
 description NEIGHBOR_ROUTER
 service-policy output qos-scheduler
 shape average 9500000000
!

启用 MACsec(端口模式,可选)

如果您有端口模式线缆群组,并且想要使用 MACsec,请启用 MACsec。

Cisco

此示例配置会执行以下操作:

  • 启用必须安全政策
  • 使用最大值配置重放窗口,以防止重放保护在 MACsec 尝试对数据包排序时生成误报
  • eapol 目标 MAC 设置为 broadcast-address
interface TenGigE/1/0
 Description facing google PF
 macsec replay-protection window-size 4294967295
 macsec network-link
 no cdp enable
 eapol destination-address broadcast-address
 mka policy mka-pol-test
 mka pre-shared-key key-chain KEY_CHAIN_NAME
 service-policy output egress-scheduler
End

KEY_CHAIN_NAME 替换为密钥链的名称。

启用 LLDP(端口模式)

如果您有端口模式线缆群组,请启用 LLDP 以帮助验证路由器之间的连接。LLDP PDU 会以透明方式在路由器之间的端口模式线缆上转发。当路由器成功交换 LLDP 信息时,它会确认线缆正常运行。

您还可以在完成接口配置之前启用 LLDP,以帮助验证新预配的跨站互连连接。

Juniper

请查看以下示例配置:

set protocols lldp interface xe-1/1/0.0

Cisco

请查看以下示例配置:

interface TenGigE/1/0
 lldp
  receive disable
  transmit disable
 !

启用 QinQ(可选)

QinQ 是可选的,用于在服务提供商网络中传输 VLAN。

Cisco

请查看以下示例配置:

interface TenGigE/1/0
 switchport access vlan VLAN_ID
 switchport mode dot1q-tunnel
 l2protocol-tunnel stp
 l2protocol-tunnel point-to-point lacp

启用 IGP 和 BFD

启用 IGP 和 BFD 以交换路由并检测故障,以便您可以实施故障切换。

Juniper

请查看以下示例配置:

set protocols isis interface xe-1/1/0.0 level 2 metric 3000
set protocols isis interface xe-1/1/0.0 level 2 hello-interval 1
set protocols isis interface xe-1/1/0.0 level 2 hold-time 5
set protocols isis interface xe-1/1/0.0 level 1 disable
set protocols isis interface xe-1/1/0.0 hello-padding adaptive
set protocols isis interface xe-1/1/0.0 csnp-interval 65535
set protocols isis interface xe-1/1/0.0 point-to-point
set protocols isis interface xe-1/1/0.0 family inet bfd-liveness-detection version 1
set protocols isis interface xe-1/1/0.0 family inet bfd-liveness-detection minimum-interval 250
set protocols isis interface xe-1/1/0.0 family inet bfd-liveness-detection multiplier 3
set protocols isis interface xe-1/1/0.0 family inet bfd-liveness-detection detection-time threshold 900
set protocols isis interface xe-1/1/0.0 family inet bfd-liveness-detection authentication key-chain CWB-ISIS-BFD-KEY
set protocols isis interface xe-1/1/0.0 family inet bfd-liveness-detection authentication algorithm keyed-sha-1

CWB-ISIS-BFD-KEY 替换为密钥链的名称。

配置 MPLS RSVP

Juniper

请查看以下示例配置:

set protocols mpls interface xe-1/1/0.0 admin-group encrypted
set protocols mpls interface xe-1/1/0.0 admin-group unencrypted

set protocols rsvp interface xe-1/1/0.0 subscription 80
set protocols rsvp interface xe-1/1/0.0 update-threshold 5
set protocols rsvp interface xe-1/1/0.0 link-protection optimize-timer 3000
set protocols rsvp interface xe-1/1/0.0 link-protection exclude-srlg
set protocols rsvp interface xe-1/1/0.0 link-protection admin-group include-all encrypted
set protocols rsvp interface xe-1/1/0.0 link-protection admin-group include-all unencrypted
set protocols rsvp interface xe-1/1/0.0 link-protection admin-group exclude red

set protocols lldp interface xe-1/1/0