From ce20ba94e672d22621e0d5ed2e020f29dbf5f3e8 Mon Sep 17 00:00:00 2001 From: Naoto Hanaue Date: Tue, 21 Apr 2015 19:51:58 +0900 Subject: docs: add cli command syntax document --- docs/sources/cli-command-syntax.md | 129 +++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 docs/sources/cli-command-syntax.md diff --git a/docs/sources/cli-command-syntax.md b/docs/sources/cli-command-syntax.md new file mode 100644 index 00000000..da2cf384 --- /dev/null +++ b/docs/sources/cli-command-syntax.md @@ -0,0 +1,129 @@ +# 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 +``` -- cgit v1.2.3