On 2/14/2011 1:03 PM, Yann GAUTERON wrote:
Hi !

I would like to apply some sophisticated rules with my prefixes announced
with BGP.

I saw that Cisco implemented a "continue" clause that could permit me to
achieve my goal.

Before implemented such rules on my productive routers, I did some tests
with GNS3, but it seems that the "continue" does not work !

For a simple simulation with 2 routers (in BGP AS 1 and AS 2), I cannot see
the expected result.

Configuration on the router in AS1:
ip cef
!
interface Loopback0
  ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet1/0
  ip address 10.0.0.1 255.255.255.0
  negotiation auto
!
router bgp 1
  no synchronization
  bgp log-neighbor-changes
  network 1.0.0.0 route-map NET-1-0-0-IN
  neighbor 10.0.0.2 remote-as 2
  neighbor 10.0.0.2 send-community
  neighbor 10.0.0.2 route-map PEER-OUT out
  no auto-summary
!
ip forward-protocol nd
ip route 1.0.0.0 255.0.0.0 Null0
!
ip bgp-community new-format
ip community-list 1 permit 1:1
!
route-map PEER-OUT permit 10
  match community 1
  continue
  set community 1:100 additive
!
route-map PEER-OUT permit 20
  set community 1:200 additive
!
route-map NET-1-0-0-IN permit 10
  set community 1:1 1:2 65000:1 65000:2

With this configuration, I would expect my second router (in AS 2), to
receive the prefix 1.0.0.0/8 with the communities 1:1 1:2 1:100 1:200
65000:1 65000:2.

But I cannot see 1:200 in my communities:
Router#sh ip bgp 1.0.0.0
BGP routing table entry for 1.0.0.0/8, version 9
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
   Not advertised to any peer
   1
     10.0.0.1 from 10.0.0.1 (1.1.1.1)
       Origin IGP, metric 0, localpref 100, valid, external, best
       Community: 1:1 1:2 1:100 65000:1 65000:2

My GNS3 router is a 7200 and has IOS 12.4(25d). My productive router is a
7600 with 12.2(33)SRE, but I cannot emulate a 7600 on GNS3 !

Is the problem due to a misbehaviour of that IOS 12.4(25d) on my "virtual"
7200, or did I miss something with the way "continue" do work ? Is it a
misbehavior I would face with my productive 7600 ?

For the sake of asking, are you certain that BRMCO is supported in 12.4(25d) on the 7200 platform? Note that outbound support followed long after inbound support, and outbound was unstable when first released in 12.0(31)S (I filed a bug on it, and it wasn't fixed until 12.0(32)S). Try putting a 'set metric 12345' in the PEER-OUT p 20 clause and see if that takes effect. If it does, you have a misbehavior. If it doesn't, BRMCO doesn't work on this code.

For the sake of sane troubleshooting, your configuration snippet above is misleading, and overly complex. If you're going to simulate BRMCO, just simulate BRMCO - add communities on the outbound side and see what you get on the inbound side. In your example above, you have a two-clause outbound route map where each clause adds one community. You then have an "unused" inbound route-map which sets four communities (non-additive, I might add). If you're trying to test the outbound behavior, just test that. If you're trying to show the inbound behavior, we're going to tell you to isolate the one thing you're trying to do so we can see it. Also, if you're trying to show us that route-map NET-1-0-0-IN is what you're applying on the inbound router, show us a separate config for that router with that route-map. If you're trying to suggest that this route-map is being used inbound, it's not clear above. If I were to guess that's what you were doing, I'd tell you you'll never see communities 1:100 or 1:200 because your route-map inbound isn't additive on the communities.

pt

_______________________________________________
cisco-nsp mailing list  [email protected]
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/

Reply via email to