Manual Chapter :
Configuring BGP with tmsh
Applies To:
Show VersionsBIG-IP LTM
- 17.1.2, 17.1.1, 17.1.0, 17.0.0, 16.1.5, 16.1.4, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.0.1, 16.0.0, 15.1.9, 15.1.8, 15.1.7, 15.1.6, 15.1.5, 15.1.4, 15.1.3, 15.1.2, 15.1.1, 15.1.0, 15.0.1, 15.0.0, 14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.0.1, 14.0.0
Configuring BGP with tmsh
ZebOS IMI will still exist in read-only mode, but IMI
and
tmsh
/iControl® REST
are mutually exclusive, so you will need to migrate your
ZebOS configuration.The routing configuration cannot
be synchronized across a device cluster.
Move ZebOS BGP routing
configuration to tmsh
The
same commands used in ZebOS
imish
for BGP and BFD can be used in tmsh
with a few exceptions. You will have to create a new deployment
because migration compatibility is not yet available.Currently BGP
and BFD are the only supported protocols available for configuration in
tmsh
.- To view the routing table:tmsh show net routeYou can see what routes the device is dynamically learning from its neighbors. Those routes will have an origin ofdynamic.
- To view the current configuration in ZebOS:imish -e 'show run'
- To remove all running routing protocols intmsh:tmsh modify net route-domain 0 routing-protocol replace-all-with { }You should run this command in case there are multiple routers across multiple-route-domains. If you have multiple route-domains with routers configured, use the commandzebos check -r <rd num>for every route-domain with a router.Now you should be able to see that no routing daemons are active if you use the commandzebos check.
- Before you recreate the router you had in ZebOS, activate thesys db variableby typing the command:tmsh modify sys db tmrouted.tmos.routing value enableOnce you have done this, do not enable any routing protocol in the user interface screen, or you will see an error message.Once you create a routing instance (BGP or BFD) the system backs upthe routing file in the corresponding route-domain. For example, it is backed up tozebos/rd0/ZebOS.conf.<timestamp>forroute-domain 0.
- Now you can recreate the router. For example:tmsh create net routing bgp testBGP local-as 111 neighbor add { 1.1.1.2 { remote-as 112} 1::2 { remote-as 112 } } address-family { ipv4 ipv6 { redistribute add { connected kernel static } } }It can take about 10 seconds for the daemon to start up.
- To view the configuration in ZebOS:imish -e 'show run'To view the configuration intmsh, type:tmsh list net routing
- To ensure that the routes made their way into ZebOS:imish -e 'show ip route'
- To verify that you are once again in an established state with the neighbor:tmsh show net routing
- Once you create the router, the old configuration is backed up automatically. To ensure that the old configuration is backed up, type the commandcat /zebos/rd<x>/ZebOS.conf.<timestamp>where "x" represents the route-domain.
- Save your configuration:tmsh save sys config
Here is an example of a router and its
configuration in
tmsh
:
Here is the above router's ZebOS equivalent :net routing bgp testBGP { address-family { ipv4 { redistribute { kernel { } static { } } } ipv6 { redistribute { connected { } } } } graceful-restart { graceful-reset enabled restart-time 101 stalepath-time 44 } local-as 123 neighbor { 5:6:7::8 { address-family { ipv4 { activate disabled } ipv6 { } } remote-as 114 } 1.2.3.4 { address-family { ipv4 { } ipv6 { activate disabled } } remote-as 113 } } profile bgp route-domain 0 }
! service password-encryption ! bgp extended-asn-cap ! router bgp 123 bgp graceful-restart restart-time 101 bgp graceful-restart stalepath-time 44 bgp graceful-restart graceful-reset redistribute kernel redistribute static neighbor 1.2.3.4 remote-as 113 neighbor 5:6:7::8 remote-as 114 no neighbor 5:6:7::8 activate no neighbor 5:6:7::8 capability graceful-restart ! address-family ipv6 redistribute connected no neighbor 1.2.3.4 activate no neighbor 1.2.3.4 capability graceful-restart neighbor 5:6:7::8 activate exit-address-family ! line con 0 login line vty 0 39 login ! end
Restore the original ZebOS routing
configuration from tmsh
The routing config sync status is in the prompt.
If you encounter a config sync failure that you are not able to fix, or if you need to
return to your original ZebOS BGP routing configuration, you can restore the ZebOS
configuration with the backed up file. Restoring a UCS should fully restore the ZebOS
configuration. Note that restoring a UCS will interrupt routing. For more information on
restoring using UCS, see K13132.
- To delete the router you configured intmsh,type the command:tmsh delete net routing all route-domain <route-domain ID>Do this for every route-domain with a routing configuration. You are required to specify the route-domain.
- To disable thedbvariable:tmsh modify sys db tmrouted.tmos.routing value disable
- To verify that the router is deleted:tmsh list net routing
- To re-enable the routing protocol:tmsh modify net route-domain 0 routing-protocol add { BGP }You also have to specify any additional protocols you were using in your previous configuration. For example: OSPF, PIM, RIP, and so on.
- To restore the backed up configuration:# mv /config/zebos/rd0/<filename> /config/zebos/rd0/ZebOS.confFor example:# mv /config/zebos/rd0/ZebOS.conf.Apr-20-2017-15:59:07 /config/zebos/rd0/ZebOS.conf
- To restarttmrouted:bigstart restart tmroutedRestartingtmroutedis required to restore the ZebOS configuration after you move the backup file toZebOS.conf.
- To check to see if the configuration was restored:imish -e 'show running-config'
- To verify the device is still in an established state with the neighbor:imish -e 'show bgp neighbor'
- To see the routes in the routing table:tmsh show net routeYour configuration should now be back in ZebOS.