tacacsTerminal Access Controller Access-Control System PlusWho Typed reload on the Core Router? (rtr <-> acs tacacs TCP 49)
What It Does on the Wire
Router CLI command auditing over TCP 49 — pro tip: seq on a tacacs line sets the 8-bit TACACS+ seq_no (1, 2, 3...) without stomping on the underlying 32-bit TCP sequence tracker!
TACACS+ (tacacs, RFC 8907) handles administrative login authentication (authen), per-command CLI authorization (author), and command audit accounting (acct) for routers, switches, and firewalls over TCP port 49. Unlike RADIUS (which combines authentication and authorization over UDP), TACACS+ separates all three AAA functions over reliable TCP.
FrameAssembly builds the 12-byte RFC 8907 TACACS+ header (version 0xc0, type, seq_no, flags, session_id, and length) alongside user and command data, while automatically keeping TCP sequence and acknowledgment numbers in sync.
Out-of-Band Management Firewall Rule Checks (TCP 49)
Verify that jump-box and management VRF firewalls allow TCP port 49 from core routers and switches to Cisco ISE or tac_plus servers.
Per-Command CLI Authorization & Audit Testing
Simulate authen, author, and acct sessions carrying a sessionid and user to test NDR tools and TACACS+ packet analyzers.
Unencrypted Flag (flags 1) Security Compliance Checks
Test security monitoring rules that alert when legacy lab devices send cleartext TACACS+ packets (TAC_PLUS_UNENCRYPTED_FLAG = 0x01).
Minimal Quickstart (tacacs_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host core_rtr { ip 10.10.0.1 }host tacacs_srv { ip 10.10.0.49 }compile { core_rtr -> tacacs_srv tacacs authen seq 1 sessionid 0x8001 user "netadmin" data "tty0" wait 2ms core_rtr <- tacacs_srv tacacs authen seq 2 sessionid 0x8001 data "Password: "}What the Compiler Calculates So You Don't Have To
- Defaults to TCP destination port
49(psh ack), TACACS+ version0xc0, and calculates the 32-bit payloadlengthfield automatically. - Treats
seq(0..255) on atacacsline as the 1-byte TACACS+seq_no(1client start,2server reply,3client continue) without breaking the outer 32-bit TCP sequence number. - Shares TCP sequence and acknowledgment tracking with
tcphandshake packets on port49.
Full TCP 49 Handshake + TACACS+ Admin Login & Command Accounting
Opens a TCP port 49 session from a spine router to a TACACS+ server, completes an authentication prompt/reply pair, and sends a command accounting record.
host spine_rtr { ip 172.20.0.1 }host tacacs_aaa { ip 172.20.0.49 }compile { // 1. TCP 3-way handshake on port 49 spine_rtr -> tacacs_aaa tcp syn srcport 51049 dstport 49 win 65535 mss 1460 wait 1ms spine_rtr <- tacacs_aaa tcp syn ack win 65535 mss 1460 wait 1ms spine_rtr -> tacacs_aaa tcp ack wait 1ms // 2. TACACS+ Authentication conversation (odd seq = router, even seq = server) spine_rtr -> tacacs_aaa tacacs authen seq 1 flags 1 sessionid 0x44001122 user "secops" data "vty0" wait 2ms spine_rtr <- tacacs_aaa tacacs authen seq 2 flags 1 sessionid 0x44001122 data "Password: " wait 5ms spine_rtr -> tacacs_aaa tacacs authen seq 3 flags 1 sessionid 0x44001122 user "secops" data "LabPass!" wait 2ms // 3. Command authorization & accounting spine_rtr -> tacacs_aaa tacacs author seq 1 flags 1 sessionid 0x44001123 user "secops" data "cmd=configure" wait 2ms spine_rtr -> tacacs_aaa tacacs acct seq 1 flags 1 sessionid 0x44001124 user "secops" data "task_id=42"}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show tacacs_admin_session.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly tacacs_admin_session.frasm tacacs_admin_session.pcap
frameassembly tacacs_admin_session.frasm tacacs_admin_session.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse tacacs_admin_session.pcap tacacs_admin_session_edited.frasmAll tacacs Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after tacacs:
src_host -> dst_host tacacs [authen | author | acct | type <authen|author|acct>] [seq <0..255>] [flags <0..255>] [sessionid <number>] [user "<text>"] [data "<text>"]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| authen | author | acct | type <authen|author|acct> | TACACS+ AAA packet type | authen (0x01) | Selects TACACS+ Type 0x01 Authentication (authen), 0x02 Authorization (author), or 0x03 Accounting (acct). |
| seq <0..255> | 1-byte TACACS+ sequence number (0..255) | 1 | Sets the 8-bit TACACS+ seq_no header field (clients send odd numbers 1, 3, 5; servers reply with even numbers 2, 4, 6). |
| flags <0..255> | 1-byte bitmask (0..255) | 0 | Sets TACACS+ header flags (0x01 Unencrypted cleartext lab mode, 0x04 Single-Connection mode). |
| sessionid <number> | 32-bit session identifier (decimal or 0x hex) | 1 | Sets the 4-byte TACACS+ session_id grouping messages in one AAA exchange. |
| user "<text>" | data "<text>" | Quoted text | Empty | Populates the username and port/prompt/command payload fields inside the TACACS+ body. |
Cross-Layer Wrappers Valid with tacacs
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
11 options
Cross-Layer Wrappers Valid with tacacs
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
| ttl <0..255> [dscp <0..63>] [ecn <0..3>] | TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3 | ttl 64, dscp 0, ecn 0 | Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings. |
| ipid <0..65535> [df] [mf] [fragoffset <0..8191>] | IPv4 ID, DF/MF flags, fragment offset 0..8191 | ipid 1, flags 0, fragoffset 0 | Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6). |
| flowlabel <0..1048575> | 20-bit IPv6 Flow Label (0..1048575) | 0 | Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts). |
| srcport <0..65535> | dstport <0..65535> | Port number 0..65535 | srcport 49152 (remembered), TCP 49 | Overrides source or destination port and remembers the port pair automatically on <- replies. |
| `acknum <number> [win <0..65535>]` (`seq` on `tacacs` sets the 8-bit TACACS+ `seq_no`) | TCP sequence/ack numbers, window size, flags & RFC 7323 options | psh ack, win 65535, automatic TCP seq/acknum | Overrides automatic TCP sequence tracking, flags, or RFC 7323 options (mss, wscale, sackperm, tsval, tsecr). |
Gotchas & Quick Fixes
Protocol Keyword Is tacacs (No Plus Sign)
core_rtr -> tacacs_srv tacacs+ authen user "admin"core_rtr -> tacacs_srv tacacs authen user "admin"Built-in protocol names only use letters and digits (a-z0-9), so TACACS+ is written tacacs.
seq Sets the 1-Byte TACACS+ Sequence Number
core_rtr -> tacacs_srv tacacs authen seq 1000core_rtr -> tacacs_srv tacacs authen seq 1On tacacs packets, seq sets the 8-bit TACACS+ seq_no (0..255), while FrameAssembly advances the outer 32-bit TCP sequence number automatically.