Got it

Router does not import to OSPF BGP routes

Created: Apr 4, 2019 21:59:36Latest reply: Apr 5, 2019 01:37:07 808 2 1 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi dears,


In this topology, I'm tryin to import the BGP routes onto OSPF with VPN-instance. For this problem I will give you two device configurations in which you will be able to see that there are routes in BGP, but they don't import onto OSPF with the command 'import-route bgp type 2' and without the type.


I saw the Loopback5 from DI_PE_01_CAR that is directly imported to OSPF and not the routes from BGP.


<DI_PE_02_CAR>dis cu
#
sysname DI_PE_02_CAR
#
ip vpn-instance CLARO-01
ipv4-family
route-distinguisher 1:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
ip vpn-instance CLARO-02
ipv4-family
route-distinguisher 2:2
vpn-target 2:2 export-extcommunity
vpn-target 2:2 import-extcommunity
#
ip vpn-instance Gb
ipv4-family
route-distinguisher 2.2.2.2:3
vpn-target 3:3 export-extcommunity
vpn-target 3:3 import-extcommunity
#
ip vpn-instance Gi_DNS
ipv4-family
route-distinguisher 2.2.2.2:5
vpn-target 5:5 export-extcommunity
vpn-target 5:5 import-extcommunity
#
ip vpn-instance Gi_blackberry
ipv4-family
route-distinguisher 2.2.2.2:4
vpn-target 4:4 export-extcommunity
vpn-target 4:4 import-extcommunity
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
#
acl number 2000
rule 1 permit source 1.5.5.0 0.0.0.3
#
isis 1
is-level level-2
network-entity 10.0000.0000.0002.00
is-name DI_PE_02_CAR
import-route ospf 1 route-policy loo1
#
interface Ethernet0/0/0
#
interface Ethernet0/0/0.100
vlan-type dot1q 100
ip binding vpn-instance CLARO-01
ip address 10.2.26.1 255.255.255.252
ospf network-type p2p
#
interface Ethernet0/0/0.200
vlan-type dot1q 200
ip binding vpn-instance CLARO-02
ip address 10.2.26.5 255.255.255.252
ospf network-type p2p
#
interface Ethernet0/0/1
#
interface Ethernet0/0/1.150
vlan-type dot1q 150
ip binding vpn-instance Gb
ip address 1.2.20.1 255.255.255.252
ospf network-type p2p
#
interface Ethernet0/0/1.151
vlan-type dot1q 151
ip binding vpn-instance Gi_blackberry
ip address 1.2.20.5 255.255.255.252
ospf network-type p2p
#
interface Ethernet0/0/1.152
vlan-type dot1q 152
ip binding vpn-instance Gi_DNS
ip address 1.2.20.9 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/0
ip address 10.2.6.1 255.255.255.252
isis enable 1
isis circuit-type p2p
isis circuit-level level-2
mpls
mpls ldp
#
interface GigabitEthernet0/0/1
ip address 10.2.4.1 255.255.255.252
isis enable 1
isis circuit-type p2p
isis circuit-level level-2
mpls
mpls ldp
#
interface GigabitEthernet0/0/2
ip address 10.2.12.1 255.255.255.252
ospf network-type p2p
mpls
mpls ldp
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/3.10
vlan-type dot1q 10
ip address 10.1.2.2 255.255.255.252
isis enable 1
isis circuit-type p2p
isis circuit-level level-2
mpls
mpls ldp
#
interface GigabitEthernet0/0/3.20
vlan-type dot1q 20
ip address 10.1.2.6 255.255.255.252
ospf network-type p2p
mpls
mpls ldp
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
isis enable 1
isis circuit-level level-2
#
interface LoopBack1
ip address 2.2.3.2 255.255.255.255
#
bgp 19114
peer 1.1.1.1 as-number 65116
peer 1.1.1.1 ebgp-max-hop 10
peer 1.1.1.1 connect-interface LoopBack0
peer 5.5.5.5 as-number 65116
peer 5.5.5.5 ebgp-max-hop 10
peer 5.5.5.5 connect-interface LoopBack0
peer 17.17.17.17 as-number 19114
peer 17.17.17.17 connect-interface LoopBack1
peer 18.18.18.18 as-number 19114
peer 18.18.18.18 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
undo peer 1.1.1.1 enable
undo peer 5.5.5.5 enable
undo peer 17.17.17.17 enable
undo peer 18.18.18.18 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
peer 5.5.5.5 enable
peer 17.17.17.17 enable
peer 18.18.18.18 enable
#
ipv4-family vpn-instance CLARO-01
network 10.2.26.0 255.255.255.252
import-route ospf 130
peer 10.2.26.2 as-number 65000
peer 10.2.26.2 fake-as 65116
#
ipv4-family vpn-instance CLARO-02
network 10.2.26.4 255.255.255.252
import-route ospf 140
peer 10.2.26.6 as-number 65000
peer 10.2.26.6 fake-as 65116
#
ipv4-family vpn-instance Gb
import-route ospf 150 med 1200
#

ipv4-family vpn-instance Gi_DNS
import-route ospf 152 med 1200
#
ipv4-family vpn-instance Gi_blackberry
import-route ospf 151 med 1200
#
ospf 1 router-id 2.2.3.2
import-route isis 1 route-policy loo0
advertise mpls-lsr-id
area 0.0.0.0
network 2.2.3.2 0.0.0.0
network 10.1.2.4 0.0.0.3
network 10.2.12.0 0.0.0.3
#
ospf 130 vpn-instance CLARO-01
area 0.0.0.0
network 10.2.26.0 0.0.0.3
#
ospf 140 vpn-instance CLARO-02
area 0.0.0.0
network 10.2.26.4 0.0.0.3
#
ospf 150 router-id 1.2.20.1 vpn-instance Gb
import-route bgp type 2
area 0.0.0.0
network 1.2.20.0 0.0.0.3
#

ospf 151 router-id 1.2.20.5 vpn-instance Gi_blackberry
import-route bgp type 2
area 0.0.0.0
network 1.2.20.4 0.0.0.3
#
ospf 152 router-id 1.2.20.9 vpn-instance Gi_DNS
import-route bgp type 2
area 0.0.0.0
network 1.2.20.8 0.0.0.3
#
return
<DI_PE_02_CAR>


<DI_PE_02_CAR>dis ip routing-table vpn-instance Gb
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Gb
Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.0/30 O_ASE 150 1 D 1.2.20.2 Ethernet0/0/1.1
50
1.1.19.0/30 OSPF 10 3 D 1.2.20.2 Ethernet0/0/1.1
50
1.2.20.0/30 Direct 0 0 D 1.2.20.1 Ethernet0/0/1.1
50
1.2.20.1/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/1.1
50
1.3.21.0/30 IBGP 255 1100 RD 8.8.8.8 GigabitEthernet
0/0/2
1.4.22.0/30 IBGP 255 1100 RD 8.8.8.8 GigabitEthernet
0/0/2
1.5.5.0/30 IBGP 255 1100 RD 9.9.9.9 GigabitEthernet
0/0/2
1.5.23.0/30 IBGP 255 1100 RD 9.9.9.9 GigabitEthernet
0/0/2
1.6.24.0/30 IBGP 255 1100 RD 9.9.9.9 GigabitEthernet
0/0/2
1.7.21.0/30 IBGP 255 1100 RD 8.8.8.8 GigabitEthernet
0/0/2
1.8.22.0/30 IBGP 255 1100 RD 8.8.8.8 GigabitEthernet
0/0/2
1.9.23.0/30 IBGP 255 1100 RD 9.9.9.9 GigabitEthernet
0/0/2
1.10.24.0/30 IBGP 255 1100 RD 9.9.9.9 GigabitEthernet
0/0/2
1.19.20.0/30 OSPF 10 2 D 1.2.20.2 Ethernet0/0/1.1
50
1.21.22.0/30 IBGP 255 1100 RD 8.8.8.8 GigabitEthernet
0/0/2
1.23.24.0/30 IBGP 255 1100 RD 9.9.9.9 GigabitEthernet
0/0/2

<DI_PE_02_CAR>


##############################################################################


<SITECAR02>dis cu
#
sysname SITECAR02
#
ip vpn-instance Gb
ipv4-family
route-distinguisher 20.20.20.20:3
vpn-target 3:3 export-extcommunity
vpn-target 3:3 import-extcommunity
#
ip vpn-instance Gi_DNS
ipv4-family
route-distinguisher 20.20.20.20:5
vpn-target 5:5 export-extcommunity
vpn-target 5:5 import-extcommunity
#
ip vpn-instance Gi_blackberry
ipv4-family
route-distinguisher 20.20.20.20:4
vpn-target 4:4 export-extcommunity
vpn-target 4:4 import-extcommunity
#ority 16
#
interface Ethernet0/0/0
#
interface Ethernet0/0/0.150
vlan-type dot1q 150
ip binding vpn-instance Gb
ip address 1.2.20.2 255.255.255.252
ospf network-type p2p
#
interface Ethernet0/0/0.151
vlan-type dot1q 151
ip binding vpn-instance Gi_blackberry
ip address 1.2.20.6 255.255.255.252
ospf network-type p2p
#
interface Ethernet0/0/0.152
vlan-type dot1q 152
ip binding vpn-instance Gi_DNS
ip address 1.2.20.10 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/0.150
vlan-type dot1q 150
ip binding vpn-instance Gb
ip address 1.19.20.2 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/0.151
vlan-type dot1q 151
ip binding vpn-instance Gi_blackberry
ip address 1.19.20.6 255.255.255.252
ospf network-type p2p
#
interface GigabitEthernet0/0/0.152
vlan-type dot1q 152
ip binding vpn-instance Gi_DNS
ip address 1.19.20.10 255.255.255.252
ospf network-type p2p
#
#
interface LoopBack0
ip address 20.20.20.20 255.255.255.255
#
ospf 150 router-id 1.2.20.2 vpn-instance Gb
area 0.0.0.0
network 1.2.20.0 0.0.0.3
network 1.19.20.0 0.0.0.3
#
ospf 151 router-id 1.2.20.6 vpn-instance Gi_blackberry
area 0.0.0.0
network 1.19.20.4 0.0.0.3
network 1.2.20.4 0.0.0.3
#
ospf 152 router-id 1.2.20.10 vpn-instance Gi_DNS
area 0.0.0.0
network 1.19.20.8 0.0.0.3
network 1.2.20.8 0.0.0.3
#
return

<SITECAR02>dis ip routing-table vpn-instance Gb
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Gb
Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.0/30 O_ASE 150 1 D 1.19.20.1 GigabitEthernet
0/0/0.150

1.1.19.0/30 OSPF 10 2 D 1.19.20.1 GigabitEthernet
0/0/0.150
1.2.20.0/30 Direct 0 0 D 1.2.20.2 Ethernet0/0/0.1
50
1.2.20.2/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/0.1
50
1.19.20.0/30 Direct 0 0 D 1.19.20.2 GigabitEthernet
0/0/0.150
1.19.20.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0.150

<SITECAR02>


054957q22aa2292z2a4c25.png?imagen.png

Thanks!

Featured Answers

Recommended answer

chenhui
Admin Created Apr 5, 2019 01:36:26

@user_3356145 hey!


Please check if there are routes towards the next-hop which belong to the routes you imported from BGP to OSPF on the VPN-instance Gb, because when there are no next-hop routes, the route entry will not be downloaded to the routing-table.

Glad to help you! Any further questions, let us know.

View more
  • x
  • convention:

All Answers

@user_3356145 hey!


Please check if there are routes towards the next-hop which belong to the routes you imported from BGP to OSPF on the VPN-instance Gb, because when there are no next-hop routes, the route entry will not be downloaded to the routing-table.

Glad to help you! Any further questions, let us know.

View more
  • x
  • convention:

by the way, you can check the OSPF lsdb, check if there are LSAs that you imported.
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.