Hallo Zusammen,
ich habe ein kleines Netzwerk-Problem unter Ubuntu 18.04. Ich muss mit einer Software auf ein Netzwerkgerät zugreifen können. Das Gerät (eine Kamera) ist (unter Windows) erreichbar und Pingbar unter der IP 192.168.0.10. Das Ganze ist allerdings eine Industrie-Kamera und Teil meiner Technikerarbeit.
Ich nutze auf einem Windows 10 Enterprise Host-System VMWare 15.5.6. Hier habe ich eine VM mit Ubuntu 18.04 LTS installiert. Das ist die Anforderung der Software.
ekonst@ubuntu:~$ uname -a Linux ubuntu 5.4.0-72-generic #80~18.04.1-Ubuntu SMP Mon Apr 12 23:26:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Da ich die Netzwerkschnittstelle im Host nicht ändern kann, habe ich einen USB3.0-Gigabit Adapter eingesteckt, und reiche diesen in die VM durch. Meiner Meinung nach wurde auch der Adapter sauber erkannt:
ekonst@ubuntu:~$ lsusb Bus 004 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 0e0f:0008 VMware, Inc. Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Unter ifconfig erhalte ich folgende ausgabe:
ekonst@ubuntu:~$ ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.150.132 netmask 255.255.255.0 broadcast 192.168.150.255 inet6 fe80::4796:1d93:a55:557f prefixlen 64 scopeid 0x20<link> ether 00:0c:29:a1:a0:f6 txqueuelen 1000 (Ethernet) RX packets 1968 bytes 1058638 (1.0 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 980 bytes 98544 (98.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enxc8d9d2dcba14: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether c8:d9:d2:dc:ba:14 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Lokale Schleife) RX packets 569 bytes 46654 (46.6 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 569 bytes 46654 (46.6 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Des weiteren poste ich jetzt die im "tutorial" aufgeführten Befehle:
ekonst@ubuntu:~$ ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 00:0c:29:a1:a0:f6 brd ff:ff:ff:ff:ff:ff 3: enxc8d9d2dcba14: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000 link/ether c8:d9:d2:dc:ba:14 brd ff:ff:ff:ff:ff:ff
¶
ekonst@ubuntu:~$ ip -4 addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 inet 192.168.150.132/24 brd 192.168.150.255 scope global dynamic noprefixroute ens33 valid_lft 1666sec preferred_lft 1666sec ekonst@ubuntu:~$ ip -4 route default via 192.168.150.2 dev ens33 proto dhcp metric 20100 169.254.0.0/16 dev ens33 scope link metric 1000 192.168.150.0/24 dev ens33 proto kernel scope link src 192.168.150.132 metric 100 ekonst@ubuntu:~$ ip -4 neigh 192.168.150.2 dev ens33 lladdr 00:50:56:ee:87:c8 STALE 192.168.150.254 dev ens33 lladdr 00:50:56:fe:96:12 STALE ekonst@ubuntu:~$
¶
ekonst@ubuntu:~$ grep renderer /{lib,etc,run}/netplan/*yaml grep: /lib/netplan/*yaml: Datei oder Verzeichnis nicht gefunden /etc/netplan/01-network-manager-all.yaml: renderer: NetworkManager grep: /run/netplan/*yaml: Datei oder Verzeichnis nicht gefunden ekonst@ubuntu:~$ nmcli general ; nmcli device ; nmcli connection STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN verbunden (nur Gelände) begrenzt aktiviert aktiviert aktiviert aktiviert DEVICE TYPE STATE CONNECTION ens33 ethernet verbunden Kabelgebundene Verbindung 1 enxc8d9d2dcba14 ethernet nicht verfügbar -- lo loopback nicht verwaltet -- NAME UUID TYPE DEVICE Kabelgebundene Verbindung 1 6b417120-7069-34c6-b9a3-f34b4d6e1a78 ethernet ens33 Kabelgebundene Verbindung 2 87961f40-ef34-3426-8e8c-f17feac1ef14 ethernet --
Hier sieht es für mich aus, wie wenn der Kabelgebunden Verbindung 2 kein Device zugeordnet ist. Nur ist die Frage, wie ich das zuordnen kann
ekonst@ubuntu:~$ grep "" /{lib,etc,run}/netplan/*yaml grep: /lib/netplan/*yaml: Datei oder Verzeichnis nicht gefunden /etc/netplan/01-network-manager-all.yaml:# Let NetworkManager manage all devices on this system /etc/netplan/01-network-manager-all.yaml:network: /etc/netplan/01-network-manager-all.yaml: version: 2 /etc/netplan/01-network-manager-all.yaml: renderer: NetworkManager grep: /run/netplan/*yaml: Datei oder Verzeichnis nicht gefunden
¶
ekonst@ubuntu:~$ ls -l /etc/resolv.conf lrwxrwxrwx 1 root root 39 Mai 4 07:02 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf ekonst@ubuntu:~$ cat /etc/resolv.conf # This file is managed by man:systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients to the # internal DNS stub resolver of systemd-resolved. This file lists all # configured search domains. # # Run "systemd-resolve --status" to see details about the uplink DNS servers # currently in use. # # Third party programs must not access this file directly, but only through the # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way, # replace this symlink by a static file or a different symlink. # # See man:systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf. nameserver 127.0.0.53 options edns0 search localdomain ekonst@ubuntu:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 ubuntu # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ekonst@ubuntu:~$ sudo ss -pan 'sport = 53' [sudo] Passwort für ekonst: Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=547,fd=12)) tcp LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=547,fd=13))
Der Ping ins Internet funktioniert, deshalb, das für mich wichtige, Ping auf das Gerät (Wurde mit Ctrl+C abgebrochen):
ekonst@ubuntu:~$ ping 192.168.0.10 PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data. ^C --- 192.168.0.10 ping statistics --- 10 packets transmitted, 0 received, 100% packet loss, time 9210ms
Für mich etwas fraglich ist, dass in der grafischen Oberfläche (Einstellungen-→ Netzwerk) das Gerät als USB Ethernet angezeigt wird. Ich kann es auch konfigurierern, und habe (mit der richtigen MAC) eine IP vergeben. Dennoch ist der Schalter zum aktivieren ausgegraut und es immer heißt "Kabel nicht angeschlossen". Dies kommt mir komisch vor, da an meinem Adapter die "link" LED blinkt.
Mit dem Gleichen Adapter unter Windows gemounet funktioniert alles. Also jegliche Kabel/Adapterdefekte sind ausgeschlossen