我在联想 G70-80 笔记本电脑上使用 Ubuntu 22.04.3 LTS,并通过 Wifi 链接连接到我的盒子,运行良好。
我需要将此链接共享给连接到我的以太网端口的设备(由 r8169 模块驱动)。为了实现这一点,我为以太网链接设置了 NetworkManager:IPV4 共享、禁用 IPV6 共享、无安全性、自动连接、允许所有用户共享。
当笔记本电脑启动时,它会获得 wifi 连接,并很好地设置互联网访问。但它不会将我的互联网链接共享到以太网端口,所以我的设备没有网络共享功能。
我找到了这个解决方案:我手动关闭 NetworkManager 中的以太网链接,然后在一两秒后手动打开它,然后通过以太网的互联网共享就可以正常工作了。
为什么我的配置没有自动设置此网络共享? 是否存在任何配置错误? 是错误吗?
我在 Debian 11 中尝试了完全相同的 NetworkManager 配置(我的笔记本电脑有双启动),启动时会自动设置以太网网络共享。无需进一步的手动干预。
所以我很困惑,无法解释 Ubuntu 中的这种行为。
以下是部分内容:
damien@damien-Lenovo-G70-80:~$ sudo nmcli connection show
NAME UUID TYPE DEVICE
Connexion filaire 1 cade8fd4-c674-3ef9-93ca-95334cabb4a8 ethernet enp2s0
Bbox-9CE598F5 f58ac981-c737-402a-860a-8348acfdea51 wifi wlp3s0
pan1 72a3e182-b70f-4c8b-b687-0042f98741a4 bridge pan1
virbr0 5366cdbc-d656-487d-87cd-9cb865750830 bridge virbr0
A22 de Mon compte Network 698a1d09-34fb-4f16-b416-531725befedf bluetooth --
AndroidAP 86627f14-6ac5-44d1-8683-6477a16872ac wifi --
Félicien 94953f1e-91ef-4d2e-9769-341b243d4a9a wifi --
Mon compte's Galaxy A22 dfcae5a4-80d5-46cc-90ff-94377b86426c wifi --
NUMERICABLE-938C 1595cd03-1329-48c6-b523-bda73bd1759c wifi --
Réseau Galaxy J3 (2017) 1d82f1dc-5707-4748-a78c-0e10e282a843 bluetooth --
Réseau XCover 5 de Damien 37d936ff-0876-4bbc-bcf4-54cdab7ec7ac bluetooth --
damien@damien-Lenovo-G70-80:~$ sudo nmcli connection show 'Connexion filaire 1'
connection.id: Connexion filaire 1
connection.uuid: cade8fd4-c674-3ef9-93ca-95334cabb4a8
connection.stable-id: --
connection.type: 802-3-ethernet
connection.interface-name: enp2s0
connection.autoconnect: oui
connection.autoconnect-priority: -999
connection.autoconnect-retries: -1 (default)
connection.multi-connect: 0 (default)
connection.auth-retries: -1
connection.timestamp: 1707052593
connection.read-only: non
connection.permissions: --
connection.zone: --
connection.master: --
connection.slave-type: --
connection.autoconnect-slaves: -1 (default)
connection.secondaries: --
connection.gateway-ping-timeout: 0
connection.metered: inconnu
connection.lldp: default
connection.mdns: -1 (default)
connection.llmnr: -1 (default)
connection.dns-over-tls: -1 (default)
connection.wait-device-timeout: -1
802-3-ethernet.port: --
802-3-ethernet.speed: 0
802-3-ethernet.duplex: --
802-3-ethernet.auto-negotiate: non
802-3-ethernet.mac-address: --
802-3-ethernet.cloned-mac-address: --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist: --
802-3-ethernet.mtu: auto
802-3-ethernet.s390-subchannels: --
802-3-ethernet.s390-nettype: --
802-3-ethernet.s390-options: --
802-3-ethernet.wake-on-lan: default
802-3-ethernet.wake-on-lan-password: --
802-3-ethernet.accept-all-mac-addresses:-1 (default)
ipv4.method: shared
ipv4.dns: --
ipv4.dns-search: --
ipv4.dns-options: --
ipv4.dns-priority: 0
ipv4.addresses: --
ipv4.gateway: --
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
ipv4.routing-rules: --
ipv4.ignore-auto-routes: non
ipv4.ignore-auto-dns: non
ipv4.dhcp-client-id: --
ipv4.dhcp-iaid: --
ipv4.dhcp-timeout: 0 (default)
ipv4.dhcp-send-hostname: oui
ipv4.dhcp-hostname: --
ipv4.dhcp-fqdn: --
ipv4.dhcp-hostname-flags: 0x0 (none)
ipv4.never-default: non
ipv4.may-fail: oui
ipv4.required-timeout: -1 (default)
ipv4.dad-timeout: -1 (default)
ipv4.dhcp-vendor-class-identifier: --
ipv4.dhcp-reject-servers: --
ipv6.method: disabled
ipv6.dns: --
ipv6.dns-search: --
ipv6.dns-options: --
ipv6.dns-priority: 0
ipv6.addresses: --
ipv6.gateway: --
ipv6.routes: --
ipv6.route-metric: -1
ipv6.route-table: 0 (unspec)
ipv6.routing-rules: --
ipv6.ignore-auto-routes: non
ipv6.ignore-auto-dns: non
ipv6.never-default: non
ipv6.may-fail: oui
ipv6.required-timeout: -1 (default)
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.ra-timeout: 0 (default)
ipv6.dhcp-duid: --
ipv6.dhcp-iaid: --
ipv6.dhcp-timeout: 0 (default)
ipv6.dhcp-send-hostname: oui
ipv6.dhcp-hostname: --
ipv6.dhcp-hostname-flags: 0x0 (none)
ipv6.token: --
proxy.method: none
proxy.browser-only: non
proxy.pac-url: --
proxy.pac-script: --
GENERAL.NAME: Connexion filaire 1
GENERAL.UUID: cade8fd4-c674-3ef9-93ca-95334cabb4a8
GENERAL.DEVICES: enp2s0
GENERAL.IP-IFACE: enp2s0
GENERAL.STATE: activé
GENERAL.DEFAULT: non
GENERAL.DEFAULT6: non
GENERAL.SPEC-OBJECT: --
GENERAL.VPN: non
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/5
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/11
GENERAL.ZONE: --
GENERAL.MASTER-PATH: --
IP4.ADDRESS[1]: 10.42.0.1/24
IP4.GATEWAY: --
IP4.ROUTE[1]: dst = 10.42.0.0/24, nh = 0.0.0.0, mt = 100
IP6.GATEWAY: --
是的,“自动连接”已打开,但我必须补充一点,我还同时通过蓝牙与应用blueman
程序共享我的无线互联网连接(本地服务)。
此蓝牙网络共享功能自动启动并正常工作,无需手动干预。蓝牙和以太网之间的两个连接共享似乎存在干扰。
蓝牙共享能全覆盖吗?