save current config in a file in extreme switch

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
we have  summit X460-24t switch

usually I telnet to it and run
show config
log the contents of telnet session to a file
The problem is when screen fills up I get 'press space to continue or q to quit' , then I have to press space .
Is there a better way to get current config ?

Thanks.
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of André Herkenrath

André Herkenrath, Employee

  • 1,942 Points 1k badge 2x thumb
You can use the command:

save configuration as-script <script-name>

Afterwards you can retrieve the file via tftp

Best
André
Photo of Baskar

Baskar, Employee

  • 518 Points 500 badge 2x thumb
Hi Sumeet,

Execute the command "disable clipaging "  

it's used to  Disables pausing of the screen display when a show command output reaches the end of the page.
Photo of Ariyakudi Srinivas, Muthuraman

Ariyakudi Srinivas, Muthuraman, Employee

  • 964 Points 500 badge 2x thumb
Hi Sumeet,

You can back up the configuration file to an external TFTP server as well. The below link gives you the information on loading the configuration file from the TFTP server into the switch and also on backing up configuration file from the switch to the TFTP server.
Follow the below link for the information,

https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-upload-Backup-Configuration-to-TFTP...
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
to André Herkenrath
I ran

#save configuration as-script two_dec2016-413pm
I got file two_dec2016-413pm.xsf in current folder
I am running tftp server on PC with ip 172.16.101.6

# ping 172.16.101.6
Ping(ICMP) 172.16.101.6: 4 packets, 8 data bytes, interval 1 second(s).
16 bytes from 172.16.101.6: icmp_seq=0 ttl=64 time=6.418 ms
16 bytes from 172.16.101.6: icmp_seq=1 ttl=64 time=8.518 ms
16 bytes from 172.16.101.6: icmp_seq=2 ttl=64 time=1.006 ms
16 bytes from 172.16.101.6: icmp_seq=3 ttl=64 time=1.020 ms

--- 172.16.101.6 ping statistics ---
4 packets transmitted, 4 packets received, 0% loss
round-trip min/avg/max = 1/4/8 ms

# tftp 172.16.101.6 -p -l two_dec2016-413pm.xsf
Uploading two_dec2016-413pm.xsf to 172.16.101.6 ... failed!
Error: Network is unreachable


to  Kaliyaperumal, Baskar,
Did "disable clipaging " 
Now all config scrolls to end as desired.
Photo of Karthik Mohandoss

Karthik Mohandoss, Employee

  • 5,524 Points 5k badge 2x thumb
Sumeet,

Can you try the below command?

" tftp put 172.16.101.6 vr "VR-Default" /usr/local/ext/two_dec2016-413pm.xsf"
Photo of Ariyakudi Srinivas, Muthuraman

Ariyakudi Srinivas, Muthuraman, Employee

  • 964 Points 500 badge 2x thumb
Hi Sumeet,

The syntax of the command is below and be sure to mention the VR over which the TFTP server is reachable and mention the VR in the command explicitly, it is either vr-mgmt or vr-default or any other user creates as per your network is configured.

tftp <tftp_server_IP> -v "VR-Mgmt" -p -l <filename> 
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
to Karthik Mohandoss ,
X460-24t.1 # tftp put 172.16.101.6 vr "VR-Default" /usr/local/ext/two_dec2016-413pm.xsf
Error: Local file name cannot contain '~' or '/' character.

to Ariyakudi Srinivas, Muthuraman,
X460-24t.2 # tftp 172.16.101.6   -v "VR-Mgmt"   -p -l two_dec2016-413pm.xsf
Uploading two_dec2016-413pm.xsf to 172.16.101.6 ... failed!
Error: Network is unreachable
X460-24t.3 # tftp 172.16.101.6   -v "VR-Default"   -p -l two_dec2016-413pm.xsf
Uploading two_dec2016-413pm.xsf to 172.16.101.6 ... failed!
Error: (2) Access violation

Could be , my tftp server running on ubuntu desktop is not allowing upload.
Will verify , then tell.

Does extreme switch run a tftp server ?
Then I can 'get' file from it . what is default tftp directory on extreme switch ?
(Edited)
Photo of Darin Seiler

Darin Seiler

  • 402 Points 250 badge 2x thumb

disable clipaging will eliminate the 'press space to continue or q to quit' to mention.

Also it is always best practice to use SSH over telnet so that you are sending your login credentials to the switch encrypted instead of in clear text.

Photo of Jason Parker

Jason Parker, Employee

  • 2,918 Points 2k badge 2x thumb
It is true that some tftp applications like Netsight or Extreme Management Center disable the tftp ability to let anyone do the tftp and the reason for this is to prevent people from placing files on your machine (could be some bad files).
What you could do is to create the dummy filename like two_dec2016-413pm.xsf  via dos (I just go to the tftp folder and type edit two_dec2016-413pm.xsf and when the window opens I throw in a few characters and then save it).

next step would be:
X460-24t.3 # tftp 172.16.101.6   -v "VR-Default"   -p -l two_dec2016-413pm.xsf

Another option is if you have:
Netsight or Extreme Management Center 
you can highlight the switch and right click on it and select: execute command script and type in the commands:

disable clipaging
show command you want
enable clipaging

When you run the application and it completes, then this gives you the option to save it.
Jason
Photo of Jason Parker

Jason Parker, Employee

  • 2,918 Points 2k badge 2x thumb
This might also work for you (Upload and Download commands)

To Upload a file from the switch to a TFTP server, use the tftp put command:
tftp [ip-address | host-name ] { -v vr_name } [ -p ] [ { -l local-file | } { -r remote-file } | { -r remote-file }
{ -l local-file } ] tftp put [ ip-address | host-name ] { vr vr_name{local-file { remote-file}


To Download a file from a TFTP server to the switch, using the tftp get command:
tftp get [ip-address| host-name ] { vr vr_name } remote-file { local-file } {force-overwrite}
Jasonj
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb

to darin seiler

Actually , i am accessing switch locally (kept on adjacent table).
yeah , ssh is must for remote access .

to jason parker

as you said and I also found out (http://askubuntu.com/questions/599558/tftp-error-code-2-access-violation-tftp-not-working) . I touched  two_dec2016-413pm.xsf in /tftpboot folder and then did

X460-24t.2 # tftp 172.16.101.6   -v "VR-Default"   -p -l two_dec2016-413pm.xsf
Uploading two_dec2016-413pm.xsf to 172.16.101.6 ... done!
Note: the blocksize option is not supported by the tftp server.
      Without this option, the maximum file size is limted to
      32mb.  Some older servers may be limited to 16mb files.

Will try other options too.
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
Netsight or Extreme Management Center  - is that web browser based access ?
Photo of Narayanan, Karthikeyan

Narayanan, Karthikeyan, Employee

  • 912 Points 500 badge 2x thumb
Hi Sumeer

Yes. You are right. This option you can use if the switches are managed by Netsight or Extreme Management Center.

http://documentation.extremenetworks.com/netsight/7.0/9034986-01_EMC_7.0_EMC.pdf

But I suppose you dont use Netsight in your case.


Regards,
Karthikeyan
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
I am able to access switch by opening VLAN IP address in web browser
https://s14.postimg.org/urpnu8xpt/extreme_web.jpg
Can I take backup of switch-config on desktop using this ?
Photo of Tripathy, Priya Ranjan

Tripathy, Priya Ranjan, ESE

  • 2,306 Points 2k badge 2x thumb
The better option for this to achieve would be to execute disable clipaging so that you get the output in one stretch and later if you want can enable this which is thew default set up for Exos platform. Moreover to get into specific info for the config can always use pipeline character specifying  your requirements.
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,742 Points 10k badge 2x thumb
Hi Sumeet,

what EXOS version do you use? How do you connect to the switch CLI?

I can successfully copy&paste your command (with space before and after the pipe) to an EXOS switch running version 15.3.5.2-patch1-9. I connect via OpenSSH running inside an XTerm to the switch CLI.

Br,
Erik
Photo of Steven Lin

Steven Lin, Employee

  • 2,176 Points 2k badge 2x thumb
I guess something wrong with your input software or your keyboard is different.
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
i am telnetting to an IP address of vlan configured on switch via gnome-terminal 3.6.2
My switch has ExtremeXOS version 12.5.4.5 v1254b...
Photo of Tripathy, Priya Ranjan

Tripathy, Priya Ranjan, ESE

  • 2,306 Points 2k badge 2x thumb
I suppose you have X460 hardware with you and why you are on software release which is unsupported one. I tried this is absolutely having no issue from 15.3.5 onwards. Though the recommended version is 16.1.3.6 anyway.
Photo of Erik Auerswald

Erik Auerswald, Embassador

  • 12,742 Points 10k badge 2x thumb
Sumeet, this may be a problem with the old EXOS version.