Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

成功运行和配置,客户端分配了ip,但是无法上网 #4

Closed
Yrp opened this issue Sep 21, 2019 · 5 comments
Closed

成功运行和配置,客户端分配了ip,但是无法上网 #4

Yrp opened this issue Sep 21, 2019 · 5 comments

Comments

@Yrp
Copy link

Yrp commented Sep 21, 2019

首先感谢作者的教程,写的很清晰简单,基本照着做就行了,不过还是出现了一点问题,希望早日得到您的回复。

目前看起来openwrt本身可以访问外网,windows 自动分配了ip地址,但是无法连接 一级路由和外网,不清楚是什么原因。

root@debian:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:ae:ed:ed:9c:42 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.219/24 brd 192.168.1.255 scope global dynamic enp2s0
       valid_lft 42493sec preferred_lft 42493sec
    inet6 fe80::baae:edff:feed:9c42/64 scope link 
       valid_lft forever preferred_lft forever
3: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:ae:ed:ed:9c:43 brd ff:ff:ff:ff:ff:ff
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:24:f6:80:13 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
8: hMACvLAN@enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 82:5b:61:10:5c:71 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.190/24 brd 10.1.1.255 scope global dynamic noprefixroute hMACvLAN
       valid_lft 41763sec preferred_lft 41763sec
    inet6 fe80::f744:2f59:6cde:e276/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

  • openwrt的网络是这样
root@OpenWrt:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 02:42:0a:01:01:02 brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.254/24 brd 10.1.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
6: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue master br-lan state UP 
    link/ether 02:42:0a:01:01:02 brd ff:ff:ff:ff:ff:ff
7: eth1@br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:c0:a8:fe:02 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.240/24 brd 192.168.1.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::42:c0ff:fea8:fe02/64 scope link 
       valid_lft forever preferred_lft forever
  • windows 10的网络信息是
    windows network info
@lisaac
Copy link
Owner

lisaac commented Sep 21, 2019

初步看感觉是openwrt配置问题
请帖一下/etc/config/network 及 firewall

@Yrp
Copy link
Author

Yrp commented Sep 22, 2019

不知道为啥,稀里糊涂的自己好了,现在能上网了。
感谢您的教程

@Yrp Yrp closed this as completed Sep 22, 2019
@Yrp Yrp reopened this Sep 22, 2019
@Yrp
Copy link
Author

Yrp commented Sep 22, 2019

  • 找到无法上网的原因了,因为使用lean的openwrt固件,里面打包了fullconenat的支持,默认是开启的。关掉后,可以正常上网。
  • 现在有个疑问,为什么在docker里面的openwrt无法使用fullconenat?

lean使用的是 https://github.com/LGA1150/openwrt-fullconenat 这个patch,是由于docker的宿主机内核不支持fullconenat吗?

@lisaac
Copy link
Owner

lisaac commented Sep 24, 2019 via email

@Yrp
Copy link
Author

Yrp commented Sep 25, 2019

好的,我检查一下

@lisaac lisaac closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants