To configure an IPv4 or IPv6 address for an L3 interface, use the set vlanset l3-interface vlan-interface vif address prefix-length command command in L2/L3 configuration mode. To remove an L3 interface, use the delete form of the command.
Command Syntax
set l3-interface vlan-interface interface interface <interface-name vif vif-name address addressname> address <address> prefix-length <numberumber>
delete l3-interface vlan-interface interface <interface-namename>
Parameters
Parameter | Description |
vlan-interface <interface- |
name name.vif-name | L3 interface name. |
address | IPv4 or IPv6 address. |
number | The network prefix length. The range is 4-32 for IPv4 addresses, and 1-128 for IPv6 addresses. |
Example
- The following example configures the IPv4 address for the vlan10 L3 interface and then removes the L3 interface:
Code Block |
---|
admin@Switch# set vlanl3-interface vlan-interface vlan10 vif vlan10 address 192.168.1.1 prefix-length 24
admin@Switch# commit
admin@Switch# delete vlanl3-interface vlan-interface vlan10 |
- The following example configures the IPv6 address for the vlan20 L3 interface and then removes the L3 interface:
Code Block |
---|
admin@Switch# set vlanl3-interface vlan-interface vlan20 vif vlan20 address 2001:1:1::1 prefix-length 64
admin@Switch# commit
admin@Switch# delete vlanl3-interface vlan-interface vlan20 |