07-12-2019 09:31 PM
NOTE: I'm doing this in a Lab Environment, it's what I do when I bored. :)
I have a server running Ubuntu Server 18.04 with openssh-server installed.
I know the scp protocol is working because when I try to save the running config to scp, it works.
S1#copy run scp://sheenlim08:Welcome123!@10.0.0.12/~/cisco_configs/s1-startup_config.txt
Address or name of remote host [10.0.0.12]?
Destination username [sheenlim08]?
Destination filename [~/cisco_configs/s1-startup_config.txt]?
Writing ~/cisco_configs/s1-startup_config.txt Sink: C0644 2271 s1-startup_config.txt
!
2271 bytes copied in 0.908 secs (2501 bytes/sec)
S1#
However, when I try to save the dhcp snooping database via scp, i cannot get a good result.
S1(config)# ip dhcp snooping database scp://sheenlim08:Welcome123!@10.0.0.12/~/cisco_configs/s1-dhcp_snooping.db
*Jul 13 04:27:52.916: %DHCP_SNOOPING-4-AGENT_OPERATION_FAILED: DHCP snooping binding transfer failed. Unable to access URL.
S1(config)#
Any idea why I'm getting this issue?
07-12-2019 09:37 PM
By the way I also tried the workaround recommendations from the link https://bst.cloudapps.cisco.com/bugsearch/bug/CSCuz02728/?rfs=iqvred
"Workaround:
A double slash (//) after the IP address of the server will instruct the SCP devices to use the path relative to root."
I tried this by issuing the command:
S1(config)# ip dhcp snooping database scp://sheenlim08:Welcome123!@10.0.0.12//~/cisco_configs/s1-dhcp_snooping.db
But it still barking me with that error
*Jul 13 04:37:27.752: %DHCP_SNOOPING-4-AGENT_OPERATION_FAILED: DHCP snooping binding transfer failed. Unable to access URL.
Any ideas?
07-12-2019 11:53 PM
So I am quite confuse right now.
I spun up a WinServer 2016 server and install the free "SolarWinds SFTP/SCP Server" and allowed it on the windows firewall.
I then reconfigure my switch to instead target 10.0.0.13 (Windows Server 2016) instead of 10.0.0.12 (Ubuntu), it was successful. Then i re-pointed it back to the Ubuntu Server and it was now successfully writing to the ubuntu server.
??????? so why is this happening? is the scp client on the switch getting some initial configuration from the SCP server on the Windows Server 2016 then using it on its future connection?
Why am I only able to use the scp on the switch if I connect to a Windows Server first?
S1(config)#
Writing cisco_configs/s1-dhcp_snooping.db_00001 scp: Failed to open file cisco_configs/s1-dhcp_snooping.db_00001.
*Jul 13 06:45:53.361: %DHCP_SNOOPING-4-AGENT_OPERATION_FAILED: DHCP snooping binding transfer failed. Error writing to remote database.
S1(config)#
S1(config)#ip dhcp snooping database scp://sheenlim08:Welcome123!@10.0.0.13/cisco_configs/s1-dhcp_snooping.db
S1(config)#
Writing cisco_configs/s1-dhcp_snooping.db_00001 !
S1(config)#ip dhcp snooping database scp://sheenlim08:Welcome123!@10.0.0.12/cisco_configs/s1-dhcp_snooping.db
S1(config)#
Writing cisco_configs/s1-dhcp_snooping.db_00001 ! Sink: C0644 47 s1-dhcp_snooping.db_00001
07-15-2019 12:04 AM
Hi,
I am guessing the switch did not like the /~/ in your first configs. I don't think the Cisco understands ~ as referring to the home folder. You have to specify the full path with Cisco.
Thanks
John
07-15-2019 01:19 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide