DOC ONLY: fix doc bugs
[vpp.git] / docs / reference / cmdreference / interface / interface.rst
1 .. _intcommands:
2
3 Interface Commands
4 ==================
5
6 .. toctree::
7
8 .. _showintcommand:
9
10 Show Interface
11 ==============
12 Shows software interface information including counters and features
13
14 Summary/Usage
15 -------------
16
17 .. code-block:: shell
18
19     show interface [address|addr|features|feat] [<interface> [<interface> [..]]]
20
21 Examples
22 --------
23
24 Example of how to show the interface counters:
25
26 .. code-block:: console
27
28     vpp# show int
29                   Name               Idx       State          Counter          Count     
30     TenGigabitEthernet86/0/0          1         up       rx packets               6569213
31                                                          rx bytes              9928352943
32                                                          tx packets                 50384
33                                                          tx bytes                 3329279
34     TenGigabitEthernet86/0/1          2        down      
35     VirtualEthernet0/0/0              3         up       rx packets                 50384
36                                                          rx bytes                 3329279
37                                                          tx packets               6569213
38                                                          tx bytes              9928352943
39                                                          drops                       1498
40     local0                            0        down      
41
42 Example of how to display the interface placement:
43
44 .. code-block:: console
45
46     vpp# show interface rx-placement
47     Thread 1 (vpp_wk_0):
48       node dpdk-input:
49         GigabitEthernet7/0/0 queue 0 (polling)
50       node vhost-user-input:
51         VirtualEthernet0/0/12 queue 0 (polling)
52         VirtualEthernet0/0/12 queue 2 (polling)
53         VirtualEthernet0/0/13 queue 0 (polling)
54         VirtualEthernet0/0/13 queue 2 (polling)
55     Thread 2 (vpp_wk_1):
56       node dpdk-input:
57         GigabitEthernet7/0/1 queue 0 (polling)
58       node vhost-user-input:
59         VirtualEthernet0/0/12 queue 1 (polling)
60         VirtualEthernet0/0/12 queue 3 (polling)
61         VirtualEthernet0/0/13 queue 1 (polling)
62         VirtualEthernet0/0/13 queue 3 (polling)
63
64 Clear Interfaces
65 ================
66 Clear the statistics for all interfaces (statistics associated with the
67 '*show interface*' command).
68
69 Summary/Usage
70 -------------
71
72 .. code-block:: shell
73
74     clear interfaces
75
76 Example
77 -------
78 Example of how to clear the statistics for all interfaces:
79
80 .. code-block:: console
81
82     vpp# clear interfaces
83
84 Set Interface Mac Address
85 =========================
86 The '*set interface mac address* ' command allows to set MAC address of
87 given interface. In case of NIC interfaces the one has to support MAC
88 address change. A side effect of MAC address change are changes of MAC
89 addresses in FIB tables (ipv4 and ipv6).
90
91
92 Summary/Usage
93 -------------
94
95 .. code-block:: shell
96
97     set interface mac address <interface> <mac-address>.
98
99 Examples
100 --------
101
102 Examples of how to change MAC Address of interface:
103
104 .. code-block:: console
105
106     vpp# set interface mac address GigabitEthernet0/8/0 aa:bb:cc:dd:ee:01
107     vpp# set interface mac address host-vpp0 aa:bb:cc:dd:ee:02
108     vpp# set interface mac address tap-0 aa:bb:cc:dd:ee:03
109     vpp# set interface mac address pg0 aa:bb:cc:dd:ee:04
110
111 Set Interface Mtu
112 =================
113
114 .. toctree::
115
116 Summary/Usage
117 -------------
118
119 .. code-block:: shell
120
121     set interface mtu [packet|ip4|ip6|mpls] <value> <interface>.
122
123 Set Interface Promiscuous
124 =========================
125
126 Summary/Usage
127 -------------
128
129 .. code-block:: shell
130
131     set interface promiscuous [on|off] <interface>.
132
133 .. _setintstate:
134
135 Set Interface State
136 ===================
137 This command is used to change the admin state (up/down) of an
138 interface.
139
140 If an interface is down, the optional '*punt*' flag can also be set. The
141 '*punt*' flag implies the interface is disabled for forwarding but punt
142 all traffic to slow-path. Use the '*enable*' flag to clear '*punt*' flag
143 (interface is still down).
144
145 Summary/Usage
146 -------------
147
148 .. code-block:: shell
149
150     set interface state <interface> [up|down|punt|enable].
151
152 Examples
153 --------
154
155 Example of how to configure the admin state of an interface to **up**:
156
157 .. code-block:: console
158
159     vpp# set interface state GigabitEthernet2/0/0 up
160
161 Example of how to configure the admin state of an interface to **down**:
162
163 .. code-block:: console
164
165     vpp# set interface state GigabitEthernet2/0/0 down