TLDR
- TACACS+ AV pairs are name=value text strings, such as priv-lvl=15, that travel in authorization and accounting packets (RFC 8907 §8).
- The separator sets how strict a pair is: = makes it mandatory and * makes it optional.
- A service=shell request with an empty cmd= authorizes the login session, and cmd and cmd-arg authorize each command after that.
- The server answers PASS_ADD, PASS_REPL, FAIL or ERROR and can send back pairs that set the session’s privilege level and timers.
TACACS+ authorization AV pairs are text attribute-value pairs, such as service=shell or priv-lvl=15, that a network device and a TACACS+ server exchange. The device sends what the user wants to do, for example cmd=show with cmd-arg=running-config. In reply, the server returns a status such as PASS_ADD or FAIL, plus any pairs that set privilege, timeouts or access lists.
RFC 8907, the IETF document that describes TACACS+, calls them argument-value pairs (§8). Most engineers say attribute-value pairs, and both names shorten to AV pairs.
At 02:10, a first-line operator in the network operations center (NOC) of a regional internet service provider (ISP) types show interfaces on a core router. Before the router prints anything, it asks the TACACS+ server whether this user may run that command. The question and the answer both travel as AV pairs.
What is a TACACS+ AV pair?
A TACACS+ AV pair is a single text string that joins a name and a value with a separator, as in priv-lvl=15. Devices put AV pairs in requests to say what a user wants, and servers return them in replies to limit or reshape that request (RFC 8907 §6).
Of the three TACACS+ packet types, only authorization and accounting carry AV pairs. Authentication packets don’t. Each authorization is one request and one reply, separate from the authentication exchange that usually comes first, and a device may send one for every command a user types (§6).
AV pair format
Each pair travels as one string of up to 255 characters (§6.1). A name can’t contain a separator, though a value can, so a parser reads up to the first = or * and treats everything after it as the value.
Every value is a string, and numbers are written in decimal (§8.1). Times are seconds since January 1, 1970, in UTC unless a timezone pair says otherwise. A value can also be empty, which matters for shell sessions because they depend on the four-character pair cmd=.
Mandatory (=) vs optional (*) pairs
An equals sign marks a mandatory pair and an asterisk marks an optional one (§6.1). If a device receives a mandatory pair it can’t act on, it must treat the whole authorization as failed (§6.1, §10.5.4).
So priv-lvl=15 is a hard requirement, and a session that can’t apply it doesn’t start. idletime*30 is a softer request for a 30-minute idle limit, which a device without that feature can skip.
In deployments we see sessions fail right after a policy change, and the cause is often a new pair sent as mandatory to a device class that doesn’t support it. Mark a pair mandatory only when the session would be unsafe without it, as with priv-lvl, and send the rest as optional.
Shell session pairs: service=shell and priv-lvl
A shell session is a user’s command-line login on a router, switch, broadband network gateway (BNG) or other managed device. At login, the device sends a service=shell TACACS+ authorization request with an empty cmd=. RFC 8907 calls this session-based shell authorization, and the TACACS+ authorization attributes in the reply apply to the whole session (§8.2, §9).
| AV pair | What it does | Example |
| service | Names the service being authorized; every request must include it | service=shell |
| protocol | Names a subset of a service; a shell request needs only service and cmd | protocol=ip |
| priv-lvl | Sets the session’s privilege level, from 0 to 15 | priv-lvl=15 |
| timeout | Ends the session after a set number of minutes; 0 means no limit | timeout*480 |
| idletime | Ends the session after this many idle minutes; 0 means no limit | idletime*15 |
| autocmd | Runs a command automatically at login | autocmd=show version |
| acl | Applies a numbered connection access list | acl=10 |
Two of these, autocmd and acl, apply only to session-based shell authorization. Section 8.2 also defines nohangup; with nohangup=true, the user stays connected after an autocmd runs.
Privilege levels run from 0 to 15, and each level includes everything below it (§9). The device’s own configuration decides which commands each level unlocks, so the same number can mean different things on two devices.
Treat TACACS+ priv-lvl as a ceiling and keep the precise rules on the server, command by command. The guide to privilege levels and command authorization shows how to map levels across a mixed device estate.
Command authorization with cmd and cmd-arg
With command authorization, the device checks each command with the TACACS+ server before running it. RFC 8907 calls this command-based authorization (§8.2). The device sends one request per command, with the command name in cmd and each following word in its own cmd-arg pair, then waits for the reply.
The authorization request
Typing show running-config produces the pairs below. They travel with the request’s fixed fields, which carry the user name, device port, remote address and the user’s current privilege level (§6.1).
- service=shell
- cmd=show
- cmd-arg=running-config
The TACACS+ cmd pair holds only the first word, and every later word becomes its own TACACS+ cmd-arg pair. Order matters (§8.2). A command such as show interfaces counters arrives as cmd-arg=interfaces followed by cmd-arg=counters, and the server’s rule has to match that sequence.
Reply statuses: PASS_ADD, PASS_REPL and FAIL
The reply carries one status and, optionally, AV pairs (§6.2). It can also carry server_msg, which the device may show the user, and data, which is meant for an admin console or log. In RFC 8907, each status name starts with the prefix TAC_PLUS_AUTHOR_STATUS_.
| Status (code) | What the device does |
| PASS_ADD (0x01) | Runs the request as sent and applies any reply pairs on top. With no reply pairs, the request goes through unchanged. |
| PASS_REPL (0x02) | Drops the request’s pairs and uses the reply’s pairs in their place |
| FAIL (0x10) | Denies the request |
| ERROR (0x11) | Treats the server as unreachable and tries a backup server or local fallback; any reply pairs are ignored (§4.4) |
| FOLLOW (0x21) | A legacy redirect. RFC 8907 deprecates redirection, and devices should treat it as FAIL (§10.5.5). |
TACACS+ PASS_ADD and PASS_REPL both approve the request; the difference is what happens to the pairs. FAIL is a policy decision. ERROR means the server couldn’t reach a decision, so the device falls back to its local rules, and those rules need the same review as the server policy.
Worked example: two roles, one policy
These TACACS+ AV pair examples come from a regional ISP’s NOC, where two roles share the same core routers and the same TACACS+ server. First-line operators can look at the network and can’t change it. Senior engineers can change configuration, except for reloads, which are held back for a separate change-approval role.
The command names are generic. Each device class has its own syntax, so map them to yours before reusing the policy.
NOC operator: read-only commands
The operator’s session gets level 1 and a 15-minute idle limit. Show and ping commands pass. Commands that change configuration or device state fail, including clear counters and reload.
| Step | Device sends | Server replies |
| Login | service=shell, cmd= | PASS_ADD with priv-lvl=1, idletime*15 |
| show interfaces | service=shell, cmd=show, cmd-arg=interfaces | PASS_ADD |
| ping 192.0.2.10 | service=shell, cmd=ping, cmd-arg=192.0.2.10 | PASS_ADD |
| configure | service=shell, cmd=configure | FAIL |
| clear counters | service=shell, cmd=clear, cmd-arg=counters | FAIL |
| reload | service=shell, cmd=reload | FAIL |
Some devices refuse configure at level 1 before they ever ask the server. The server rule covers every device that does ask.
Senior engineer: configuration access
The engineer’s session gets level 15 with a 30-minute idle limit and an eight-hour cap. Level 15 opens the full command line, and command authorization still checks every line.
| Step | Device sends | Server replies |
| Login | service=shell, cmd= | PASS_ADD with priv-lvl=15, idletime*30, timeout*480 |
| show interfaces | service=shell, cmd=show, cmd-arg=interfaces | PASS_ADD |
| ping 192.0.2.10 | service=shell, cmd=ping, cmd-arg=192.0.2.10 | PASS_ADD |
| configure | service=shell, cmd=configure | PASS_ADD |
| clear counters | service=shell, cmd=clear, cmd-arg=counters | PASS_ADD |
| reload | service=shell, cmd=reload | FAIL, with server_msg “Reload needs change approval” |
Both roles send identical pairs for identical commands, and only the server’s answers differ. That is least privilege as NIST SP 800-53 Rev. 5 control AC-6 describes it, applied through the role-based access control in CIS Controls v8.1 Safeguard 6.8.
Alepo TACACS+ Server enforces this kind of policy through command-level authorization in its policy engine. Its supported use cases include read-only operator access limited to show commands and time-of-day change windows, and the TACACS+ Server datasheet lists the rest.
AV pairs in TACACS+ accounting records
TACACS+ accounting records reuse the authorization pairs and add some of their own (RFC 8907 §8.3). With command accounting turned on, the device sends a record for every command and repeats its cmd and cmd-arg pairs, whether or not TACACS+ authorized it. Inside the packet, the accounting pairs come first, ahead of the authorization pairs.
| AV pair | Meaning | Example |
| task_id | Ties a task’s start and stop records together; can’t be reused until the stop record is sent | task_id=4127 |
| start_time | When the action started, in seconds since the epoch | start_time=1795689000 |
| stop_time | When the action stopped | stop_time=1795689900 |
| elapsed_time | How long the action ran, in seconds | elapsed_time=900 |
A START flag opens a task and a STOP flag closes it, while WATCHDOG marks an interim update (§7.1). Pairs such as timezone, bytes_in, bytes_out and err_msg add context.
Put together, the records show who ran which command on which device and when. That is the log of privileged functions NIST SP 800-53 control AC-6(9) asks for. The guide to TACACS+ accounting records explains how to turn them into an audit trail.
RFC 8907 only obfuscates the packet body these pairs travel in. Section 10.1 says that offers no meaningful privacy or integrity protection, and that anyone on the path should be assumed able to read and modify the packets. Run TACACS+ on a dedicated management network, or move to TLS 1.3 under RFC 9887, which uses TCP port 300.
FAQs
Q1. What is an AV pair in TACACS+?
It’s a text string such as priv-lvl=15 that names a setting and gives its value. The device uses AV pairs to describe a request, and the server uses them to grant or limit it (RFC 8907 §8).
Q2. What does priv-lvl 15 mean?
Level 15 is the highest TACACS+ privilege level and is normally reserved for the most privileged administrators. Each device’s configuration decides which commands it unlocks (RFC 8907 §9).
Q3. What is service=shell?
It marks a request about a command-line (exec) session. With an empty cmd= it authorizes the login, and with cmd set it authorizes a single command (RFC 8907 §8.2).
Q4. How do cmd and cmd-arg work?
cmd holds the command name, and each later word arrives as its own cmd-arg pair, in order. The device sends one request per command (RFC 8907 §8.2).
Q5. What is the difference between = and * in an AV pair?
An equals sign makes a pair mandatory, so a device that can’t apply it fails the authorization. An asterisk makes it optional, and a device that doesn’t support it can ignore it (RFC 8907 §6.1).
Q6. What is PASS_ADD vs PASS_REPL?
Both approve the request. PASS_ADD adds the reply’s pairs to the request’s pairs, and PASS_REPL replaces the request’s pairs with the reply’s (RFC 8907 §6.2).
Q7. Which AV pairs appear in TACACS+ accounting?
Accounting records carry task_id, start_time, stop_time and elapsed_time, plus pairs such as timezone or bytes_in. The authorization pairs for the session or command follow them (RFC 8907 §8.3).
Conclusion
TACACS+ AV pairs carry every decision a device makes about an administrator: the privilege level at login, the timers on the session, the verdict on each command and the record of what ran. Device administration policy gets enforced through these short name=value strings.
Getting them right comes down to a few habits. Send a pair as mandatory only when the session would be unsafe without it, and test each new pair on every device class before it goes live. Use priv-lvl as a ceiling and keep the command rules on the TACACS+ server, so one policy change applies to every device that asks.
Review the local rules a device falls back to on an ERROR reply with the same care as the server policy. Keep command accounting on, so each command leaves a task_id and timestamps behind. If the pairs still cross a shared network in obfuscated form, plan the move to TLS 1.3 under RFC 9887.
The operator at 02:10 never sees any of this. They see command output or a denied line, and the accounting log records which one it was.
Alepo TACACS+ Server applies per-command authorization from one central policy and runs on the same Alepo platform that handles RADIUS and Diameter. Book a demo to see your NOC and engineering roles enforced command by command.

