爱快虚拟机安装openwrt要网卡直通吗

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了爱快虚拟机安装openwrt要网卡直通吗相关的知识,希望对你有一定的参考价值。

参考技术A 爱快没有无线模块,只能在以太网口接入AP提供无线网络。我用openwrt,将USB网卡直通给openwrt发射WiFi,挺好用的。 参考技术B 我用openwrt,将USB网卡直通给openwrt发射WiFi,挺好用的。

openWrt 安装与实践 II

1. 启动ubuntu上面的openwrt虚拟机之后, 设置一下虚拟机的网卡:

第1个网卡: Host-only

第2个网卡: NAT

 

2. 查看网络配置:

root@OpenWrt:/etc/config# cat network

config interface \'loopback\'
        option ifname \'lo\'
        option proto \'static\'
        option ipaddr \'127.0.0.1\'
        option netmask \'255.0.0.0\'

config interface \'lan\'
        option ifname \'eth0\'
        option type \'bridge\'
        option proto \'static\'
        option ipaddr \'192.168.1.254\'
        option netmask \'255.255.255.0\'
        option ip6assign \'60\'

config interface \'wan\'
        option ifname \'eth1\'
        option proto \'dhcp\'

config interface \'wan6\'
        option ifname \'eth1\'
        option proto \'dhcpv6\'

config globals \'globals\'
        option ula_prefix \'fd43:e822:82cf::/48\'

用ifconfig|grep addr命令, 可以看到eth1的ip是192.168.127.129:

root@OpenWrt:/etc/config# ifconfig|grep add
br-lan    Link encap:Ethernet  HWaddr 00:0C:29:09:43:FB
          inet addr:192.168.1.254  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd43:e822:82cf::1/60 Scope:Global
          inet6 addr: fe80::20c:29ff:fe09:43fb/64 Scope:Link
eth0      Link encap:Ethernet  HWaddr 00:0C:29:09:43:FB
          Interrupt:19 Base address:0x2000
eth1      Link encap:Ethernet  HWaddr 00:0C:29:09:43:05
          inet addr:192.168.127.129  Bcast:192.168.127.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe09:4305/64 Scope:Link
          Interrupt:19 Base address:0x2080
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host

 3. 检查一下是否能访问网络:

root@OpenWrt:/etc/config# ping baidu.com
PING baidu.com (111.13.101.208): 56 data bytes
64 bytes from 111.13.101.208: seq=0 ttl=128 time=46.149 ms
64 bytes from 111.13.101.208: seq=1 ttl=128 time=47.142 ms
^C
--- baidu.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 46.149/46.645/47.142 ms

升级一下luci吧:

opkg update

opkg install luci

/etc/init.d/uhttpd enable

/etc/init.d/uhttpd start

/etc/init.d/firewall stop

然后打开防火墙.

接着就可以在windows上面打开luci了.

 

 

接下来就可以在web界面上折腾了...

 

以上是关于爱快虚拟机安装openwrt要网卡直通吗的主要内容,如果未能解决你的问题,请参考以下文章

Proxmox VE 7.2 网卡直通

Proxmox(PVE)下安装署爱快(ikuai)教程

怎么用虚拟机装openwrt

在VMWare虚拟机下创建Openwrt LEDE软路由系统

使用VMware虚拟机通过Panabit抓取爱快虚拟机PPPoE报文

Proxmox VE 7.2 LXC 方式部署openwrt