blob: a3429037e8ba5b6c4860f8a0daaf524b9063efc2 [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _intcommands:
2
3Interface Commands
4==================
5
6.. toctree::
7
8.. _showintcommand:
9
10Show Interface
11==============
12Shows software interface information including counters and features
13
14Summary/Usage
15-------------
16
17.. code-block:: shell
18
19 show interface [address|addr|features|feat] [<interface> [<interface> [..]]]
20
21Examples
22--------
23
24Example 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
42Example 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
64Clear Interfaces
65================
66Clear the statistics for all interfaces (statistics associated with the
67'*show interface*' command).
68
69Summary/Usage
70-------------
71
72.. code-block:: shell
73
74 clear interfaces
75
76Example
77-------
78Example of how to clear the statistics for all interfaces:
79
80.. code-block:: console
81
82 vpp# clear interfaces
83
84Set Interface Mac Address
85=========================
86The '*set interface mac address* ' command allows to set MAC address of
87given interface. In case of NIC interfaces the one has to support MAC
88address change. A side effect of MAC address change are changes of MAC
89addresses in FIB tables (ipv4 and ipv6).
90
91
92Summary/Usage
93-------------
94
95.. code-block:: shell
96
97 set interface mac address <interface> <mac-address>.
98
99Examples
100--------
101
102Examples 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
111Set Interface Mtu
112=================
113
114.. toctree::
115
116Summary/Usage
117-------------
118
119.. code-block:: shell
120
121 set interface mtu [packet|ip4|ip6|mpls] <value> <interface>.
122
123Set Interface Promiscuous
124=========================
125
126Summary/Usage
127-------------
128
129.. code-block:: shell
130
131 set interface promiscuous [on|off] <interface>.
132
133.. _setintstate:
134
135Set Interface State
136===================
137This command is used to change the admin state (up/down) of an
138interface.
139
140If 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
142all traffic to slow-path. Use the '*enable*' flag to clear '*punt*' flag
143(interface is still down).
144
145Summary/Usage
146-------------
147
148.. code-block:: shell
149
150 set interface state <interface> [up|down|punt|enable].
151
152Examples
153--------
154
155Example 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
161Example 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