Проблема с MTU

PPPoE related questions
Post Reply
brodayga
Posts: 94
Joined: 23 Oct 2014, 06:13

Проблема с MTU

Post by brodayga » 03 Apr 2018, 09:40

Добрый день. Последняя версия с гита. При подключении на интерфейсе pppX всегда устанавливается mtu 1500

Code: Select all

ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol
          inet addr:192.168.0.1  P-t-P:192.168.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1327 (1.2 KiB)  TX bytes:84 (84.0 B)

Code: Select all

accel-cmd --version
accel-cmd 10ede239609e41e259be9c38932e33f7dc74bd8a

Лог:
Спойлер
[2018-04-03 12:33:40]: info: eth0: recv [PPPoE PADI 00:c0:26:30:a8:4d => ff:ff:ff:ff:ff:ff sid=0000 <Service-Name > <Host-Uniq 080000000e000000>]
[2018-04-03 12:33:40]: info: eth0: send [PPPoE PADO 00:24:1d:df:ca:d8 => 00:c0:26:30:a8:4d sid=0000 <AC-Name accel-ppp> <Service-Name > <AC-Cookie 4da5f11d909642a7f299b324fc4943f2c7a74e2f343e1e06> <Host-Uniq 080000000e000000>]
[2018-04-03 12:33:40]: info: eth0: recv [PPPoE PADR 00:c0:26:30:a8:4d => 00:24:1d:df:ca:d8 sid=0000 <Service-Name > <Host-Uniq 080000000f000000> <AC-Cookie 4da5f11d909642a7f299b324fc4943f2c7a74e2f343e1e06>]
[2018-04-03 12:33:40]: info: eth0: send [PPPoE PADS 00:24:1d:df:ca:d8 => 00:c0:26:30:a8:4d sid=0001 <AC-Name accel-ppp> <Service-Name > <Host-Uniq 080000000f000000>]
[2018-04-03 12:33:40]: debug: eth0: lcp_layer_init
[2018-04-03 12:33:40]: debug: eth0: auth_layer_init
[2018-04-03 12:33:40]: debug: eth0: ccp_layer_init
[2018-04-03 12:33:40]: debug: eth0: ipcp_layer_init
[2018-04-03 12:33:40]: debug: eth0: ipv6cp_layer_init
[2018-04-03 12:33:40]: debug: eth0: ppp establishing
[2018-04-03 12:33:40]: debug: eth0: lcp_layer_start
[2018-04-03 12:33:40]: info: ppp0: connect: ppp0 <--> pppoe(00:c0:26:30:a8:4d)
[2018-04-03 12:33:40]: debug: ppp0: ppp connected
[2018-04-03 12:33:40]: info: ppp0: send [LCP ConfReq id=1 <mru 1400> <magic 6b8b4567>]
[2018-04-03 12:33:40]: info: ppp0: recv [LCP ConfReq id=0 <mru 1480> <magic 2244022d> < d 3 6 >]
[2018-04-03 12:33:40]: info: ppp0: send [LCP ConfRej id=0 < d 3 6 >]
[2018-04-03 12:33:40]: info: ppp0: recv [LCP ConfAck id=1 <mru 1400> <magic 6b8b4567>]
[2018-04-03 12:33:40]: info: ppp0: recv [LCP ConfReq id=1 <mru 1480> <magic 2244022d>]
[2018-04-03 12:33:40]: info: ppp0: send [LCP ConfAck id=1 ]
[2018-04-03 12:33:40]: debug: ppp0: lcp_layer_started
[2018-04-03 12:33:40]: debug: ppp0: auth_layer_start
[2018-04-03 12:33:40]: debug: ppp0: auth_layer_started
[2018-04-03 12:33:40]: debug: ppp0: ccp_layer_start
[2018-04-03 12:33:40]: debug: ppp0: ipcp_layer_start
[2018-04-03 12:33:40]: info: ppp0: send [IPCP ConfReq id=1 <addr 192.168.0.1>]
[2018-04-03 12:33:40]: debug: ppp0: ipv6cp_layer_start
[2018-04-03 12:33:40]: info: ppp0: recv [LCP Ident id=2 <MSRASV5.10>]
[2018-04-03 12:33:40]: info: ppp0: recv [LCP Ident id=3 <MSRAS-0-CHERDAK>]
[2018-04-03 12:33:40]: info: ppp0: recv [CCP ConfReq id=4 <mppe -H -M -S -L -D +C>]
[2018-04-03 12:33:40]: info: ppp0: send [CCP ConfReq id=1 <mppe -H -M -S -L -D -C>]
[2018-04-03 12:33:40]: info: ppp0: send [CCP ConfNak id=4 <mppe -H -M -S -L -D -C>]
[2018-04-03 12:33:40]: info: ppp0: recv [IPCP ConfReq id=5 <addr 0.0.0.0> <dns1 0.0.0.0> <wins1 0.0.0.0> <dns2 0.0.0.0> <wins2 0.0.0.0>]
[2018-04-03 12:33:40]: info: ppp0: send [IPCP ConfNak id=5 <addr 192.168.0.2>]
[2018-04-03 12:33:40]: info: ppp0: recv [IPCP ConfAck id=1 <addr 192.168.0.1>]
[2018-04-03 12:33:40]: info: ppp0: recv [CCP ConfAck id=1 <mppe -H -M -S -L -D -C>]
[2018-04-03 12:33:40]: info: ppp0: recv [CCP ConfReq id=6 <mppe -H -M -S -L -D -C>]
[2018-04-03 12:33:40]: info: ppp0: send [CCP ConfAck id=6]
[2018-04-03 12:33:40]: debug: ppp0: ccp_layer_started
[2018-04-03 12:33:40]: info: ppp0: recv [IPCP ConfReq id=7 <addr 192.168.0.2> <dns1 0.0.0.0> <wins1 0.0.0.0> <dns2 0.0.0.0> <wins2 0.0.0.0>]
[2018-04-03 12:33:40]: info: ppp0: send [IPCP ConfAck id=7]
[2018-04-03 12:33:40]: debug: ppp0: ipcp_layer_started
[2018-04-03 12:33:40]: debug: ppp0: pppoe: ppp started
Конфиг
Спойлер
[modules]
log_file
pppoe
ippool
[core]
log-error=/var/log/accel-ppp/core.log
thread-count=4
[common]
[ppp]
verbose=5
min-mtu=1280
mtu=1400
mru=1400
ipv4=require
ipv6=deny
lcp-echo-interval=20
lcp-echo-timeout=120
#unit-cache=1
#unit-preallocate=1
[auth]
any-login=1
noauth=1
[pppoe]
verbose=5
called-sid=mac
interface=eth0
[dns]
#dns1=172.16.0.1
#dns2=172.16.1.1
[ip-pool]
gw-ip-address=192.168.0.1
attr=Framed-Pool
192.168.0.2-255
[log]
log-file=/var/log/accel-ppp/accel-ppp.log
log-emerg=/var/log/accel-ppp/emerg.log
log-fail-file=/var/log/accel-ppp/auth-fail.log
copy=1
level=5
[cli]
verbose=1
telnet=127.0.0.1:2000
tcp=127.0.0.1:2001
На старой(очень) версии работает корректно.

dimka88
Posts: 431
Joined: 13 Oct 2014, 05:51
Contact:

Re: Проблема с MTU

Post by dimka88 » 03 Apr 2018, 11:23

brodayga, это баг, всплыл при использовании noauth=1, Владислав написал патчик для решения

Code: Select all

diff --git a/accel-pppd/ppp/ppp_auth.c b/accel-pppd/ppp/ppp_auth.c
index 0eaac35..5924899 100644
--- a/accel-pppd/ppp/ppp_auth.c
+++ b/accel-pppd/ppp/ppp_auth.c
@@ -84,11 +84,8 @@ static struct lcp_option_t *auth_init(struct ppp_lcp_t *lcp)
 
 	INIT_LIST_HEAD(&ad->auth_opt.auth_list);
 
-	if (conf_noauth) {
-		if (connect_ppp_channel(lcp->ppp))
-			return NULL;
+	if (conf_noauth)
 		return &ad->auth_opt.opt;
-	}
 
 	list_for_each_entry(h, &auth_handlers, entry) {
 		d = h->init(lcp->ppp);
@@ -286,6 +283,9 @@ static int auth_layer_start(struct ppp_layer_data_t *ld)
 
 	log_ppp_debug("auth_layer_start\n");
 
+	if (conf_noauth && connect_ppp_channel(ad->ppp))
+		return -1;
+
 	if (ad->auth_opt.auth) {
 		ad->auth_opt.started = 1;
 		ad->auth_opt.auth->h->start(ad->ppp, ad->auth_opt.auth);
думаю скоро Дмитрий добавит его в мастер ветку.

brodayga
Posts: 94
Joined: 23 Oct 2014, 06:13

Re: Проблема с MTU

Post by brodayga » 03 Apr 2018, 13:23

Спасибо так и есть. Патч не нужен будет работать с радиусом.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest