我是 BGP 的新手并且有一个 ASR1001x 路由器(172.16.0.3),我正在将 ACL 转发到第二个路由器(172.16.0.1),同时我尝试让 BGP 在这个路由器上工作以进行特定的测试前缀列表
接口:
interface Loopback0
ip address 192.168.0.1 255.255.255.0
!
interface GigabitEthernet0/0/0
ip address 172.16.0.3 255.255.255.0
ip nat inside
ip policy route-map PBR_GI0/0/0
!
interface GigabitEthernet0/0/2
ip address 2.2.201.201 255.255.255.252
ip nat outside
negotiation auto
ip virtual-reassembly
!
interface GigabitEthernet0/0/3
ip address 3.3.301.301 255.255.255.252
ip nat outside
negotiation auto
ip virtual-reassembly
!
GE0/0/0 来自 SVI 开关。
BGP设置如下:
router bgp 62323
bgp log-neighbor-changes
neighbor 2.2.200.200 remote-as 200
neighbor 2.2.200.200 ttl-security hops 2
neighbor 2.2.200.200 password 7 #####
neighbor 2.2.200.200 timers 6 20
neighbor 3.3.300.300 remote-as 300
neighbor 3.3.300.300 ttl-security hops 2
neighbor 3.3.300.300 password 7 ####
neighbor 3.3.300.300 timers 7 22
!
address-family ipv4
network 172.16.0.0 mask 255.255.255.0
network 192.168.0.0
network 192.168.120.0
neighbor 2.2.200.200 activate
neighbor 2.2.200.200 send-community both
neighbor 2.2.200.200 route-map ISPA_IN in
neighbor 2.2.200.200 route-map ISPA_OUT out
neighbor 3.3.300.300 activate
neighbor 3.3.300.300 send-community both
neighbor 3.3.300.300 route-map ISPB_IN in
neighbor 3.3.300.300 route-map ISPB_OUT out
exit-address-family
!
ip as-path access-list 1 permit ^$
ip as-path access-list 2 permit _200$
ip as-path access-list 2 permit _300$
!
access-list 1 permit 192.160.120.0 0.0.0.255
access-list 1 permit 192.168.0.0 0.0.0.255
通过 SVI (172.160.0.254) 的 3 个网络的静态路由:
ip route 192.168.100.0 255.255.255.0 172.16.0.254
ip route 192.168.110.0 255.255.255.0 172.16.0.254 name SVR_SW
ip route 192.168.120.0 255.255.255.0 172.16.0.254
PBR 的访问列表发送到第二个路由器:
ip access-list standard PRODUCTION_ACL
permit 192.168.100.0 0.0.0.255
permit 192.168.110.0 0.0.0.255
BGP 的前缀列表:
ip prefix-list TESTING_LAN seq 5 permit 192.168.120.0/24
路线图:
route-map PBR_GI0/0/0 permit 10
match ip address PRODUCTION_ACL
set ip next-hop 172.16.0.1
!
route-map ISPA_IN permit 10
match as-path 2
!
route-map ISPB_IN permit 10
match as-path 2
!
route-map ISPA_OUT permit 20
match ip address prefix-list TESTING_LAN
match as-path 1
!
route-map ISPB_OUT permit 20
match ip address prefix-list TESTING_LAN
match as-path 1
!
我正在获取 BGP 路由,并且我可以看到我正在向两个邻居广播一条路由:
local router ID: 192.168.0.1
Network Next Hop Metric LocPrf Weight Path
*> 192.168.120.0 172.16.0.254 0 32768 i
但是当我在 192.168.120.0/24 的机器上时,我无法通过路由器 ping 任何东西。
我在设置中遗漏了什么吗?