docs: add useful debug CLI
[vpp.git] / docs / reference / cmdreference / interface / hardware.rst
1 .. _interface:
2
3 .. toctree::
4
5 Hardware-Interfaces Commands
6 =============================
7 This section contains those interface commands that are related to hardware-interfaces:
8
9
10 * `Show Bridge-Domain`_
11 * `Show Hardware-Interfaces`_
12 * `Clear Hardware-Interfaces`_
13
14 .. note:: For a complete list of CLI Debug commands refer to the Debug CLI section of the `Source Code Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`_ .
15
16 Show Bridge-Domain
17 +++++++++++++++++++
18
19 Summary/Usage
20 --------------
21
22 show bridge-domain [*bridge-domain-id* [detail|int|arp| *bd-tag* ]]
23
24 Description
25 ------------
26
27 Show a summary of all the bridge-domain instances or detailed view of a single bridge-domain. Bridge-domains are created by adding an interface to a bridge using the **set interface l2 bridge** command.
28
29 Example Usage
30 --------------
31 .. code-block:: console
32
33     Example of displaying all bridge-domains:
34
35     vpp# show bridge-domain
36
37      ID   Index   Learning   U-Forwrd   UU-Flood   Flooding   ARP-Term     BVI-Intf
38      0      0        off        off        off        off        off        local0
39     200     1        on         on         on         on         off          N/A
40
41     Example of displaying details of a single bridge-domains:
42
43     vpp# show bridge-domain 200 detail
44
45      ID   Index   Learning   U-Forwrd   UU-Flood   Flooding   ARP-Term     BVI-Intf
46     200     1        on         on         on         on         off          N/A
47
48              Interface           Index  SHG  BVI        VLAN-Tag-Rewrite
49      GigabitEthernet0/8/0.200      3     0    -               none
50      GigabitEthernet0/9/0.200      4     0    -               none
51
52 Declaration and Implementation
53 -------------------------------
54
55 **Declaration:** bd_show_cli (src/vnet/l2/l2_bd.c line 1151)
56
57 **Implementation:** bd_show
58
59 Show Hardware-Interfaces
60 +++++++++++++++++++++++++
61 Display more detailed information about all or a list of given
62 interfaces. The verboseness of the output can be controlled by the
63 following optional parameters:
64
65 -  **brief**: Only show name, index and state (default for bonded
66    interfaces).
67 -  **verbose**: Also display additional attributes (default for all other
68    interfaces).
69 -  **detail**: Also display all remaining attributes and extended
70    statistics.
71
72 .. note::
73         To limit the output of the command to bonded interfaces and their
74         slave interfaces, use the '*bond*' optional parameter.
75
76 Summary/Usage
77 --------------
78
79 .. code-block:: shell
80
81     show hardware-interfaces [brief|verbose|detail] [bond] [<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]].
82
83 Examples
84 ---------
85 Example of how to display default data for all interfaces:
86
87 .. code-block:: console
88
89     vpp# show hardware-interfaces
90                   Name                Idx   Link  Hardware
91     GigabitEthernet7/0/0               1     up   GigabitEthernet7/0/0
92       Ethernet address ec:f4:bb:c0:bc:fc
93       Intel e1000
94         carrier up full duplex speed 1000 mtu 9216
95         rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
96         cpu socket 0
97     GigabitEthernet7/0/1               2     up   GigabitEthernet7/0/1
98       Ethernet address ec:f4:bb:c0:bc:fd
99       Intel e1000
100         carrier up full duplex speed 1000 mtu 9216
101         rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
102         cpu socket 0
103     VirtualEthernet0/0/0               3     up   VirtualEthernet0/0/0
104       Ethernet address 02:fe:a5:a9:8b:8e
105     VirtualEthernet0/0/1               4     up   VirtualEthernet0/0/1
106       Ethernet address 02:fe:c0:4e:3b:b0
107     VirtualEthernet0/0/2               5     up   VirtualEthernet0/0/2
108       Ethernet address 02:fe:1f:73:92:81
109     VirtualEthernet0/0/3               6     up   VirtualEthernet0/0/3
110       Ethernet address 02:fe:f2:25:c4:68
111     local0                             0    down  local0
112       local
113
114 Example of how to display *verbose* data for an interface by name and software index (where 2 is the software index):
115
116 .. code-block:: console
117
118     vpp# show hardware-interfaces GigabitEthernet7/0/0 2 verbose
119                    Name                Idx   Link  Hardware
120     GigabitEthernet7/0/0               1     up   GigabitEthernet7/0/0
121       Ethernet address ec:f4:bb:c0:bc:fc
122       Intel e1000
123         carrier up full duplex speed 1000 mtu 9216
124         rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
125         cpu socket 0
126     GigabitEthernet7/0/1               2    down  GigabitEthernet7/0/1
127       Ethernet address ec:f4:bb:c0:bc:fd
128       Intel e1000
129         carrier up full duplex speed 1000 mtu 9216
130         rx queues 1, rx desc 1024, tx queues 3, tx desc 1024
131         cpu socket 0
132
133 Clear Hardware-Interfaces
134 +++++++++++++++++++++++++++
135
136 Clear the extended statistics for all or a list of given interfaces
137 (statistics associated with the **show hardware-interfaces** command).
138
139
140 Summary/Usage
141 -------------
142
143 .. code-block:: shell
144
145     clear hardware-interfaces [<interface> [<interface> [..]]] [<sw_idx> [<sw_idx> [..]]].
146
147
148 Examples
149 --------
150
151 Example of how to clear the extended statistics for all interfaces:
152
153
154 .. code-block:: console
155
156         vpp# clear hardware-interfaces
157
158 Example of how to clear the extended statistics for an interface by name and software index (where 2 is the software index):
159
160 .. code-block:: console
161
162         vpp# clear hardware-interfaces GigabitEthernet7/0/0 2
163
164