I have a SSG5 with BGP running to two different routers (one is primary the other is meant to be secondary/backup.) I need to be able to pre-pend all the routes advertised out the secondary BGP session.. I believe I have it configured correctly... but it will not do the route-map on the individual neighbors. If I apply the route map that does the prepends to the route-distribution for static it will prepend to both BGP neighbors...which I don't want. I need it to prepend only on the secondary.
Config:
set protocol bgp 65500
set enable
set hold-time 30
set neighbor 192.168.250.1 remote-as 6167
set neighbor 192.168.250.1 enable
set neighbor 192.168.250.1 hold-time 30
set neighbor 192.168.250.5 remote-as 6167
set neighbor 192.168.250.5 enable
set neighbor 192.168.250.5 hold-time 30
set ipv4 neighbor 192.168.250.1 activate
set ipv4 neighbor 192.168.250.1 nhself-enable
set ipv4 neighbor 192.168.250.1 advertise-def-route
set ipv4 neighbor 192.168.250.1 route-map "primary-out" out
set ipv4 neighbor 192.168.250.5 activate
set ipv4 neighbor 192.168.250.5 nhself-enable
set ipv4 neighbor 192.168.250.5 advertise-def-route
set ipv4 neighbor 192.168.250.5 route-map "secondary-out" out
set as-path-access-list 1 permit "65500"
set as-path-access-list 2 permit "65500 65500 65500 65500 65500"
exit
set access-list 10
set access-list 10 deny ip 192.168.0.0/24 10
set access-list 10 permit ip 10.0.0.0/16 20
set access-list 10 permit default-route 100
set route-map name "secondary-out" permit 1
set match ip 10
set as-path 2
exit
set route-map name "primary-out" permit 1
set match ip 10
set as-path 1
exit
set route-map name "bgp-resdis-static" permit 1
set match ip 10
exit
set add-default-route vrouter "untrust-vr"
set route 10.0.0.0/16 interface bgroup0 gateway 10.0.106.1 permanent
set protocol bgp
set redistribute route-map "bgp-resdis-static" protocol static
exit
exit
set interface tunnel.1 protocol bgp
set interface tunnel.2 protocol bgp
Some debug below...where I believe I see it applying the route-map but the commands showing advertised routes does not have the prepend...
ssg5-serial-> get vrouter trust-vr protocol bgp rib neighbor 192.168.250.5
i: IBGP route, e: EBGP route, >: best route, *: valid route
Prefix Nexthop Wt Pref Med Orig AS-Path
--------------------------------------------------
e 192.168.0.0/24 192.168.250.5 100 100 0 INC 6167 6167 6167 6167 6167 6167 6167 6167 6167 6167 6167 6167
Total IPv4 routes received: 1
i: IBGP route, e: EBGP route, >: best route, *: valid route
Prefix Nexthop Wt Pref Med Orig AS-Path
--------------------------------------------------
>i 0.0.0.0/0 0.0.0.0 32768 100 0 INC
>i 10.0.0.0/16 10.0.106.1 32768 100 0 INC
Total IPv4 routes advertised: 2
## 2017-04-07 15:49:13 : [bgp/update]: created new PA, peer 192.168.250.5
## 2017-04-07 15:49:13 : [bgp/update]: validate/canonical UPDATE pass
## 2017-04-07 15:49:13 : [bgp/update]: start: proc updt msg, peer:192.168.250.5
## 2017-04-07 15:49:13 : [bgp/rtmap]: start: apply policy route 0.0.0.0/0, peer 192.168.250.5, rtmap NULL
## 2017-04-07 15:49:13 : [bgp/rtmap]: done : apply policy route 0.0.0.0/0, peer 192.168.250.5, rtmap NULL
## 2017-04-07 15:49:13 : [bgp/update]: start: proc nlri 192.168.0.0/24
## 2017-04-07 15:49:13 : [bgp/update]: local rib add prefix 192.168.0.0 / pref 100, metric 0, next-hop 192.168.250.5
## 2017-04-07 15:49:13 : [bgp/nexthop]: added nexthop for BGP nexthop: 192.168.250.5 with fdb nexthop: 192.168.250.5, cost: 0, reach_addr: 192.168.250.6, reach_mask: 30, bgprt: 0
## 2017-04-07 15:49:13 : BGP: re(192.168.0.0/24) from peer 192.168.250.5 is being handled for ECMP route change
## 2017-04-07 15:49:13 : [bgp/update]: done : proc nlri 192.168.0.255/24 OK
## 2017-04-07 15:49:13 : [bgp/update]: done : proc updt msg, peer:192.168.250.5
## 2017-04-07 15:49:13 : [bgp/stack]: Rx 192.168.250.5: UPDATE msg, conn-id 22
## 2017-04-07 15:49:13 : [bgp/update]: validate/canonical UPDATE pass
## 2017-04-07 15:49:13 : [bgp/update]: start: proc updt msg, peer:192.168.250.5
## 2017-04-07 15:49:13 : [bgp/update]: done : proc updt msg, peer:192.168.250.5
## 2017-04-07 15:49:13 : [bgp/update]: start: initial send eBGP update 192.168.0.0/24
## 2017-04-07 15:49:13 : [bgp/update]: nhop: 192.168.250.1, bgprt->i_nhop: 0.0.0.0
## 2017-04-07 15:49:13 : [bgp/rtmap]: o/g filter route 192.168.0.0/24 from peer 192.168.250.5 with rtmap vzw-secondary-out
## 2017-04-07 15:49:13 : [bgp/rtmap]: Filter with route-map entry 1
## 2017-04-07 15:49:13 : [bgp/rtmap]: MATCH IP-addr: acc-list-id 10 return deny
## 2017-04-07 15:49:13 : [bgp/rtmap]: input-policy exit: no match in route-map
## 2017-04-07 15:49:13 : [bgp/update]: Txq Add Rt return: qparms->filter: 1
## 2017-04-07 15:49:13 : [bgp/update]: done : initial send eBGP 192.168.0.0/24 OK
## 2017-04-07 15:49:13 : [bgp/update]: start: initial send eBGP update 0.0.0.0/0
## 2017-04-07 15:49:13 : [bgp/update]: nhop: 0.0.0.0, bgprt->i_nhop: 0.0.0.0
## 2017-04-07 15:49:13 : [bgp/rtmap]: o/g filter route 0.0.0.0/0 from peer 192.168.250.5 with rtmap vzw-secondary-out
## 2017-04-07 15:49:13 : [bgp/rtmap]: Filter with route-map entry 1
## 2017-04-07 15:49:13 : [bgp/rtmap]: MATCH IP-addr: acc-list-id 10 return permit
## 2017-04-07 15:49:13 : [bgp/rtmap]: SET AS-Path id 2
## 2017-04-07 15:49:13 : [bgp/update]: Build Tx PA: med: 0, local pref: 100, nhop: 192.168.250.6
## 2017-04-07 15:49:13 : [bgp/update]: add feasible afi/safi: 1/1 prefix 0.0.0.0/0 to peer 192.168.250.5 Tx-q
## 2017-04-07 15:49:13 : [bgp/update]: done : initial send eBGP 0.0.0.0/0 OK
## 2017-04-07 15:49:13 : [bgp/update]: start: initial send eBGP update 10.0.0.0/16
## 2017-04-07 15:49:13 : [bgp/update]: nhop: 10.0.106.1, bgprt->i_nhop: 0.0.0.0
## 2017-04-07 15:49:13 : [bgp/rtmap]: o/g filter route 10.0.0.0/16 from peer 192.168.250.5 with rtmap vzw-secondary-out
## 2017-04-07 15:49:13 : [bgp/rtmap]: Filter with route-map entry 1
## 2017-04-07 15:49:13 : [bgp/rtmap]: MATCH IP-addr: acc-list-id 10 return permit
## 2017-04-07 15:49:13 : [bgp/rtmap]: SET AS-Path id 2
## 2017-04-07 15:49:13 : [bgp/update]: Build Tx PA: med: 0, local pref: 100, nhop: 192.168.250.6
## 2017-04-07 15:49:13 : [bgp/update]: add feasible afi/safi: 1/1 prefix 10.0.0.0/16 to peer 192.168.250.5 Tx-q
## 2017-04-07 15:49:13 : [bgp/update]: done : initial send eBGP 10.0.0.0/16 OK
## 2017-04-07 15:49:13 : [bgp/rtmap]: o/g filter route 0.0.0.0/0 from peer 192.168.250.5 with rtmap vzw-secondary-out
## 2017-04-07 15:49:13 : [bgp/rtmap]: Filter with route-map entry 1
## 2017-04-07 15:49:13 : [bgp/rtmap]: MATCH IP-addr: acc-list-id 10 return permit
## 2017-04-07 15:49:13 : [bgp/rtmap]: SET AS-Path id 2
## 2017-04-07 15:49:13 : [bgp/update]: Build Tx PA: med: 0, local pref: 100, nhop: 192.168.250.6
## 2017-04-07 15:49:13 : [bgp/update]: add feasible afi/safi: 1/1 prefix 0.0.0.0/0 to peer 192.168.250.5 Tx-q
Open to any suggestions...I am stumped.