Commands For Configuring Switch Ip Address

1.3 Commands for Configuring Switch IP

1.3.1 interface vlan

Command: interface vlan <vlan-id>
???????????????????no interface vlan <vlan-id>
Function: Enter the VLAN interface Configuration Mode. The no command deletes the
existing VLAN interface.

Parameter:

  • <vlan-id>: VLAN ID of an existing VLAN. The valid range is from 1 to 4094.

Command mode: Global Configuration Mode
Default: None.
Usage guide: Users should first make sure the VLAN exists before configuring it. The ?exit? command quits the VLAN interface Configuration Mode and returns the user to the Global Configuration Mode.
Example: Enter the VLAN interface Configuration Mode of VLAN1.

active500EM(config)#interface vlan 1
active500EM(config-if-vlan1)#

1.3.2 ip address

Command: ip address <ip-address> <mask> [secondary] ???????????????????no ip address [<ip-address> <mask>] [secondary] Function: Sets the IP address and mask for the specified VLAN interface. The no command deletes the specified IP address setting.
Parameters:

  • <ip-address>: IP address in dot decimal format.
  • <mask>: subnet mask in dot decimal format.
  • [secondary]: indicates that the IP configured is a secondary IP address.

Command mode: VLAN Interface Mode
Default: No IP address.
Usage guide: A VLAN interface must first be created before the user can assign an IP address to the switch.
Example: Set 10.1.128.1/24 as the IP address for the VLAN1 interface.

active500EM(config)#interface vlan 1
active500EM(config-if-vlan1)#ip address 10.1.128.1 255.255.255.0
active500EM(config-if-vlan1)#exit
active500EM(config)#

Related commands: ip bootp-client enable, ip dhcp-client enable

1.3.3 ipv6 address

Command: ipv6 address <ipv6address | prefix-length> [eui-64] ???????????????????no ipv6 address <ipv6address | prefix-length> [eui-64] Function: Configures the aggregate global unicast, site-local, and link-local address for the interface.
Parameter:

  • <ipv6address>: prefix of an IPV6 address.
  • <prefix-length>: length of the prefix of an IPV6 address. The valid value is from 3 to 128.
  • eui-64: the eui64 interface ID of the interface will automatically create an IPV6 address.

Command mode: Interface Configuration Mode
Default: None.
Usage guide: The prefix of an IPV6 address should not be a multicast address or an existing IPV6 address. Layer three VLAN interfaces are forbidden to share the same address prefix. The prefix should be limited to the range of 2001:: to 3fff::, with a length no shorter than 3. The prefix length of a site-local address or a linklocal address should not be shorter than 10.
Example: Configure an IPV6 address at the layer-three interface of VLAN1. Set the prefix as 2001:3f:ed8::99, the length of which is 64.

active500EM(config-if-vlan1)#ipv6 address 2001:3f:ed8::99/64

1.3.4 ip bootp-client enable

Command: ip bootp-client enable
???????????????????no ip bootp-client enable
Function: Enable the switch to be a BootP Client and obtain an IP address and gateway address through BootP negotiation. The no command disables the BootP Client function and releases the IP address obtained in BootP.
Parameters: None.
Default: BootP client function is disabled by default.
Command mode VLAN Interface Mode
Default: None.
Usage guide Obtaining an IP address through either BootP Manual configuration or DHCP is mutually exclusive. The two methods cannot be used to obtain the IP address. Note: To obtain an IP address via BootP, a DHCP server or a BootP server is required in the network.
Example: Obtain an IP address through BootP.

active500EM(config)#interface vlan 1
active500EM(config-if-vlan1)#ip bootp-client enable
active500EM(config-if-vlan1)#exit
active500EM(config)#

Related commands: ip address, ip dhcp-client enable

1.3.5 ip dhcp-client enable

Command: ip dhcp-client enable
???????????????????no ip dhcp-client enable
Function: Enables the switch to be a DHCP client and obtain an IP address and gateway address through DHCP negotiation. The no command disables the DHCP client function and releases the IP address obtained in DHCP.
Parameters: None
Default: The DHCP client function is disabled.
Command mode: VLAN Interface Mode
Usage guide: Use manual configuration or BootP to obtain an IP address via DHCP. Manual configuration and BootP cannot be used at the same time to obtain an IP address.
Note: To obtain an IP address via DHCP, a DHCP server in the network is required.
Example: Obtain an IP address through DHCP.

active500EM(config)#interface vlan 1
active500EM(config-if-vlan1)#ip dhcp-client enable
active500EM(config-if-vlan1)#exit
active500EM(config)#


Return to Controller Wired CLI Table of Contents