96 lines
1.9 KiB
Text
96 lines
1.9 KiB
Text
|
!
|
||
|
hostname r1
|
||
|
password zebra
|
||
|
log file /tmp/r1-frr.log
|
||
|
ip forwarding
|
||
|
!
|
||
|
interface r1-eth0
|
||
|
ip address 10.0.1.1/24
|
||
|
ip ospf cost 100
|
||
|
ip ospf hello-interval 1
|
||
|
ip ospf dead-interval 40
|
||
|
!
|
||
|
interface r1-eth1 vrf blue
|
||
|
ip address 10.0.10.1/24
|
||
|
ip ospf hello-interval 1
|
||
|
ip ospf dead-interval 40
|
||
|
!
|
||
|
!
|
||
|
interface r1-eth2 vrf green
|
||
|
ip address 10.0.91.1/24
|
||
|
ip ospf hello-interval 1
|
||
|
ip ospf dead-interval 40
|
||
|
!
|
||
|
!
|
||
|
router ospf
|
||
|
ospf router-id 10.0.255.1
|
||
|
distance 20
|
||
|
redistribute bgp route-map costplus
|
||
|
network 10.0.1.0/24 area 0
|
||
|
!
|
||
|
router ospf vrf blue
|
||
|
ospf router-id 10.0.255.1
|
||
|
distance 20
|
||
|
redistribute bgp route-map costplus
|
||
|
network 10.0.10.0/24 area 0
|
||
|
!
|
||
|
router ospf vrf green
|
||
|
ospf router-id 10.0.255.1
|
||
|
distance 20
|
||
|
redistribute bgp route-map costplus
|
||
|
network 10.0.91.0/24 area 0
|
||
|
!
|
||
|
router bgp 99
|
||
|
no bgp ebgp-requires-policy
|
||
|
address-family ipv4 unicast
|
||
|
redistribute connected
|
||
|
redistribute ospf route-map rmap
|
||
|
import vrf route-map rmap
|
||
|
import vrf blue
|
||
|
import vrf green
|
||
|
!
|
||
|
!
|
||
|
router bgp 99 vrf blue
|
||
|
no bgp ebgp-requires-policy
|
||
|
address-family ipv4 unicast
|
||
|
redistribute connected
|
||
|
redistribute ospf route-map rmap
|
||
|
import vrf route-map rmap
|
||
|
import vrf default
|
||
|
import vrf green
|
||
|
!
|
||
|
router bgp 99 vrf green
|
||
|
no bgp ebgp-requires-policy
|
||
|
address-family ipv4 unicast
|
||
|
redistribute connected
|
||
|
redistribute ospf
|
||
|
import vrf route-map rmap
|
||
|
import vrf default
|
||
|
import vrf blue
|
||
|
!
|
||
|
!
|
||
|
route-map rmap permit 10
|
||
|
set metric-type type-1
|
||
|
set metric +1
|
||
|
exit
|
||
|
!
|
||
|
ip prefix-list min seq 5 permit 10.0.80.0/24
|
||
|
route-map costmax permit 20
|
||
|
set metric-type type-1
|
||
|
set metric +1
|
||
|
set metric-min 713
|
||
|
match ip address prefix-list min
|
||
|
exit
|
||
|
!
|
||
|
ip prefix-list max seq 10 permit 10.0.70.0/24
|
||
|
route-map costplus permit 30
|
||
|
set metric-type type-1
|
||
|
set metric +1
|
||
|
set metric-max 13
|
||
|
match ip address prefix-list max
|
||
|
exit
|
||
|
!
|
||
|
route-map costplus permit 40
|
||
|
set metric-type type-1
|
||
|
set metric +1
|
||
|
exit
|