save current config in a file in extreme switch

  • 2 December 2016
  • 26 replies
  • 7262 views

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.

26 replies

Userlevel 4
You can use the command:

save configuration as-script

Afterwards you can retrieve the file via tftp

Best
André
Userlevel 2
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.
Userlevel 3
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...
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.
Userlevel 6
Sumeet, Can you try the below command? " tftp put 172.16.101.6 vr "VR-Default" /usr/local/ext/two_dec2016-413pm.xsf"
Userlevel 3
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 -v "VR-Mgmt" -p -l
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 ?
Userlevel 1
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.
Userlevel 4
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
Userlevel 4
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
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.
Netsight or Extreme Management Center - is that web browser based access ?
Userlevel 3
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
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

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 ?
Userlevel 4
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.
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.

you said about using pipe character.
how ?
suppose I want all lines from config containig word tagged
show config | "tagged"
Userlevel 3
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.

show configuration | include "tagged"

P.S: the word mentioned after the include for which you want to grep is case sensitive.
Userlevel 4
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.

Below are some more information in using the above pipe character in Exos:

In ExtremeXOS software, the resulting command is as follows:show | {include | exclude | begin}

----show State the command. For example: show ports. (This is
followed by the vertical bar (|) when used as the pipe
character.)

----include Display the lines that match the regular expression.

----exclude Do not display the lines that match the regular expression.

----begin Display all the lines starting with the first line that matches
the regular expression.

----regexp The regular expression to match.
• Regular expressions are case-sensitive.
• Special characters in regular expressions such as [ ], ?,
and * have special significance to the Linux shell and it is
therefore common to specify your regular expression in
quotes to protect it from the shell.
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.

looks like , my switch does not support .
X460-24t.1 # show config | include tagged
^
%% Invalid input detected at '^' marker.
(^ is just below pipe)
Userlevel 7
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.

You need to ensure that there is a space before the pipe.
sw-srv1.5 # show config| include sysName ^ %% Invalid input detected at '^' marker. sw-srv1.6 # show config | include sysName configure snmp sysName "sw-srv1" [/code]
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.

space before and after pipe
X460-24t.4 # show config | include tagged
^
%% Invalid input detected at '^' marker.

space before pipe
X460-24t.5 # show config |include tagged
^
%% Invalid input detected at '^' marker.

Nothing helps.
BTW , pipe is 'shift + \' on my keyboard .
Userlevel 7
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.

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
Userlevel 4
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.

I guess something wrong with your input software or your keyboard is different.
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.

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...
Userlevel 4
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.

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.

Reply