From 006f45213d76ea3a67e275e7683d66a67ad5d8a1 Mon Sep 17 00:00:00 2001 From: Motok1 Date: Sat, 1 Jun 2024 12:35:47 +0000 Subject: [PATCH] Update README --- README.md | 7 ++-- cmd/pola/README.md | 58 +++++++++++++++++++++++++++------ configs/polad.yaml.sample | 1 + docs/sources/getting-started.md | 37 ++++++++++++++++++--- 4 files changed, 87 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index df58e47..9496834 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Pola PCE is an implementation of the Path Computation Element (PCE) and a PCEP Library in Go. ## Features -* Support for SRv6 and SR-MPLS +* Support for SRv6(full-SID/uSID) and SR-MPLS * Implementation of active stateful PCE functionality (PCInitiate, PCUpdate, etc.) * Dynamic and explicit SR policy definition using YAML * Dynamic path: Utilizes CSPF with GoBGP BGP-LS TED @@ -25,9 +25,12 @@ Pola PCE is an implementation of the Path Computation Element (PCE) and a PCEP L * Junos * FRRouting -### SRv6 +### SRv6 (full-SID) * Junos +### SRv6 (uSID) +* IOS-XR + ## Installation & Use * [Getting Started](docs/sources/getting-started.md) * Examples (powered by [Containerlab](https://containerlab.dev/)/[Tinet](https://github.com/tinynetwork/tinet)) diff --git a/cmd/pola/README.md b/cmd/pola/README.md index 500abc6..5db54f4 100644 --- a/cmd/pola/README.md +++ b/cmd/pola/README.md @@ -1,5 +1,31 @@ # Pola CLI Tool +## Instllation + +### From Go Package + +```bash +$ go install github.com/nttcom/pola/cmd/pola@latest +``` + +### From Source + +**Getting the Source** + +```bash +$ git clone https://github.com/nttcom/pola.git +``` + +**Build & install** + +```bash +$ cd pola +$ go install ./cmd/pola + +# or, install with daemon +$ go install ./... +``` + ## Command Reference ### pola session \[-j\] @@ -134,7 +160,7 @@ JSON formatted response ### pola sr-policy add -f _filepath_ -Create a new SR Policy using TED +Create a new SR Policy **using TED** #### Case: Dynamic Path calculate @@ -185,21 +211,33 @@ JSON formatted response ### pola sr-policy add -f _filepath_ --no-link-state -Create a new SR Policy without using TED +Create a new SR Policy **without using TED** + +Should write the `localAddress` (and `remoteAddr` if Adj-SID) of each sid for creation of Nai + +See [JSON shema](schemas/polad_config.json) for input details. YAML input format ```yaml srPolicy: - pcepSessionAddr: 192.0.2.1 - srcAddr: 192.0.2.1 - dstAddr: 192.0.2.2 - name: name + pcepSessionAddr: "2001:0db8::1" + srcAddr: "2001:0db8::1" + dstAddr: "2001:0db8::2" + name: "policy-name" color: 100 segmentList: - - sid: 16003 - nai: 192.0.2.3 - - sid: 16002 - nai: 192.0.2.2 + - sid: "2001:0db8:1005::" + localAddr: "2001:0db8::5" + sidStructure: "32,16,0,80" + - sid: "2001:0db8:1006::" + localAddr: "2001:0db8::6" + sidStructure: "32,16,0,80" + - sid: "2001:0db8:1005::" + localAddr: "2001:0db8::5" + sidStructure: "32,16,0,80" + - sid: "2001:0db8:1006::" + localAddr: "2001:0db8::6" + sidStructure: "32,16,0,80" ``` json formatted response diff --git a/configs/polad.yaml.sample b/configs/polad.yaml.sample index 36eb28a..66fa3d7 100644 --- a/configs/polad.yaml.sample +++ b/configs/polad.yaml.sample @@ -15,3 +15,4 @@ global: grpc-client: address: "127.0.0.1" port: 50051 + usid-mode: true diff --git a/docs/sources/getting-started.md b/docs/sources/getting-started.md index a8d02eb..65a0e85 100644 --- a/docs/sources/getting-started.md +++ b/docs/sources/getting-started.md @@ -4,13 +4,38 @@ This page explains how to use Pola PCE. ## Instllation +### From Go Package + ```bash $ go install github.com/nttcom/pola/cmd/polad@latest ``` +### From Source + +**Getting the Source** + +```bash +$ git clone https://github.com/nttcom/pola.git +``` + +**Build & install** + +```bash +$ cd pola +$ go install ./cmd/polad + +# or, install with cli command +$ go install ./... +``` + +### From Container Image + +See the [Docker page](../../build/package/README.md). + ## Configuration Specify the IP address and port number for each PCEP and gRPC. +See [JSON shema](../schemas/polad_config.json) for config details. ### case: TED disable @@ -19,16 +44,17 @@ To manage SR Policy without using TED. ```yaml global: pcep: - address: ** + address: "2001:0db8::254" port: 4189 grpc-server: address: "127.0.0.1" - port: 50052 + port: 50051 log: path: "/var/log/pola/" name: "polad.log" ted: enable: false + usid-mode: false ``` ### case: TED enable @@ -39,10 +65,12 @@ Enabling TED allows dynamic path calculation. A specific tool for updating TED is required to use this feature. Currently, only GoBGP is supported. +**Not currently available for IPv6 underlay(IPv6 SR-MPLS / SRv6).** + ```yaml global: pcep: - address: ** + address: "192.0.2.254" port: 4189 grpc-server: address: "127.0.0.1" @@ -85,6 +113,7 @@ Start polad. Specify the created configuration file with the -f option. ```bash $ sudo polad -f polad.yaml 2022-06-05T22:57:59.823Z info gRPC listen {"listenInfo": "127.0.0.1:50052", "server": "grpc"} -2022-06-05T22:57:59.823Z info PCEP listen {"listenInfo": "10.255.0.254:4189"} +2022-06-05T22:57:59.823Z info PCEP listen {"listenInfo": "192.0.2.254:4189"} ``` +After Polad is running, use [pola cmd](../../cmd/pola/README.md) or the [gRCP client](../../api/grpc/) for daemon operations \ No newline at end of file