Unable to download packets in OpenStack’s Instance

Sometimes you stuck with this different issue in VM’s network that you can communicate with public/external network from VM but unable to download or update the repo.

 

When you go for “apt-get update” you will be stuck at certain percentage and not able to complete the update process.

 

You will suspect that the problem is due to repo servers traffic and will try new other repo to update the local repo. but still you will be facing the same problem even after trying new public repo.

 

Actually, this problem occurs not because of web traffic but because of Openstack’s quantum  issue in allocating MTU (Maximum Transmission Unit ) for NIC while assigning IP.

 

You can check whether MTU is assigned to your NIC or not by usual command “ ifconfig “.

 

eth0      Link encap:Ethernet  HWaddr fb:16:4e:95:e6:4f
         inet addr:172.168.1.54  Bcast:172.168.1.255  Mask:255.255.255.0
         inet6 addr: fe81::f816:3eff:fe95:e64f/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST  MTU:1450  Metric:1
         RX packets:36828 errors:0 dropped:0 overruns:0 frame:0
         TX packets:31195 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:52733699 (52.7 MB)  TX bytes:2276665 (2.2 MB)
  
Here, I set MTU value to 1450 for my openstack VM.
Probably in your case you would not find any MTU value or it should have 1500. So assign it manually by the command below.

 

For LINUX
———-
sudo ifconfig eth0 mtu 1400
For Windows
————
netsh interface ipv4 show interfaces
netsh interface ipv4 set subinterface “12” mtu=1400 store=persistent
The value you assigned to NIC will be lost after reboot. So it is prefered to make entry in /etc/rc.local.
You can also make changes in base image by booting base image and set MTU value to 1400 which is set as 1500 by default.

Leave a Comment