06-10-2023 03:34 AM
Hello all,
I'm trying to do a lab in gns3 where I have some routers one is CE4 and one is PE2,I want to advertise the loopback 11 of PE2 to CE4 that resides on vrf C1 and is not working. I paste here the config on PE2 and CE4 maybe I did something wrong:
CE4#show run
Building configuration...
Current configuration : 1679 bytes
!
! Last configuration change at 10:28:09 UTC Sat Jun 10 2023
!
version 16.8
service timestamps debug datetime msec
service timestamps log datetime msec
platform qfp utilization monitor load 80
no platform punt-keepalive disable-kernel-core
platform console serial
!
hostname CE4
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
subscriber templating
!
!
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
license udi pid CSR1000V sn 9TQ4BJSOOUO
no license smart enable
diagnostic bootup level minimal
!
spanning-tree extend system-id
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 10.16.11.11 255.255.255.0
!
interface GigabitEthernet1
ip address 101.2.22.30 255.255.255.224
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet2
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router bgp 100
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 101.2.22.1 remote-as 200
!
address-family ipv4
network 10.16.11.0 mask 255.255.255.0
neighbor 101.2.22.1 activate
exit-address-family
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
line con 0
logging synchronous
stopbits 1
line vty 0 4
login
!
wsma agent exec
!
wsma agent config
!
wsma agent filesys
!
wsma agent notify
!
!
end
PE2#show running-config
Building configuration...
Current configuration : 2189 bytes
!
! Last configuration change at 10:28:12 UTC Sat Jun 10 2023
!
version 16.8
service timestamps debug datetime msec
service timestamps log datetime msec
platform qfp utilization monitor load 80
no platform punt-keepalive disable-kernel-core
platform console serial
!
hostname PE2
!
boot-start-marker
boot-end-marker
!
!
vrf definition C2
rd 200:1
route-target export 20:20
route-target import 30:30
!
address-family ipv4
exit-address-family
!
!
no aaa new-model
!
!
!
!
!
!
!
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
subscriber templating
!
!
!
!
!
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
license udi pid CSR1000V sn 9N0LYWUTOZK
no license smart enable
diagnostic bootup level minimal
!
spanning-tree extend system-id
!
!
!
!
redundancy
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 10.19.3.33 255.255.255.255
!
interface Loopback11
ip address 10.1.1.1 255.255.255.0
!
interface GigabitEthernet1
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet2
vrf forwarding C2
ip address 101.2.22.1 255.255.255.224
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet3
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
interface GigabitEthernet4
no ip address
shutdown
negotiation auto
no mop enabled
no mop sysid
!
router bgp 200
bgp log-neighbor-changes
no bgp default ipv4-unicast
!
address-family ipv4 vrf C2
redistribute connected
redistribute static route-map Global-to-Vrf
neighbor 101.2.22.30 remote-as 100
neighbor 101.2.22.30 log-neighbor-changes
neighbor 101.2.22.30 activate
neighbor 101.2.22.30 advertise-map Global-to-Vrf exist-map Global
exit-address-family
!
ip forward-protocol nd
ip http server
ip http authentication local
ip http secure-server
!
!
!
ip prefix-list Global seq 5 permit 10.1.1.0/24
!
!
route-map Global-to-Vrf permit 10
match ip address prefix-list Global
set ip next-hop 101.2.22.1
!
!
!
control-plane
!
!
!
!
!
!
line con 0
logging synchronous
stopbits 1
line vty 0 4
login
!
wsma agent exec
!
wsma agent config
!
wsma agent filesys
!
wsma agent notify
!
!
end
CE4#show ip ro
CE4#show ip route b
CE4#show ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
Solved! Go to Solution.
06-11-2023 07:28 PM - edited 06-11-2023 07:46 PM
Hi @vasialexandru43 ,
1. To import routes from the global routing table to the VRF you need to apply the following command under the VRF configuration:
vrf definition C2
address-family ipv4
import ipv4 unicast map Global-to-Vrf
2. Remove the "set ip next-hop 101.2.22.1" from the route-map.
3. Remove the following configurations statement from the VRF.
router bgp 200
address-family ipv4 vrf C2
no redistribute static route-map Global-to-Vrf
no neighbor 101.2.22.30 advertise-map Global-to-Vrf exist-map Global
4. You also need to originate the loopback address in the global BGP table so that it can be imported in the VRF.
router bgp 200
address-family ipv4
network 10.1.1.0 mask 255.255.255.0
Regards,
06-11-2023 07:28 PM - edited 06-11-2023 07:46 PM
Hi @vasialexandru43 ,
1. To import routes from the global routing table to the VRF you need to apply the following command under the VRF configuration:
vrf definition C2
address-family ipv4
import ipv4 unicast map Global-to-Vrf
2. Remove the "set ip next-hop 101.2.22.1" from the route-map.
3. Remove the following configurations statement from the VRF.
router bgp 200
address-family ipv4 vrf C2
no redistribute static route-map Global-to-Vrf
no neighbor 101.2.22.30 advertise-map Global-to-Vrf exist-map Global
4. You also need to originate the loopback address in the global BGP table so that it can be imported in the VRF.
router bgp 200
address-family ipv4
network 10.1.1.0 mask 255.255.255.0
Regards,
06-12-2023 06:20 AM
@Harold Ritter Thank you so much for this it really helped me to fix it !
06-12-2023 06:29 AM
Can you ping between two IP ?
06-12-2023 07:12 AM
You are very welcome @vasialexandru43 and thanks for the feedback
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