Re: PPPoE bridge / vlan? setup help needed

From: Ian Smith <smithi_at_nimnet.asn.au>
Date: Tue, 02 May 2023 15:08:27 UTC
On 2 May 2023 11:32:25 am AEST, Gary Aitken <freebsd@dreamchaser.org> wrote:

 > Having trouble setting up a dsl modem as a bridge.
 > ISP info:
 >    Fixed IP
 >    LLC-Based multiplexing
 >    VPI 0
 >    VCI 100
 > 
 > Nowhere in ppp.conf do I see anything about
 > multiplexing mode, vpi, vci, or dsl mode;

Thanks to kristof's message nudging my brain into gear ... also C. 15 years since last setting up dialup or ADSL ppp.

Apart from the IP address, those things are configured on the DSL modem, as is choice between bridge mode or having the modem do PPP itself.

 > searching I found something about setting up a vlan and associating
 > it with the hardware interface, but it's not clear to me how.
 > Handbook Ch 33.11 VLANs shows examples using a single number, the
 > vlan tag.

This has nothing to do with vlans.

 > Otherwise, nothing I've been able to find about setting up PPPoE
 > bridged says anything about vpi/vci.

It's most likely already set 0/100 for your country or region. Here it's 0/35 (IIRC).
Similarly LLC or ... the other one :)

 > pp.conf:
 > 
 > default:
 >   set log Phase tun command
 >   ident user-ppp VERSION
 > 
 > myisp:
 >   set log Phase Chat LCP IPCP CCP Connect DNS tun command
 >   set device PPPoE:xl0
 >   set mtu max 1492
 >   set mru max 1492
 >   disable ipv6cp

Does the ISP offer ipv6?  If so, is this all you have to dl to disable it?

 >   set dial
 >   set login
 >   set timeout 0
 > # set speed 20000000       # is speed needed for PPPoE?

No.  Used if you had a serial link to the modem instead, commonly 115200.

 >   set authname ********
 >   set authkey ********
 >   set ifaddr my.isp.assigned.ip/29 0.0.0.0
 > add! default HISADDR     # Override existing default route with new
 > one

Not sure you need the '!' ?

 > With no vlan set up, I see:
 > Sorry it's long, seems to succeed through SUCCESS but don't know what
 > from the earlier output may be relevant.
 > 
 >       tun0: Phase: Using interface: tun0
 > tun0: Command: myisp: set log Phase Chat LCP IPCP CCP Connect DNS tun
 > comman
 > d
 >       tun0: Command: myisp: set device PPPoE:xl0
 >       tun0: Command: myisp: set redial 3 0
 >       tun0: Command: myisp: set mtu max 1492
 >       tun0: Command: myisp: set mru max 1492
 >       tun0: Command: myisp: disable ipv6cp
 >       tun0: Command: myisp: set dial
 >       tun0: Command: myisp: set login
 >       tun0: Command: myisp: set timeout 0
 >       tun0: Command: myisp: set authname ********
 >       tun0: Command: myisp: set authkey ********
 >       tun0: Command: myisp: set ifaddr my.isp.assigned.ip/29 0.0.0.0
 >       tun0: Command: myisp: add! default HISADDR
 >       tun0: Phase: PPP Started (ddial mode).
 >       tun0: Phase: bundle: Establish
 >       tun0: Phase: deflink: closed -> opening
 >       tun0: Phase: deflink: Connected!
 >       tun0: Phase: deflink: opening -> dial
 >       tun0: Phase: deflink: dial -> carrier
 >       tun0: Phase: Received NGM_PPPOE_ACNAME (hook "MSSLMT-CO-MX480")
 >       tun0: Phase: Received NGM_PPPOE_SESSIONID
 >       tun0: Phase: Received NGM_PPPOE_SUCCESS
 >       tun0: Phase: deflink: carrier -> login

So far so good, looks like.

 >       tun0: Phase: deflink: login -> lcp
 >       tun0: LCP: FSM: Using "deflink" as a transport
 >       tun0: LCP: deflink: State change Initial --> Closed
 >       tun0: LCP: deflink: State change Closed --> Stopped
 >       tun0: LCP: deflink: RecvConfigReq(163) state = Stopped
 >       tun0: LCP:  MRU[4] 1492
 >       tun0: LCP:  AUTHPROTO[4] 0xc023 (PAP)
 >       tun0: LCP:  MAGICNUM[6] 0x3bbf819a
 >     tun0: Warning: deflink: Reducing configured MRU from 1500 to 1492
 >       tun0: LCP: deflink: SendConfigReq(1) state = Stopped
 >       tun0: LCP:  ACFCOMP[2]
 >       tun0: LCP:  PROTOCOMP[2]
 >       tun0: LCP:  ACCMAP[6] 0x00000000
 >       tun0: LCP:  MRU[4] 1492
 >       tun0: LCP:  MAGICNUM[6] 0x3bbf5181
 >       tun0: LCP: deflink: SendConfigAck(163) state = Stopped
 >       tun0: LCP:  MRU[4] 1492
 >       tun0: LCP:  AUTHPROTO[4] 0xc023 (PAP)
 >       tun0: LCP:  MAGICNUM[6] 0x3bbf819a
 >       tun0: LCP: deflink: LayerStart
 >       tun0: LCP: deflink: State change Stopped --> Ack-Sent

I think that's ok ... chatty, ain't it ..

 >       tun0: LCP: deflink: RecvConfigAck(1) state = Ack-Sent
 >       tun0: LCP:  ACFCOMP[2]
 >       tun0: LCP:  PROTOCOMP[2]
 >       tun0: LCP:  ACCMAP[6] 0x00000000
 >       tun0: LCP:  MRU[4] 1492
 >       tun0: LCP:  MAGICNUM[6] 0x3bbf5181
 >       tun0: LCP: deflink: State change Ack-Sent --> Opened
 >       tun0: LCP: deflink: LayerUp
 >       tun0: LCP: deflink: SendIdent(0) state = Opened
 >       tun0: LCP:  MAGICNUM 3bbf5181
 >       tun0: LCP:  TEXT user-ppp 3.4.2
 >       tun0: Phase: bundle: Authenticate
 >       tun0: Phase: deflink: his = PAP, mine = none
 >       tun0: Phase: Pap Output: ******** ********
 >       tun0: Phase: Pap Input: SUCCESS ()

Looks ok, but then starting CCP negotiation (compression control)

 >       tun0: CCP: FSM: Using "deflink" as a transport
 >       tun0: CCP: deflink: State change Initial --> Closed
 >       tun0: CCP: deflink: LayerStart.
 >       tun0: CCP: MPPE: Not usable without CHAP81

This looks maybe ominous.

 >       tun0: CCP: deflink: SendConfigReq(1) state = Closed
 >       tun0: CCP:  DEFLATE[4] win 15
 >       tun0: CCP:  PRED1[2]
 >       tun0: CCP: deflink: State change Closed --> Req-Sent

So you want deflate or pred1 ... but now moving to IPCP (IP Control protocol)

 >       tun0: Phase: deflink: lcp -> open
 >       tun0: Phase: bundle: Network
 >       tun0: IPCP: FSM: Using "deflink" as a transport
 >       tun0: IPCP: deflink: State change Initial --> Closed
 >       tun0: IPCP: deflink: LayerStart.
 >       tun0: IPCP: deflink: SendConfigReq(1) state = Closed
 >       tun0: IPCP:  IPADDR[6] my.isp.assigned.ip
 >       tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
 >       tun0: IPCP: deflink: State change Closed --> Req-Sent
 >       tun0: LCP: deflink: RecvProtocolRej(164) state = Opened
 > ***  tun0: LCP: deflink: -- Protocol 0x80fd (Compression Control
 > Protocol) was reject
 > ed!

Right, so CCP requested mode is wrong. Ask them what they expect / require.

 >       tun0: CCP: deflink: State change Req-Sent --> Stopped
 >       tun0: IPCP: deflink: RecvConfigReq(101) state = Req-Sent
 >       tun0: IPCP:  IPADDR[6] 69.51.80.35
 >       tun0: IPCP: deflink: SendConfigAck(101) state = Req-Sent
 >       tun0: IPCP:  IPADDR[6] 69.51.80.35
 >       tun0: IPCP: deflink: State change Req-Sent --> Ack-Sent

So you've accepted their offered IP address, and acknowledged it.

 >       tun0: IPCP: deflink: RecvConfigRej(1) state = Ack-Sent
 >       tun0: LCP: deflink: SendIdent(1) state = Opened
 >       tun0: LCP:  MAGICNUM 3bbf5181
 >       tun0: LCP:  TEXT user-ppp 3.4.2
 >       tun0: IPCP:  COMPPROTO[6] 16 VJ slots with slot compression
 >       tun0: IPCP: deflink: SendConfigReq(2) state = Ack-Sent
 >       tun0: IPCP:  IPADDR[6] my.isp.assigned.ip
 >       tun0: IPCP: deflink: RecvConfigNak(2) state = Ack-Sent
 >       tun0: IPCP:  IPADDR[6] 66.109.136.47

But they want you to use this 66. address, is that related or similar to the address   
'my.isp.assigned.ip'?  Within your /29?

 > ***  tun0: IPCP: 66.109.136.47: Unacceptable address!

So you reject it.  Maybe if you don't insist on 'my.isp.assigned.ip' it might go - but then they've provided the wrong info. 

At this stage I'd send them the log and ask what's up?

It's all downhill from here ...

 >       tun0: IPCP: deflink: SendTerminateReq(3) state = Ack-Sent
 >       tun0: IPCP: deflink: State change Ack-Sent --> Closing
 >       tun0: IPCP: deflink: RecvTerminateAck(3) state = Closing
 >       tun0: IPCP: deflink: LayerFinish.
 >       tun0: IPCP: Connect time: 0 secs: 0 octets in, 0 octets out
 >       tun0: IPCP: 0 packets in, 0 packets out
 > tun0: IPCP:  total 0 bytes/sec, peak 0 bytes/sec on Mon May  1
 > 18:57:32 2023
 >       tun0: IPCP: deflink: State change Closing --> Closed
 >       tun0: Phase: bundle: Terminate
 >       tun0: CCP: deflink: State change Stopped --> Closed
 >       tun0: CCP: deflink: State change Closed --> Initial
 >       tun0: LCP: deflink: LayerDown
 >       tun0: LCP: deflink: SendTerminateReq(2) state = Opened
 >       tun0: LCP: deflink: State change Opened --> Closing
 >       tun0: Phase: deflink: open -> lcp
 > tun0: Warning: ff02::/: Change route failed: errno: Network is
 > unreachable
 >       tun0: IPCP: deflink: State change Closed --> Initial
 >       tun0: LCP: deflink: RecvTerminateAck(2) state = Closing
 >       tun0: LCP: deflink: LayerFinish
 >       tun0: LCP: deflink: State change Closing --> Closed
 >       tun0: LCP: deflink: State change Closed --> Initial
 >       tun0: Phase: deflink: Disconnected!
 >       tun0: Phase: deflink: lcp -> logout
 >       tun0: Phase: deflink: logout -> hangup
 >       tun0: Phase: deflink: Disconnected!
 > 
 > Any pointers would be much appreciated.
 > Thanks,
 > 
 > Gary

It's been a long time, I may have missed something obvious.

We moved from user ppp to mpd C. '07, and found it better and easier, but that won't help if their setup info is wrong.

cheers, Ian