diff --git a/README.md b/README.md index 2802f61..b0f003e 100644 --- a/README.md +++ b/README.md @@ -22,35 +22,62 @@ docker container run --rm -d --name pfcpsim pfcpsim: -p 12345 --inter #### 2. Use `pfcpctl` to configure server's remote peer address and N3 interface address: ```bash -docker exec pfcpsim pfcpctl --server localhost:12345 -c configure --n3-addr --remote-peer +docker exec pfcpsim pfcpctl -s localhost:12345 service configure --n3-addr --remote-peer-addr ``` - - `--server`: (**optional**, Default is localhost:54321) gRPC server address. - - `-c`: command to execute. + - `-s`/`--server`: (**optional**, default is 'localhost:54321') the gRPC server address. + - `service`: selects the service subparser. + - `configure`: selects the Configure RPC that allows to set the addresses of the N3 interface and the remote PFCP agent peer. - `--n3-addr`: address of the N3 Interface between UPF and nodeB. - - `--remote-peer`: address of the PFCP server. It supports the override of the IANA PFCP port (e.g. `10.0.0.1:8888`). + - `--remote-peer-addr`: address of the PFCP server. It supports the override of the IANA PFCP port (e.g. `10.0.0.1:8888`). To list all the available commands just append `--help`, when executing `pfcpctl`. #### 3. `associate` command will connect to remote peer set in the previous configuration step and perform an association. ```bash -docker exec pfcpsim pfcpctl --server localhost:12345 -c associate +docker exec pfcpsim pfcpctl -s localhost:12345 service associate ``` #### 4. Create 5 sessions ```bash -docker exec pfcpsim pfcpctl --server localhost:12345 -c create --count 5 --baseID 2 --ue-pool --nb-addr +docker exec pfcpsim pfcpctl -s localhost:12345 session create --count 5 --baseID 2 --ue-pool --gnb-addr --sdf-filter 'permit out ip from 0.0.0.0/0 to assigned 81-81' ``` - `--count` the amount of sessions to create - `--baseID` the base ID used to incrementally create sessions - `--ue-pool` the IP pool from which UE addresses will be generated (e.g. `17.0.0.0/24`) - - `--nb-addr` the nodeB address + - `--gnb-addr` the (e/g)NodeB address + - `--sdf-filter` (optional) the SDF Filter to use when creating PDRs. If not set, PDI will contain a SDF Filter IE with an empty string as SDF Filter. #### 5. Delete the sessions ```bash -docker exec pfcpsim pfcpctl --server localhost:12345 -c delete --count 5 --baseID 2 +docker exec pfcpsim pfcpctl --server localhost:12345 session delete --count 5 --baseID 2 ``` #### 6. `disassociate` command will perform disassociation and close connection with remote peer. ```bash -docker exec pfcpsim pfcpctl --server localhost:12345 -c disassociate +docker exec pfcpsim pfcpctl --server localhost:12345 service disassociate ``` + +## Compile binaries +If you don't want to use docker you can just compile the binaries of `pfcpsim` and `pfcpctl`: + +#### 1. Git clone this repository +```bash +git clone https://github.com/omec-project/pfcpsim && cd pfcpsim/ +``` + +#### 2. Compile pfcpsim +```bash +go build -o server cmd/pfcpsim/main.go +``` + +#### 3. Compile pfcpctl +```bash +go build -o client cmd/pfcpctl/main.go +``` + +You can now place `server` and `client` wherever you want. +To setup pfcpsim use the same steps shown above (without executing `docker`). E.G: +```bash +./server -p 12345 --interface +``` +