# 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 -a
# add policy to export-policy configuration % gobgp neighbor policy add export -a
# delete import-policy configuration from specific neighbor % gobgp neighbor policy del import -a
# delete export-policy configuration from specific neighbor % gobgp neighbor policy del export -a
# show a specific policy information % gobgp neighbor policy -a
``` ### 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 # delete a specific PrefixSet % 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 # delete a specific NeighborSet % 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 RoutePolicy % gobgp policy routepoilcy add condition action # delete all RoutePolicy % gobgp policy routepoilcy del # delete a specific RoutePolicy % gobgp policy routepoilcy del # show all RoutePolicy information % gobgp policy routepoilcy # show a specific RoutePolicy information % gobgp policy routepoilcy ```