系統(tǒng)之家 - 系統(tǒng)光盤(pán)下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Windows和Virtualbox端口號(hào)映射失敗

Windows和Virtualbox端口號(hào)映射失敗怎么辦?

時(shí)間:2016-04-21 16:22:57 作者:jianfang 來(lái)源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪(fǎng)問(wèn): https://m.xitongzhijia.net/xtjc/20160421/70956.html 手機(jī)查看 評(píng)論

  在Virtualbox虛擬機(jī)中運(yùn)行Ubuntu系統(tǒng)時(shí),有時(shí)候需要通過(guò)端口映射來(lái)實(shí)現(xiàn)主機(jī)pc端和虛擬機(jī)內(nèi)部鏡像通信,端口和虛擬機(jī)內(nèi)部的服務(wù)相對(duì)應(yīng)。在Virtualbox啟動(dòng)階段會(huì)映射這些端口,然而在Windows中部分機(jī)器卻出現(xiàn)端口映射失敗的情況,那么,Windows和Virtualbox端口號(hào)映射失敗該怎么辦呢?

Windows和Virtualbox端口號(hào)映射失敗怎么辦?

  端口映射失敗日志如下:

  00:00:01.125577 NAT: set redirect UDP host 0.0.0.0:6000 =》 guest 10.0.2.15:6000

  00:00:01.125748 NAT: can‘t create datagram socket

  00:00:01.125763 NAT: failed to redirect UDP 0.0.0.0:6000 =》 10.0.2.15:6000

  00:00:01.125774 NAT: set redirect TCP host 0.0.0.0:6555 =》 guest 10.0.2.15:5555

  00:00:01.125897 NAT: failed to redirect TCP 0.0.0.0:6555 =》 10.0.2.15:5555

  分析:

  1.此處的端口號(hào)映射沒(méi)有占用Windows官方分配的端口號(hào),所有不存在端口號(hào)被Windows服務(wù)占用導(dǎo)致無(wú)效映射的問(wèn)題

  2.通過(guò)netstat -ano查看所有正在使用端口,未發(fā)現(xiàn)映射的端口號(hào)被占用

  3.上述兩點(diǎn)都排除了,那就排查Windows系統(tǒng)本身環(huán)境的問(wèn)題,通過(guò)驗(yàn)證發(fā)現(xiàn),可以通過(guò)修復(fù)工具修復(fù)此問(wèn)題。即是由于Windows本身環(huán)境導(dǎo)致的。

  具體修復(fù):Repair Winsock & DNS Cache

  功能說(shuō)明如下:

  This will clear the stored DNS cache in Windows. When the DNS becomes corrupt you will not be able to get to some sites. Flushing and rebuilding the DNS will fix that problem.

  Also resets winsock entries & resets TCP/IP stack.

  These extra commands are run on Windows vista and newer.

  執(zhí)行完如下幾條命令然后重啟,即可修復(fù)端口號(hào)映射失敗問(wèn)題,此述不僅僅限于Virtualbox要使用的端口映射,其他任何軟件使用到端口映射且失敗時(shí)可以考慮用如下幾條命令修復(fù):

  netsh winsock reset all

  netsh int 6to4 reset all

  netsh int ipv4 reset all

  netsh int ipv6 reset all

  netsh int httpstunnel reset all

  netsh int isatap reset all

  netsh int portproxy reset all

  netsh int tcp reset all

  netsh int teredo reset all

  如上這些命令來(lái)源于Windows修復(fù)工具中其中一項(xiàng)

Windows和Virtualbox端口號(hào)映射失敗怎么辦?

  如果有其他Windows問(wèn)題可以嘗試用此工具鏡像修復(fù)。

發(fā)表評(píng)論

0

沒(méi)有更多評(píng)論了

評(píng)論就這些咯,讓大家也知道你的獨(dú)特見(jiàn)解

立即評(píng)論

以上留言?xún)H代表用戶(hù)個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)

其他版本軟件

熱門(mén)教程

人氣教程排行

Linux系統(tǒng)推薦

掃碼關(guān)注
掃碼關(guān)注

掃碼關(guān)注 官方交流群 軟件收錄