log "/var/log/trex/bird.log" all;
debug protocols all;
router id 10.100.1.2;
protocol device {
# scan time 10;
interface "loop1";
interface "loop2";
interface "enp5s0";
}
protocol bgp bgp_peer1 {
local 10.100.101.1 as 65001;
neighbor 10.100.1.1 as 65500;
ipv4 {
import all;
export all;
};
}
protocol bgp bgp_peer2 {
local 10.100.102.1 as 65002;
neighbor 10.100.1.1 as 65500;
ipv4 {
import all;
export all;
};
}
protocol static bird_cfg_routes {
ipv4 {
export all;
import all;
};
route 200.1.1.1/32 via 10.100.2.100;
}
Logs
====
bird> show protocols
Name Proto Table State Since Info
device1 Device --- up 13:05:16.761
bgp_peer1 BGP --- up 13:05:21.497 Established
bgp_peer2 BGP --- start 13:05:16.761 Idle
bird_cfg_routes Static master4 up 13:05:16.761
bird>
bird>
bird>
bird> restart bgp_peer1
bgp_peer1: restarted
bird>
bird>
bird> show protocols
Name Proto Table State Since Info
device1 Device --- up 13:05:16.761
bgp_peer1 BGP --- start 13:07:13.673 Idle
bgp_peer2 BGP --- up 13:07:18.328 Established
bird_cfg_routes Static master4 up 13:05:16.761
bird> show interfaces
lo up (index=1)
MultiAccess AdminUp LinkUp Loopback Ignored MTU=65536
127.0.0.1/8 (Preferred, scope host)
::1/128 (Preferred, scope host)
mgmt0 up (index=2)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
192.168.121.163/24 (Preferred, scope site)
fe80::b203:e9ff:fe02:100/64 (Preferred, scope link)
enp5s0 up (index=3)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
10.100.1.2/24 (Preferred, scope site)
enp6s0 up (index=4)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
10.100.2.1/24 (Preferred, scope site)
fc00:64:2::1/120 (Preferred, scope site)
fe80::b203:e9ff:fe02:102/64 (Preferred, scope link)
loop1 up (index=5)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
10.100.101.1/24 (Preferred, scope site)
fe80::78f9:91ff:fe2c:83ed/64 (Preferred, scope link)
loop2 up (index=6)
MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
10.100.102.1/24 (Preferred, scope site)
fe80::a4fc:34ff:fefd:11ce/64 (Preferred, scope link)
bird>
bird>
bird> show route all
Table master4:
200.1.1.1/32 unicast [bird_cfg_routes 13:05:16.761] * (200)
via 10.100.2.100 on enp6s0
Type: static univ
bird>
Debugs
======
2023-01-21 13:05:16.761 <TRACE> device1: Initializing
2023-01-21 13:05:16.761 <TRACE> bgp_peer1: Initializing
2023-01-21 13:05:16.761 <TRACE> bgp_peer2: Initializing
2023-01-21 13:05:16.761 <TRACE> bird_cfg_routes: Initializing
2023-01-21 13:05:16.761 <TRACE> device1: Starting
2023-01-21 13:05:16.761 <TRACE> device1: Scanning interfaces
2023-01-21 13:05:16.761 <TRACE> device1: State changed to up
2023-01-21 13:05:16.761 <TRACE> bgp_peer1: Starting
2023-01-21 13:05:16.761 <TRACE> bgp_peer1: State changed to start
2023-01-21 13:05:16.761 <TRACE> bgp_peer2: Starting
2023-01-21 13:05:16.761 <TRACE> bgp_peer2: State changed to start
2023-01-21 13:05:16.761 <TRACE> bird_cfg_routes: Starting
2023-01-21 13:05:16.761 <TRACE> bird_cfg_routes: State changed to up
2023-01-21 13:05:16.761 <TRACE> bird_cfg_routes.ipv4 > added [best] 200.1.1.1/32 unicast
2023-01-21 13:05:16.761 <INFO> Started
2023-01-21 13:05:16.762 <TRACE> bgp_peer1: Started
2023-01-21 13:05:16.762 <TRACE> bgp_peer1: Connect delayed by 5 seconds
2023-01-21 13:05:21.495 <TRACE> bgp_peer1: Connecting to 10.100.1.1 from local address 10.100.101.1
2023-01-21 13:05:21.496 <TRACE> bgp_peer1: Connected
2023-01-21 13:05:21.496 <TRACE> bgp_peer1: Sending OPEN(ver=4,as=65001,hold=240,id=0a640102)
2023-01-21 13:05:21.497 <TRACE> bgp_peer1: Got OPEN(as=65500,hold=30,id=192.168.121.230)
2023-01-21 13:05:21.497 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:05:21.497 <TRACE> bgp_peer1: Got KEEPALIVE
2023-01-21 13:05:21.497 <TRACE> bgp_peer1: BGP session established
2023-01-21 13:05:21.497 <TRACE> bgp_peer1: State changed to up
2023-01-21 13:05:21.497 <TRACE> bgp_peer1.ipv4 < added 200.1.1.1/32 unicast
2023-01-21 13:05:23.049 <TRACE> bgp_peer1: Got UPDATE
2023-01-21 13:05:23.049 <TRACE> bgp_peer1: Got END-OF-RIB
2023-01-21 13:05:23.049 <TRACE> bgp_peer1: Sending UPDATE
2023-01-21 13:05:23.049 <TRACE> bgp_peer1: Sending END-OF-RIB
2023-01-21 13:05:30.958 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:05:31.499 <TRACE> bgp_peer1: Got KEEPALIVE
2023-01-21 13:05:38.689 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:05:41.499 <TRACE> bgp_peer1: Got KEEPALIVE
2023-01-21 13:05:46.842 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:05:51.499 <TRACE> bgp_peer1: Got KEEPALIVE
2023-01-21 13:05:54.864 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:06:01.499 <TRACE> bgp_peer1: Got KEEPALIVE
2023-01-21 13:06:03.759 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:06:11.499 <TRACE> bgp_peer1: Got KEEPALIVE
2023-01-21 13:06:11.843 <TRACE> bgp_peer1: Sending KEEPALIVE
2023-01-21 13:06:16.764 <TRACE> device1: Scanning interfaces
...
...
...
2023-01-21 13:07:13.673 <INFO> Restarting protocol bgp_peer1
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: Shutting down
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: Shutdown requested
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: State changed to stop
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: BGP session closed
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: Sending NOTIFICATION(code=6.4)
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: Down
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: State changed to flush
2023-01-21 13:07:13.673 <TRACE> bgp_peer2: Started
2023-01-21 13:07:13.673 <TRACE> bgp_peer2: Connect delayed by 5 seconds
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: State changed to down
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: Starting
2023-01-21 13:07:13.673 <TRACE> bgp_peer1: State changed to start
2023-01-21 13:07:16.761 <TRACE> device1: Scanning interfaces
2023-01-21 13:07:18.326 <TRACE> bgp_peer2: Connecting to 10.100.1.1 from local address 10.100.102.1
2023-01-21 13:07:18.327 <TRACE> bgp_peer2: Connected
2023-01-21 13:07:18.327 <TRACE> bgp_peer2: Sending OPEN(ver=4,as=65002,hold=240,id=0a640102)
2023-01-21 13:07:18.328 <TRACE> bgp_peer2: Got OPEN(as=65500,hold=30,id=192.168.121.230)
2023-01-21 13:07:18.328 <TRACE> bgp_peer2: Sending KEEPALIVE
2023-01-21 13:07:18.328 <TRACE> bgp_peer2: Got KEEPALIVE
2023-01-21 13:07:18.328 <TRACE> bgp_peer2: BGP session established
2023-01-21 13:07:18.328 <TRACE> bgp_peer2: State changed to up
2023-01-21 13:07:18.328 <TRACE> bgp_peer2.ipv4 < added 200.1.1.1/32 unicast
2023-01-21 13:07:19.880 <TRACE> bgp_peer2: Got UPDATE
2023-01-21 13:07:19.880 <TRACE> bgp_peer2: Got END-OF-RIB
2023-01-21 13:07:19.880 <TRACE> bgp_peer2: Sending UPDATE
2023-01-21 13:07:19.880 <TRACE> bgp_peer2: Sending END-OF-RIB
2023-01-21 13:07:27.298 <TRACE> bgp_peer2: Sending KEEPALIVE
2023-01-21 13:07:28.329 <TRACE> bgp_peer2: Got KEEPALIVE
2023-01-21 13:07:36.478 <TRACE> bgp_peer2: Sending KEEPALIVE