Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Changing a Router

All of the tools but one only read. The one that changes a router's running state is bgp_reset_neighbor.

flockmcp cannot change a router's configuration.

Allowing it

A reset is refused unless two settings both allow it. Neither is on by default.

  1. flockmcp must be started with --allow-actions naming the router:

     flockmcp --daemon r1=http://192.0.2.1:50051 --daemon r2=http://192.0.2.2:50051 --allow-actions r1
    

    Here an assistant may reset neighbors on r1 and not on r2. Give --allow-actions once for each router.

  2. The router must allow actions over its API, in the system section of its /etc/flockd/flockd.json:

     "system": {
         "api": {
             "allow_actions": true
         }
     }
    

    flockd takes a change to this setting without a restart.

list_daemons shows the first of these for each router, as allow_actions.

The assistant is told that bgp_reset_neighbor changes a router and that the other tools do not. Most assistants ask you before they call a tool that is marked so. Keep that turned on.

bgp_reset_neighbor

Resets a BGP neighbor. The same as flockc bgp vrf <vrf> neigh <neighbor> reset <reset>, where flockc writes the reset values with a hyphen in place of the underscore: soft-in.

Argument
daemonThe router. It must be one that list_daemons shows with allow_actions true
vrfThe VRF the neighbor is in. Leave out for the main VRF
neighborThe neighbor, as bgp_neighbors gives it in neigh_key
resetHow to reset it
reset
soft_inReplay what the neighbor sent through its import policy. Does not disturb the session
soft_outSend the neighbor the BGP RIB again through its export policy. Does not disturb the session
refresh_inAsk the neighbor to send its routes again
refresh_outSend the neighbor its routes again, as if it had asked
hardClose the session and establish it again. Traffic through the neighbor is disrupted

A reset that flockd carried out answers:

{
    "reset": true,
    "daemon": "r1",
    "vrf": "default",
    "neighbor": "10.0.12.2"
}

A reset is sent once

flockmcp checks the router is the one it expects immediately before it sends a reset, and never sends a reset a second time.

If the router restarts as the reset is sent, flockmcp cannot tell whether the reset reached it. It says so, and does not try again:

daemon r1 restarted while it was being asked to act.  What was asked may have reached it, and is not asked again: look at its state before asking again