/
Importing an External Route into an OSPF Area
Importing an External Route into an OSPF Area
Figure 5-8. Importing an external route into an OSPF area.
Configuring Switch A
admin@XorPlus# set vlans vlan-id 500 l3-interface vlan-500 admin@XorPlus# set vlan-interface interface vlan-500 vif vlan-500 address 192.168.1.2 prefix-length 30 admin@XorPlus# set interface gigabit-ethernet ge-1/1/47 family ethernet-switching native-vlan-id 500 admin@XorPlus# set protocols ospf4 router-id 1.1.1.1 admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan-500 vif vlan-500 address 192.168.1.2 admin@XorPlus#commit Waiting for merging configuration. Commit OK. Save Done. admin@XorPlus#
Configuring Switch B
admin@XorPlus# set vlans vlan-id 400 l3-interface vlan-400 admin@XorPlus# set vlan-interface interface vlan-400 vif vlan-400 address 172.25.150.250 prefix-length 30 admin@XorPlus# set vlans vlan-id 500 l3-interface vlan-500 admin@XorPlus# set vlan-interface interface vlan-500 vif vlan-500 address 192.168.1.1 prefix-length 30 admin@XorPlus# set interface gigabit-ethernet ge-1/1/48 family ethernet-switching native-vlan-id 500 admin@XorPlus# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 400 admin@XorPlus# set protocols ospf4 router-id 4.4.4.4 admin@XorPlus# set protocols ospf4 area 0.0.0.0 interface vlan-500 vif vlan-500 address 192.168.1.1 admin@XorPlus# set protocols ospf4 area 1.1.1.1 interface vlan-400 vif vlan-400 address 172.25.150.250 admin@XorPlus#commit Waiting for merging configuration. Commit OK. Save Done. admin@XorPlus#
Configuring Switch C
admin@XorPlus# set vlans vlan-id 300 l3-interface vlan-300 admin@XorPlus# set vlan-interface interface vlan-300 vif vlan-300 address 172.25.150.246 prefix-length 30 admin@XorPlus# set vlans vlan-id 400 l3-interface vlan-400 admin@XorPlus# set vlan-interface interface vlan-400 vif vlan-400 address 172.25.150.249 prefix-length 30 admin@XorPlus# set interface gigabit-ethernet te-1/1/49 family ethernet-switching native-vlan-id 300 admin@XorPlus# set interface gigabit-ethernet te-1/1/51 family ethernet-switching native-vlan-id 400 admin@XorPlus# set protocols ospf4 router-id 3.3.3.3 admin@XorPlus# set protocols ospf4 area 2.2.2.2 interface vlan-300 vif vlan-300 address 172.25.150.246 admin@XorPlus# set protocols ospf4 area 1.1.1.1 interface vlan-400 vif vlan-400 address 172.25.150.249 admin@XorPlus#commit Waiting for merging configuration. Commit OK. Save Done. admin@XorPlus#
Configuring an external route import policy on Switch C
Configure external static route.
admin@XorPlus# set protocols static route 192.168.6.0/24 next-hop 172.25.150.245 admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Configure policy to import external route
admin@XorPlus# set policy policy-statement static term 1 from protocol static admin@XorPlus# set policy policy-statement static then accept admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Use policy on ospf
admin@XorPlus# set protocols ospf4 export static admin@XorPlus# commit Waiting for merging configuration. Commit OK. Save done. admin@XorPlus#
Check route table on Switch A. There will be route entry 192.168.6.0/24
admin@XorPlus# run show route forward-route ipv4 all Destination NetMask NextHopMac Port --------------- --------------- ----------------- --------- 192.168.1.0 255.255.255.252 C8:0A:A9:AE:0A:66 connected 172.25.150.248 255.255.255.252 60:EB:69:9B:BE:31 te-1/1/47 192.168.6.0 255.255.255.0 60:EB:69:9B:BE:31 te-1/1/47 Total route count:3
Copyright © 2025 Pica8 Inc. All Rights Reserved.