https://github.com/nerdalert/gopher-net-ctl
CLI for Gopher Net Router
https://github.com/nerdalert/gopher-net-ctl
Last synced: about 1 year ago
JSON representation
CLI for Gopher Net Router
- Host: GitHub
- URL: https://github.com/nerdalert/gopher-net-ctl
- Owner: nerdalert
- License: apache-2.0
- Created: 2015-01-26T06:48:01.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-02T10:43:28.000Z (over 11 years ago)
- Last Synced: 2025-04-11T22:53:09.874Z (about 1 year ago)
- Language: Go
- Size: 266 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/nerdalert/gopher-net-ctl)
# gopher-net-cli
CLI for Gopher Net Router
### Example Advertise a new route
-Example adding a prefix to advertise into the tables (only a couple of fields are plumbed in until it uses the daemon data structures):
gopher-net-ctl -d add route --prefix=172.15.14.0/24 --nexthop=172.16.86.1
-Example Output in Quagga
ub134(config-router)# do sho ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, A - Babel,
> - selected route, * - FIB route
K>* 0.0.0.0/0 via 172.16.86.2, eth0
C>* 127.0.0.0/8 is directly connected, lo
B>* 172.15.14.0/24 [200/0] via 172.16.86.1, eth0, 00:00:03
C>* 172.16.86.0/24 is directly connected, eth0
### Example remove the advertised route
-This will stop advertising the requested prefix. There is some cidr from the specified node.from the specified note a new route
gopher-net-ctl -d delete route --prefix=172.15.14.0/24
Example Output in Quagga
ub134(config-router)# do sho ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, A - Babel,
> - selected route, * - FIB route
K>* 0.0.0.0/0 via 172.16.86.2, eth0
C>* 127.0.0.0/8 is directly connected, lo
C>* 172.16.86.0/24 is directly connected, eth0
### Host Route Support
This and the API will also support hostnames that are resolvable by the target node/bgp speaker.
-Add a hosts DNS name (or VIP) to be advertised.
gopher-net-ctl -d add route --prefix=google-public-dns-a.google.com --nexthop=172.16.86.1
-The the resolved address will be advertised into the IGP/EGP as in the Quagga interface output below that is peered to an instance of the gnet daemon.
ub134(config-router)# do sho ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, A - Babel,
> - selected route, * - FIB route
K>* 0.0.0.0/0 via 172.16.86.2, eth0
B>* 8.8.8.8/32 [200/0] via 172.16.86.1, eth0, 00:00:08
C>* 127.0.0.0/8 is directly connected, lo
B>* 172.15.14.0/24 [200/0] via 172.16.86.1, eth0, 00:07:46
C>* 172.16.86.0/24 is directly connected, eth0