5 This section covers those commands that are related to setting an
8 - `Set Interface IP Address <#set-interface-ip-address>`__
9 - `Set Interface L2 Bridge <#set-interface-l2-bridge>`__
10 - `Set Interface MTU <#set-interface-mtu>`__
11 - `Set Interface Promiscuous <#set-interface-promiscuous>`__
12 - `Set Interface State <#set-interface-state>`__
16 For a complete list of CLI Debug commands refer to the Debug CLI
17 section of the `Source Code
18 Documents <https://docs.fd.io/vpp/18.07/clicmd.html>`__ .
20 Set Interface IP Address
21 ========================
25 set interface ip address [del] <*interface*> <*ip-addr*>/<*mask*> | [all]
27 Add an IP Address to an interface or remove and IP Address from an
28 interface. The IP Address can be an IPv4 or an IPv6 address. Interfaces
29 may have multiple IPv4 and IPv6 addresses. There is no concept of
30 primary vs. secondary interface addresses; they're just addresses.
32 To display the addresses associated with a given interface, use the
33 command **show interface address** <*interface*>.
37 The debug CLI does not enforce classful mask-width / addressing
43 An example of how to add an IPv4 address to an interface:
47 vpp# set interface ip address GigabitEthernet2/0/0 172.16.2.12/24
49 An example of how to add an IPv6 address to an interface:
53 vpp# set interface ip address GigabitEthernet2/0/0 ::a:1:1:0:7/126
55 To delete a specific interface ip address:
59 vpp# set interface ip address GigabitEthernet2/0/0 172.16.2.12/24 del
61 To delete all interfaces addresses (IPv4 and IPv6):
65 vpp# set interface ip address GigabitEthernet2/0/0 del all
67 Declaration and Implementation
68 ------------------------------
70 **Declaration:** set_interface_ip_address_command
71 (src/vnet/ip/ip46_cli.c line 216)
73 **Implementation:** add_del_ip_address
75 Set Interface L2 Bridge
76 =======================
80 set interface l2 bridge <*interface*> <*bridge-domain-id*> [bvi|uu-fwd]
83 Use this command put an interface into Layer 2 bridge domain. If a
84 bridge-domain with the provided bridge-domain-id does not exist, it will
85 be created. Interfaces in a bridge-domain forward packets to other
86 interfaces in the same bridge-domain based on destination mac address.
87 To remove an interface from a the Layer 2 bridge domain, put the
88 interface in a different mode, for example Layer 3 mode.
90 Optionally, an interface can be added to a Layer 2 bridge-domain as a
91 Bridged Virtual Interface (bvi). Only one interface in a Layer 2
92 bridge-domain can be a bvi.
94 Optionally, a split-horizon group can also be specified. This defaults
95 to 0 if not specified.
102 Example of how to configure a Layer 2 bridge-domain with three
103 interfaces (where 200 is the bridge-domain-id):
107 vpp# set interface l2 bridge GigabitEthernet0/8/0.200 200
109 This interface is added a BVI interface:
113 vpp# set interface l2 bridge GigabitEthernet0/9/0.200 200 bvi
115 This interface also has a split-horizon group of 1 specified:
119 vpp# set interface l2 bridge GigabitEthernet0/a/0.200 200 1
121 Example of how to remove an interface from a Layer2 bridge-domain:
125 vpp# set interface l3 GigabitEthernet0/a/0.200
127 .. _declaration-and-implementation-1:
129 Declaration and Implementation
130 ------------------------------
132 **Declaration:** int_l2_bridge_cli (src/vnet/l2/l2_input.c line 949)
134 **Implementation:** int_l2_bridge
141 set interface mtu [packet|ip4|ip6|mpls] <value> <interface>
143 Set Interface Promiscuous
144 =========================
148 set interface promiscuous [on|off] <interface>.
155 This command is used to change the admin state (up/down) of an
158 If an interface is down, the optional *punt* flag can also be set. The
159 *punt* flag implies the interface is disabled for forwarding but punt
160 all traffic to slow-path. Use the *enable* flag to clear *punt* flag
161 (interface is still down).
165 set interface state <interface> [up|down|punt|enable].
172 Example of how to configure the admin state of an interface to **up**:
176 vpp# set interface state GigabitEthernet2/0/0 up
178 Example of how to configure the admin state of an interface to **down**:
182 vpp# set interface state GigabitEthernet2/0/0 down