文章介绍:使用Ubuntu安装FRRouting,采用FRR的动态路由协议BGP,搭建智能路由分流服务器,简称BGPServer(缩写BS),主BGPServer简称MBS,备份BGPServer简称BBS。
一、Ubuntu安装FRR
1.1、更新软件包并安装FRR
sudo apt update
sudo apt install -y frr frr-pythontools
1.2、启动FRR服务
sudo systemctl start frr
1.3、配置FRR开机自启动
sudo systemctl enable frr
1.4、查看FRR服务状态
sudo systemctl status frr
二、搭建BGPServer
2.1、开启BGPD功能
sudo nano /etc/frr/daemons
2.2、重启FRR服务生效BGPD
sudo systemctl restart frr
2.3、备份原始frr.conf文件
sudo mv /etc/frr/frr.conf /etc/frr/frr-backup.conf
2.4、下载智能frr.conf文件
sudo wget -P /etc/frr/ https://pan.yydy.link:2023/d/share/frr/200/frr.conf
sudo wget -P /etc/frr/ https://pan.yydy.link:2023/d/share/frr/201/frr.conf
2.5、重启FRR服务生效配置
sudo systemctl restart frr
2.6、查看bgp状态
2.6.1、进入FRR
vtysh
2.6.2、查看bgp建立状态
show ip bgp summary
三、配置FRR
3.1、进入FRR
root@master-bgpserver:~# vtysh
Hello, this is FRRouting (version 10.1.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
master-bgpserver#
3.2、进入配置模式
master-bgpserver# configure terminal
3.3、添加新邻居
master-bgpserver(config)# router bgp 65000
master-bgpserver(config-router)# neighbor 10.225.97.15 remote-as 65000
master-bgpserver(config-router)# neighbor 10.225.97.15 update-source 10.225.97.200
master-bgpserver(config-router)# address-family ipv4 unicast
master-bgpserver(config-router-af)# neighbor 10.225.97.15 activate
master-bgpserver(config-router-af)# end
master-bgpserver# wr
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr/frr.conf
[OK]
master-bgpserver#