Ask Your Question

Can't copy a local file(>120kB) to an instance through a floating-ip by scp ?

asked 2015-09-09 22:07:04 -0500

Imagen gravatar image

updated 2015-10-01 21:57:42 -0500

Hi, I set up Openstack Juno with two nodes:Controller and Compute. Successfully I could boost an instance in an internal network which is connected to an external network through a router. The network environment is managed by neutron server that is running in the Controller node. I associated a floating ip address of the external network to the instance. Then, I could get access to the instance from a host in the external network by ssh with public key authentication. After that, I tried to copy a local file on the host to the instance by scp. But it failed as followings.

[imagen@host01 ~]$ scp                                    100% 1380KB   1.4MB/s   00:00    
 Received disconnect from 2: Packet corrupt
 lost connection

Then, I deleted the router and created new router by neutron CLI commands. But the behavior did not change. I looked arp table. The indicated MAC address corresponding to the floating ip is same with the one of the router port. However, if I try to copy a file smaller than ~120kB, scp works successfully. Also I found the scp reverse file copy from the instance to the outside host worked without such limitation. Is this known issue for neutron or my wrong setting of neutron ? Any suggestion is appreciated to make it clear.

==Additonal info.== My instance is launched from an image which is registered to Glance from a running VM disk image (CentOS 6.4) including applications, not from prepared OS standard image for Openstack. So I used a static account for root and users. The user's public key has been registered to nova database by "nova keypair-add” before launching.

edit retag flag offensive close merge delete


Tcpdump on the qg- interface in the qrouter namespace and check for packets >~ 1500bytes. If so would try disabling offloads like GRO and LRO on the physical interface in br-ex (or whatever)

darragh-oreilly gravatar imagedarragh-oreilly ( 2015-10-05 12:39:05 -0500 )edit

I found many packets ~>1500bytes incoming to the instance through the router. But I can not understand your comment: " .. disabling offloads like GRO ....". How should I do ? Let me know in more detail. Thanks.

Imagen gravatar imageImagen ( 2015-10-09 03:16:14 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2015-10-19 01:57:01 -0500

Imagen gravatar image

Following comment by "darragh-oreilly" and reading the bug report: ( , I fixed my problem on the directional scp performance. My Neutron server is running on a real machine(Controller node). The internal network for instances has a gateway through a neutron router which is connected to br-ex. The br-ex is linked to the physical NIC: em2. Then, I issued the command; ethtool as followings.

[root@host01 ~]$ ovs-vsctl show
        Bridge br-ex
            Port br-ex
                Interface br-ex
                    type: internal
            Port "em2"
                Interface "em2"
            Port "qg-94925359-2c"
                Interface "qg-94925359-2c"
                    type: internal enter code here
[root@host-01 ~]$ ethtool --offload em2 gro off

After that, the large file scp from a local host to the instance worked with a reasonable speed: ~ 40 MB/sec. The bug reported might not be fixed even in the Juno.

edit flag offensive delete link more


good to hear it's working now. But this is not a bug in neutron. Neutron is not responsible for physical nic settings.

darragh-oreilly gravatar imagedarragh-oreilly ( 2015-10-20 14:58:43 -0500 )edit

answered 2015-09-16 00:08:43 -0500

dbaxps gravatar image

updated 2015-09-16 00:11:23 -0500

Say you launch VM with oskeydev SSH keypair

# chmod 600 oskeydev.pem
# create user with default user name for your VM say ubuntu
# cp oskeydev.pem ~ubuntu/
# cd ~ubuntu/
# chown ubutu:ubuntu *.pem
# su - ubuntu
$ scp -i oskeydev.pem  file-name floating-ip:/home/ubuntu

Size doesn't matter.

edit flag offensive delete link more


Thank you 'dbaxps'. Sorry for late response. Please refer to =Additional info.= in the above initial post. I did not success scp for a large file even following your suggestion with the user:imagen.

Imagen gravatar imageImagen ( 2015-10-01 22:05:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-09-09 22:07:04 -0500

Seen: 1,213 times

Last updated: Oct 19 '15