路由标签和策略路由选择 - 流量工程问题

网络工程 思科
2021-07-25 13:14:45

我有一个特定的静态路由,需要将其通告到 EIGRP 并最终通告到远程办公室的 BGP。我的目标是减少所需的配置更新,不仅需要更新静态路由,还需要更新 EIGRP 的路由映射 ACL 和下一跳的策略路由 ACL。

我了解到,路由标签可能是一种以较少配置路由流量的选项。基本上我可以用一个数字(例如 20)标记一个静态路由。然后我可以创建一个匹配标签 20 的路由映射,并设置标签 20 并在 EIGRP 中配置它以再次匹配和通告该标签。在接收路由器上,我应该能够以类似的方式对 BGP 执行相同的步骤(重新标记的 EIGRP 到 BGP 路由映射),但是,我仍然有一个不太适合这种标记方法的策略路由(ACL 具有源/目标 - 而前缀列表没有)。

我的目标是创建带有标签的特定静态路由,并让这些标签正确执行和通告(包括策略路由映射或等效项),而我不必每次都更新 3 个其他 ACL。政策地图在重新分配中不能很好地发挥作用 - 有没有人提出其他类似的想法?

2个回答

我不是 100% 确定标签是否包含在 BGP 更新中,但这是我很快整理的内容:

在此处输入图片说明

路由器“静态”:

interface Loopback0
 ip address 172.16.1.1 255.255.255.0
!
interface Loopback1
 ip address 172.16.2.1 255.255.255.0

interface Ethernet0/1
 ip address 172.16.0.1 255.255.255.0
 half-duplex

ip route 0.0.0.0 0.0.0.0 172.16.0.2

路由器 R1:

interface Ethernet0/0
 ip address 10.0.0.1 255.255.255.252
 half-duplex

interface Ethernet0/1
 ip address 172.16.0.2 255.255.255.0
 half-duplex

ip route 172.16.1.0 255.255.255.0 172.16.0.1 tag 20
ip route 172.16.2.0 255.255.255.0 172.16.0.1 tag 20

router eigrp 100
 redistribute static route-map MyRouteMap
 network 10.0.0.0 0.0.0.3
 no auto-summary

route-map MyRouteMap permit 10
 match tag 20

路由器 R2:

interface Ethernet0/0
 ip address 10.0.0.2 255.255.255.252
 half-duplex

interface Ethernet0/1
 ip address 10.0.0.5 255.255.255.252
 half-duplex

router eigrp 100
 network 10.0.0.0 0.0.0.3
 no auto-summary

router bgp 65000
 no synchronization
 bgp log-neighbor-changes
 redistribute eigrp 100 route-map MyRouteMap
 neighbor 10.0.0.6 remote-as 65000
 neighbor 10.0.0.6 next-hop-self
 no auto-summary

route-map MyRouteMap permit 10
 match tag 20

R2#show ip route 172.16.1.0
Routing entry for 172.16.1.0/24
  Known via "eigrp 100", distance 170, metric 307200
  Tag 20, type external

路由器 R3:

interface Ethernet0/1
 ip address 10.0.0.6 255.255.255.252
 half-duplex

router bgp 65000
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.0.0.5 remote-as 65000
 no auto-summary

R3#show ip bgp 172.16.1.0
BGP routing table entry for 172.16.1.0/24, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  Local
    10.0.0.5 from 10.0.0.5 (10.0.0.2)
      Origin incomplete, metric 307200, localpref 100, valid, internal, best

我希望这就是你所要求的。

我觉得有点晚了,但是..我走了

您应该使用社区来标记路由,然后将其用于策略而不是 BGP 上的 ACL。