Dynamic routing protocols: BGP, OSPF, RIP
U
SER
G
UIDE
216
The status of the OSPF routing table is:
root@IMOLA>
show ip route ospf
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
O>* 0.0.0.0/0 [110/20] via 10.45.15.221, eth0, 00:01:54
O 10.45.15.192/27 [110/10] is directly connected, eth0, 00:01:55
O 172.20.1.219/32 [110/10] is directly connected, dummy0, 00:02:09
O 192.168.1.0/24 [110/10] is directly connected, eth1, 00:02:04
On router
A
we have this OSPF configuration:
set ospf router ospf router-id 10.45.15.221
set ospf network 10.45.15.192/27 area 0
set ospf default-information originate metric 20
set ospf on
with OSPF routes:
root@IMOLA>
show ip route ospf
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - ISIS, B -
BGP, > - selected route, * - FIB route
O 10.45.15.192/27 [110/10] is directly connected, eth1, 00:10:10
O>* 172.20.1.219/32 [110/20] via 10.45.15.219, eth1, 00:03:32
O>* 192.168.1.0/24 [110/20] via 10.45.15.219, eth1, 00:03:32
Now to the BGP configuration we add the command for announcing towards the neighbor routes
obtained via OSPF:
set bgp local-as 65201
set bgp neighbor 88.58.10.245 remote-as 3269
set bgp neighbor 88.58.10.245 description EBGP router master
set bgp redistribute ospf route-map RedOSPF
set bgp redistribute connected route-map ConnBGP
set bgp redistribute static route-map StatBGP
set bgp route-map ConnBGP permit 10 match ip address prefix-list LocalNet
set bgp route-map StatBGP permit 10 match ip address prefix-list StatRoute
set bgp route-map RedOSPF permit 10 match ip address prefix-list RedOSPF
set bgp ip prefix-list LocalNet seq 20 permit 172.20.1.221/32
set bgp ip prefix-list LocalNet seq 10 permit 10.45.15.192/27
set bgp ip prefix-list StatRoute seq 10 permit 44.44.0.0/16