Hallo zusammen,
ich habe in einem meiner Embeddex Box PCs eine Huawei MU609 MiniPCIe UMTS Karte eingebaut. Diese ist vom Kernel auch automatisch erkannt worden:
[ 3.651928] option 1-5:2.2: GSM modem (1-port) converter detected [ 3.652125] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB0 [ 3.652167] option 1-5:2.3: GSM modem (1-port) converter detected [ 3.652311] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB1 [ 3.652341] option 1-5:2.4: GSM modem (1-port) converter detected [ 3.652497] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB2 [ 3.652522] option 1-5:2.5: GSM modem (1-port) converter detected [ 3.658752] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB3 [ 3.658826] option 1-5:2.6: GSM modem (1-port) converter detected [ 3.659010] usb 1-5: GSM modem (1-port) converter now attached to ttyUSB4 [ 3.664835] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 [ 3.668127] cdc_ether 1-5:2.0 eth2: register 'cdc_ether' at usb-0000:00:14.0-5, CDC Ethernet Device, 00:a0:c6:62:23:00 [ 3.668194] usbcore: registered new interface driver cdc_ether
Ich habe dann mittels wvdial mit folgender wvdial.conf eine Verbindung hergestellt
[Dialer Defaults] Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 Modem = /dev/ttyUSB0 Modem Type = USB Modem Baud = 9600 New PPPD = yes Check DNS = yes Auto DNS = no [Dialer umts-pin] Init3 = AT+CPIN=XXXX [Dialer umts] Dialer Command = ATD Carrier Check = no Phone = *99# Username = t-mobile Password = tm Stupid Mode = 1 Init4 = AT+CGDCONT=1,"IP","internet.t-mobile.de" Dial Attempts = 2
Der Log von wvdial dazu sieht so aus:
root@smulight-iEi:/home/smulight# wvdial umts & [1] 1287 root@smulight-iEi:/home/smulight# --> WvDial: Internet dialer version 1.61 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Sending: AT+CGDCONT=1,"IP","internet.t-mobile.de" AT+CGDCONT=1,"IP","internet.t-mobile.de" OK --> Modem initialized. --> Sending: ATDT*99# --> Waiting for carrier. ATDT*99# CONNECT 236800 --> Carrier detected. Starting PPP immediately. --> Starting pppd at Fri Aug 18 09:13:46 2017 --> Pid of pppd: 1288 --> Using interface ppp0 --> Authentication (CHAP) started --> Authentication (CHAP) successful --> local IP address 10.16.72.24 --> remote IP address 10.64.64.64 --> Script /etc/ppp/ip-up run successful --> Default route Ok. --> Nameserver (DNS) Ok. --> Connected... Press Ctrl-C to disconnect
Und der Syslog dazu so:
Aug 18 09:13:46 smulight-iEi pppd[1288]: pppd 2.4.7 started by smulight, uid 0 Aug 18 09:13:46 smulight-iEi kernel: [71677.736028] PPP generic driver version 2.4.2 Aug 18 09:13:46 smulight-iEi pppd[1288]: using channel 1 Aug 18 09:13:46 smulight-iEi pppd[1288]: Using interface ppp0 Aug 18 09:13:46 smulight-iEi pppd[1288]: Connect: ppp0 <--> /dev/ttyUSB0 Aug 18 09:13:46 smulight-iEi pppd[1288]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xb1b0fefb> <pcomp> <accomp>] Aug 18 09:13:46 smulight-iEi systemd-networkd[346]: ppp0: found matching network '/etc/systemd/network/ppp0.network', based on potentially unpredictable ifname Aug 18 09:13:46 smulight-iEi systemd-networkd[346]: ppp0: IPv6 enabled for interface: Success Aug 18 09:13:46 smulight-iEi systemd-networkd[346]: ppp0: Gained carrier Aug 18 09:13:46 smulight-iEi systemd-timesyncd[317]: Network configuration changed, trying to establish connection. Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x660e1b57> <pcomp> <accomp>] Aug 18 09:13:46 smulight-iEi pppd[1288]: sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x660e1b57> <pcomp> <accomp>] Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xb1b0fefb> <pcomp> <accomp>] Aug 18 09:13:46 smulight-iEi pppd[1288]: sent [LCP EchoReq id=0x0 magic=0xb1b0fefb] Aug 18 09:13:46 smulight-iEi systemd-timesyncd[317]: Synchronized to time server 10.2.2.68:123 (10.2.2.68). Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [LCP DiscReq id=0x1 magic=0x660e1b57] Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [CHAP Challenge id=0x1 <42a9357d466cfb4da88f81b5b0bbfe4c>, name = "UMTS_CHAP_SRVR"] Aug 18 09:13:46 smulight-iEi pppd[1288]: sent [CHAP Response id=0x1 <9a83f54938b5934c69c2accc777d0e49>, name = "t-mobile"] Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [LCP EchoRep id=0x0 magic=0x660e1b57 b1 b0 fe fb] Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [CHAP Success id=0x1 ""] Aug 18 09:13:46 smulight-iEi pppd[1288]: CHAP authentication succeeded Aug 18 09:13:46 smulight-iEi pppd[1288]: CHAP authentication succeeded Aug 18 09:13:46 smulight-iEi kernel: [71677.769362] PPP BSD Compression module registered Aug 18 09:13:46 smulight-iEi pppd[1288]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>] Aug 18 09:13:46 smulight-iEi pppd[1288]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>] Aug 18 09:13:46 smulight-iEi kernel: [71677.772276] PPP Deflate Compression module registered Aug 18 09:13:46 smulight-iEi pppd[1288]: rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f] Aug 18 09:13:46 smulight-iEi pppd[1288]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received Aug 18 09:13:47 smulight-iEi pppd[1288]: rcvd [IPCP ConfReq id=0x0] Aug 18 09:13:47 smulight-iEi pppd[1288]: sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>] Aug 18 09:13:47 smulight-iEi pppd[1288]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>] Aug 18 09:13:47 smulight-iEi pppd[1288]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0>] Aug 18 09:13:47 smulight-iEi pppd[1288]: rcvd [IPCP ConfReq id=0x1] Aug 18 09:13:47 smulight-iEi pppd[1288]: sent [IPCP ConfAck id=0x1] Aug 18 09:13:47 smulight-iEi pppd[1288]: rcvd [IPCP ConfNak id=0x2 <addr 10.16.72.24>] Aug 18 09:13:47 smulight-iEi pppd[1288]: sent [IPCP ConfReq id=0x3 <addr 10.16.72.24>] Aug 18 09:13:47 smulight-iEi pppd[1288]: rcvd [IPCP ConfAck id=0x3 <addr 10.16.72.24>] Aug 18 09:13:47 smulight-iEi pppd[1288]: Could not determine remote IP address: defaulting to 10.64.64.64 Aug 18 09:13:47 smulight-iEi pppd[1288]: not replacing default route to eth1 [10.1.177.254] Aug 18 09:13:47 smulight-iEi pppd[1288]: local IP address 10.16.72.24 Aug 18 09:13:47 smulight-iEi systemd-timesyncd[317]: Network configuration changed, trying to establish connection. Aug 18 09:13:47 smulight-iEi pppd[1288]: remote IP address 10.64.64.64 Aug 18 09:13:47 smulight-iEi pppd[1288]: Script /etc/ppp/ip-up started (pid 1302) Aug 18 09:13:47 smulight-iEi systemd-timesyncd[317]: Synchronized to time server 10.2.2.68:123 (10.2.2.68). Aug 18 09:14:05 smulight-iEi pppd[1288]: Script /etc/ppp/ip-up finished (pid 1302), status = 0x0
Hierbei ist mir bereits folgendes aufgefallen:
Could not determine remote IP address: defaulting to 10.64.64.64
Was hat das zu bedeuten? Liegt es nur daran das die externe IP nicht ermittelt werden konnte oder ist das scho ein Fehler?
Ich habe nun folgende anliegen:
Wie kann ich überprüfen ob die Verbindung über diese UMTS Verbindung funktioniert? Wie kann ich den Traffic zu einer bestimmten IP-Adresse über diese Schnittstellte leiten und allen anderen Traffic weiterhin wie bisher?
Ich habe zusätzlich noch zwei interne Schnittstellen konfiguriert:
root@smulight-iEi:/home/smulight# networkctl list IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 eth0 ether routable configuring 3 eth1 ether routable configured 4 enx00a0c6622300 ether off unmanaged 5 ppp0 ppp routable configuring
root@smulight-iEi:/home/smulight# ip route list default via 10.1.177.254 dev eth1 proto static default via 10.2.255.254 dev eth0 proto static 10.1.177.0/24 dev eth1 proto kernel scope link src 10.1.177.2 10.2.0.0/16 dev eth0 proto kernel scope link src 10.2.130.181 10.64.64.64 dev ppp0 proto kernel scope link src 10.16.72.24
root@smulight-iEi:/home/smulight# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.2.130.181 netmask 255.255.0.0 broadcast 10.2.255.255 inet6 fe80::218:7dff:feaa:ca53 prefixlen 64 scopeid 0x20<link> ether 00:18:7d:aa:ca:53 txqueuelen 1000 (Ethernet) RX packets 625639 bytes 43738622 (41.7 MiB) RX errors 0 dropped 325 overruns 0 frame 0 TX packets 4504 bytes 3625007 (3.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0x81300000-8131ffff eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.1.177.2 netmask 255.255.255.0 broadcast 10.1.177.255 inet6 fe80::218:7dff:feaa:ca54 prefixlen 64 scopeid 0x20<link> ether 00:18:7d:aa:ca:54 txqueuelen 1000 (Ethernet) RX packets 12530 bytes 787530 (769.0 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 24 bytes 1748 (1.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0x81200000-8121ffff 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 1 (Lokale Schleife) RX packets 13 bytes 1166 (1.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 13 bytes 1166 (1.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500 inet 10.16.72.24 netmask 255.255.255.255 destination 10.64.64.64 ppp txqueuelen 3 (Punkt-zu-Punkt-Verbindung) RX packets 5 bytes 38 (38.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 39 bytes 10691 (10.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@smulight-iEi:/home/smulight# cat /etc/resolv.conf # This file is managed by systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients directly to # all known DNS servers. # # Third party programs must not access this file directly, but only through the # symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way, # replace this symlink by a static file or a different symlink. # # See systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf. nameserver 10.2.2.68 nameserver 10.74.210.210 nameserver 10.74.210.211
root@smulight-iEi:/home/smulight# cat /etc/ppp/peers/wvdial noauth name wvdial #usepeerdns debug defaultroute
root@smulight-iEi:/home/smulight# cat /etc/systemd/network/eth0.network [Match] Name=eth0 [Network] Address=10.2.130.181/16 Gateway=10.2.255.254 DNS=10.2.2.68 root@smulight-iEi:/home/smulight# cat /etc/systemd/network/eth1.network [Match] Name=eth1 [Network] Address=10.1.177.2/24 Gateway=10.1.177.254 root@smulight-iEi:/home/smulight# cat /etc/systemd/network/ppp0.network [Match] Name=ppp0 [Network] DHCP=yes [DHCP] UseDNS=both