Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OSPF has the ability to redistribute routes of other routing protocols in the routing table into OSPF.  In OSPF terminology, routes from other routing protocols are known as external routes and they are can be redistributed into OSPF as Type-5 LSAs.

...

Code Block
admin@router2# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 30
admin@router2# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 40
admin@router2# set protocols lldp enable true
admin@router2# set protocols ospf router-id 2.2.2.2
admin@router2# set protocols ospf area 0.0.0.2 area-type stub
admin@router2# set protocols ospf network 10.10.2.0/24 area 0.0.0.2
admin@router2# set protocols ospf network 10.10.4.0/24 area 0.0.0.0
admin@router2# set system hostname router2
admin@router2# set vlanl3-interface loopback lo address 2.2.2.2 prefix-length 32
admin@router2# set vlanl3-interface loopback address 2.2.2.3 prefix-length 32
admin@router2# set vlan-interface interface vlan30 vif vlan30 address 10.10.2.2 prefix-length 24
admin@router2# set vlanl3-interface vlan-interface vlan40 vif vlan40 address 10.10.4.1 prefix-length 24
admin@router2# set vlans vlan-id 30 l3-interface vlan30
admin@router2# set vlans vlan-id 40 l3-interface vlan40
Commit OK.
Save done.
admin@router2#

...

If we wish to redistribute external routes through OSPF, we can configure the set protocols ospf redistribute command. And then configure a route map to control which type or specific prefixes are allowed to be redistributed through OSPF. The configuration shown below permits the redistribution of prefix 2.2.2.3/32 through OSPF.


Code Block

admin@router2# set routing prefix-list IPv4 list2 permit prefix 2.2.2.3/32
admin@router2# set routing route-map map2 order 1 matching-policy "permit"
admin@router2# set routing route-map map2 order 1 match ip address prefix-list "list2"
admin@router2# set protocols ospf redistribute connected route-map "map2"

...