Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何连接到virtualbox上的openwrt_Virtualbox_Openwrt - Fatal编程技术网

如何连接到virtualbox上的openwrt

如何连接到virtualbox上的openwrt,virtualbox,openwrt,Virtualbox,Openwrt,我已经在virtualbox上安装了openwrt-x86-generic-combined.ext4.vdi。我设置了广域网,所以“路由器”连接到网络上,我可以用ip和域名ping站点 现在我想用我的windows笔记本电脑连接到路由器,我在上面运行虚拟机。我试图遵循这个解决方案:但它似乎没有联系 我的/etc/config/network文件现在如下所示: config interface 'wan' option proto 'dhcp'

我已经在virtualbox上安装了openwrt-x86-generic-combined.ext4.vdi。我设置了广域网,所以“路由器”连接到网络上,我可以用ip和域名ping站点

现在我想用我的windows笔记本电脑连接到路由器,我在上面运行虚拟机。我试图遵循这个解决方案:但它似乎没有联系

我的/etc/config/network文件现在如下所示:

 config interface 'wan'
                  option  proto 'dhcp'
                  option ifname 'eth0'

 config interface 'lan'
        option ifname 'eth2'
        option type 'bridge'
        option proto 'static' 
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
我曾尝试将适配器设置为仅主机、内部网络和桥接适配器,但它们都没有按照我的要求工作(实际上根本没有工作),有什么方法可以做到这一点吗

这对我很有效

适配器1:NAT
适配器2:仅主机

我在Vbox中配置的主机专用适配器为192.168.56.1 在openwrt中,我将“lan”ip设置为192.168.56.2,然后我可以通过ssh将其设置为192.168.56.2

您的局域网配置显示“eth2”。应正确为“eth1”
这对我很有效

适配器1:NAT
适配器2:仅主机

我在Vbox中配置的主机专用适配器为192.168.56.1 在openwrt中,我将“lan”ip设置为192.168.56.2,然后我可以通过ssh将其设置为192.168.56.2

您的局域网配置显示“eth2”。应正确为“eth1”