cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2208
Views
0
Helpful
7
Replies

asr9k - BGP - communication - route-policy issue

wilsonribeiro
Level 1
Level 1

Hello,

I'm trying a simple BGP example here with asr9k ios 6.0.2

router bgp 100

address-family ipv4 unicast

network 10.10.10.0/24

neighbor 1.1.1.1
remote-as 200
address-family ipv4 unicast
route-policy filtroEntrada in
route-policy ANUNCIO_200 out
!


prefix-set PREFIXOS_200
10.10.10.0/24
end-set

route-policy filtroEntrada
   drop
end-policy

route-policy ANUNCIO_200
if destination in PREFIXOS_200 then
  prepend as-path 200 1
  pass
endif
end-policy

router static
address-family ipv4 unicast
0.0.0.0/0 Bundle-Ether1 1.1.1.1 permanent

So basically, the bgp session is established, I'm filtering all routes delivered by AS 200 as expected, and I'm advertising 10.10.10.0/24 prefix with aspath modified. I have a static default route via neighbor 1.1.1.1.

The problem I'm seeing is I can't communicate with anything through this neighbor. The behavior changes when I change route-policy filtroEntrada to pass everything, then I can communicate with any host via neighbor 1.1.1.1.

What am I missing?

Thanks

1 Accepted Solution

Accepted Solutions

Hello,

your static route has a destination VRF specified:

router static
address-family ipv4 unicast
0.0.0.0/0 Bundle-Ether1 1.1.1.1 permanent

Try to remove the VRF from the static route...

View solution in original post

7 Replies 7

Hello,

your static route has a destination VRF specified:

router static
address-family ipv4 unicast
0.0.0.0/0 Bundle-Ether1 1.1.1.1 permanent

Try to remove the VRF from the static route...

Ok, I'll try that.

Thanks! it worked!

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

I am not familiar with asr9ks, but according to your policy everything inbound supposed to be drooped. 1.1.1.1

route-policy filtroEntrada
   drop
end-policy

So, it should be changed to pass.

HTH

My objective is to receive not any prefixes from 1.1.1.1 / AS 200.

Also this link could be useful:

Configuring BGP Route Filtering by Route Policy

Perform this task to configure BGP routing filtering by route policy.

Prerequisites

See the Implementing Routing Policy on Cisco ASR 9000 Series Routers module of Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide (this publication) for a list of the supported attributes and operations that are valid for inbound and outbound neighbor policy filtering.

SUMMARY STEPS

1. configure

2. route-policy name

3. end-policy

4. router bgp as-number

5. neighbor ip-address

6. address-family {ipv4 | ipv6} unicast

7. route-policy route-policy-name {in | out}

8. end
or
commit

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

RP/0/RSP0/CPU0:router# configure

Enters global configuration mode.

Step 2 

route-policy name

Example:

RP/0/RSP0/CPU0:router(config)# route-policy drop-as-1234

RP/0/RSP0/CPU0:router(config-rpl)# if as-path 
passes-through '1234' then
RP/0/RSP0/CPU0:router(config-rpl)# apply 
check-communities
RP/0/RSP0/CPU0:router(config-rpl)# else
RP/0/RSP0/CPU0:router(config-rpl)# pass
RP/0/RSP0/CPU0:router(config-rpl)# endif

(Optional) Creates a route policy and enters route policy configuration mode, where you can define the route policy.

Step 3 

end-policy

Example:

RP/0/RSP0/CPU0:router(config-rpl)# end-policy

(Optional) Ends the definition of a route policy and exits route policy configuration mode.

Step 4 

router bgp as-number

Example:

RP/0/RSP0/CPU0:router(config)# router bgp 120

Enters BGP configuration mode, allowing you to configure the BGP routing process.

Step 5 

neighbor ip-address

Example:

RP/0/RSP0/CPU0:router(config-bgp)# neighbor 172.168.40.24

Places the router in neighbor configuration mode for BGP routing and configures the neighbor IP address as a BGP peer.

Step 6 

address-family {ipv4 | ipv6} unicast

Example:

RP/0/RSP0/CPU0:router(config-vrf)# address-family ipv4 unicast

Specifies either an IPv4 or IPv6 address family unicast and enters address family configuration submode.

To see a list of all the possible keywords and arguments for this command, use the CLI help (?).

Step 7 

route-policy route-policy-name {in | out}

Example:

RP/0/RSP0/CPU0:router(config-bgp-nbr-af)# route-policy drop-as-1234 in

Applies the specified policy to inbound routes.

Step 8 

end

or

commit

Example:

RP/0/RSP0/CPU0:router(config-bgp-nbr-af)# end

or

RP/0/RSP0/CPU0:router(config-bgp-nbr-af)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before 
exiting(yes/no/cancel)? 
[cancel]:

Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.

Reference: http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/routing/configuration/guide/rcasr9kbgp.html#wp1207277




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Hi

If you are implementing eBGP between 2 ASR you need to create a PASS policy and apply it on both ASR, example:

route-policy PASS
pass
exit

router bgp 100

address-family ipv4 unicast
neighbor 1.1.1.1
remote 100
update-source <interface>  <--- if you are not using the connected subnets>
ebgp-multihop <hop value>  <-- if the above is applied>
address-family ipv4 unicast
no route-policy filtroEntrada in
route-policy PASS in
route-policy PASS out

exit

commit

If your neighborship is in active status, you could verify if they have router-id configured:

sh bgp neighbor detail

BGP neighbor is 100.100.100.2
Remote AS 200, local AS 100, external link
Remote router ID 0.0.0.0
BGP state = Active (Router-ID not available)

to configure the router-id

router bgp x
address-family ipv4 unicast
bgp router-id x.x.x.x

If you are configuring a normal eBGP the static route is not required. It is used when you are creating an eBGP and passing mpls labels throught it for example through an ipv4 connection.

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
Review Cisco Networking for a $25 gift card