06-26-2023
04:07 AM
- last edited on
06-30-2023
12:31 AM
by
Translator
Hello Everyone, i'm having a trouble configuring
BGP and RIP
between two VRFs .The idea was to configure as many protocols and get hands-on experince using only one router.
This is my configuration:
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname myrouter
!
boot-start-marker
boot-end-marker
!
enable secret xxx
enable password xxx
!
no aaa new-model
!
no ipv6 cef
ip source-route
ip cef
!
!
ip vrf blue
rd 65000:1
bgp next-hop Loopback1
!
ip vrf red
rd 65000:2
bgp next-hop Loopback2
!
!
!
multilink bundle-name authenticated
!
!
!
license udi pid CISCO1921/K9 sn xxx
!
!
!
!
!
!
!
!
interface Loopback1
ip vrf forwarding red
ip address 10.0.0.1 255.255.255.255
ip rip send version 2
ip rip receive version 2
!
interface Loopback2
ip vrf forwarding blue
ip address 10.0.0.2 255.255.255.255
ip rip send version 2
ip rip receive version 2
!
interface Loopback10
ip address 128.0.0.1 255.255.0.0
!
interface Loopback20
ip address 129.0.0.2 255.255.0.0
!
interface GigabitEthernet0/0
bandwidth 100
ip vrf forwarding blue
ip address 192.168.1.12 255.255.255.0
ip ospf network point-to-point
duplex auto
speed auto
no mop enabled
!
interface GigabitEthernet0/1
description unused available port
ip vrf forwarding red
ip address 192.168.1.13 255.255.255.0
ip ospf network point-to-point
duplex auto
speed auto
no mop enabled
!
interface ATM0/0/0
no ip address
shutdown
no atm ilmi-keepalive
!
interface Serial0/1/0
no ip address
shutdown
clock rate 2000000
!
router ospf 2 vrf blue
router-id 10.0.0.2
log-adjacency-changes
redistribute static subnets
network 192.168.1.0 0.0.0.255 area 0
!
router ospf 1 vrf red
router-id 10.0.0.1
log-adjacency-changes
redistribute static subnets
network 192.168.1.0 0.0.0.255 area 0
!
router rip
version 2
!
address-family ipv4 vrf red
network 10.0.0.0
no auto-summary
exit-address-family
!
address-family ipv4 vrf blue
network 10.0.0.0
no auto-summary
exit-address-family
!
router bgp 40000
bgp router-id 10.0.0.1
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 45000
!
address-family ipv4
no synchronization
network 10.0.0.0
network 10.0.0.0 mask 255.255.255.255
network 192.168.1.0
neighbor 10.0.0.2 activate
no auto-summary
exit-address-family
!
address-family ipv4 vrf blue
no synchronization
redistribute connected
redistribute static
neighbor 10.0.0.1 remote-as 40000
neighbor 10.0.0.1 activate
exit-address-family
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route vrf blue 10.2.0.0 255.255.255.0 Null0
!
!
!
snmp-server community public RO
!
control-plane
!
!
line con 0
exec-timeout 0 0
password xxx
line aux 0
password xxx
login
modem InOut
transport input all
speed 115200
flowcontrol hardware
line vty 0 4
password xxx
login
transport input all
line vty 5 15
password xxx
login
!
scheduler allocate 20000 1000
end
I was trying to test and learn as much as i can using this one router.
the two interfaces are directly connected with 4 pair RJ-45 Cable.
Both
RIP and BGP
doesn't even show up .
Any help will be much appreciated.
Solved! Go to Solution.
06-26-2023
04:13 AM
- last edited on
06-26-2023
11:01 PM
by
Translator
https://networkdirection.net/articles/routingandswitching/mp-bgp/leakingrouteswithmp-bgp/
this link for config
BGP route leaking
,
must important part
route-target import/export
06-26-2023
04:13 AM
- last edited on
06-26-2023
11:01 PM
by
Translator
https://networkdirection.net/articles/routingandswitching/mp-bgp/leakingrouteswithmp-bgp/
this link for config
BGP route leaking
,
must important part
route-target import/export
06-27-2023
01:03 AM
- last edited on
06-30-2023
02:09 AM
by
Translator
"If we are using
MP-BGP
, this solution should work. However, if we are configuring regular
BGP
, there are some changes that need to be made, right?
I'm also having trouble understanding why
RIP
isn't functioning properly. Can anyone please provide more details or share any specific error messages they encountered? It would be helpful to diagnose the issue and provide a more accurate solution. Thank you!"
06-27-2023
03:34 AM
- last edited on
07-03-2023
02:58 AM
by
Translator
Hello @Cisco Enthusiast ,
>> I'm also having trouble understanding why
RIP
isn't functioning properly.
You are attempting to build
RIP
neighborships on loopback interfaces, but this is not possibile . A loopback interface is a logical interface isolated from outside world if using an appropriate
debug
command you should see a loopback receiving back only its own
RIP
advertisements sourced by itself.
In order to make a
RIP
neighborship you should run
RIP
also on the LAN interfaces that are interconnected with a LAN cable
gi0/0 and gi0/1
by adding a
network
command for subnet 192.168.1.0 under the two address families in
RIP router
process.
For
BGP
you are attempting to use
iBGP
within a vrf and also this is something that is uncommon, but you have a single router that cannot be in two different
BGP
ASes at the same time. There are some tricks like neighbor ... local-as that could be used but I would suggest you to try to fix the
RIP
Also OSPF could be used to build the inter VRF communication.
Hope to help
Giuseppe
06-27-2023
07:18 AM
- last edited on
06-30-2023
02:16 AM
by
Translator
Hi @Cisco Enthusiast ,
A few things you need to change for the
BGP
session to come up.
1. Advertise the loopback addresses in ospf for
vrf
red and blue.
router ospf 2 vrf blue
network 10.0.0.2 0.0.0.0
area 0!
router ospf 1 vrf red
network 10.0.0.1 0.0.0.0 area 0
2. The following section of the
BGP
configuration should be configured for
vrf red
, not for global, as the session is established between
vrf red
and
vrf blue
(10.0.0.1 to 10.0.0.2).
address-family ipv4
no synchronization
network 10.0.0.0
network 10.0.0.0 mask 255.255.255.255
network 192.168.1.0
neighbor 10.0.0.2 activate
no auto-summary
exit-address-family
!
it should be
address-family ipv4 vrf red
no synchronization
network 10.0.0.0
network 10.0.0.0 mask 255.255.255.255
network 192.168.1.0
neighbor 10.0.0.2 activate
no auto-summary
exit-address-family
!
3. Configure a different
BGP router id for vrf red and blue
. Otherwise the default will be used and the session will not come up, as the router id will be the same for both neighbors.
address-family ipv4
vrf red
bgp router-id 10.0.0.1
address-family ipv4
vrf blue
bgp router-id 10.0.0.2
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide