Subject: q: l2tpd

From: [email-masked]
Date: Tue, 11 Jul 2000 17:28:58 +0300 (EEST)

Hello all,

I'm trying to set up L2TP between linux and RedbackSMS boxes.
Linux box should work as LNS
On linux I set up Spencer's l2tpd with following config:

[global]                        ; Global parameters:
port = 1701                     ; * Bind to port 1701
auth file = /etc/l2tp/l2tp-secrets      ; * Where our challenge secrets are
access control = yes            ; * Refuse connections without IP match

[lns istop]                     ; Our fallthrough LNS definition
exclusive = no                  ; * Only permit one tunnel per host
ip range = 192.168.0.1-192.168.0.20   ; * Allocate from this IP range
no ip range = 192.168.0.3-192.168.0.9 ; * Except these hosts
lac = 10.10.240.2-10.10.240.3   ; * These can connect as LAC's
hidden bit = yes                ; * Use hidden AVP's?
local ip = 10.10.240.1          ; * Our local IP to use
length bit = yes                ; * Use length bit in payload?
require chap = yes              ; * Require CHAP auth. by peer
refuse pap = yes                ; * Refuse PAP authentication
refuse chap = no                ; * Refuse CHAP authentication
refuse authentication = no      ; * Refuse authentication altogether
require authentication = yes    ; * Require peer to authenticate
unix authentication = no        ; * Use /etc/passwd for auth.
name = istop                    ; * Report this as our hostname
ppp debug = yes                 ; * Turn on PPP debugging
call rws = 10                   ; * RWS for call (-1 is valid)
tunnel rws = 4                  ; * RWS for tunnel (must be > 0)
flow bit = yes                  ; * Include sequence numbers
challenge = no 

When I run l2tpd with debug and connect to Redback with PPPoE,
I have the following on my end of L2TP

network_thread: recv packet from 10.10.240.2, size = 172,
tunnel = 0, call = 0
packet dump: 
HEX: { 02 C8 AC 00 00 00 00 00 00 00 00 00 80 08 00 00 00 00 00 01 80 08 00 00 00 02 01 00 80 0A 00 00 00 03 00 00 00 01 80 0A 00 00 00 04 00 00 00 00 00 08 00 00 00 06 01 00 80 0E 00 00 00 07 6E 65 78 78 69 61 32 30 00 16 00 00 00 08 52 65 64 42 61 63 6B 20 4E 65 74 77 6F 72 6B 73 80 08 00 00 00 09 00 9B 80 08 00 00 00 0A 00 0A 00 0E 00 00 00 05 00 00 00 00 D4 8F 01 20 80 32 00 00 00 0B 65 3A 6E FC 54 E3 CD 52 28 EB EE 2B F3 25 5D 90 65 2E 51 CF F8 35 1B FC 1D 5D 48 24 8F 11 FD F4 4C EC 72 A0 D0 BF 72 F8 AB E0 A3 9F }
ASCII: {                                                               nexxia20      RedBack Networks                               2    e:n T  R(  + %] e.Q  5   ]H$    L r   r     }
get_call: allocating new tunnel for host 10.10.240.2, port 1701.
check_control: control, cid = 0, Ns = 0, Nr = 0
handle_avps: handling avp's for tunnel 17767, call 0
message_type_avp: message type 1 (Start-Control-Connection-Request)
protocol_version_avp: peer is using version 1, revision 0.
framing_caps_avp: supported peer frames: sync
: supported peer bearers:
─
firmware_rev_avp: peer reports firmware version 256 (0x0100)
hostname_avp: peer reports hostname 'nexxia20'
vendor_avp: peer reports vendor 'RedBack Networks'
assigned_tunnel_avp: using peer's tunnel 155
receive_window_size_avp: peer wants RWS of 10.  Will use flow control.
handle_avps:  no handler for atribute 5 (Tie Breaker).
challenge_avp: challenge avp found
control_finish: message type is Start-Control-Connection-Request(1).  Tunnel is 155, call is 0.
get_lns: Rule 10.10.240.2 to 10.10.240.2, sense allow matched 10.10.240.2
packet dump:
HEX: { C8 02 00 9C 00 9B 00 00 00 00 00 01 80 08 00 00 00 00 00 02 80 16 00 00 00 24 73 48 33 66 51 DC B0 74 FF 5C 49 19 4A 94 E8 2A 80 08 00 00 00 02 01 00 80 0A 00 00 00 03 00 00 00 03 80 0A 00 00 00 04 00 00 00 00 00 08 00 00 00 06 05 00 80 15 00 00 00 07 69 70 32 35 32 2E 69 73 74 6F 70 2E 63 6F 6D 00 13 00 00 00 08 41 64 74 72 61 6E 2C 20 6C 32 74 70 64 80 08 00 00 00 09 45 67 80 08 00 00 00 0A 00 04 80 16 00 00 00 0D 46 99 6E BA 85 FC 2A A9 A2 3A CA 37 30 B7 26 C1 }
ASCII: {                          $sH3fQ  t \I J  *                                          ip252.istop.com      Adtran, l2tpd      Eg              F n   *  : 70 & }
control_finish: sending SCCRP
network_thread: recv packet from 10.10.240.2, size = 20,
tunnel = 17767, call = 0
packet dump: 
HEX: { 02 C8 14 00 67 45 00 00 01 00 01 00 80 08 00 00 00 00 00 03 }
ASCII: {     gE              }
check_control: control, cid = 0, Ns = 1, Nr = 1
handle_avps: handling avp's for tunnel 17767, call 0
message_type_avp: message type 3 (Start-Control-Connection-Connected)
control_finish: message type is Start-Control-Connection-Connected(3).  Tunnel is 155, call is 0.
control_finish: Connection established to 10.10.240.2, 1701.  Local: 17767, Remote: 155.  LNS session is 'istop'
control_finish: scheduling initial HELLO on 17767
control_zlb: sending control ZLB on tunnel 155
network_thread: recv packet from 10.10.240.2, size = 58,
tunnel = 17767, call = 0
packet dump:
HEX: { 02 C8 3A 00 67 45 00 00 02 00 01 00 80 08 00 00 00 00 00 0A 80 08 00 00 00 0E 00 AC 80 0A 00 00 00 0F 00 00 E2 E1 80 0A 00 00 00 12 00 00 00 01 80 0A 00 00 00 19 07 00 07 AC }
ASCII: {   : gE                                                    }
check_control: control, cid = 0, Ns = 2, Nr = 1
handle_avps: handling avp's for tunnel 17767, call 0
message_type_avp: message type 10 (Incoming-Call-Request)
message_type_avp: new incoming call
assigned_call_avp: using peer's call 172
call_serno_avp: serial number is 58081
bearer_type_avp: peer bears:digital
call_physchan_avp: physical channel is 117442476
control_finish: message type is Incoming-Call-Request(10).  Tunnel is 155, call is 0.
encrypt_avp: The digest to be XOR'ed
bufferDump: buflen=16, buffer[0]: *334b6e33e41bdb1c3b97307dd1280181*
encrypt_avp: The plaintext to be XOR'ed
bufferDump: buflen=16, buffer[0]: *000258ec000000000000000000000000*
encrypt_avp: The result of XOR
bufferDump: buflen=16, buffer[0]: *334936dfe41bdb1c3b97307dd1280181*
packet dump: 
HEX: { C8 02 00 48 00 9B 00 AC 00 01 00 03 80 08 00 00 00 00 00 0B 80 16 00 00 00 24 29 1F 8E 23 CD 7C E8 46 BA 58 1B 3D AB D7 7E 50 C0 16 00 00 00 0E 33 49 36 DF E4 1B DB 1C 3B 97 30 7D D1 28 01 81 80 08 00 00 00 0A 00 0A }
ASCII: {    H                     $)  # | F X =  ~P      3I6     ; 0} (          }
control_finish: Sending ICRP
control_zlb: sending control ZLB on tunnel 155
network_thread: recv packet from 10.10.240.2, size = 185,
tunnel = 17767, call = 50508
packet dump:
HEX: { 02 C8 B9 00 67 45 4C C5 03 00 02 00 80 08 00 00 00 00 00 0C 00 16 00 00 00 1A 02 06 00 00 00 00 00 00 00 00 05 06 00 00 F8 BA 00 14 00 00 00 1B 01 04 05 D4 03 04 C0 23 05 06 04 1B DE E3 00 10 00 00 00 1C 01 04 05 D4 05 06 00 00 F8 BA 00 08 00 00 00 1D 00 03 00 08 00 00 00 20 00 01 80 25 00 00 00 24 23 64 42 3F 4F 84 ED 15 3E 8D EF 2E D8 3B 29 F9 16 A4 D4 8B 8E 51 59 3A 70 EE 17 89 FC FD 5D 40 1C 00 00 00 1E 77 31 C1 90 3A 39 D1 A7 01 8B 01 D9 49 E6 B8 F1 58 ED 93 2C B3 D4 80 06 00 00 00 21 80 0A 00 00 00 13 00 00 00 01 80 0A 00 00 00 18 00 00 4B 00 }
ASCII: {     gEL                                                #                                       %   $#dB?O   >  . ;)      QY:p     ]@     w1  :9      I   X  ,       !                  K }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
check_control: control, cid = 50508, Ns = 3, Nr = 2
control_zlb: sending control ZLB on tunnel 155
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 27 00 67 45 4C C5 00 00 00 00 FF 03 C0 23 01 02 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump:
HEX: { 02 48 27 00 67 45 4C C5 01 00 00 00 FF 03 C0 23 01 03 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 27 00 67 45 4C C5 02 00 00 00 FF 03 C0 23 01 04 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 27 00 67 45 4C C5 03 00 00 00 FF 03 C0 23 01 05 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump:
HEX: { 02 48 27 00 67 45 4C C5 04 00 00 00 FF 03 C0 23 01 06 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 27 00 67 45 4C C5 05 00 00 00 FF 03 C0 23 01 07 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 24,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 18 00 67 45 4C C5 06 00 00 00 FF 03 C0 21 09 01 00 08 00 00 F8 BA }
ASCII: {  H  gEL        !        }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump:
HEX: { 02 48 27 00 67 45 4C C5 07 00 00 00 FF 03 C0 23 01 08 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 27 00 67 45 4C C5 08 00 00 00 FF 03 C0 23 01 09 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 39,
tunnel = 17767, call = 50508
packet dump: 
HEX: { 02 48 27 00 67 45 4C C5 09 00 00 00 FF 03 C0 23 01 0A 00 17 11 73 74 61 74 69 70 31 40 69 73 74 6F 70 2E 63 6F 6D 00 }
ASCII: {  H' gEL        #     [email-masked] }
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
network_thread: recv packet from 10.10.240.2, size = 60,
tunnel = 17767, call = 50508
packet dump:
HEX: { 02 48 3C 00 67 45 4C C5 0A 00 00 00 FF 03 C0 21 05 03 00 2C 46 61 69 6C 65 64 20 74 6F 20 61 75 74 68 65 6E 74 69 63 61 74 65 20 6F 75 72 73 65 6C 76 65 73 20 74 6F 20 70 65 65 72 }
ASCII: {  H< gEL        !   ,Failed to authenticate ourselves to peer}
get_call: can't find call 50508 in tunnel 17767
DEBUG: tunnel=17767, tunnels.head=134622816, st->ourtid=17767, sc=st->call_head: 0
network_thread: no such call 1073783288 on tunnel 134517196.  Sending special ZLB
packet dump: 
HEX: { C8 02 00 14 00 9B 00 00 00 02 00 04 80 08 00 00 00 00 00 06 }
ASCII: {                     }
hello: sending Hello on 17767
hello: scheduling another Hello on 17767
Segmentation fault (core dumped)

So seems to tunnel established, Redback translate ppp auth request,
but l2tpd does not call pppd..