A2 series - Change from dhcp to static ip

  • 0
  • 1
  • Problem
  • Updated 2 years ago
  • Solved
Hy,
we want to change a2 switch from dhcp to static ip, but the switch won't let me:

TST2-A2-5(rw)->set ip address 10.142.14.5 mask 255.255.255.0 gateway 10.142.14.1

IP protocol must be none to set ip address.

Use'set ip protocol{none | bootp | dhcp}'to set Ip protocol to none.

TST2-A2-5(rw)->

If I set the ip protocol to none - the switch is not manageable any more, because the dhcp adress is lost immediatly.

I tried to load a config with static ip in it with configure configs/newconfig.cfg, but the switch don't takes the new ip. It takes the other config but not the ip adress!

There is no possibility to have a serial console access.

Best Regards

Photo of Anton Sax

Anton Sax

  • 1,062 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Jeremy

Jeremy, Embassador

  • 9,788 Points 5k badge 2x thumb
I believe you will need to console into the C2>

    set ip protocol none 
    set ip address 10.142.14.5 mask 255.255.255.0 gateway 10.142.14.1
Photo of Ronald Dvorak

Ronald Dvorak, Embassador

  • 47,528 Points 20k badge 2x thumb
The switches are send to the branch with DHCP enabled.

So the question is how to change it via remote without access to the console.

I've tried to load a new cfg (filename is change)via TFTP that includes both commands and then use....

# configure configs/change append

but the switch "ignores" the second command - looks like that there is some logic that doesn't allow that in one step.


Photo of Careno, Ryan

Careno, Ryan, Employee

  • 1,092 Points 1k badge 2x thumb
Hello Anton,

I have been doing some testing in the lab, and have found a work-around for you to do this remotely.  Keep in mind if the syntax below is not exact, you will potentially not be able to get into the switch.  The process involves copying two files to the switch:

Filename: change.cfg
set ip protocol none
configure configs/ipchange.cfg append

Filename: ipchange.cfg
set ip address 10.142.14.5 mask 255.255.255.0 gateway 10.142.14.1

Once both of these files with the above text in them are pushed to the switch via TFTP, you can then append the first file "change.cfg" with:

configure configs/change.cfg append

It would be good to test this in a switch you do have local console access to first if possible.  It worked good in my lab setup on an A2 switch.

Regards,
Ryan Careno
ExtremeNetworks GTAC
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,960 Points 10k badge 2x thumb
I have seen "configure append" not work correctly (i.e. ignoring commands) before.

It usually works to save the config, copy it to a PC (e.g. via TFTP), edit it there, copy the edited config back to the switch, and then use "configure configs/edited_config" to reboot and apply the edited configuration.

This needs a switch reboot and should be tested in a lab environment first, of course.
Photo of Anton Sax

Anton Sax

  • 1,062 Points 1k badge 2x thumb
Hy Ryan,

thank you very much, it worked!

I didn't knew about the append command

TST2-A2-5(rw)->TST2-A2-5(rw)->copy tftp://10.241.2.3/configs/a2-ip-protoc... configs/a2-ip-protocol-none.cfg
File transfer successful...

TST2-A2-5(rw)->copy tftp://10.241.2.3/configs/a2-ip-addres... configs/a2-ip-address.cfg
File transfer successful...

TST2-A2-5(rw)->
TST2-A2-5(rw)->
TST2-A2-5(rw)->configure configs/a2-ip-protocol-none.cfg append
>> set ip protocol none
>> configure configs/a2-ip-address.cfg append
>> set ip address 10.142.14.5 mask 255.255.255.0 gateway 10.142.14.1
TST2-A2-5(rw)->
TST2-A2-5(rw)->
TST2-A2-5(rw)->show config ip

#ip
set ip address 10.142.14.5 mask 255.255.255.0 gateway 10.142.14.1
!
end


TST2-A2-5(rw)->
Photo of Careno, Ryan

Careno, Ryan, Employee

  • 1,092 Points 1k badge 2x thumb
Great, thanks for the feedback!  Glad things worked out. 

Regards,
Ryan Careno
ExtremeNetworks GTAC