Reset Search
 

 

Article

How to change the IP address used to access a switch remotely

« Go Back

Information

 
TitleHow to change the IP address used to access a switch remotely
Objective
Use an EXOS script file to change a VLAN IP address
Environment
EXOS based switches
Procedure
We can use an .xsf script to change the ipaddress on a vlan through an SSH session to the switch.

1. Please ensure SSH is enabled:
# show management | i SSH
SSH access                       : Enabled (Key valid, tcp port 22 vr all)
SSH2 idle time                   : none
SSH2 rekey interval              : 4096 MB and no time limit
2. Login to the switch via SSH.

3. Issue the following commands
 
# vi ip-change.xsf

4. Place the follwing inside the .xsf file via VI:
unconfigure vlan <vlan-name> ipaddress
configure vlan <vlan-name> ipaddress x.x.x.x x.x.x.x
5. To exit VI, use the following command:
<esc>:wq

6.
run script ip-change.xsf

For example:
 
* (Private debug) Switch.6 # show vlan | i test
test 4089 10.123.123.123 /24 ---------------------------- ANY 0 /0 VR-Default
* (Private debug) Switch.7 # vi ip-change.xsf
__________________________________________________
unconfigure vlan test ipaddress
configure vlan test ipaddress 10.100.100.1 255.255.255.0
_________________________________________________

* (Private debug) Switch.8 # run script ip-change.xsf
* (Private debug) Switch.9 # show vlan | i test
test 4089 10.100.100.1 /24 ---------------------------- ANY 0 /0 VR-Default
* (Private debug) Switch.10 #

 
Additional notes
Please keep in mind that if the IP address is changing to a different subnet, then we'll need to add route information into the ip-change.xsf file above.

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255