When a host accesses a server in another subnet, the Ethernet destination MAC is usually the gateway interface, not the remote server. Understanding this allows you to separate "whether the link is up," "whether neighbors are resolved," and "whether routing is correct." Ethernet provides frame carrying for the local link; bridging and VLANs determine the Layer 2 forwarding scope, while upper-layer routing determines the next hop.
Question to Investigate
Entry Point in This Article
Key Distinction
Why do 1500, 1518, and 1538 all appear?
Frame format and wire-speed budget
L3 MTU, MAC frame, time occupation
Is MAC a permanent unique identity?
Address structure
Unicast/multicast, global/local management
Why send to gateway MAC across subnets?
Single routing forwarding
Current link destination vs. final IP destination
How to parse VLAN tag bits?
802.1Q
Network byte order, PCP, DEI, VID
Why is FCS missing or are there oversized packets in captures?
Capture location and offloading
Software view vs. actual line frames
Why doesn't single-stream throughput double with dual-port aggregation?
LACP and flow control
Aggregation capacity, hashing, and hop-by-hop backpressure
Distinguish Responsibilities of Ethernet, Bridging, and Physical Layer
IEEE 802.3 covers Ethernet MAC and various physical layers; 802.1Q handles bridging/VLAN capabilities, and link aggregation falls under 802.1AX. Do not call all of these frame format extensions of 802.3. Copper or fiber, encoding, and rates vary, yet the upper layers can still use similar MAC services.
Modern common switched full-duplex links do not use CSMA/CD, nor do they have collision processes under normal operation. The background of historical shared media/half-duplex minimum frames and collision detection helps understand evolution, but cannot be used to explain all throughput bottlenecks today; under full duplex, congestion mainly manifests as queuing, dropping, or flow control. Cisco: Full Duplex and Collision Detection
Understand Ethernet II Frame Fields One by One
The following lengths are calculated from the destination address, excluding preamble and SFD. The unmarked frame header is 14 B, and FCS is 4 B; a common 1500 B MTU represents the amount of L3 data that can be carried, so the max-length MAC frame is 1518 B. Do not treat MTU as the total byte count including the Ethernet header.
Field
Length
How the Receiver Uses It
Dest MAC
6 B
Determines unicast, multicast, or broadcast reception/forwarding
Src MAC
6 B
Identifies the local sending source; switching devices can learn from this
Type/Length
2 B
≥1536 indicates EtherType, ≤1500 indicates length
Data and necessary padding
Unmarked basic frame at least 46 B
Determines valid upper-layer length based on encapsulation protocol
FCS
4 B
Detects transmission errors covering the fields
1501~1535 cannot be casually interpreted as normal EtherType or length; the length form also involves encapsulations like LLC/SNAP and should not be collectively called "raw mode." Common EtherTypes include IPv4 0x0800, ARP 0x0806, IPv6 0x86DD, MAC Control 0x8808, and Slow Protocols 0x8809. PAUSE uses 0x8808, and LACP belongs to 0x8809; do not mix them up. IANA IEEE 802 Parameters Registry
The basic Ethernet preamble is usually recorded as seven 0x55, and SFD is 0xD5; represented with least significant bit first, the final boundary pattern differs from the alternating preamble. Do not say that modern SerDes no longer needs frame boundary mechanisms, nor equate the on-wire representation after PHY encoding simply with the original octet string.
FCS uses a specified CRC algorithm, covering from Dest MAC to the end of data/padding; if a tag is present, it includes the tag, excluding preamble and SFD. It detects transmission errors, does not provide source identity authentication, and does not retransmit on its own. Padding is used to meet the minimum length and does not belong to IP Total Length; drivers should avoid leaking uninitialized memory and should not treat random memory padding as a normal implementation strategy.
Why Small Packets Hit Packet Rate Bottlenecks First
Based on the common budget of 8 B for preamble/SFD per frame and an average 12 byte-times IFG, a 64 B minimum MAC frame occupies 84 byte-times; at 1 Gb/s, this is approximately 1.488 Mframe/s. A 1518 B max-length frame occupies 1538 byte-times, and the ideal efficiency for 1500 B L3 load is 1500/1538≈97.53%. If we further assume IPv4 and TCP headers are each 20 B with no options, the ideal upper limit for 1460 B TCP data is about 949.3 Mb/s, not yet accounting for ACK traffic and host limits.
IFG is the inter-frame idle time. 96 bit times at 1 Gb/s is 96 ns, and at 10 Gb/s is 9.6 ns; some high-speed interfaces have implementation details like word alignment and deficit idle count. Do not rigidly apply a fixed 12 bytes in a single observation without considering PHY/MAC rules. Devices process in parallel via pipelines, caches, DMA, and queues, and do not need to complete all software processing of a frame within one IFG.
Large frames reduce per-byte per-packet overhead, but interrupt coalescing, NAPI, and segmentation/coalescing offloading change the workload observed by the host. Therefore, do not say that increasing MTU from 1500 to 9000 necessarily reduces interrupts by six times.
On the same wire, why do small packets exhaust processing capacity more easily?
Converting the time required for a single transmission into byte-times allows comparing frame rate and effective throughput with the same denominator. When dragged to minimum packets, TCP data can even be zero, yet the link still pays the full cost of the minimum frame. The ribbon chart allocates widths according to true proportions; the table below retains values for small fields.
F=max(64,14+LIP+4),PPS=8(F+20)R,G=RF+20LIP−40
Preparing the visual
On the same wire, why do small packets exhaust processing capacity more easily?
Each frame has fixed byte and idle time overhead. Small packets may not occupy high total bandwidth, but require processing more frames; PPS and throughput are two different accounts.
{"id":"ethernet-wire-budget","title":"On the same wire, why do small packets exhaust processing capacity more easily?","summary":"Each frame has fixed byte and idle time overhead. Small packets may not occupy high total bandwidth, but require processing more frames; PPS and throughput are two different accounts.","height":1000,"html":"<h2 data-i18n=\"heading\"></h2><p class=\"intro\" data-i18n=\"intro\"></p><div class=\"control\"><label for=\"ip\" data-i18n=\"ip\"></label><output for=\"ip\" id=\"ip-value\"></output><input id=\"ip\" type=\"range\" min=\"40\" max=\"1500\" value=\"1500\" step=\"1\"></div><div class=\"control\"><label for=\"rate\" data-i18n=\"rate\"></label><output for=\"rate\" id=\"rate-value\"></output><input id=\"rate\" type=\"range\" min=\"1\" max=\"10\" value=\"1\" step=\"1\"></div><div id=\"wire\" class=\"budget\"></div><section class=\"panel\"><h3 data-i18n=\"parts\"></h3><div id=\"parts\"></div></section><div class=\"metrics\"><div><span data-i18n=\"frame\"></span><strong id=\"frame\"></strong></div><div><span data-i18n=\"pps\"></span><strong id=\"pps\"></strong></div><div><span data-i18n=\"goodput\"></span><strong id=\"goodput\"></strong></div><div><span data-i18n=\"eff\"></span><strong id=\"eff\"></strong></div></div><p id=\"equation\" class=\"formula\"></p><details class=\"scope\"><summary data-i18n=\"scopeLabel\"></summary><p data-i18n=\"scope\"></p></details>","css":".intro{margin:8px 0 18px;color:var(--muted);font-size:14px}.caption,.hint{font-size:12px;color:var(--muted);margin-top:12px}.control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center;margin:14px 0;font-size:13px}.control label{font-size:13px}.control output{color:var(--accent);min-width:5em;text-align:right;font-variant-numeric:tabular-nums}.control input{grid-column:1/-1;width:100%;margin:0}.presets{display:flex;gap:4px;align-items:stretch}.presets button{flex:1 1 0;min-width:0;overflow-wrap:anywhere;font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.actions button{flex:1;min-width:0;font-size:13px;min-height:42px}.copy{display:grid;font-size:14px;margin:16px 0}.copy>*{grid-area:1/1;margin:0}.reserve{visibility:hidden}.scope{margin-top:14px;color:var(--muted);font-size:12px}.scope summary{padding:8px 0;cursor:pointer}.scope p{margin-top:10px}.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.card{border:1px solid var(--rule);border-radius:9px;padding:14px;min-width:0}.card header{font-size:14px;font-weight:600;margin-bottom:10px}.card button{font-size:12px;width:100%;min-width:0}.card small{display:block;font-size:12px;color:var(--muted)}.card code{font-size:12px;overflow-wrap:anywhere}.metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.metrics>div{border-left:2px solid var(--accent);padding-left:10px;min-width:0}.metrics span{display:block;min-height:3.2em;color:var(--muted);font-size:12px}.metrics strong{font-size:23px;display:block;font-weight:500;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.formula{border-top:1px solid var(--rule);padding-top:12px;margin-top:14px;font-size:13px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.value{font:500 20px var(--viz-font-ui)}.legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;color:var(--muted);margin:12px 0}.legend span:before{content:'';display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--accent);margin-right:6px}.legend .second:before{background:var(--second)}.check{display:flex;align-items:center;gap:8px;font-size:13px;margin:12px 0}.check input{width:16px;height:16px;flex-shrink:0;accent-color:var(--accent)}select,input[type=text],input[type=number]{background:var(--paper);color:var(--ink);font:inherit;font-size:13px;padding:10px;border:1px solid var(--rule);border-radius:7px;max-width:100%;min-width:0}select{width:100%;min-height:42px}.band{height:20px;display:flex;background:var(--surface);border-radius:4px;overflow:hidden}.band i{height:100%;display:block;background:var(--accent);transition:width .25s}.band i.second{background:var(--second)}button:disabled{cursor:default}.status{font-size:13px;min-height:4.8em}.mono{font-family:var(--viz-font-mono);font-variant-numeric:tabular-nums}.muted{color:var(--muted)}\n@media(max-width:480px){.two{gap:8px}.card{padding:12px 9px}.actions button,.presets button{font-size:12px}.metrics strong{font-size:20px}.metrics{gap:8px}}\n@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}\n.track-row{margin:16px 0}.track-row>span{display:block;font-size:12px;color:var(--muted);margin-bottom:7px}.track{display:flex;gap:5px;min-width:0}.cell{flex:1;min-width:0;min-height:48px;border:1px solid var(--rule);border-radius:5px;background:var(--surface);display:flex;align-items:center;justify-content:center;text-align:center;padding:5px 3px;font-size:12px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.cell.on{background:var(--accent-soft);border-color:var(--accent)}.cell.gold{background:var(--second-soft);border-color:var(--second)}.cell.empty{border-style:dashed;color:var(--muted)}.cell.error{border-color:var(--second);text-decoration:line-through}.choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:14px 0}.choices button{min-width:0;padding:10px 4px;font-size:12px;overflow-wrap:anywhere}.choices button[aria-current=true]{border-color:var(--accent);background:var(--accent-soft)}.relation{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);align-items:center;gap:6px;margin:12px 0}.relation .cell{min-height:72px}.relation>i{text-align:center;font-style:normal;color:var(--accent)}.readout{font-size:13px;white-space:pre-line;min-height:6.4em;overflow-wrap:anywhere}.plot{position:relative;border-left:1px solid var(--rule);border-bottom:1px solid var(--rule);padding:8px 0;margin:18px 0}.plot-row{height:28px;position:relative;margin:4px 0;background:var(--surface)}.plot-row i{position:absolute;inset-block:5px;background:var(--accent);min-width:2px;transition:width .2s,left .2s}.plot-row b{position:relative;padding:4px 6px;font:11px/28px var(--viz-font-ui);background:var(--paper);border-radius:3px}.axis{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}\n\n/* Action labels must remain readable across locales and narrow embeds. */\n.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}\n.actions button{overflow-wrap:anywhere;white-space:normal;min-height:58px;padding:8px}\nbutton{overflow-wrap:anywhere}\n@media(min-width:640px){.actions{grid-template-columns:repeat(3,minmax(0,1fr))}}\n\n.metrics span{overflow-wrap:anywhere}\n.panel{border:1px solid var(--rule);border-radius:9px;padding:12px;margin:14px 0;min-width:0}.panel h3{font-size:13px;margin:0 0 10px;color:var(--muted)}.source{font:13px/1.8 var(--viz-font-mono);white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}.source mark{background:var(--accent-soft);color:var(--ink);border-bottom:2px solid var(--accent)}.source .fault{background:var(--second-soft);border-color:var(--second)}.diagram{display:block;width:100%;height:auto;max-height:320px;margin:14px 0;overflow:visible}.diagram text{fill:var(--ink);font:12px var(--viz-font-ui)}.diagram .edge{stroke:var(--muted);stroke-width:1.5;fill:none}.diagram .edge.on{stroke:var(--accent);stroke-width:3}.diagram .node{fill:var(--surface);stroke:var(--rule);stroke-width:1.5}.diagram .node.on{fill:var(--accent-soft);stroke:var(--accent)}.diagram .node.gold{fill:var(--second-soft);stroke:var(--second)}.log{font:12px/1.8 var(--viz-font-mono);white-space:pre-line;overflow-wrap:anywhere;min-height:7.2em}.table{display:grid;gap:5px;margin:14px 0}.table .tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.table .tr>*{padding:8px 5px;background:var(--surface);border-radius:4px;min-width:0;overflow-wrap:anywhere;font-size:12px}.table .tr .on{background:var(--accent-soft)}.table .tr .gold{background:var(--second-soft)}.choices button{min-height:44px}.metrics strong{min-height:1.6em}.code-line{display:block}.code-line.on{background:var(--accent-soft);border-left:2px solid var(--accent);padding-left:6px}.status-badge{font-size:12px;color:var(--accent)}.tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.tile-grid .cell{min-height:40px}.actions button{min-height:48px}.form-field{display:grid;gap:8px;margin:14px 0;font-size:13px}.form-field input{width:100%;font-family:var(--viz-font-ui)}.metrics.three{grid-template-columns:repeat(3,minmax(0,1fr))}.formula{min-height:3.2em}.presets{flex-wrap:wrap}.presets button{flex-basis:25%;min-height:44px}\n\n.budget{display:flex;height:28px;margin:16px 0;background:var(--surface);border-radius:5px;overflow:hidden}.budget i{display:block;background:var(--accent);transition:width .2s}.budget i.gold{background:var(--second)}.intervals{margin:16px 0}.interval{position:relative;height:36px;background:var(--surface);margin:6px 0;border-radius:4px;overflow:hidden}.interval i{position:absolute;height:100%;background:var(--accent-soft);border-left:2px solid var(--accent)}.interval i.gold{background:var(--second-soft);border-color:var(--second)}.interval span{position:relative;z-index:1;font:12px/36px var(--viz-font-ui);padding-left:7px}.table .tr>*{min-height:4.8em}.formula{white-space:pre-line;min-height:7.2em}.actions:has(>button:only-child){grid-template-columns:1fr}.metrics strong{min-height:3.2em}.rangegrid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:3px;margin:14px 0}.rangegrid .cell{min-height:30px;padding:3px 1px;font-size:10px}.message{min-height:7.2em;white-space:pre-line;font:13px/1.8 var(--viz-font-ui);overflow-wrap:anywhere}\n/* Allow CJK hanging punctuation without overflowing a metric's border box. */\n.metrics>div{padding-right:4px}.metrics span{line-break:anywhere}\n\n#parts .tr{grid-template-columns:1fr 1fr}.metrics strong{font-size:19px}","js":"const $=s=>document.querySelector(s);const set=(id,v)=>$('#'+id).textContent=v;const t=k=>viz.t(k);function cells(id,values){$('#'+id).replaceChildren(...values.map(v=>{const e=document.createElement('div');e.className='cell '+(v.cls||'');e.textContent=v.text;e.title=v.title||v.text;return e;}));}function pressed(mode){document.querySelectorAll('[data-mode]').forEach(e=>e.setAttribute('aria-pressed',String(e.dataset.mode===mode)));}const esc=s=>String(s).replace(/[&<>\"']/g,c=>({'&':'&','<':'<','>':'>','\"':'"',\"'\":'''}[c]));const fmt=s=>'{'+[...s].sort().join(', ')+'}';function graph(id,nodes,edges){const el=$('#'+id);el.setAttribute('viewBox','0 0 360 200');el.innerHTML='<defs><marker id=\"arrow-'+id+'\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"5\" markerHeight=\"5\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"var(--muted)\"/></marker></defs>'+edges.map(e=>{const a=nodes[e[0]],b=nodes[e[1]],dx=b.x-a.x,dy=b.y-a.y,d=Math.hypot(dx,dy)||1;if(edges.some(r=>r[0]===e[1]&&r[1]===e[0])){const nx=-dy/d,ny=dx/d;return '<path class=\"edge '+(e[2]?'on':'')+'\" d=\"M '+(a.x+dx/d*22+nx*12)+' '+(a.y+dy/d*22+ny*12)+' Q '+((a.x+b.x)/2+nx*38)+' '+((a.y+b.y)/2+ny*38)+' '+(b.x-dx/d*25+nx*12)+' '+(b.y-dy/d*25+ny*12)+'\" marker-end=\"url(#arrow-'+id+')\"/>';}return '<line class=\"edge '+(e[2]?'on':'')+'\" x1=\"'+(a.x+dx/d*25)+'\" y1=\"'+(a.y+dy/d*25)+'\" x2=\"'+(b.x-dx/d*28)+'\" y2=\"'+(b.y-dy/d*28)+'\" marker-end=\"url(#arrow-'+id+')\"/>';}).join('')+nodes.map(n=>'<g><circle class=\"node '+(n.cls||'')+'\" cx=\"'+n.x+'\" cy=\"'+n.y+'\" r=\"25\"/><text x=\"'+n.x+'\" y=\"'+(n.y+4)+'\" text-anchor=\"middle\">'+esc(n.name)+'</text>'+(n.sub?'<text x=\"'+n.x+'\" y=\"'+(n.y+43)+'\" text-anchor=\"middle\">'+esc(n.sub)+'</text>':'')+'</g>').join('');}function table(id,rows){$('#'+id).classList.add('table');$('#'+id).replaceChildren(...rows.map(r=>{const row=document.createElement('div');row.className='tr';r.forEach(x=>{const c=document.createElement('div');if(typeof x==='object'){c.textContent=x.text;c.className=x.cls||'';}else c.textContent=x;row.append(c)});return row;}));}function band(id,parts,total){$('#'+id).replaceChildren(...parts.map((p,i)=>{const e=document.createElement('i');e.style.width=(100*p.value/total)+'%';e.className=i%2?'gold':'on';e.title=p.name+': '+p.value;return e}));}function intervals(id,items,total){$('#'+id).replaceChildren(...items.map(p=>{const row=document.createElement('div');row.className='interval';const bar=document.createElement('i');bar.style.left=(100*p.start/total)+'%';bar.style.width=(100*(p.end-p.start)/total)+'%';bar.className=p.cls||'';const label=document.createElement('span');label.textContent=p.label;row.append(bar,label);return row;}));}function draw(){const ip=+$('#ip').value,rate=+$('#rate').value,pad=Math.max(0,46-ip),frame=14+ip+pad+4,wire=frame+20,pps=rate*1e9/(8*wire),parts=[{name:'Preamble/SFD',value:8},{name:'Ethernet',value:14},{name:'IPv4/TCP',value:40},{name:'TCP data',value:ip-40},{name:'Padding',value:pad},{name:'FCS',value:4},{name:'IFG (time)',value:12}];set('ip-value',ip);set('rate-value',rate);band('wire',parts,wire);table('parts',parts.map(p=>[p.name,p.value]));set('frame',frame);set('pps',Math.round(pps).toLocaleString());set('goodput',(pps*(ip-40)*8/1e6).toFixed(2));set('eff',((ip-40)/wire*100).toFixed(2)+'%');set('equation','wire = max(64, 14 + '+ip+' + 4) + 8 + 12 = '+wire+'\\nPPS = '+rate+'×10⁹ / (8×'+wire+')');$('#wire').dataset.bytes=wire;$('#pps').dataset.value=pps;}document.querySelectorAll('input').forEach(e=>e.oninput=draw);draw();","audio":false,"strings":{"eff":"TCP Data Ratio","frame":"MAC Frame (B)","goodput":"TCP Data Upper Bound (Mbit/s)","heading":"On the same wire, why do small packets exhaust processing capacity more easily?","intro":"Modify IP length and wire speed, comparing effective data, MAC frames, and link time occupation.","ip":"Total IP Length (B)","parts":"Itemized Byte Account","pps":"Upper Bound of Frames per Second","rate":"Wire Speed (Gbit/s)","reset":"Reset","scope":"Unlabeled Ethernet II, IPv4/TCP each 20 B, no options; IFG accounted at average 12 byte-times. ACK, encoding, and host bottlenecks are not included; the result is an ideal upper bound.","scopeLabel":"Model Scope and Assumptions"}}
MAC Address is a Link Identifier, Not a Trusted Identity
Common MACs are 48 bits. Using the lowest bit number of the first byte as bit 0, bit 0=1 indicates a group address, and bit 1=1 indicates local management. For example, 02:00:00:00:00:01 is locally managed unicast; ff:ff:ff:ff:ff:ff is broadcast. Traditional OUI allocation commonly uses the first three bytes, but IEEE allocation blocks have different lengths; do not infer a unique vendor from the first three bytes of any address.
Local management, virtualization, randomization, and configuration errors can all produce duplicates or changes, and addresses can be spoofed. A switch learning a MAC only provides forwarding table information and does not mean the device has been authenticated. RFC 9542: IEEE 802 Identifiers and Allocation
Broadcast usually floods only to ports within the same VLAN that meet forwarding state and policy, not unconditionally copying to all switch ports; reserved multicast addresses have special handling. Ordinary switches generally learn the ingress based on source MAC and look up the forwarding table based on destination MAC and VLAN; unknown unicast handling, multicast listening, and port isolation also change the actual egress.
The router receives the link frame destined for itself, removes the old Layer 2 encapsulation, selects the egress based on IP routing, and then generates a new frame using the next-hop MAC of that egress. In the example without NAT, the final destination IP remains unchanged, but TTL/Hop Limit is decremented, and relevant header fields are updated per protocol. See ARP and NDP for MAC next-hop resolution.
Across a router, which addresses change?
First fix the final communicating parties, then observe the addresses actually needed on each link. Setting the initial TTL to 1 and selecting the next link segment reveals that the result should be "no packet," rather than a frame with TTL=0 that continues moving forward. This boundary tests both encapsulation replacement and forwarding lifecycle.
Preparing the visual
Across a router, which addresses change?
Ordinary routing rebuilds Layer 2 encapsulation per hop; final IP destination remains; TTL decrements, and if life is insufficient, the frame simply does not exist on the next link.
{"id":"ethernet-hop-addresses","title":"Across a router, which addresses change?","summary":"Ordinary routing rebuilds Layer 2 encapsulation per hop; final IP destination remains; TTL decrements, and if life is insufficient, the frame simply does not exist on the next link.","height":1000,"html":"<h2 data-i18n=\"heading\"></h2><p class=\"intro\" data-i18n=\"intro\"></p><div class=\"presets\" role=\"group\" data-i18n-label=\"link\"><button data-mode=\"0\" data-i18n=\"l0\"></button><button data-mode=\"1\" data-i18n=\"l1\"></button><button data-mode=\"2\" data-i18n=\"l2\"></button></div><div class=\"control\"><label for=\"ttl\" data-i18n=\"ttl\"></label><output for=\"ttl\" id=\"ttl-value\"></output><input id=\"ttl\" type=\"range\" min=\"1\" max=\"8\" value=\"4\" step=\"1\"></div><svg id=\"path\" class=\"diagram\" viewBox=\"0 0 360 180\" role=\"img\" data-i18n-label=\"heading\"></svg><section class=\"panel\"><h3 data-i18n=\"fields\"></h3><div id=\"fields\"></div></section><div class=\"metrics\"><div><span data-i18n=\"remaining\"></span><strong id=\"remaining\"></strong></div><div><span data-i18n=\"status\"></span><strong id=\"status\"></strong></div></div><details class=\"scope\"><summary data-i18n=\"scopeLabel\"></summary><p data-i18n=\"scope\"></p></details>","css":".intro{margin:8px 0 18px;color:var(--muted);font-size:14px}.caption,.hint{font-size:12px;color:var(--muted);margin-top:12px}.control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;align-items:center;margin:14px 0;font-size:13px}.control label{font-size:13px}.control output{color:var(--accent);min-width:5em;text-align:right;font-variant-numeric:tabular-nums}.control input{grid-column:1/-1;width:100%;margin:0}.presets{display:flex;gap:4px;align-items:stretch}.presets button{flex:1 1 0;min-width:0;overflow-wrap:anywhere;font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.actions button{flex:1;min-width:0;font-size:13px;min-height:42px}.copy{display:grid;font-size:14px;margin:16px 0}.copy>*{grid-area:1/1;margin:0}.reserve{visibility:hidden}.scope{margin-top:14px;color:var(--muted);font-size:12px}.scope summary{padding:8px 0;cursor:pointer}.scope p{margin-top:10px}.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.card{border:1px solid var(--rule);border-radius:9px;padding:14px;min-width:0}.card header{font-size:14px;font-weight:600;margin-bottom:10px}.card button{font-size:12px;width:100%;min-width:0}.card small{display:block;font-size:12px;color:var(--muted)}.card code{font-size:12px;overflow-wrap:anywhere}.metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.metrics>div{border-left:2px solid var(--accent);padding-left:10px;min-width:0}.metrics span{display:block;min-height:3.2em;color:var(--muted);font-size:12px}.metrics strong{font-size:23px;display:block;font-weight:500;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.formula{border-top:1px solid var(--rule);padding-top:12px;margin-top:14px;font-size:13px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.value{font:500 20px var(--viz-font-ui)}.legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;color:var(--muted);margin:12px 0}.legend span:before{content:'';display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--accent);margin-right:6px}.legend .second:before{background:var(--second)}.check{display:flex;align-items:center;gap:8px;font-size:13px;margin:12px 0}.check input{width:16px;height:16px;flex-shrink:0;accent-color:var(--accent)}select,input[type=text],input[type=number]{background:var(--paper);color:var(--ink);font:inherit;font-size:13px;padding:10px;border:1px solid var(--rule);border-radius:7px;max-width:100%;min-width:0}select{width:100%;min-height:42px}.band{height:20px;display:flex;background:var(--surface);border-radius:4px;overflow:hidden}.band i{height:100%;display:block;background:var(--accent);transition:width .25s}.band i.second{background:var(--second)}button:disabled{cursor:default}.status{font-size:13px;min-height:4.8em}.mono{font-family:var(--viz-font-mono);font-variant-numeric:tabular-nums}.muted{color:var(--muted)}\n@media(max-width:480px){.two{gap:8px}.card{padding:12px 9px}.actions button,.presets button{font-size:12px}.metrics strong{font-size:20px}.metrics{gap:8px}}\n@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}\n.track-row{margin:16px 0}.track-row>span{display:block;font-size:12px;color:var(--muted);margin-bottom:7px}.track{display:flex;gap:5px;min-width:0}.cell{flex:1;min-width:0;min-height:48px;border:1px solid var(--rule);border-radius:5px;background:var(--surface);display:flex;align-items:center;justify-content:center;text-align:center;padding:5px 3px;font-size:12px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.cell.on{background:var(--accent-soft);border-color:var(--accent)}.cell.gold{background:var(--second-soft);border-color:var(--second)}.cell.empty{border-style:dashed;color:var(--muted)}.cell.error{border-color:var(--second);text-decoration:line-through}.choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:14px 0}.choices button{min-width:0;padding:10px 4px;font-size:12px;overflow-wrap:anywhere}.choices button[aria-current=true]{border-color:var(--accent);background:var(--accent-soft)}.relation{display:grid;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);align-items:center;gap:6px;margin:12px 0}.relation .cell{min-height:72px}.relation>i{text-align:center;font-style:normal;color:var(--accent)}.readout{font-size:13px;white-space:pre-line;min-height:6.4em;overflow-wrap:anywhere}.plot{position:relative;border-left:1px solid var(--rule);border-bottom:1px solid var(--rule);padding:8px 0;margin:18px 0}.plot-row{height:28px;position:relative;margin:4px 0;background:var(--surface)}.plot-row i{position:absolute;inset-block:5px;background:var(--accent);min-width:2px;transition:width .2s,left .2s}.plot-row b{position:relative;padding:4px 6px;font:11px/28px var(--viz-font-ui);background:var(--paper);border-radius:3px}.axis{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}\n\n/* Action labels must remain readable across locales and narrow embeds. */\n.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}\n.actions button{overflow-wrap:anywhere;white-space:normal;min-height:58px;padding:8px}\nbutton{overflow-wrap:anywhere}\n@media(min-width:640px){.actions{grid-template-columns:repeat(3,minmax(0,1fr))}}\n\n.metrics span{overflow-wrap:anywhere}\n.panel{border:1px solid var(--rule);border-radius:9px;padding:12px;margin:14px 0;min-width:0}.panel h3{font-size:13px;margin:0 0 10px;color:var(--muted)}.source{font:13px/1.8 var(--viz-font-mono);white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}.source mark{background:var(--accent-soft);color:var(--ink);border-bottom:2px solid var(--accent)}.source .fault{background:var(--second-soft);border-color:var(--second)}.diagram{display:block;width:100%;height:auto;max-height:320px;margin:14px 0;overflow:visible}.diagram text{fill:var(--ink);font:12px var(--viz-font-ui)}.diagram .edge{stroke:var(--muted);stroke-width:1.5;fill:none}.diagram .edge.on{stroke:var(--accent);stroke-width:3}.diagram .node{fill:var(--surface);stroke:var(--rule);stroke-width:1.5}.diagram .node.on{fill:var(--accent-soft);stroke:var(--accent)}.diagram .node.gold{fill:var(--second-soft);stroke:var(--second)}.log{font:12px/1.8 var(--viz-font-mono);white-space:pre-line;overflow-wrap:anywhere;min-height:7.2em}.table{display:grid;gap:5px;margin:14px 0}.table .tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.table .tr>*{padding:8px 5px;background:var(--surface);border-radius:4px;min-width:0;overflow-wrap:anywhere;font-size:12px}.table .tr .on{background:var(--accent-soft)}.table .tr .gold{background:var(--second-soft)}.choices button{min-height:44px}.metrics strong{min-height:1.6em}.code-line{display:block}.code-line.on{background:var(--accent-soft);border-left:2px solid var(--accent);padding-left:6px}.status-badge{font-size:12px;color:var(--accent)}.tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.tile-grid .cell{min-height:40px}.actions button{min-height:48px}.form-field{display:grid;gap:8px;margin:14px 0;font-size:13px}.form-field input{width:100%;font-family:var(--viz-font-ui)}.metrics.three{grid-template-columns:repeat(3,minmax(0,1fr))}.formula{min-height:3.2em}.presets{flex-wrap:wrap}.presets button{flex-basis:25%;min-height:44px}\n\n.budget{display:flex;height:28px;margin:16px 0;background:var(--surface);border-radius:5px;overflow:hidden}.budget i{display:block;background:var(--accent);transition:width .2s}.budget i.gold{background:var(--second)}.intervals{margin:16px 0}.interval{position:relative;height:36px;background:var(--surface);margin:6px 0;border-radius:4px;overflow:hidden}.interval i{position:absolute;height:100%;background:var(--accent-soft);border-left:2px solid var(--accent)}.interval i.gold{background:var(--second-soft);border-color:var(--second)}.interval span{position:relative;z-index:1;font:12px/36px var(--viz-font-ui);padding-left:7px}.table .tr>*{min-height:4.8em}.formula{white-space:pre-line;min-height:7.2em}.actions:has(>button:only-child){grid-template-columns:1fr}.metrics strong{min-height:3.2em}.rangegrid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:3px;margin:14px 0}.rangegrid .cell{min-height:30px;padding:3px 1px;font-size:10px}.message{min-height:7.2em;white-space:pre-line;font:13px/1.8 var(--viz-font-ui);overflow-wrap:anywhere}\n/* Allow CJK hanging punctuation without overflowing a metric's border box. */\n.metrics>div{padding-right:4px}.metrics span{line-break:anywhere}\n\n#fields .tr{grid-template-columns:1fr 1fr}.metrics strong{font-size:18px}","js":"const $=s=>document.querySelector(s);const set=(id,v)=>$('#'+id).textContent=v;const t=k=>viz.t(k);function cells(id,values){$('#'+id).replaceChildren(...values.map(v=>{const e=document.createElement('div');e.className='cell '+(v.cls||'');e.textContent=v.text;e.title=v.title||v.text;return e;}));}function pressed(mode){document.querySelectorAll('[data-mode]').forEach(e=>e.setAttribute('aria-pressed',String(e.dataset.mode===mode)));}const esc=s=>String(s).replace(/[&<>\"']/g,c=>({'&':'&','<':'<','>':'>','\"':'"',\"'\":'''}[c]));const fmt=s=>'{'+[...s].sort().join(', ')+'}';function graph(id,nodes,edges){const el=$('#'+id);el.setAttribute('viewBox','0 0 360 200');el.innerHTML='<defs><marker id=\"arrow-'+id+'\" viewBox=\"0 0 10 10\" refX=\"8\" refY=\"5\" markerWidth=\"5\" markerHeight=\"5\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"var(--muted)\"/></marker></defs>'+edges.map(e=>{const a=nodes[e[0]],b=nodes[e[1]],dx=b.x-a.x,dy=b.y-a.y,d=Math.hypot(dx,dy)||1;if(edges.some(r=>r[0]===e[1]&&r[1]===e[0])){const nx=-dy/d,ny=dx/d;return '<path class=\"edge '+(e[2]?'on':'')+'\" d=\"M '+(a.x+dx/d*22+nx*12)+' '+(a.y+dy/d*22+ny*12)+' Q '+((a.x+b.x)/2+nx*38)+' '+((a.y+b.y)/2+ny*38)+' '+(b.x-dx/d*25+nx*12)+' '+(b.y-dy/d*25+ny*12)+'\" marker-end=\"url(#arrow-'+id+')\"/>';}return '<line class=\"edge '+(e[2]?'on':'')+'\" x1=\"'+(a.x+dx/d*25)+'\" y1=\"'+(a.y+dy/d*25)+'\" x2=\"'+(b.x-dx/d*28)+'\" y2=\"'+(b.y-dy/d*28)+'\" marker-end=\"url(#arrow-'+id+')\"/>';}).join('')+nodes.map(n=>'<g><circle class=\"node '+(n.cls||'')+'\" cx=\"'+n.x+'\" cy=\"'+n.y+'\" r=\"25\"/><text x=\"'+n.x+'\" y=\"'+(n.y+4)+'\" text-anchor=\"middle\">'+esc(n.name)+'</text>'+(n.sub?'<text x=\"'+n.x+'\" y=\"'+(n.y+43)+'\" text-anchor=\"middle\">'+esc(n.sub)+'</text>':'')+'</g>').join('');}function table(id,rows){$('#'+id).classList.add('table');$('#'+id).replaceChildren(...rows.map(r=>{const row=document.createElement('div');row.className='tr';r.forEach(x=>{const c=document.createElement('div');if(typeof x==='object'){c.textContent=x.text;c.className=x.cls||'';}else c.textContent=x;row.append(c)});return row;}));}function band(id,parts,total){$('#'+id).replaceChildren(...parts.map((p,i)=>{const e=document.createElement('i');e.style.width=(100*p.value/total)+'%';e.className=i%2?'gold':'on';e.title=p.name+': '+p.value;return e}));}function intervals(id,items,total){$('#'+id).replaceChildren(...items.map(p=>{const row=document.createElement('div');row.className='interval';const bar=document.createElement('i');bar.style.left=(100*p.start/total)+'%';bar.style.width=(100*(p.end-p.start)/total)+'%';bar.className=p.cls||'';const label=document.createElement('span');label.textContent=p.label;row.append(bar,label);return row;}));}let link=0;function draw(){const ttl=+$('#ttl').value,live=ttl>link;set('ttl-value',ttl);graph('path',['A','R1','R2','B'].map((name,i)=>({name,x:40+i*92,y:80,cls:i===link||i===link+1?'on':''})),[[0,1,link===0&&live],[1,2,link===1&&live],[2,3,link===2&&live]]);const mac=[['A-mac','R1-in'],['R1-out','R2-in'],['R2-out','B-mac']];table('fields',[['Ethernet src',live?mac[link][0]:'∅'],['Ethernet dst',live?mac[link][1]:'∅'],['IPv4 src',live?'192.0.2.10':'∅'],['IPv4 dst',live?'198.51.100.20':'∅']]);set('remaining',live?ttl-link:'—');set('status',t(live?'live':'expired'));$('#fields').dataset.live=String(live);pressed(String(link));}document.querySelectorAll('[data-mode]').forEach(b=>b.onclick=()=>{link=+b.dataset.mode;draw()});$('#ttl').oninput=draw;draw();","audio":false,"strings":{"expired":"Exhausted Previously","fields":"Packet on this Link","heading":"Across a router, which addresses change?","intro":"Select current link and initial TTL, comparing link encapsulation, final IP, and remaining forwarding life.","l0":"A → R1","l1":"R1 → R2","l2":"R2 → B","link":"Observe Link","live":"Sendable","remaining":"TTL Here","reset":"Reset","scope":"Fixed A→R1→R2→B path, no NAT, tunnels, or options. Selecting a link is for observing the same forwarding deduction, not for resending packets; does not simulate ICMP return path.","scopeLabel":"Model Scope and Assumptions","status":"Forwarding Status","ttl":"Initial TTL"}}
VLAN Tag: Read TCI in Network Byte Order First
The 802.1Q tag is located after the source MAC, including a 2 B TPID and 2 B TCI, followed by the inner EtherType. When decoding TCI as a 16-bit unsigned integer: PCP=(TCI>>13)&7, DEI=(TCI>>12)&1, VID=TCI&0x0fff. The positions from left to right in the diagram are opposite to the numbering direction starting from the least significant bit of the integer; implementations should extract fields using the masks above.
Item
Function
Boundary
PCP, 3 bit
Carrying Priority Mark
Queue, trust, and scheduling mapping are determined by device policy
DEI, 1 bit
Discard Eligibility Indicator
Not equal to IP ECN, does not guarantee immediate discard
VID, 12 bit
Identifies VLAN-related Affiliation
1~4094 usually serve as VLAN ID, 0 is for priority tagging, 4095 is reserved
When PCP=5, DEI=1, VID=100, TCI=0xB064, and the two bytes on the wire are B0 64. VID=0 does not mean a normal VLAN 0 exists; the ingress still needs to determine the affiliated VLAN according to port classification rules. Untagged traffic can also be classified by the ingress port's PVID.
Adding a tag usually brings a frame carrying 1500 B payload to 1522 B; L3 MTU does not need to be reduced because of this. Whether short frames retain original padding and the length after inserting/removing tags must be analyzed according to specific sending and bridging behaviors; do not force a minimum payload value on all tagged frames.
Q-in-Q commonly uses outer S-tag 0x88A8 and inner C-tag 0x8100, in the order of DA, SA, outer tag, inner tag, upper-layer type, and data. It extends carrying and isolation identifiers but does not equal encryption. Linux QoS to PCP mapping and VLAN offloading configurations also need to be checked separately; do not assume that reading PCP automatically yields the expected queue policy.
MTU and Packet Capture: Distinguish Three Views
Jumbo MTU like 9000 is a common configuration, not consistently guaranteed by all devices; the end-to-end path must meet corresponding frame or packet capabilities, and tunnels also need to reserve encapsulation overhead. Layer 2 devices dropping frames due to being too large typically do not generate ICMP for routers; Layer 3 MTU, fragmentation, and PMTUD are another set of mechanisms, with different behaviors for IPv4 and IPv6.
Software packet capture may not see preamble or FCS; VLAN tags may be stripped by hardware and delivered as metadata; send checksums may not yet be completed by the NIC, and TSO/GSO or GRO may make software objects larger than on-wire frames. When seeing "oversized MTU packets" or "bad checksums," first check the capture location and offloading, rather than immediately asserting line violations. Linux Segmentation Offloads
Linux's rx-fcs requests retaining received FCS, while rx-all relates to error frames that are usually dropped upon reception; support depends on the NIC/driver. Do not mix them into one switch, and tcpdump will not magically obtain content of frames already dropped by hardware. Linux netdev features
The fields and bitmasks in this article are also cross-checked with Linux 7.2's include/uapi/linux/if_ether.h and include/linux/if_vlan.h; kernel length constants clearly distinguish whether FCS is included.
PAUSE, PFC, and LACP Solve Different Problems
PAUSE is per-link backpressure, requesting the peer to pause corresponding normal sends, with time units in 512 bit times. It can suppress instantaneous pressure on the receiving side, but may also cause unrelated traffic to wait together. PFC distinguishes pauses by priority, but may still produce head-of-line blocking, congestion propagation, or even deadlocks under specific dependencies; do not describe it as the default superior solution for all data center traffic, nor generalize a specific RoCE deployment strategy into a mandatory condition for all networks.
LACP is responsible for negotiating aggregation members and states, not for automatically splitting one connection into multiple paths. Commonly, per-flow hashing is used to avoid per-packet out-of-order delivery, so an aggregation composed of two 10 Gb/s links can increase total capacity for multiple flows, but a single flow is usually still limited by one member link; hash collisions may also cause multiple flows to land on the same member. Linux bonding documentation
Fast/Slow LACP common send periods are about 1 s/30 s and should not be directly taken as the final failover time. Link detection, timeouts, aggregation selection, switch-side configuration, and traffic redistribution jointly determine recovery. Modes like active-backup and balance-rr also have different peer requirements and order impacts; do not configure it as "just plug in two cables."
Local Resolution and Wire-Speed Recalculation
frommathimportiscloseimportstructpcp, dei, vid=5, 1, 100tci=(pcp<<13)|(dei<<12)|vidasserttci==0xB064wire=struct.pack('!HHH',0x8100,tci,0x0800)tpid, received, etype=struct.unpack('!HHH',wire)asserttpid==0x8100andetype==0x0800assert((received>>13)&7,(received>>12)&1,received&0xfff)==(5,1,100)first=0x02assert(first&1)==0and(first&2)!=0assert1_488_095<1e9/((64+8+12)*8)<1_488_096assertisclose(1500/1538,0.9752925877763329)assert949.2<1e3*1460/1538<949.3assertisclose(96/1e9*1e9,96)assertisclose(1*512/1e9*1e6,0.512)print('TCI byte order/bit fields, MAC flags, and frame time budget checks passed')
This article only verifies format and mathematical budgets, without modifying interface MAC, MTU, VLAN, or aggregation configurations, and without performing actual packet captures.
Continue Reading
ARP and NDP: How IP next-hops map to link addresses.