подключение pppoe_client mpd5

Простые/общие вопросы по UNIX системам. Спросите здесь, если вы новичок

Модераторы: vadim64, terminus

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
v4v4n
проходил мимо
Сообщения: 4
Зарегистрирован: 2011-10-06 14:56:29

подключение pppoe_client mpd5

Непрочитанное сообщение v4v4n » 2011-10-06 20:06:54

Не могу подключить шлюз FreeBSD 8.2 к провайдеру по pppoe. Не могу понять чего не хватает.

Код: Выделить всё

%ifconfig
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE>
	ether 00:04:23:c1:60:d9
	inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
	ether 00:04:23:c1:60:d8
	media: Ethernet autoselect
	status: no carrier
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=80008<VLAN_MTU,LINKSTATE>
	ether 00:80:ad:84:52:c1
	inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 1460
	inet 111.11.111.11 --> 22.222.22.2 netmask 0xffffffff 
%netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.1.2        UGS        22       70   msk0
22.222.22.2        link#6             UH          0        0    ng0
127.0.0.1          link#5             UH          0        0    lo0
111.11.111.11      link#6             UHS         0        0    lo0
192.168.0.0/24     link#3             U           0        0    dc0
192.168.0.2        link#3             UHS         0        0    lo0
192.168.1.0/24     link#1             U           3     1274   msk0
192.168.1.200      link#1             UHS         0        0    lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::1                               ::1                           UH          lo0
fe80::%lo0/64                     link#5                        U           lo0
fe80::1%lo0                       link#5                        UHS         lo0
ff01:5::/32                       fe80::1%lo0                   U           lo0
ff02::%lo0/32                     fe80::1%lo0                   U           lo0

Код: Выделить всё

%ping 22.222.22.2
PING 22.222.22.2 (22.222.22.2): 56 data bytes
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
^C
--- 22.222.22.2 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
%cat /etc/rc.conf | grep firewall_type
firewall_type="open"
%
/usr/local/etc/mpd5/mpd.conf

Код: Выделить всё

pppoe_client: 
 
 create bundle static B1 
 set iface route default 
 set ipcp ranges 0.0.0.0/0 0.0.0.0/0 
 
 create link static L1 pppoe 
 set link action bundle B1 
 set auth authname MyLogin 
 set auth password MyPassword 
 set link max-redial 0 
 set link mtu 1460 
 set link keep-alive 10 60 
 set pppoe iface dc0 
 set pppoe service "" 
 open 
 
/var/log/mpd.log

Код: Выделить всё

Oct 6 20:56:44 kgate mpd: Multi-link PPP daemon for FreeBSD 
Oct 6 20:56:44 kgate mpd: 
Oct 6 20:56:44 kgate mpd: process 1038 started, version 5.5 (root@kgate.aaaa 21:23 5-Oct-2011) 
Oct 6 20:56:45 kgate mpd: CONSOLE: listening on 127.0.0.1 5005 
Oct 6 20:56:45 kgate mpd: [B1] Bundle: Interface ng0 created 
Oct 6 20:56:45 kgate mpd: [L1] Link: OPEN event 
Oct 6 20:56:45 kgate mpd: [L1] LCP: Open event 
Oct 6 20:56:45 kgate mpd: [L1] LCP: state change Initial --> Starting 
Oct 6 20:56:45 kgate mpd: [L1] LCP: LayerStart 
Oct 6 20:56:45 kgate mpd: [L1] PPPoE: Connecting to '' 
Oct 6 20:56:45 kgate mpd: PPPoE: rec'd ACNAME "72-TUMEN-BB01-BRAS-3" 
Oct 6 20:56:45 kgate mpd: [L1] PPPoE: connection successful 
Oct 6 20:56:45 kgate mpd: [L1] Link: UP event 
Oct 6 20:56:45 kgate mpd: [L1] LCP: Up event 
Oct 6 20:56:45 kgate mpd: [L1] LCP: state change Starting --> Req-Sent 
Oct 6 20:56:45 kgate mpd: [L1] LCP: SendConfigReq #1 
Oct 6 20:56:45 kgate mpd: [L1] PROTOCOMP 
Oct 6 20:56:45 kgate mpd: [L1] MRU 1492 
Oct 6 20:56:45 kgate mpd: [L1] MAGICNUM f6f4c500 
Oct 6 20:56:45 kgate mpd: [L1] LCP: rec'd Configure Request #1 (Req-Sent) 
Oct 6 20:56:45 kgate mpd: [L1] MRU 1460 
Oct 6 20:56:45 kgate mpd: [L1] AUTHPROTO CHAP MD5 
Oct 6 20:56:45 kgate mpd: [L1] MAGICNUM 1e46f8c0 
Oct 6 20:56:45 kgate mpd: [L1] LCP: SendConfigAck #1 
Oct 6 20:56:45 kgate mpd: [L1] MRU 1460 
Oct 6 20:56:45 kgate mpd: [L1] AUTHPROTO CHAP MD5 
Oct 6 20:56:45 kgate mpd: [L1] MAGICNUM 1e46f8c0 
Oct 6 20:56:45 kgate mpd: [L1] LCP: state change Req-Sent --> Ack-Sent 
Oct 6 20:56:45 kgate mpd: [L1] LCP: rec'd Configure Ack #1 (Ack-Sent) 
Oct 6 20:56:45 kgate mpd: [L1] PROTOCOMP 
Oct 6 20:56:45 kgate mpd: [L1] MRU 1492 
Oct 6 20:56:45 kgate mpd: [L1] MAGICNUM f6f4c500 
Oct 6 20:56:45 kgate mpd: [L1] LCP: state change Ack-Sent --> Opened 
Oct 6 20:56:45 kgate mpd: [L1] LCP: auth: peer wants CHAP, I want nothing 
Oct 6 20:56:45 kgate mpd: [L1] LCP: LayerUp 
Oct 6 20:56:45 kgate mpd: [L1] CHAP: rec'd CHALLENGE #1 len: 41 
Oct 6 20:56:45 kgate mpd: [L1] Name: "72-TUMEN-BB01-BRAS-3" 
Oct 6 20:56:45 kgate mpd: [L1] CHAP: Using authname "Mylogin" 
Oct 6 20:56:45 kgate mpd: [L1] CHAP: sending RESPONSE #1 len: 32 
Oct 6 20:56:45 kgate mpd: [L1] CHAP: rec'd SUCCESS #1 len: 4 
Oct 6 20:56:45 kgate mpd: [L1] LCP: authorization successful 
Oct 6 20:56:45 kgate mpd: [L1] Link: Matched action 'bundle "B1" ""' 
Oct 6 20:56:45 kgate mpd: [L1] Link: Join bundle "B1" 
Oct 6 20:56:45 kgate mpd: [B1] Bundle: Status update: up 1 link, total bandwidth 64000 bps 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: Open event 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: state change Initial --> Starting 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: LayerStart 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: Up event 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: state change Starting --> Req-Sent 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: SendConfigReq #1 
Oct 6 20:56:45 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:45 kgate mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: rec'd Configure Reject #1 (Req-Sent) 
Oct 6 20:56:45 kgate mpd: [B1] COMPPROTO VJCOMP, 16 comp. channels, no comp-cid 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: SendConfigReq #2 
Oct 6 20:56:45 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: rec'd Configure Ack #2 (Req-Sent) 
Oct 6 20:56:45 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:45 kgate mpd: [B1] IPCP: state change Req-Sent --> Ack-Rcvd 
Oct 6 20:56:47 kgate mpd: [B1] IPCP: state change Ack-Rcvd --> Req-Sent 
Oct 6 20:56:47 kgate mpd: [B1] IPCP: SendConfigReq #3 
Oct 6 20:56:47 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:47 kgate mpd: [B1] IPCP: rec'd Configure Ack #3 (Req-Sent) 
Oct 6 20:56:47 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:47 kgate mpd: [B1] IPCP: state change Req-Sent --> Ack-Rcvd 
Oct 6 20:56:49 kgate mpd: [B1] IPCP: state change Ack-Rcvd --> Req-Sent 
Oct 6 20:56:49 kgate mpd: [B1] IPCP: SendConfigReq #4 
Oct 6 20:56:49 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:49 kgate mpd: [B1] IPCP: rec'd Configure Ack #4 (Req-Sent) 
Oct 6 20:56:49 kgate mpd: [B1] IPADDR 111.11.111.11 
Oct 6 20:56:49 kgate mpd: [B1] IPCP: state change Req-Sent --> Ack-Rcvd 
Oct 6 20:56:50 kgate mpd: [B1] IPCP: rec'd Configure Request #2 (Ack-Rcvd) 
Oct 6 20:56:50 kgate mpd: [B1] IPADDR 22.222.22.2 
Oct 6 20:56:50 kgate mpd: [B1] 22.222.22.2 is OK 
Oct 6 20:56:50 kgate mpd: [B1] IPCP: SendConfigAck #2 
Oct 6 20:56:50 kgate mpd: [B1] IPADDR 22.222.22.2 
Oct 6 20:56:50 kgate mpd: [B1] IPCP: state change Ack-Rcvd --> Opened 
Oct 6 20:56:50 kgate mpd: [B1] IPCP: LayerUp 
Oct 6 20:56:50 kgate mpd: [B1] 111.11.111.11 -> 22.222.22.2 
Oct 6 20:56:50 kgate mpd: [B1] IFACE: Add route 0.0.0.0/0 22.222.22.2 failed: File exists 
Oct 6 20:56:50 kgate mpd: [B1] IFACE: Up event 

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

v4v4n
проходил мимо
Сообщения: 4
Зарегистрирован: 2011-10-06 14:56:29

Re: подключение pppoe_client mpd5

Непрочитанное сообщение v4v4n » 2011-10-06 20:13:22

Аналогично не могу pppd. Под windows же всё подключается.

/etc/ppp/ppp.conf

Код: Выделить всё

default: 
 set log Phase tun command 
 disable ipv6cp 
 enable lqr 
 set lqrperiod 5 
 
prov: 
 set device PPPoE:dc0 
 set authname MyLogin
 set authkey MyPassword 
 set dial 
 set login 
 set redial 0 0 
 set timeout 0 
 set reconnect 3 30000 
 set ifaddr 0 0 
 add default HISADDR # Add a (sticky) default route 
/var/log/ppp.log

Код: Выделить всё

Oct 6 21:21:59 kgate ppp[498]: tun0: Phase: Received NGM_PPPOE_ACNAME (hook "72-TUMEN-BB01-BRAS-3") 
Oct 6 21:21:59 kgate ppp[498]: tun0: Phase: Received NGM_PPPOE_SESSIONID 
Oct 6 21:21:59 kgate ppp[498]: tun0: Phase: Received NGM_PPPOE_SUCCESS 
Oct 6 21:21:59 kgate ppp[498]: tun0: Phase: deflink: carrier -> lcp 
Oct 6 21:22:00 kgate ppp[498]: tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: bundle: Authenticate 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: deflink: his = CHAP 0x05, mine = none 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: Chap Input: CHALLENGE (16 bytes from 72-TUMEN-BB01-BRAS-3) 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: Chap Output: RESPONSE (Mylogin) 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: Chap Input: SUCCESS 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: deflink: lcp -> open 
Oct 6 21:22:00 kgate ppp[498]: tun0: Phase: bundle: Network 
Oct 6 21:22:00 kgate ppp[498]: tun0: Warning: 0.0.0.0: Change route failed: errno: No such process 

Аватара пользователя
hedgehog
сержант
Сообщения: 220
Зарегистрирован: 2010-01-26 11:47:05
Откуда: Kharkiv, Ukraine
Контактная информация:

Re: подключение pppoe_client mpd5

Непрочитанное сообщение hedgehog » 2011-10-06 20:18:13

Oct 6 20:56:50 kgate mpd: [B1] IFACE: Add route 0.0.0.0/0 22.222.22.2 failed: File exists
во-первых, мпд не может изменить шлюз по умолчанию, так как уже дефолтный маршрут уже имеется. либо удаляйте перед запуском (вручную или up/down скриптами), либо оптимизируйте таблицу маршрутов. если шлюз 192.168.1.2 - это локалка, так и заверните только локалку через него, а не 0.0.0.0
%ping 22.222.22.2
PING 22.222.22.2 (22.222.22.2): 56 data bytes
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
^C
как вы сами догадались, фаервол блокирует пинг

andrian
проходил мимо
Сообщения: 2
Зарегистрирован: 2011-10-05 16:58:57

Re: подключение pppoe_client mpd5

Непрочитанное сообщение andrian » 2011-10-06 20:25:25

Привет, исходя из твоих настроек у тебя ошибка поднятия pppoe - не тот интерфейс:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.2 UGS 22 70 msk0
а в конфиге написано mpd.conf:
set pppoe iface dc0
--- Поменяй с dc0 на msk0 и перезапустит mpd

v4v4n
проходил мимо
Сообщения: 4
Зарегистрирован: 2011-10-06 14:56:29

Re: подключение pppoe_client mpd5

Непрочитанное сообщение v4v4n » 2011-10-06 20:40:28

:smile: ДА, в точности как вы, hedgehog, сказали. Это firewall.

v4v4n
проходил мимо
Сообщения: 4
Зарегистрирован: 2011-10-06 14:56:29

Re: подключение pppoe_client mpd5

Непрочитанное сообщение v4v4n » 2011-10-06 20:49:35

И в rc.conf defaultrouter="NO"