Sunday, October 6, 2013

VirtualBox Bridged Networking and MTU Problem in a Windows Guest


Busting my head (and other valuable parts of my body) getting Bridged networking in virtual WindowsXP (Windows 7 doesn't have this issue) with Linux host because I needed it to have DHCP IP and make it available to my home network, basic websites would load and others would time out. Also accesing the machine via SAMBA would cause errors once in a while. Using standard NAT would work and resolve websites immediately, but the machine would get IP assigned by host machine and would not be seen to the rest of the home network and completely invisible in router.



Turned out that MTU (I believe 1500 default) is too high in WindowsXP, in my Debian Linux host I have MTU set to standard 1492, so I lowered the MTU in virtual winxp to 1469, and now everything is better, pages resolve immediately, pings don't time out and some websites (mostly running in ssl mode) are no longer causing trouble.

If you really need the virtual windows guest to have IP assigned (probably even static) by the main network because you can only do it with bridged networking mode, and are having this type of issues that I had then you can change the MTU in winxp through the registry.

So to do it just run regedit and do the following steps:

Once in regedit go to this key

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\[Adapter ID]]

NOTE: [Adapter ID] is going to be a unique alphanumeric sequence, you may have several, you need to find the correct one, usually the correct key will have more entries within it, you can add the mtu entry to all of them, it wont hurt if you do.

Once in the registry key for that interface, create a new DWORD value and call it MTU

Edit the MTU dword value, change the value to 1469 and make sure it is a decimal value, not hexadecimal.

Once you make that change you have to reboot.

And hopefully your bridged networking will be working as it should...

5 comments:

  1. Thanks for that. It is a complete mystery to me as to why the MTU has to come down to 1469 but it did do the trick for me.
    Windows.........

    ReplyDelete
  2. Try VM Ware player, worked fine for me in Solaris and Ubuntu.

    ReplyDelete
  3. thanks for the good informative blog to provide me,thanks for sharing.

    Silver Jackpot Calls

    ReplyDelete
  4. Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing...
    mason soiza

    ReplyDelete
  5. We are the world best leading online newspaper portal. You all are the most welcome in our newspaper.If you want to get regular newslatter from our newspaper, please go home page science news and click the below subscribe button.

    World News :
    View CNN world news today for international news and videos from Europe, Asia, Africa, the Middle East and the Americas. Visit world news report for up-to-the-minute news, breaking news, video, audio and feature stories.

    Politics News :
    Politics at CNN has news, opinion and analysis of American and global politics Find news and video about elections, the White House, the U.N and much more. What You Need To Know About political news from us.

    Business News :
    The latest CNN business news articles : breaking personal finance, company, View the latest business news about the world's top companies, and explore articles on global.

    Sports News :
    Latest sports news from around the world with in-depth analysis, features, photos and videos covering football, tennis, motorsport, golf, rugby, sailing, skiing, horse racing and equestrian.

    Entertainment News :
    View entertainment news of today and videos for the latest movie, music, TV and celebrity headlines on usacnnnews.com
    Technology News :
    Get the latest CNN technology news google : breaking news and analysis on computing, the web, blogs, games, gadgets, social media, broadband and more.

    Science News :
    Get the latest CNN Science and Environment News: breaking news, analysis and debate on science news latest and nature in the UK and around the world.

    Daily Life :
    What You Need To Know About daily life yoga ? Get the latest lifestyle news with articles and videos on pets, parenting, fashion, beauty, food, travel, relationships and more on CNN news.

    ReplyDelete