mywiki:linux:tc-ca
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mywiki:linux:tc-ca [2025/08/29 11:54] – gshao | mywiki:linux:tc-ca [2025/08/29 16:35] (current) – [Example to create below queue structures] gshao | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Difference between ingress/ | ||
| + | |||
| + | |||
| | Feature | Ingress Qdisc | egress Qdisc | | | Feature | Ingress Qdisc | egress Qdisc | | ||
| | Direction | Incoming traffic | Outgoing traffic | | | Direction | Incoming traffic | Outgoing traffic | | ||
| Line 15: | Line 18: | ||
| * **htb** is a **hierarchical** token bucket used for shaping. | * **htb** is a **hierarchical** token bucket used for shaping. | ||
| * **flowid** assigns traffic to **a specific class**. | * **flowid** assigns traffic to **a specific class**. | ||
| + | * **tc class** is only for egress qdisc, not ingress qdisc | ||
| + | * **lowid :1** in this ingress command is a label or tag used for accounting and statistics: tc filter add dev < | ||
| - | Example to create below queue structures: | + | |
| + | ====== | ||
| < | < | ||
| Queue 1 ─┐ | Queue 1 ─┐ | ||
| Line 25: | Line 32: | ||
| Queue 4 ─┘→ Scheduler 3 → Scheduler 4 → Root Egress Qdisc (eth1) | Queue 4 ─┘→ Scheduler 3 → Scheduler 4 → Root Egress Qdisc (eth1) | ||
| </ | </ | ||
| + | |||
| + | Note: | ||
| + | * use **tc class** to create queue/ | ||
| + | * use **tc filter** to map traffic to queue | ||
| <code bash t.sh> | <code bash t.sh> | ||
| Line 63: | Line 74: | ||
| match ip src 192.168.1.4/ | match ip src 192.168.1.4/ | ||
| </ | </ | ||
| + | |||
| + | Delete filter example: | ||
| + | * filter del dev eth1 protocol ip parent 1: prio 1 | ||
| + | |||
| + | Delete class example: | ||
| + | * tc class del dev eth1 classid 1:111 # Queue 1 | ||
| + | * tc class del dev eth1 classid 1:112 # Queue 2 | ||
| + | * tc class del dev eth1 classid 1:211 # Queue 3 | ||
| + | * tc class del dev eth1 classid 1:212 # Queue 4 | ||
| + | * tc class del dev eth1 classid 1:11 # Scheduler 1 | ||
| + | * tc class del dev eth1 classid 1:21 # Scheduler 3 | ||
| + | * tc class del dev eth1 classid 1:10 # Scheduler 2 | ||
| + | * tc class del dev eth1 classid 1:20 # Scheduler 4 | ||
| + | |||
| + | Delete qdisc example: | ||
| + | * tc qdisc del dev eth1 root | ||
| + | |||
| + | ====== example to create multiple chains in the ingress qdisc ====== | ||
| + | |||
| + | |||
| + | ====== example to create multiple chains in the egress qdisc ====== | ||
| + | |||
| + | |||
mywiki/linux/tc-ca.1756439690.txt.gz · Last modified: by gshao
