F5 BGP 配置

首页 / 🍁F5 / 正文

背景:您希望使用动态路由协议BGP配置F5的网络,本文将讲解F5 BGP配置。

一、前期准备

1、环境

(1) BIG-IP 系统已获得 BIG-IP 高级路由模块 (BIG-IP ARM) 的许可。

# 通过以下命令检查,是否含有 ARM License,有输出则含有 ARM License。
cat bigip.license| grep "Routing Bundle"

(2) 您具有对 BIG-IP 命令行的管理访问权限。

2、实验拓扑

image-20220721100159094

二、F5 配置

1、F5 配置 Selfip

image-20220720151109523

2、F5 Selfip 自定义端口放行 BGP 179 端口用于建立BGP邻居;

image-20220720151220818

3、F5 路由域开启 BGP、BFD 功能特性

image-20220720151613248

4、F5 取消 VLAN-Keyed Connections 功能

image-20220720151704296

5、登录F5 命令行配置BGP

# 进入高级路由模块
[root@bigip2:Active:Standalone] config # imish
# 进入特权模式
bigip2.com[0]>enable
# 进入配置模式
bigip2.com[0]#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
# 进入vlan接口
bigip2.com[0](config)#interface vlan_external
# 启用 BFD 特性
bigip2.com[0](config-if)#bfd interval 300 minrx 300 multiplier 3
# 退出vlan接口
bigip2.com[0](config-if)#quit
# 配置 bfd slow-timer
bigip2.com[0](config)#bfd slow-timer 2000
# 进入 BGP AS 100
bigip2.com[0](config)#router bgp 100 
# 配置 BGP 邻居
bigip2.com[0](config-router)#neighbor 192.168.10.83 remote-as 200
# 激活配置
bigip2.com[0](config-router)#neighbor 192.168.10.83 activate 
# 启用 BFD
bigip2.com[0](config-router)#neighbor 192.168.10.83 fall-over bfd multihop 
# 宣告 vip 网段,如果配置 snat 网段,也需要宣告。
bigip2.com[0](config-router)#network 192.168.7.0/24
bigip2.com[0](config-router)#quit
bigip2.com[0](config)#quit
bigip2.com[0]#exit

6、检查路由表

bigip2.com[0]>show ip route 
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default

C       127.0.0.1/32 is directly connected, lo
C       127.1.1.254/32 is directly connected, tmm
B       192.168.2.0/24 [20/0] via 192.168.10.83, vlan_external, 00:01:48
C       192.168.7.0/24 is directly connected, vlan_internal
C       192.168.10.0/24 is directly connected, vlan_external

Gateway of last resort is not set

通过路由表已经发现通过 BGP 学到了 192.168.2.0/24 的网络。

三、参考文档

人员致谢

👦 XinYu Zhang

参考文献

🎯 https://support.f5.com/csp/article/K17721433

🎯 https://support.f5.com/csp/article/K54334475

打赏
文章目录