pppoe_client:
create bundle static B2
set iface route x.x.x.x
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
create link static L2 pppoe
set link action bundle B2
set auth authname login_name_here
set auth password passwd_here
set link max-redial 0
set iface enable tcpmssfix
set link mtu 1400
set link keep-alive 10 60
set pppoe iface vlan11
set pppoe service ""
open
Так понимаю, необходимо создать PPP-подключение.
Воспользуйтесь для этого, например, mpd.
На сайте не описывал этой возможности. В одной из точек подключаюсь по PPPoE. Секция в mpd.conf, относительно PPPoE-включения, в моем случае следующий:Код: [Выделить]pppoe_client:
create bundle static B2
set iface route x.x.x.x
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
create link static L2 pppoe
set link action bundle B2
set auth authname login_name_here
set auth password passwd_here
set link max-redial 0
set iface enable tcpmssfix
set link mtu 1400
set link keep-alive 10 60
set pppoe iface vlan11
set pppoe service ""
open
У меня модем включался к сетевой карте.
Если же модем USB - смотрите, куда нужно отправлять данные (в какой порт). К сожалению, примера подключения 3G-модема нету. Есть статья по подключению DialUp-модема: http://muff.kiev.ua/content/podklyuchenie-modema-zyxel-omni-56k-usb-plus-ee-k-serveru-pod-upravleniem-freebsd (http://muff.kiev.ua/content/podklyuchenie-modema-zyxel-omni-56k-usb-plus-ee-k-serveru-pod-upravleniem-freebsd). Посмотрите, возможно пригодится.
Да, конечно.В вожу (модем подключен):
Иначе с портом не определиться.
То, что поддержка USB реализована на уровне ядра. Модуль не может подгрузится, поскольку он уже вкомпилирован в ядро. В статье описывалось, что у меня система была собрана без поддержки USB, поэтому и пришлось подгружать модуля.
Проверьте, на каком порту определяется модем и вносите настройки, отталкиваясь от адресации порта.
ste0: link state changed to DOWN
ste0: link state changed to UP
ugen3.2: <HUAWEI Technology> at usbus3
u3g0: <HUAWEI Technology HUAWEI Mobile, class 0/0, rev 2.00/0.00, addr 2> on usbus3
u3g0: Found 3 ports.
ste0: link state changed to DOWN
ste0: link state changed to UP
g_vfs_done():acd0[READ(offset=32768, length=2048)]error = 5
ls -la /dev
Нет, не то.
Дайте вывод команды:Код: [Выделить]ls -la /dev
[/pre]
total 5
dr-xr-xr-x 6 root wheel 512 Jan 27 12:58 .
drwxr-xr-x 21 root wheel 512 Jan 27 12:57 ..
crw-r----- 1 root operator 0, 90 Jan 27 12:58 acd0
crw-r----- 1 root operator 0, 91 Jan 27 12:58 acd1
crw-r--r-- 1 root wheel 0, 34 Jan 27 12:58 acpi
crw-r----- 1 root operator 0, 92 Jan 27 12:58 ad2
crw-r----- 1 root operator 0, 93 Jan 27 12:58 ad2s1
crw-r----- 1 root operator 0, 94 Jan 27 12:58 ad2s1a
crw-r----- 1 root operator 0, 95 Jan 27 12:58 ad2s1b
crw-r----- 1 root operator 0, 96 Jan 27 12:58 ad2s1d
crw-r----- 1 root operator 0, 97 Jan 27 12:58 ad2s1e
crw-r----- 1 root operator 0, 98 Jan 27 12:58 ad2s1f
crw------- 1 root wheel 0, 35 Jan 27 12:58 agpgart
crw------- 1 root operator 0, 33 Jan 27 12:58 ata
crw------- 1 root wheel 0, 68 Jan 27 12:58 atkbd0
crw------- 1 root kmem 0, 21 Jan 27 12:58 audit
crw------- 1 root wheel 0, 14 Jan 27 12:58 bpf
lrwxr-xr-x 1 root wheel 3 Jan 27 12:58 bpf0 -> bpf
crw------- 1 root wheel 0, 4 Jan 27 13:00 console
crw------- 1 root wheel 0, 67 Jan 27 12:58 consolectl
crw-rw-rw- 1 root wheel 0, 11 Jan 27 12:58 ctty
crw-rw---- 1 uucp dialer 0, 112 Jan 27 12:58 cuaU0.0
crw-rw---- 1 uucp dialer 0, 113 Jan 27 12:58 cuaU0.0.init
crw-rw---- 1 uucp dialer 0, 114 Jan 27 12:58 cuaU0.0.lock
crw-rw---- 1 uucp dialer 0, 118 Jan 27 12:58 cuaU0.1
crw-rw---- 1 uucp dialer 0, 119 Jan 27 12:58 cuaU0.1.init
crw-rw---- 1 uucp dialer 0, 120 Jan 27 12:58 cuaU0.1.lock
crw-rw---- 1 uucp dialer 0, 124 Jan 27 12:58 cuaU0.2
crw-rw---- 1 uucp dialer 0, 125 Jan 27 12:58 cuaU0.2.init
crw-rw---- 1 uucp dialer 0, 126 Jan 27 12:58 cuaU0.2.lock
crw-rw---- 1 uucp dialer 0, 39 Jan 27 12:58 cuau0
crw-rw---- 1 uucp dialer 0, 40 Jan 27 12:58 cuau0.init
crw-rw---- 1 uucp dialer 0, 41 Jan 27 12:58 cuau0.lock
crw-rw---- 1 uucp dialer 0, 45 Jan 27 12:58 cuau1
crw-rw---- 1 uucp dialer 0, 46 Jan 27 12:58 cuau1.init
crw-rw---- 1 uucp dialer 0, 47 Jan 27 12:58 cuau1.lock
crw------- 1 root wheel 0, 17 Jan 27 12:58 dcons
crw------- 1 root wheel 0, 5 Jan 27 12:58 devctl
cr-------- 1 root wheel 0, 82 Jan 27 12:58 devstat
crw------- 1 root wheel 0, 18 Jan 27 12:58 dgdb
dr-xr-xr-x 2 root wheel 512 Jan 27 12:58 fd
crw-r----- 1 root operator 0, 89 Jan 27 12:58 fd0
crw------- 1 root wheel 0, 19 Jan 27 12:58 fido
crw-r----- 1 root operator 0, 3 Jan 27 12:58 geom.ctl
crw------- 1 root wheel 0, 28 Jan 27 12:58 io
lrwxr-xr-x 1 root wheel 6 Jan 27 12:58 kbd0 -> atkbd0
lrwxr-xr-x 1 root wheel 7 Jan 27 12:58 kbd1 -> kbdmux0
crw------- 1 root wheel 0, 29 Jan 27 12:58 kbdmux0
crw------- 1 root wheel 0, 8 Jan 27 12:58 klog
crw-r----- 1 root kmem 0, 32 Jan 27 12:58 kmem
lrwxr-xr-x 1 root wheel 12 Jan 27 12:58 log -> /var/run/log
crw------- 1 root wheel 0, 48 Jan 27 12:58 lpt0
crw------- 1 root wheel 0, 49 Jan 27 12:58 lpt0.ctl
crw------- 1 root wheel 0, 71 Jan 27 12:58 mdctl
crw-r----- 1 root kmem 0, 31 Jan 27 12:58 mem
crw------- 1 root kmem 0, 20 Jan 27 12:58 nfslock
crw-rw-rw- 1 root wheel 0, 6 Jan 27 13:00 null
crw-r--r-- 1 root wheel 0, 9 Jan 27 12:58 pci
crw------- 1 root wheel 0, 50 Jan 27 12:58 ppi0
crw-rw-rw- 1 root wheel 0, 10 Jan 27 12:58 ptmx
dr-xr-xr-x 2 root wheel 512 Jan 27 13:00 pts
crw-rw-rw- 1 root wheel 0, 12 Jan 27 12:58 random
lrwxr-xr-x 1 root wheel 4 Jan 27 12:58 stderr -> fd/2
lrwxr-xr-x 1 root wheel 4 Jan 27 12:58 stdin -> fd/0
lrwxr-xr-x 1 root wheel 4 Jan 27 12:58 stdout -> fd/1
crw------- 1 root wheel 0, 16 Jan 27 12:58 sysmouse
crw------- 1 root wheel 0, 109 Jan 27 12:58 ttyU0.0
crw------- 1 root wheel 0, 110 Jan 27 12:58 ttyU0.0.init
crw------- 1 root wheel 0, 111 Jan 27 12:58 ttyU0.0.lock
crw------- 1 root wheel 0, 115 Jan 27 12:58 ttyU0.1
crw------- 1 root wheel 0, 116 Jan 27 12:58 ttyU0.1.init
crw------- 1 root wheel 0, 117 Jan 27 12:58 ttyU0.1.lock
crw------- 1 root wheel 0, 121 Jan 27 12:58 ttyU0.2
crw------- 1 root wheel 0, 122 Jan 27 12:58 ttyU0.2.init
crw------- 1 root wheel 0, 123 Jan 27 12:58 ttyU0.2.lock
crw------- 1 root wheel 0, 36 Jan 27 12:58 ttyu0
crw------- 1 root wheel 0, 37 Jan 27 12:58 ttyu0.init
crw------- 1 root wheel 0, 38 Jan 27 12:58 ttyu0.lock
crw------- 1 root wheel 0, 42 Jan 27 12:58 ttyu1
crw------- 1 root wheel 0, 43 Jan 27 12:58 ttyu1.init
crw------- 1 root wheel 0, 44 Jan 27 12:58 ttyu1.lock
crw------- 1 root wheel 0, 51 Jan 27 12:59 ttyv0
crw------- 1 root wheel 0, 52 Jan 27 12:59 ttyv1
crw------- 1 root wheel 0, 53 Jan 27 12:59 ttyv2
crw------- 1 root wheel 0, 54 Jan 27 12:59 ttyv3
crw------- 1 root wheel 0, 55 Jan 27 12:59 ttyv4
crw------- 1 root wheel 0, 56 Jan 27 12:59 ttyv5
crw------- 1 root wheel 0, 57 Jan 27 12:59 ttyv6
crw------- 1 root wheel 0, 58 Jan 27 12:59 ttyv7
crw------- 1 root wheel 0, 59 Jan 27 12:58 ttyv8
crw------- 1 root wheel 0, 60 Jan 27 12:58 ttyv9
crw------- 1 root wheel 0, 61 Jan 27 12:58 ttyva
crw------- 1 root wheel 0, 62 Jan 27 12:58 ttyvb
crw------- 1 root wheel 0, 63 Jan 27 12:58 ttyvc
crw------- 1 root wheel 0, 64 Jan 27 12:58 ttyvd
crw------- 1 root wheel 0, 65 Jan 27 12:58 ttyve
crw------- 1 root wheel 0, 66 Jan 27 12:58 ttyvf
dr-xr-xr-x 2 root wheel 512 Jan 27 12:58 ufsid
lrwxr-xr-x 1 root wheel 9 Jan 27 12:58 ugen0.1 -> usb/0.1.0
lrwxr-xr-x 1 root wheel 9 Jan 27 12:58 ugen1.1 -> usb/1.1.0
lrwxr-xr-x 1 root wheel 9 Jan 27 12:58 ugen2.1 -> usb/2.1.0
lrwxr-xr-x 1 root wheel 9 Jan 27 12:58 ugen3.1 -> usb/3.1.0
lrwxr-xr-x 1 root wheel 9 Jan 27 12:58 ugen3.2 -> usb/3.2.0
lrwxr-xr-x 1 root wheel 9 Jan 27 12:58 ugen4.1 -> usb/4.1.0
lrwxr-xr-x 1 root wheel 6 Jan 27 12:58 urandom -> random
dr-xr-xr-x 2 root wheel 512 Jan 27 12:58 usb
crw-r--r-- 1 root operator 0, 70 Jan 27 12:58 usbctl
crw------- 1 root operator 0, 88 Jan 27 12:58 xpt0
crw-rw-rw- 1 root wheel 0, 7 Jan 27 12:58 zero
total 5
dr-xr-xr-x 6 root wheel 512 Jan 28 17:17 .
drwxr-xr-x 21 root wheel 512 Jan 28 17:16 ..
crw-r----- 1 root operator 0, 90 Jan 28 17:17 acd0
crw-r----- 1 root operator 0, 91 Jan 28 17:17 acd1
crw-r--r-- 1 root wheel 0, 34 Jan 28 17:17 acpi
crw-r----- 1 root operator 0, 92 Jan 28 17:17 ad2
crw-r----- 1 root operator 0, 93 Jan 28 17:17 ad2s1
crw-r----- 1 root operator 0, 94 Jan 28 17:17 ad2s1a
crw-r----- 1 root operator 0, 95 Jan 28 17:17 ad2s1b
crw-r----- 1 root operator 0, 96 Jan 28 17:17 ad2s1d
crw-r----- 1 root operator 0, 97 Jan 28 17:17 ad2s1e
crw-r----- 1 root operator 0, 98 Jan 28 17:17 ad2s1f
crw------- 1 root wheel 0, 35 Jan 28 17:17 agpgart
crw------- 1 root operator 0, 33 Jan 28 17:17 ata
crw------- 1 root wheel 0, 68 Jan 28 17:17 atkbd0
crw------- 1 root kmem 0, 21 Jan 28 17:17 audit
crw------- 1 root wheel 0, 14 Jan 28 17:17 bpf
lrwxr-xr-x 1 root wheel 3 Jan 28 17:17 bpf0 -> bpf
crw------- 1 root wheel 0, 4 Jan 28 17:29 console
crw------- 1 root wheel 0, 67 Jan 28 17:17 consolectl
crw-rw-rw- 1 root wheel 0, 11 Jan 28 17:17 ctty
crw-rw---- 1 uucp dialer 0, 39 Jan 28 17:17 cuau0
crw-rw---- 1 uucp dialer 0, 40 Jan 28 17:17 cuau0.init
crw-rw---- 1 uucp dialer 0, 41 Jan 28 17:17 cuau0.lock
crw-rw---- 1 uucp dialer 0, 45 Jan 28 17:17 cuau1
crw-rw---- 1 uucp dialer 0, 46 Jan 28 17:17 cuau1.init
crw-rw---- 1 uucp dialer 0, 47 Jan 28 17:17 cuau1.lock
crw------- 1 root wheel 0, 17 Jan 28 17:17 dcons
crw------- 1 root wheel 0, 5 Jan 28 17:17 devctl
cr-------- 1 root wheel 0, 72 Jan 28 17:17 devstat
crw------- 1 root wheel 0, 18 Jan 28 17:17 dgdb
dr-xr-xr-x 2 root wheel 512 Jan 28 17:17 fd
crw-r----- 1 root operator 0, 89 Jan 28 17:17 fd0
crw------- 1 root wheel 0, 19 Jan 28 17:17 fido
crw-r----- 1 root operator 0, 3 Jan 28 17:17 geom.ctl
crw------- 1 root wheel 0, 28 Jan 28 17:17 io
lrwxr-xr-x 1 root wheel 6 Jan 28 17:17 kbd0 -> atkbd0
lrwxr-xr-x 1 root wheel 7 Jan 28 17:17 kbd1 -> kbdmux0
crw------- 1 root wheel 0, 29 Jan 28 17:17 kbdmux0
crw------- 1 root wheel 0, 8 Jan 28 17:17 klog
crw-r----- 1 root kmem 0, 32 Jan 28 17:17 kmem
lrwxr-xr-x 1 root wheel 12 Jan 28 17:18 log -> /var/run/log
crw------- 1 root wheel 0, 48 Jan 28 17:17 lpt0
crw------- 1 root wheel 0, 49 Jan 28 17:17 lpt0.ctl
crw------- 1 root wheel 0, 71 Jan 28 17:17 mdctl
crw-r----- 1 root kmem 0, 31 Jan 28 17:17 mem
crw------- 1 root kmem 0, 20 Jan 28 17:17 nfslock
crw-rw-rw- 1 root wheel 0, 6 Jan 28 17:29 null
crw-r--r-- 1 root wheel 0, 9 Jan 28 17:17 pci
crw------- 1 root wheel 0, 50 Jan 28 17:17 ppi0
crw-rw-rw- 1 root wheel 0, 10 Jan 28 17:17 ptmx
dr-xr-xr-x 2 root wheel 512 Jan 28 17:18 pts
crw-rw-rw- 1 root wheel 0, 12 Jan 28 17:18 random
lrwxr-xr-x 1 root wheel 4 Jan 28 17:17 stderr -> fd/2
lrwxr-xr-x 1 root wheel 4 Jan 28 17:17 stdin -> fd/0
lrwxr-xr-x 1 root wheel 4 Jan 28 17:17 stdout -> fd/1
crw------- 1 root wheel 0, 16 Jan 28 17:17 sysmouse
crw------- 1 root wheel 0, 36 Jan 28 17:17 ttyu0
crw------- 1 root wheel 0, 37 Jan 28 17:17 ttyu0.init
crw------- 1 root wheel 0, 38 Jan 28 17:17 ttyu0.lock
crw------- 1 root wheel 0, 42 Jan 28 17:17 ttyu1
crw------- 1 root wheel 0, 43 Jan 28 17:17 ttyu1.init
crw------- 1 root wheel 0, 44 Jan 28 17:17 ttyu1.lock
crw------- 1 root wheel 0, 51 Jan 28 17:18 ttyv0
crw------- 1 root wheel 0, 52 Jan 28 17:18 ttyv1
crw------- 1 root wheel 0, 53 Jan 28 17:18 ttyv2
crw------- 1 root wheel 0, 54 Jan 28 17:18 ttyv3
crw------- 1 root wheel 0, 55 Jan 28 17:18 ttyv4
crw------- 1 root wheel 0, 56 Jan 28 17:18 ttyv5
crw------- 1 root wheel 0, 57 Jan 28 17:18 ttyv6
crw------- 1 root wheel 0, 58 Jan 28 17:18 ttyv7
crw------- 1 root wheel 0, 59 Jan 28 17:17 ttyv8
crw------- 1 root wheel 0, 60 Jan 28 17:17 ttyv9
crw------- 1 root wheel 0, 61 Jan 28 17:17 ttyva
crw------- 1 root wheel 0, 62 Jan 28 17:17 ttyvb
crw------- 1 root wheel 0, 63 Jan 28 17:17 ttyvc
crw------- 1 root wheel 0, 64 Jan 28 17:17 ttyvd
crw------- 1 root wheel 0, 65 Jan 28 17:17 ttyve
crw------- 1 root wheel 0, 66 Jan 28 17:17 ttyvf
dr-xr-xr-x 2 root wheel 512 Jan 28 17:17 ufsid
lrwxr-xr-x 1 root wheel 9 Jan 28 17:17 ugen0.1 -> usb/0.1.0
lrwxr-xr-x 1 root wheel 9 Jan 28 17:17 ugen1.1 -> usb/1.1.0
lrwxr-xr-x 1 root wheel 9 Jan 28 17:17 ugen2.1 -> usb/2.1.0
lrwxr-xr-x 1 root wheel 9 Jan 28 17:17 ugen3.1 -> usb/3.1.0
lrwxr-xr-x 1 root wheel 9 Jan 28 17:17 ugen4.1 -> usb/4.1.0
lrwxr-xr-x 1 root wheel 6 Jan 28 17:17 urandom -> random
dr-xr-xr-x 2 root wheel 512 Jan 28 17:17 usb
crw-r--r-- 1 root operator 0, 70 Jan 28 17:17 usbctl
crw------- 1 root operator 0, 88 Jan 28 17:17 xpt0
crw-rw-rw- 1 root wheel 0, 7 Jan 28 17:17 zero
- /dev/cuaU0.0
- /dev/cuaU0.1
- /dev/cuaU0.2
kldload /boot/kernel/umodem.ko
Если установлен mpd5, то в /usr/local/etc/mpd5/mpd.conf.Не могу найти найти "mpd5":(
netServer001# cd /usr/local/etc/mpd5/
/usr/local/etc/mpd5/: No such file or directory.
netServer001#
Есть пример настройки MPD5 как сервера. В любом случае, просмотреть процесс установки - можно.
http://muff.kiev.ua/content/mpd-nastroika-sobstvennogo-vpn-servera (http://muff.kiev.ua/content/mpd-nastroika-sobstvennogo-vpn-servera)
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
===> Found saved configuration for ng_ipacct-20061223
=> ng_ipacct-20061223.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/skv/ng_ipacct-20061223.tar.gz
fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/skv/ng_ipacct-20061223.tar.gz: Connection reset by peer
=> Attempting to fetch ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/skv/ng_ipacct-20061223.tar.gz
ng_ipacct-20061223.tar.gz 100% of 24 kB 23 kBps
===> Extracting for ng_ipacct-20061223
=> SHA256 Checksum OK for ng_ipacct-20061223.tar.gz.
===> Patching for ng_ipacct-20061223
===> Applying FreeBSD patches for ng_ipacct-20061223
===> Configuring for ng_ipacct-20061223
===> Building for ng_ipacct-20061223
===> ng_ipacct (all)
"/usr/share/mk/bsd.kmod.mk", line 12: "can't find kernel source tree"
*** Error code 1
Stop in /usr/ports/net-mgmt/ng_ipacct/work/ng_ipacct.
*** Error code 1
Stop in /usr/ports/net-mgmt/ng_ipacct.
*** Error code 1
Stop in /usr/ports/net-mgmt/ng_ipacct.
*** Error code 1
Stop in /usr/ports/net/mpd5.
*** Error code 1
Stop in /usr/ports/net/mpd5.
Options for mpd 5.6
[ ] NG_CAR Use ng_car kernel module from port (< 7.0 only)
[ ] NG_IPACCT Use ng_ipacct kernel module from port
# rm -R /var/db/ports/mpd5
# rm -R /usr/ports/net/mpd5/work
# cd /usr/ports/net/mpd5/ && make install clean && rehash
pppoe_client:
create bundle static B2 ?
set iface route x.x.x.x IP address интерфейса подклченого к сети которой буду раздавать инет
set ipcp ranges 0.0.0.0/0 0.0.0.0/0 ?
create link static L2 pppoe ?
set link action bundle B2 ?
set auth authname login_name_here login мобильный номер Utela
set auth password passwd_here пароль APNa
set link max-redial 0 ?
set iface enable tcpmssfix Исправлять ошибки с определением MSS
set link mtu 1400 Уменьшение размера mtu для избежания фрагментации
set link keep-alive 10 60 ?
set pppoe iface vlan11 У вас поднят VLAN на Сервере (значение в вел но закрил '#')
set pppoe service "" ?
open ?
Вот коллега наваял статью по поводу того, как "подружить" FreeBSD и 3g модем:
http://unix.uz/articles/tuning/78-usb-3g-modem-i-freebsd.html (http://unix.uz/articles/tuning/78-usb-3g-modem-i-freebsd.html)
Starting PPP profile: itcLoading /lib/libalias_cuseeme.so
Loading /lib/libalias_ftp.so
Loading /lib/libalias_irc.so
Loading /lib/libalias_nbt.so
Loading /lib/libalias_pptp.so
Loading /lib/libalias_skinny.so
Loading /lib/libalias_smedia.so
Warning: No default entry found in config file.
itc:
set speed 460800
set ifaddr 0.0.0.0/0 0.0.0.0/0 0.0.0.0/0
ident user-ppp VERSION (built COMPILATIONDATE)
set log PHase Chat LCP IPCP CCP tun command
set device /dev/cuaU0.1
set phone "*99#"
set dial "ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5 "" AT OK-AT-OK ATE1Q0s7=60 OK \dATDT\ TIMEOUT 40 CONNECT
set login
set authname "login"
set authkey "passwd"
add default HISADDR