Добрый день.
Помогите пожалуйста настроить выход в интернет через сим-карту “Yota” (WB 6.5).
Все настроил по данной инструкции, интерфейс ppp0
появился вместе с ip адресом. Однако интернет так и не появился - пинга нет с ошибкой destination port unreachable
.
Вывод ifconfig
и ping
:
root-wirenboard-AMIGTYJM{~}:ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.20.22.73 netmask 255.255.0.0 broadcast 10.20.255.255
inet6 fde8:284d:a1f8:0:821f:12ff:fe49:1194 prefixlen 64 scopeid 0x0<global>
inet6 fe80::821f:12ff:fe49:1194 prefixlen 64 scopeid 0x20<link>
ether 80:1f:12:49:11:94 txqueuelen 1000 (Ethernet)
RX packets 91900 bytes 8188493 (7.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 164 bytes 25467 (24.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 80:1f:12:48:d3:a7 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 1 (Local Loopback)
RX packets 52327 bytes 3676464 (3.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52327 bytes 3676464 (3.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.164.118.199 netmask 255.255.255.255 destination 10.164.118.199
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 84 bytes 8815 (8.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 138 bytes 10395 (10.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.42.1 netmask 255.255.255.0 broadcast 192.168.42.255
inet6 fe80::4a46:c1ff:fef7:5602 prefixlen 64 scopeid 0x20<link>
ether 48:46:c1:f7:56:02 txqueuelen 1000 (Ethernet)
RX packets 25 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1 bytes 96 (96.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root-wirenboard-AMIGTYJM{~}:ping -I ppp0 1.1.1.1
PING 1.1.1.1 (1.1.1.1) from 10.164.118.199 ppp0: 56(84) bytes of data.
From 1.1.1.1 icmp_seq=1 Destination Port Unreachable
From 1.1.1.1 icmp_seq=2 Destination Port Unreachable
From 1.1.1.1 icmp_seq=3 Destination Port Unreachable
From 1.1.1.1 icmp_seq=4 Destination Port Unreachable
From 1.1.1.1 icmp_seq=5 Destination Port Unreachable
From 1.1.1.1 icmp_seq=6 Destination Port Unreachable
^C
--- 1.1.1.1 ping statistics ---
6 packets transmitted, 0 received, +6 errors, 100% packet loss, time 5006ms
Действия по настройки интернета: Создал файл /etc/ppp/peers/yota
:
/dev/ttyACM0
115200
#disable hardware flow control
nocrtscts
# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute
# Makes pppd "dial again" when the connection is lost.
persist
# Do not ask the remote to authenticate.
noauth
persist
# no limit on failed connections
maxfail 0
lcp-echo-interval 10
lcp-echo-failure 3
holdoff 10
init "/usr/bin/wb-gsm restart_if_broken"
# Логин и пароль для Yota не нужны (вроде как)
#user ""
#password ""
connect "/usr/sbin/chat -v -f /etc/chatscripts/yota"
Так же создал скрипт /etc/chatscripts/yota
:
ABORT "BUSY"
ABORT "NO ANSWER"
ABORT "NO CARRIER"
ABORT "ERROR"
TIMEOUT 5
"" ATZ
OK AT+CGDCONT=1,"IP","internet.yota"
OK ATD*99#
CONNECT
Внес изменение в файл /etc/network/interfaces
auto ppp0
iface ppp0 inet ppp
# select provider: megafon, mts or beeline below
provider yota
#Рестартуем модем, если он завис
pre-up wb-gsm restart_if_broken
#Затем ждем, пока он загрузится и найдет сеть.
pre-up sleep 10