-
Notifications
You must be signed in to change notification settings - Fork 47
/
marvell-switch-tag.html
214 lines (172 loc) · 7.47 KB
/
marvell-switch-tag.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Created by : Luis MartinGarcia <http://www.aldabaknocking.com>
Original design : "Collaboration" by Free CSS Templates (later "TEMPLATED")
Original license : Creative Commons Attribution 2.5 License
-->
<html>
<!-- HEAD -->
<head>
<meta charset="utf-8">
<title>Marvell switch tag | TCPDUMP/LIBPCAP public repository</title>
<meta name="keywords" content="tcpdump, libpcap, pcap, packet capture, sniffer, security, eavesdrop">
<meta name="description" content="Web site of Tcpdump and Libpcap">
<link href="../style.css" rel="stylesheet" type="text/css" media="screen">
<link rel="canonical" href="https://www.tcpdump.org">
</head>
<!-- END OF HTML HEAD -->
<!-- BODY -->
<body>
<!-- TOP MENU -->
<div id="menu">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../security.html">Security</a></li>
<li><a href="../faq.html">FAQ</a></li>
<li><a href="../linktypes.html">Link-Layer Header Types</a></li>
<li><a href="../related.html">Related Projects</a></li>
<li><a href="../license.html">Licenses</a></li>
<li><a href="../old_releases.html">Old Releases</a></li>
</ul>
</div>
<!-- END OF TOP MENU -->
<!-- PAGE HEADER -->
<div id="splash">
<br><img src="../images/logo.png" alt="">
</div>
<div id="logo">
<hr>
</div>
<!-- END OF PAGE HEADER -->
<!-- PAGE CONTENTS -->
<div id="page">
<!-- Start of Marvell switch tag section -->
<div class="post">
<h2 class="title">
<a name="intro">Marvell switch tag</a>
</h2>
<div class="entry">
<h3>Switch tag structure</h3>
The Marvell (Ethertyped or not) DSA tagged frames contains a
proprietary tag inserted between the source address field and the
type/length field in the Ethernet header.
The DSA tag is 4 octets. It contains the source (or target) switch
device and port or trunk numbers. It is placed in the frame on top
of the standard IEEE tag.
The EDSA tag is 8 octets. It contains a programmable Ethernet type,
two reserved bytes (always 0), and a standard DSA tag.
<pre>
7 6 5 4 3 2 1 0
. . . . . . . . .
0 +---+---+---+---+---+---+---+---+
| Ether Destination Address |
+6 +---+---+---+---+---+---+---+---+
| Ether Source Address |
+6 +---+---+---+---+---+---+---+---+ --
| Prog. DSA Ether Type [15:8] | |
+1 +---+---+---+---+---+---+---+---+ |
| Prog. DSA Ether Type [7:0] | | EDSA tag
+1 +---+---+---+---+---+---+---+---+ |
| Reserved (0x00 0x00) | |
+2 +---+---+---+---+---+---+---+---+ | --
| Mode |b29| Switch Device | | |
+1 +---+---+---+---+---+---+---+---+ | |
| Switch Port |b18|b17|b16| | |
+1 +---+---+---+---+---+---+---+---+ | | DSA tag
| PRI [2:0] |b12| VID [11:8] | | |
+1 +---+---+---+---+---+---+---+---+ | |
| VID [7:0] | | |
+1 +---+---+---+---+---+---+---+---+ -- --
| Ether Length/Type |
+2 +---+---+---+---+---+---+---+---+
. . . . . . . . .
</pre>
<h4>To_CPU frame mode (ingress)</h4>
The DSA tag mode 0x0 describes a To_CPU frame.
If the b29 bit is set, the original frame contained an IEEE tag
converted into a DSA tag, otherwise the frame was originally untagged
and the DSA tag was added to the frame.
The switch device and port bits define the numbers of the original
source device and port where the frame first ingressed.
Bits b17, b16 and b12 are the frame type code bits 2, 1 and 0,
describing the kind of To_CPU frame:
<ul>
<li>0x0 for BPDU (MGMT) Trap</li>
<li>0x1 for Frame2Reg Response</li>
<li>0x2 for IGMP/MLD Trap</li>
<li>0x3 Policy Trap</li>
<li>0x4 for ARP Mirror</li>
<li>0x3 Policy Mirror</li>
</ul>
The b16 bit is the original frame's CFI bit if it was IEEE tagged.
The PRI bits define the priority assigned to the frame when it entered
the source device.
The VID bits define the VLAN identifier assigned to the frame when
it entered the source device.
<h4>From_CPU frame mode (egress)</h4>
The DSA tag mode 0x1 describes a From_CPU frame.
If the b29 bit is set, the frame egresses the target port with an
IEEE tag, otherwise the frame egresses the target port untagged.
The switch device and port bits define the numbers of the target
device and port where the frame must egress.
The b16 bit is used as the frame's IEEE tag CFI bit if the frame
egresses the target port tagged.
The PRI bits define the IEEE tag priority of the frame if it egresses
the target port tagged, otherwise they indicate the egress queue the
frame is to be switched to.
The VID bits define the IEEE VID of the frame if it egresses the
target port tagged, otherwise they are ignored.
<h4>To_Sniffer frame mode (ingress)</h4>
The DSA tag mode 0x2 describes a To_Sniffer frame.
If the b29 bit is set, the original frame contained an IEEE tag
converted into a DSA tag, otherwise the frame was originally untagged
and the DSA tag was added to the frame.
The switch device and port bits define the numbers of the original
source device and port where the frame first ingressed.
If the b18 bit is set, the frame came from an ingress source port,
otherwise it came from an egress source port.
The b16 bit is the original frame's CFI bit if it was IEEE tagged.
The PRI bits define the priority assigned to the frame when it entered
the source device.
The VID bits define the VLAN identifier assigned to the frame when
it entered the source device.
<h4>Forward DSA tag frame mode (egress)</h4>
The DSA tag mode 0x3 describes a Forward frame.
The b29 bit is used to inform the egress port to consider the frame
as tagged if set, otherwise as untagged.
The PRI bits are used as the IEEE tag priority of the frame.
The VID bits are used as the IEEE VID of the frame.
<h4>Forward DSA tag frame mode (ingress)</h4>
The DSA tag mode 0x3 describes a Forward frame.
If the b29 bit is set, the original frame contained an IEEE tag
converted into a DSA tag, otherwise the frame was originally untagged
and the DSA tag was added to the frame.
The switch device and port bits define the numbers of the original
source device and port where the frame first ingressed.
If the b18 bit is set, the switch port bits indicate a trunk ID,
otherwise a port number.
The b16 bit is the original frame's CFI bit if it was IEEE tagged.
The PRI bits define the priority assigned to the frame when it entered
the source device.
The VID bits define the VLAN identifier assigned to the frame when
it entered the source device.
</div>
<!-- End of Marvell switch tag section -->
</div>
</div>
<!-- END OF PAGE CONTENTS -->
<!-- FOOTER -->
<div id="footer">
<p>
© 2010–2021 The Tcpdump Group. Designed by
<a href="http://www.aldabaknocking.com/">Luis MartinGarcia</a>;
based on a template by TEMPLATED.
<a href="https://validator.w3.org/check?uri=referer">[Valid HTML
4.01]</a> <a href="https://jigsaw.w3.org/css-validator/check/referer">
[Valid CSS]</a>
</p>
</div>
<!-- END OF FOOTER -->
</body>
<!-- END OF HTML BODY -->
</html>