# CLI command syntax This page explains gobgp client command syntax. ## basic command pattern gobgp \ \ opts... gobgp has three subcommands. - global - neighbor - policy Note: Currently gobgp supports only **global** and **neighbor** subcommand. ## global subcommand ### Operations for Global-Rib - add/del/show - ```shell # add Route % gobgp global rib add -a
# delete a specific Route % gobgp global rib del -a
# show all Route information % gobgp global rib -a
```
## neighbor subcommand ### Show Neighbor Status ```shell # show neighbor's status as list % gobgp neighbor # show status of a specific neighbor % gobgp neighbor ``` ### Operations for neighbor - shutdown/reset/softreset/enable/disable - ```shell % gobgp neighbor shutdown % gobgp neighbor reset % gobgp neighbor softreset -a
% gobgp neighbor softresetin -a
% gobgp neighbor softresetout -a
% gobgp neighbor enable % gobgp neighbor disable ``` ### Show Rib - local-rib/adj-rib-in/adj-rib-out - ```shell % gobgp neighbor local -a
% gobgp neighbor adj-in -a
% gobgp neighbor adj-out -a
``` ### Operations for Policy - add/del/show - ```shell # add policy to import-policy configuration % gobgp neighbor policy add import # add policy to export-policy configuration % gobgp neighbor policy add export # delete import-policy configuration from specific neighbor % gobgp neighbor policy del import # delete export-policy configuration from specific neighbor % gobgp neighbor policy del export # show a specific policy information % gobgp neighbor policy ``` ### Operations for Static Route - add/del/show - ```shell # add Route % gobgp neighbor route add -a
# delete all Route % gobgp neighbor route del -a
# delete a specific Route % gobgp neighbor route del -a
# show all Route information % gobgp neighbor route -a
```
## policy subcommand ### Operations for PrefixSet - add/del/show - ```shell # add PrefixSet % gobgp policy prefix add # delete all PrefixSet % gobgp policy prefix del all # delete a specific PrefixSet % gobgp policy prefix del % gobgp policy prefix del # show all PrefixSet information % gobgp policy prefix # show a specific PrefixSet % gobgp policy prefix ``` ### Operations for NeighborSet - add/del/show - ```shell # add NeighborSet % gobgp policy neighbor add # delete all NeighborSet % gobgp policy neighbor del all # delete a specific NeighborSet % gobgp policy neighbor del % gobgp policy neighbor del
# show all NeighborSet information % gobgp policy neighbor # show a specific NeighborSet information % gobgp policy neighbor ``` ### Operations for RoutePolicy - add/del/show - ```shell # add conditions to RoutePolicy % gobgp policy routepoilcy add condition # add actions to RoutePolicy % gobgp policy routepoilcy add action # delete all RoutePolicy % gobgp policy routepoilcy del all # delete a specific RoutePolicy % gobgp policy routepoilcy del % gobgp policy routepoilcy del # show all RoutePolicy information % gobgp policy routepoilcy # show a specific RoutePolicy information % gobgp policy routepoilcy ```