09-28-2020 10:26 PM - edited 09-28-2020 10:51 PM
Some of the Nexus 3k switches require that you manually compact the image in order for it to fit on the bootflash of the switch. In some instances this is done locally on the switch itself. Other instances require you to compact the image "in-flight" while the image is being copied to the switch itself. This process requires access to a Server which allows SCP (Secure Copy), while most SSH servers also support SCP, sometimes this is not the case.
This guide will demonstrate how to use a Nexus switch (3k, 5k, 6k, 7k, 9k) as an SCP server in the event you don't have one readily available.
Note: Nexus 3k is mentioned above as some Nexus 3000 products have sufficient bootflash space for multiple large images.
Below is the example topology that will be used in this article.
+--------------+ +--------------+ | | | | | | vPC Peer-keepalive | | | | - - - - - - - - - - - - - - - - -+ | | n3k-1 + | n3k-2 | | ==================================== | | | vPC Peer-link | | | | | | +------+-------+ +--------+-----+ | VLAN: 10 | VLAN: 10 | IP address: 192.0.2.1/25 | IP address: 192.0.2.2/25 | | | | | | | | | .-~~~-. | | .- ~ ~-( )_ _ | | / ~ -. | +------------+ Your Network \+---------+ \ .' ~- . _____________ . -~ + | | | | | VLAN: 11 | IP address: 192.0.2.150/25 | +------+-------+ | | | | | | +-----> | SOURCE-SW1 | | | | | | | | | | | +--------------+ | + This Nexus can be a: 3k, 5k, 6k, 7k, 9k
In this scenario we'll be converting SOURCE-SW1 temporarily into an SCP Server to copy our images from. This switch will act like an SCP server and be the "source" we're copying from.
conf
feature scp-server
Verify that the SCP server is enabled
show feature | i i Feature|--|scp
<or>
show feature | i i scp
n3k-1# copy scp://USERNAME@192.0.2.150/nxos.x.x.x.x.x.bin . compact [vrf management]
conf
no feature scp-server
show feature | i i Feature|--|scp
<or>
show feature | i i scp
This guide is for those situations where for some reason there is an issue with the SSH server or one doesn't exist and compacting is required. The scp-server can also be left on (or enabled on-demand, when you need it) in order to facilitate easier/faster (faster than TFTP) copying files to and from the switch.
Failing that, if you're struggling to compact your image please don't hesitate to contact TAC who can assist with obtaining/generating a compacted image.
HTH,
Jason.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: