ExtremeSwitching (EXOS)

Expand all | Collapse all

Change IP on interface VLAN remote

  • 1.  Change IP on interface VLAN remote

    Posted 04-23-2015 11:26
    Is it an easy way to change a interface VLAN remote?
    As far as I see it is not possible to set more than one IP an a interface...



  • 2.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:31
    You can make a script that does it for you, something like:

    unconfig default ipaddress
    config default ipaddress x.x.x.x/xx

    That should do it.


  • 3.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:38
    how would you go about creating a script to work with XOS.

    say if I needed to change a switch interface remotely and unconfig would obviously drop me from connection, is there a way to upload script and run from within XOS



  • 4.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Sorry should have written that too :)

    You can make the script directly on the switch with the command :

    edit script "script_name"

    You will then use the builtin VI editor to make the script, and then you can load that script with the command :
    Load script "script_name.xsf"

    You can also make the script in notepad++ or what ever text editor you use, and save it as a .xsf file and upload into the switch with the command:
    tftp get x.x.x.x vr vr-xx "filename.xsf"

    That should get you the file onto the switch and you can again load the script as mentioned before.


  • 5.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Hi all;

    I have tried that way but it is not possible to change ipaddress via remote connection.

    You can change ipaddress via serial connection using that script because your connection doesn't closed during the operation.

    But if you try running script via remote connection it won't work. I think it is the same thing as configuring it manually line by line.

    Regards,

    Burak.


  • 6.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Did you update your routes as Drew mentioned?

    Regards,
    Chris


  • 7.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    I've directly connected to switch while i was trying that. There's only default vlan.

    Thanks,

    Burak


  • 8.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Are you changing IP within the same subnet?


  • 9.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Yes , the new ip address is in the same subnet.

    And again if i run this script via serial console it perfectly works.

    Thanks.


  • 10.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    The script is on the remote switch?


  • 11.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    unconfigure vlan default ipaddress
    configure vlan default ipaddress 192.168.10.4/24



  • 12.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    and you have used tftp to store this on remote switch?


  • 13.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    No. I've created the script file using edit script command.


  • 14.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    If you upload the file on the remote switch and run from remote switch.


  • 15.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Again it is the same.



  • 16.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Hi Burak,
    I recently did this same process on one of our lab management switches without any issue. There should be no difference when you run the script via telnet/SSH or through console. It sounds like that's the problem you're describing though - that the same script that works on console doesn't work through a Telnet/SSH.

    What doesn't work about it? Are you unable to re-connect to the new IP after running the script? Or are you expecting to see the CLI prompt appear after the script runs - because you won't see that, you'll be kicked from the switch when the IP is unconfigured.

    -Drew


  • 17.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    Hi Drew;

    I was expecting to change the default vlan's ip address via remote access.

    There 's only default vlan on the switch and when i ran the script via telnet or ssh it unconfigures default vlan but couldn't configure it with the new ip address.

    So i lost my connection to the switch and i had to reconfigure it via serial console.

    After that i was looking for a different way to do that and i saw this subject on the community and thaught that somebody could help me with this problem.

    Regards,

    Burak



  • 18.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:43
    I wouldn't have expected this to work on Linux/Unix, so was surprised when it sounded like it might on XOS. In linux, as soon as a command is run that would disconnect your current ssh/telnet session, the batch file exits.

    Can you create another vlan with it's own IP temporarily for the purpose of changing the default vlan's IP? create the vlan on the target switch and the switch it connects to, ssh give them both IPs in the temporary vlan, ssh to the target's temp IP from the other switch, change default vlan's ip, destroy temporary stuff.


  • 19.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 11:46
    Nice, thanks for the fast reply



  • 20.  RE: Change IP on interface VLAN remote

    Posted 04-23-2015 19:09
    Don't forget to check any routes (default or otherwise) that may be tied to the VLAN IP you're changing. You could end up with a switch with a new IP, but no route back to you.
    At least then you can telnet or SSH to it from another device or switch in the same subnet and take care of it.