<aside> 🚨 Configuring the IP parameters is a two step process. First you will set up the IP address, then the default gateway. If you’re doing this over SSH, connect to the switch using a terminal on the same L2 network.
</aside>
Switch> **enable**
Switch# **conf t**
Switch(config)# **ip address [IP] [Subnet Mask]**
The switch will immediately start using this static IP and turn off DHCP.
Right now, there is no Default Gateway configured, so if you did this from a remote terminal you will not be able to reach it unless you NAT traffic to the ICX’s LAN.
To add a Default Gateway:
Switch> **enable**
Switch# **conf t**
Switch(config)# **vlan 10**
Switch(config-vlan-10)# **default gateway [gateway-address] 1**
<aside> 🚨 With Router code this cannot be done simply via SSH commands because the two-step process involves disabling the DHCP Client first, then configuring the static IP. As soon as you disable the DHCP Client, the switch loses its IP address so you will lose connectivity. The only way to recover from this is to connect locally via console!
</aside>
<aside> 💡 You will need a TFTP Server reachable by the switch.
</aside>
To do this remotely, you will need to use a config file which is then copied to the Running Config.
ip dhcp-client disable
no ip dhcp-client ve **[Management VLAN ID]**
int ve **[Management VLAN ID]**
ip address **[IP]** **[Subnet Mask]** ospf-ignore
en
copy tftp run **[TFTP Server IP] [Filename.txt]**
This will download the text file and apply the commands immediately, disable the DHCP-Client and setting the IP address, therefore make sure the commands are valid for your network.