IOS-XR and Nexus: EBGP peering example with different AS per-router

Home » Blog » Configuration Template » Cisco » IOS-XR and Nexus: EBGP peering example with different AS per-router

IOS-XR and Nexus: EBGP peering example with different AS per-router

12.02 2024 | by massimiliano

architettura di riferimento NEXUS-R3 configuration router bgp 65514 vrf EXAMPLE address-family ipv4 unicast redistribute direct route-map CONNECTED neighbor 10.255.255.1 description […]



architettura di riferimento

NEXUS-R3 configuration

router bgp 65514

vrf EXAMPLE

address-family ipv4 unicast

redistribute direct route-map CONNECTED

neighbor 10.255.255.1

description to_R1

remote-as 65512

timers 10 30

password <password>

address-family ipv4 unicast

disable-peer-as-check

route-map Weight-Out out

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

neighbor 10.255.255.2

description to_R2

remote-as 65513

timers 10 30

password <password>

address-family ipv4 unicast

disable-peer-as-check

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

neighbor 10.255.255.4

desciption to-R4

remote-as 65515

password <password>

update-source vlan 10

address-family ipv4 unicast

next-hop self

!

interface Vlan100

ip address 10.0.0.1/8

!

route-map CONNECTED permit 10

match ip address prefix-list DIRECT

route-map Weight-Out permit 10

set weight 200

!

ip prefix-list DIRECT 10.0.0.0/8

NEXUS R4 configuration

router bgp 65515

vrf EXAMPLE

address-family ipv4 unicast

redistribute direct route-map CONNECTED

neighbor 10.255.255.1

description to_R1

remote-as 65512

timers 10 30

password <password>

address-family ipv4 unicast

disable-peer-as-check

route-map Weight-Out out

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

neighbor 10.255.255.2

description to_R2

remote-as 65513

timers 10 30

password <password>

address-family ipv4 unicast

disable-peer-as-check

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

neighbor 10.255.255.3

desciption to-R3

remote-as 65514

password <password>

update-source vlan 10

address-family ipv4 unicast

next-hop self

!

interface Vlan100

ip address 10.0.0.1/8

!

route-map CONNECTED permit 10

match ip address prefix-list DIRECT

route-map Weight-Out permit 10

set weight 200

!

ip prefix-list DIRECT 10.0.0.0/8

IOS-XR R1 configuration

router bgp 65512

vrf EXAMPLE

address-family ipv4 unicast

neighbor 172.16.1.1

remote-as 100

timers 10 30

descripion to-PEA

password encrypted <password>

ttl-security

address-family ipv4 unicast

route-policy EXAMPLE-IN in

route-policy PASS_ALL out

maximum-prefix 10000 50 warning-only

neighbor 10.255.255.3

remote-as 65514

timers 10 30

description to-NEXUS-R3

password encrypted <password>

address-family ipv4 unicast

route-policy PASS_ALL in

route-policy PASS_ALL out

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

neighbor 10.255.255.4

remote-as 65515

timers 10 30

description to-NEXUS-R4

password encrypted <password>

address-family ipv4 unicast

route-policy PASS_ALL in

route-policy PASS_ALL out

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

!

route-policy EXAMPLE-IN

if as-path in AS_EXAMPLE_PERMIT then

pass

elseif (destination in PFX_Example_Permit_IN) then

pass

endif

end-policy

!

as-path-set AS_EXAMPLE_PERMIT

#DCRM

ios-regex ‘_400$’,

#DCMI

ios-regex ‘_500$’

end-set

prefix-set PFX_Example_Permit_IN

10.0.0.0/8

end-set

IOS-XR R2 configuration

router bgp 65513

vrf EXAMPLE

address-family ipv4 unicast

neighbor 172.16.1.2

remote-as 200

timers 10 30

descripion to-PEB

password encrypted <password>

ttl-security

address-family ipv4 unicast

route-policy EXAMPLE-IN in

route-policy EXAMPLE_OUT out

maximum-prefix 10000 50 warning-only

neighbor 10.255.255.3

remote-as 65514

timers 10 30

description to-NEXUS-R3

password encrypted <password>

address-family ipv4 unicast

route-policy PASS_ALL in

route-policy PASS_ALL out

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

neighbor 10.255.255.4

remote-as 65515

timers 10 30

description to-NEXUS-R4

password encrypted <password>

address-family ipv4 unicast

route-policy PASS_ALL in

route-policy PASS_ALL out

maximum-prefix 10000 50 warning-only

soft-reconfiguration inbound

!

route-policy EXAMPLE-IN

if as-path in AS_EXAMPLE_PERMIT then

pass

elseif (destination in PFX_Example_Permit_IN) then

pass

endif

end-policy

!

as-path-set AS_EXAMPLE_PERMIT

#DCRM

ios-regex ‘_400$’,

#DCMI

ios-regex ‘_500$’

end-set

!

route-policy EXAMPLE-OUT

set med 200

end-policy

!

prefix-set PFX_Example_Permit_IN

10.0.0.0/8

end-set

Torna in alto