23. 详解 FRRouting 的 IBGP 应用配置

FRRouting 简介
FRRouting (FRR) is a free and open source Internet routing protocol suite for Linux and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric and VRRP, with alpha support for EIGRP and NHRP.
官方网站链接。 如何移植 FRRoutin 项目中 OpenWRT中,请参考链接

IBGP实验环境说明:

(1). 两台 OpenWRT 虚拟主机,主机A的eth0 192.168.40.82/24 , 主机B的 eth0 192.168.40.83/24; eth0 是两台主机的互联接口;
(2).虚拟主机运行环境 PVE 。
关于 IBGP 协议相关内容,请参考链接

第一步 开启 FRRouting 路由功能

配置 /etc/frr/daemons 文件 ospf 、bgp 协议功能
重启 FRR 模块。

请参考上篇讲述 ospf 路由配置,内容比较详细。

第二步 配置 IBGP 路由

1. 配置 peer 端信息
router bgp 555
bgp router-id 10.2.40.83
neighbor 10.1.40.82 remote-as 555
neighbor 10.1.40.82 update-source eth1
interface eth1
ip address 10.2.40.83
ip address 10.2.40.83/24
do write
2. 配置 eth1 接口
interface eth1
ip address 10.2.40.83/24
ip address 10.2.0.10/24
ip ospf 100 area 0
3. 宣告互联接口eth0
interface eth0
ip ospf 100 area 0
4. 保持参数
do write

第三步 验证 IBGP 功能

1.检查路由
ixeCloud(config-if)# do show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

K>* 0.0.0.0/0 [0/0] via 192.168.40.1, eth0, src 192.168.40.82, 00:18:49
O[100]   10.1.0.0/24 [110/1] is directly connected, eth1, weight 1, 00:01:38
C>* 10.1.0.0/24 is directly connected, eth1, 00:01:38
O[100]>* 10.1.1.0/24 [110/2] via 192.168.40.63, eth0, weight 1, 00:14:09
O[100]   10.1.40.0/24 [110/1] is directly connected, eth1, weight 1, 00:05:49
C>* 10.1.40.0/24 is directly connected, eth1, 00:15:26
O[100]>* 10.2.0.0/24 [110/2] via 192.168.40.83, eth0, weight 1, 00:01:58 
O[100]>* 10.2.2.0/24 [110/2] via 192.168.40.61, eth0, weight 1, 00:14:09
B   10.2.40.0/24 [200/0] via 10.2.40.83 inactive, weight 1, 00:04:11
O[100]>* 10.2.40.0/24 [110/2] via 192.168.40.83, eth0, weight 1, 00:04:12  # ospf 路由信息
O[100]>* 10.4.4.0/24 [110/2] via 192.168.40.67, eth0, weight 1, 00:14:09
O[100]>* 10.5.5.0/24 [110/2] via 192.168.40.71, eth0, weight 1, 00:14:09
O[100]   192.168.40.0/24 [110/1] is directly connected, eth0, weight 1, 00:14:09
C>* 192.168.40.0/24 is directly connected, eth0, 00:18:49
2. 检查 IBGP 信息
ixeCloud(config)# do show ip bgp summary 

IPv4 Unicast Summary:
BGP router identifier 10.1.40.82, local AS number 555 vrf-id 0
BGP table version 2
RIB entries 3, using 576 bytes of memory
Peers 1, using 21 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
10.2.40.83      4        555        31        31        0    0    0 00:27:51            1        1
Total number of neighbors 1

3. 检查 IBGP 联通性
ixeCloud(config)# do ping 10.2.40.83
PING 10.2.40.83 (10.2.40.83) 56(84) bytes of data.
64 bytes from 10.2.40.83: icmp_req=1 ttl=64 time=0.179 ms
64 bytes from 10.2.40.83: icmp_req=2 ttl=64 time=0.180 ms
^C
--- 10.2.40.83 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1072ms
rtt min/avg/max/mdev = 0.179/0.179/0.180/0.013 ms

笔者注:

IBGP 是内外路由协议,建立在动态路由协议之上(本实验使用ospf);宣告 eth0 互联接口进入 ospf 100 域,在宣告eth1 接口进入 ospf 100域;此处内容有待确认,如有错误请指正,先谢了。^ = ^

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值