Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Command Reference Document for PAC HLD#1469 #3006

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,19 @@
* [Static DNS Commands](#static-dns-commands)
* [Static DNS config command](#static-dns-config-command)
* [Static DNS show command](#static-dns-show-command)
* [Port Access Control Commands](#port-access-control-commands)
* [PAC config command](#pac-config-command)
* [MAB user config commands](#mab-user-config-commands)
* [Hostapd user config commands](#hostapd-user-config-commands)
* [PAC show command](#pac-show-command)
* [MAB user show command](#mab-user-show-command)
* [Hostapd user show command](#hostapd-user-show-command)

## Document History

| Version | Modification Date | Details |
| --- | --- | --- |
| v8 | Sep-10-2023 | Add PAC show and config commands |
| v7 | Jun-22-2023 | Add static DNS show and config commands |
| v6 | May-06-2021 | Add SNMP show and config commands |
| v5 | Nov-05-2020 | Add document for console commands |
Expand Down Expand Up @@ -12823,3 +12831,154 @@ admin@sonic:~$ show dns nameserver
8.8.8.8

```

# Port Access Control Commands

This sub-section explains the list of the configuration options available for PAC (Port Access Control) feature. These CLI Commands shall be autogenerated using PAC Yang files.

## PAC config command

- Configure PAC authentication order in system

```
admin@sonic:~$ config pac-config global auth-order-list -h
Usage: config pac-config global auth-order-list [OPTIONS] AUTH_ORDER_LIST

Order list of authentication mechanisms used by PAC. Must be 'remote' or
'local'.

Options:
-?, -h, --help Show this message and exit.
```

## MAB User config commands

- Add MAB user specific configuration

```
admin@sonic:~$ config mab-user-config add -h
Usage: config mab-user-config add [OPTIONS] MAC

Add object in MAB_USER_CONFIG.

Options:
--access-type TEXT Access type for the MAB client (allow or deny)
--vlan-id TEXT VLAN ID associated with the authorized client
--session-timeout TEXT Client session timeout in seconds
-h, -?, --help Show this message and exit.
```

- Delete MAB user specific configuration

```
Usage: config mab-user-config delete [OPTIONS] MAC

Delete object in MAB_USER_CONFIG.

Options:
-?, -h, --help Show this message and exit.
```

- Update MAB user specific configuration

```
admin@sonic:~$ config mab-user-config update -h
Usage: config mab-user-config update [OPTIONS] MAC

Add object in MAB_USER_CONFIG.

Options:
--access-type TEXT Access type for the MAB client (allow or deny)
--vlan-id TEXT VLAN ID associated with the authorized client
--session-timeout TEXT Client session timeout in seconds
-h, -?, --help Show this message and exit.
```

## Hostapd User config commands

- Add Hostapd user specific configuration

```
admin@sonic:~$ config hostapd-user-config add -h
Usage: config hostapd-user-config add [OPTIONS] USERNAME

Add object in HOSTAPD_USER_CONFIG.

Options:
--password TEXT Password of the user
--auth-type TEXT
--vlan-id TEXT VLAN ID associated with the authorized client
--session-timeout TEXT Client session timeout in seconds
-?, -h, --help Show this message and exit.
```

- Delete Hostapd user specific configuration

```
admin@sonic:~$ config hostapd-user-config delete -h
Usage: config hostapd-user-config delete [OPTIONS] USERNAME

Delete object in HOSTAPD_USER_CONFIG.

Options:
-h, -?, --help Show this message and exit.
```

- Update Hostapd user specific configuration

```
admin@sonic:~$ config hostapd-user-config update -h
Usage: config hostapd-user-config update [OPTIONS] USERNAME

Add object in HOSTAPD_USER_CONFIG.

Options:
--password TEXT Password of the user
--auth-type TEXT
--vlan-id TEXT VLAN ID associated with the authorized client
--session-timeout TEXT Client session timeout in seconds
-h, -?, --help Show this message and exit.
```

## PAC show command

- Show PAC global configuration

```
admin@sonic:~$ show pac-config global -h
Usage: show pac-config global [OPTIONS]

Global PAC configuration.

Options:
-?, -h, --help Show this message and exit.
```

## MAB User show command

- Show MAB User configuration

```
admin@sonic:~$ show mab-user-config -h
Usage: show mab-user-config [OPTIONS] COMMAND [ARGS]...

MAB client configuration [Callable command group]

Options:
-?, -h, --help Show this message and exit.
```

## Hostapd User show command

- Show Hostapd User configuration

```
admin@sonic:~$ show hostapd-user-config -h
Usage: show hostapd-user-config [OPTIONS] COMMAND [ARGS]...

User configuration for HOSTAPD [Callable command group]

Options:
-h, -?, --help Show this message and exit.
```