{code}
configure
cont local
!!! создаем все маршруты из сервисного контекста local в контекс ipoe
!!! в теории можно заменить на один, отправляя все в bgp контекст, но не всегда админу удобно
@@@ for route in abon_nets
ip route {{route.net}} context {{ctx_name}}
@@@ endfor
!
@@@ for route in reverse_routes
ip route {{route.net}} {{route.gw}}
@@@ endfor
!
@@@ for policy in nat_policy
@@@ for pool in policy.nat_pool
ip route {{pool}} context {{ctx_name}}
@@@ endfor
@@@ endfor
!
@@@ for bind in abon_binds
@@@ if bind.if_ip
ip route {{bind.if_ip}} context {{ctx_name}}
@@@ endif
@@@ endfor
!
@@@ if context_ip
ip route {{context_ip}} context {{ctx_name}}
@@@ endif
end
exit
{code}
configure
cont local
!!! создаем все маршруты из сервисного контекста local в контекс ipoe
!!! в теории можно заменить на один, отправляя все в bgp контекст, но не всегда админу удобно
@@@ for route in abon_nets
ip route {{route.net}} context {{ctx_name}}
@@@ endfor
!
@@@ for route in reverse_routes
ip route {{route.net}} {{route.gw}}
@@@ endfor
!
@@@ for policy in nat_policy
@@@ for pool in policy.nat_pool
ip route {{pool}} context {{ctx_name}}
@@@ endfor
@@@ endfor
!
@@@ for bind in abon_binds
@@@ if bind.if_ip
ip route {{bind.if_ip}} context {{ctx_name}}
@@@ endif
@@@ endfor
!
@@@ if context_ip
ip route {{context_ip}} context {{ctx_name}}
@@@ endif
end
exit
{code}