Openwrt配置BGP

安装FRR

opkg update
opkg install frr frr-babeld frr-bfdd frr-bgpd frr-eigrpd frr-fabricd frr-isisd frr-ldpd frr-libfrr frr-nhrpd frr-ospf6d frr-ospfd frr-pbrd frr-pimd frr-ripd frr-ripngd frr-staticd frr-vrrpd frr-vtysh frr-watchfrr frr-zebra

或者

 opkg update && opkg install quagga quagga-zebra quagga-bgpd quagga-vtysh

配置

$ vtysh

OpenWrt# conf t

OpenWrt(config)# router bgp 65000

OpenWrt(config-router)# neighbor 192.168.1.5 remote-as 65001

OpenWrt(config-router)# neighbor 192.168.1.5 description ubuntu-dev1

OpenWrt(config-router)# neighbor 192.168.1.6 remote-as 65001

OpenWrt(config-router)# neighbor 192.168.1.6 description ubuntu-dev2

OpenWrt(config-router)# exit

OpenWrt(config)# exit

查看

OpenWrt# show ip bgp summary
BGP router identifier 192.168.1.2, local AS number 65000
RIB entries 0, using 0 bytes of memory
Peers 2, using 18 KiB of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.1.5     4 65001       0       0        0    0    0 never    Active
192.168.1.6     4 65001       0       0        0    0    0 never    Active

Total number of neighbors 2

Total num. Established sessions 0
Total num. of routes received     0