Creating VRF context
vrf context TEST_VRFip route <ip address/range> <next hop>
Configure vrf specific static routes under the same vrf context
Assign interface to VRF
interface Ethernet1/1
no switchport
vrf member TEST_VRF
ip address 1.1.1.1/24
Remember to apply IP address to interface AFTER the vrf config
Create OSPF Process
router ospf 201
vrf TEST_VRF
interface Ethernet1/1
ip router ospf 201 area 0
Redistribute Directly Connected Subnets
route-map CONNECTED_INTO_OSPF permit 10
set metric 20
set metric-type type-1
router ospf 201
vrf TEST_VRF
redistribute direct route-map CONNECTED_INTO_OSPF
Metrics and OSPF advertisement type is configured in the route-map
Redistribute Selective Static Routes
ip prefix-list STATIC_INTO_OSPF permit 10.10.10.0/20
route-map STATIC_INTO_OSPF permit 10
!match ip address prefix-list STATIC_INTO_OSPF
set metric 20
set metric-type type-1
router ospf 201
vrf TEST_VRF
redistribute static route-map STATIC_INTO_OSPF
Only 10.10.10.0/24 is redistributed into OSPF.
Verifications
show ip ospf vrf TEST_VRF
show ip ospf database detail vrf TEST_VRF #verify metric and type for advertisements
show ip ospf interface vrf TEST_VRF
No comments:
Post a Comment