Hello,
I'm setting up OpenBGPD in a lab to determine if I can use it in my
organization. I'm fond of the pf similarities in the config and have
things generally working. I've run into some issues where I cannot
seem to use 'set' on prefixes from originating networks. Excerpts from
bgpd.conf:
####################################
PREFIX_ORIGINATE = "{ 10.171.0.0/19, 101.192.144.0/24, 91.199.248.0/24 }"
COMMUNITY_TEST = "65000:666"
network 10.171.0.0/19
network 101.192.144.0/24
network 91.199.248.0/22
# <default allow/deny stuff from sample conf is here>
match from any prefix $PREFIX_ORIGINATE set localpref 140
match from any prefix $PREFIX_ORIGINATE set community $COMMUNITY_TEST
match from any prefix $PREFIX_ORIGINATE set med 12
####################################
After this, even with a full restart of bgpd I just get the defaults:
# bgpctl show ip bgp
flags destination gateway lpref med aspath origin
AI*> 10.171.0.0/19 0.0.0.0 100 0 i
AI*> 101.192.144.0/24 0.0.0.0 100 0 i
AI*> 91.199.248.0/22 0.0.0.0 100 0 i
`bgpctl show ip bgp detail` shows no communites. In cisco land what
I'm trying to achieve can be done with:
####################################
router bgp 65000
network 10.171.0.0 mask 255.255.224.0 route-map ROUTEMAP-BGP-ORIGINATE
route-map ROUTEMAP-BGP-ORIGINATE permit 10
set local-preference 140
set community 65000:666
####################################
The 'match' statements I'm using above do work if I'm receiving routes
from another peer so the syntax does appear to be valid. I've also
tried them in the 'neighbor' statement with no luck. Doing so there
also seems odd since I would have to have multiple neighbor statements
for each originating prefix.
Additionally it appears that community macros cannot contain {} to
group them like prefixes can? it gives syntax errors.
--falz