cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2022
Views
5
Helpful
33
Replies

Redistribution (BGP and OSPF)

mailaglady2
Level 1
Level 1

Hi I am trying to setup vrf's but I need to get my network to function properly first, so I have 4 routers and I am running bgp between R2&R3, OSPF between R1&R2 and R3&R4. Router R3 and R4 can ping all the routers on my network but R4 and R1 can only ping their directly connected routers. I have redistributed OSPF into BGP and vice versa on R4&R3 as below.

R1--R2--R3--R4

R2

router ospf 1

log-adjacency-changes

redistribute bgp 100 metric 2 subnets

network 4.4.4.4 0.0.0.0 area 0

network 165.148.122.0 0.0.0.255 area 0

!

router bgp 100

no synchronization

bgp log-neighbor-changes

network 4.4.4.4 mask 255.255.255.255

network 165.148.120.0 mask 255.255.255.252

redistribute ospf 1 metric 2

neighbor 165.148.120.1 remote-as 100

no auto-summary

!

R3

router ospf 1

log-adjacency-changes

redistribute bgp 100 metric 2 subnets

network 1.1.1.1 0.0.0.0 area 0

network 165.148.121.0 0.0.0.3 area 0

!

router bgp 100

no synchronization

bgp log-neighbor-changes

network 1.1.1.1 mask 255.255.255.255

network 165.148.120.0 mask 255.255.255.252

redistribute ospf 1 metric 2

neighbor 165.148.120.2 remote-as 100

no auto-summary

!

What must I do for router 1&4 to be able to ping all other routers. Is it good practice for me to advertise all other networks in OSPF for router R2&R3?

33 Replies 33

royalblues
Level 10
Level 10

Could you please post the output of < sh ip bgp and sh ip route from R2 and R3

Narayan

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Lawrence,

to correctly deploy an MPLS network you should use a common IGP (OSPF in your case) on all the backbone routers.

then you can build a full mesh of iBGP sessions using loopbacks that are advertised in OSPF.

I would use for this the same loopbacks that are used by LDP to exchange messages.

the iBGP sessions then need to be of MP-BGP

router bgp 100

no bgp default ipv4-unicast

address-family ipv4 unicast

neigh x.x.x.x activate

address-family vpnv4

neigh x.x.x.x activate

neigh x.x.x.x send-community extended

Edit:

if you want to setup an inter-as scenario you need to put two routers in AS 100 and two routers in AS 200 but for each subset of routers you should follow the guidelines described above

Hope to help

Giuseppe

R2

sh ip route

1.0.0.0/32 is subnetted, 1 subnets

O 1.1.1.1 [110/2] via 165.148.120.1, 00:58:28, ATM3/0.100

155.239.0.0/24 is subnetted, 1 subnets

C 155.239.247.0 is directly connected, FastEthernet0/2

155.1.0.0/24 is subnetted, 1 subnets

C 155.1.1.0 is directly connected, GigabitEthernet0/3

4.0.0.0/32 is subnetted, 1 subnets

C 4.4.4.4 is directly connected, Loopback0

C 192.11.1.0/24 is directly connected, GigabitEthernet0/1

165.148.0.0/30 is subnetted, 1 subnets

C 165.148.120.0 is directly connected, ATM3/0.100

R3

sh ip route

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

155.239.0.0/24 is subnetted, 1 subnets

C 155.239.247.0 is directly connected, GigabitEthernet0/3

155.1.0.0/24 is subnetted, 1 subnets

C 155.1.1.0 is directly connected, GigabitEthernet0/2

3.0.0.0/32 is subnetted, 1 subnets

B 3.3.3.3 [20/0] via 165.148.121.2, 00:17:01

4.0.0.0/32 is subnetted, 1 subnets

O 4.4.4.4 [110/2] via 165.148.120.2, 01:01:53, ATM1/0.100

C 192.5.1.0/24 is directly connected, GigabitEthernet0/1

165.148.0.0/30 is subnetted, 2 subnets

C 165.148.121.0 is directly connected, Serial6/0

C 165.148.120.0 is directly connected, ATM1/0.100

the problem here is once I apply the ip vrf for command on th interface on the PE's, the CE's drops immediately..

adamclarkuk_2
Level 4
Level 4

Hi

Just an FYI, you cannot redistribute BGP into any IGP without the BGP command :-

bgp redistribute-internal

You will need to add this to your config on router 2 under router bgp 100, or if you go with the above example, it will go under address-family ipv4.

I tried all of the above configs but i still can't get it right.

please confirm this for me, to run mpls do I need to have a P router, and PE's. I've configured only these two commands mpls ip, mpls label protocol ldp between the two routers (R2&R3) to create an mpls cloud so that i can configure my vrf's on the PE and CE.

Do I need to to have mpls configurations on the P router before I can generate traffic from one end to another making use of vrf?

Lawrence,

It should be fine to have "mpls ip" configured only between r2 and r3 if those are your PEs. You do not necessarily need P routers to get MPLS VPN working. Directly connected PEs will do just fine.

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Lawrence

Have a look on the attached configs i had used to simulate when learning about MPLS .. There are no P routers in them

Hope it helps

Narayan

I will be trying the configs you gave me in three hours, I will provide feedback. I can't access my lab at this stage I don't know what happened. will be checking in the morning(in 4 hours from now).

I have tried your configs, my problem now is: I cannot activate the neighbor on address-family vpnv4 here is an error message "Specify remote-as or peer-group commands first".

another question is "is it a must to have three routers(PE)?

Can it work with my sketch(only four routers.

Yes it can... you can remove the RR in my design

"Cannot configure the local system as neighbor".

This means that you are trying to use using the routers own ip address instead of the peer neighbor command.. just chnage this to the other peer

Narayan

Lawrence,

As the message indicates, you are trying to activate using the address of the local end when you should be using the remote end as defined in global bgp mode.

As to your other question, you can run mpls vpn with only two PEs, no P router.

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

sorry my bad, you guys are correct but it's still giving me an errors message "Specify remote-as or peer-group commands first" when I try to activate the neighbor.

I am starting to suspect the ios. this router is using version 12.2(31)SB9, the other router is using version 12.4(21) and this one does accept this configs. i once tried to upgrade to the recent version but it's failing to boot from the latest..

I forgot to put it the remote-as.. thanks for your help but I am still proceeding with my configs not done yet.

Hello Lawrence,

on older IOS version you need to give

router bgp 100

no bgp default ipv4-unicast

this is to be able then to use the address-families

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card