82 lines
1.8 KiB
Plaintext
82 lines
1.8 KiB
Plaintext
frr version 8.1
|
|
frr defaults traditional
|
|
hostname F
|
|
no ipv6 forwarding
|
|
!
|
|
interface eth1
|
|
description B-eth3
|
|
ip address 10.10.10.14/30
|
|
ip ospf cost 10
|
|
exit
|
|
!
|
|
interface eth2
|
|
description D-eth3
|
|
ip address 10.10.10.26/30
|
|
ip ospf cost 1
|
|
exit
|
|
!
|
|
interface eth3
|
|
description Gandalf-eth3
|
|
ip address 203.0.113.1/30
|
|
exit
|
|
!
|
|
interface eth4
|
|
description R1-eth4
|
|
ip address 203.0.113.5/30
|
|
exit
|
|
!
|
|
interface lo
|
|
ip address 10.10.0.5/32
|
|
ip ospf passive
|
|
exit
|
|
!
|
|
router bgp 65501
|
|
bgp router-id 10.10.0.5
|
|
no bgp ebgp-requires-policy
|
|
neighbor 10.10.0.6 remote-as 65501
|
|
neighbor 10.10.0.6 update-source lo
|
|
neighbor 203.0.113.2 remote-as 65502
|
|
neighbor 203.0.113.2 update-source eth3
|
|
neighbor 203.0.113.6 remote-as 65503
|
|
neighbor 203.0.113.6 update-source eth4
|
|
!
|
|
address-family ipv4 unicast
|
|
redistribute ospf metric 10 route-map BGP4-OSPF
|
|
neighbor 10.10.0.6 next-hop-self
|
|
neighbor 203.0.113.2 route-map PREFER-ROUTE in
|
|
neighbor 203.0.113.6 route-map PREFER-ROUTE2 in
|
|
exit-address-family
|
|
exit
|
|
!
|
|
router ospf
|
|
ospf router-id 10.10.0.5
|
|
redistribute bgp metric 20 metric-type 1 route-map BGP4-OSPF
|
|
network 10.10.0.5/32 area 0
|
|
network 10.10.10.0/27 area 0
|
|
exit
|
|
!
|
|
ip prefix-list ALLOWED_ROUTES seq 10 permit 10.0.0.0/24 ge 32
|
|
ip prefix-list ALLOWED_ROUTES seq 20 permit 192.168.0.0/16 ge 24
|
|
ip prefix-list ALLOWED_ROUTES seq 30 deny 0.0.0.0/0 le 32
|
|
ip prefix-list PREFER-ROUTE seq 5 permit 192.168.2.0/24
|
|
ip prefix-list PREFER-ROUTE seq 10 deny any
|
|
ip prefix-list PREFER-ROUTE2 seq 5 permit 192.168.3.0/24
|
|
ip prefix-list PREFER-ROUTE2 seq 10 deny any
|
|
!
|
|
route-map BGP4-OSPF permit 10
|
|
match ip address prefix-list ALLOWED_ROUTES
|
|
exit
|
|
!
|
|
route-map PREFER-ROUTE permit 10
|
|
match ip address prefix-list PREFER-ROUTE
|
|
set local-preference 200
|
|
set weight 32768
|
|
exit
|
|
!
|
|
route-map PREFER-ROUTE2 permit 10
|
|
match ip address prefix-list PREFER-ROUTE2
|
|
set local-preference 200
|
|
set weight 32768
|
|
exit
|
|
!
|