sk2/autonetkit — Issue #173: HIGH: wrong route-map naming for IOS
Author: coaj
Created: 2012-01-23 04:59:39+00:00
State: open

rm_name parameter passed to IOS.mako is wrong.
as in here (irrelevant lines omitted):

"""
router bgp 1
neighbor 10.1.0.1 remote-as 2
neighbor 10.1.0.1 route-map rm_1_AS1_in in
neighbor 10.1.0.1 route-map rm_1_AS1_out out
neighbor 10.3.0.1 remote-as 4
neighbor 10.3.0.1 route-map rm_1_AS1_out out
neighbor 10.0.0.2 remote-as 3
neighbor 10.0.0.2 route-map rm_1_AS1_in in
neighbor 10.0.0.2 route-map rm_1_AS1_out out
!
ip community-list standard a200 permit 1234:20
ip community-list standard a300 permit 1234:10
!
route-map rm_1_AS1_in permit 10
set community 1234:10 additive
!
route-map rm_1_AS1_out deny 10
match community a200;

"""

the route-map name should consist of neighborAS and direction. at the moment it consists of localAS + direction.

the same policy compiled ok for Junos:

"""

policy-options {
community a200 members 1234:20;
community a300 members 1234:10;

policy-statement rm_ingress_2_AS2_1 {
term 10 {
then {
community add a200;
accept;
}
}
}
policy-statement rm_egress_2_AS2_2 {
term 10 {
from {
community a200;
}
then {
reject;
}
}
}
policy-statement rm_egress_2_AS2_1 {
term 10 {
from {
community a300;
}
then {
reject;
}
}
}
policy-statement rm_ingress_3_AS3_1 {
term 10 {
then {
community add a300;
accept;
}
}
}
policy-statement rm_egress_3_AS3_1 {
term 10 {
from {
community a200;
}
then {
reject;
}
}
}
policy-statement rm_egress_4_AS4_3 {
term 10 {
then {
reject;
}
}
}
policy-statement rm_egress_4_AS4_2 {
term 10 {
then {
metric 20;
accept;
}
}
}
policy-statement rm_egress_4_AS4_1 {
term 10 {
then {
local-preference 130;
accept;
}
}
}

"""