Choosing a concentrator in the network with multiple pppoe concentrators

I’ve faced with problem of choosing the access concentrator in the network with two concentrators available. rp-pppoe package allows to specify this parameter, but in case of pppd and its pppoe plugin I was unable to find corresponding configuration parameter. But thanks to analyzing plugin sources I was able to achieve this. (Long live open source!)

When there are multiple pppoe providers in LAN, pppd connects to the first one which responded to LCP-request by default.

Standard rp-pppoe works perfectly. With help of configuration in /etc/ppp/pppoe.conf you can set different configuration options of the protocol. Option we need is ACNAME. You can find out concentrator name using pppd logs.

Feb 26 14:03:14 weblab pppd[24007]: Send PPPOE Discovery V1T1 PADI session 0x0 length 12
Feb 26 14:03:14 weblab pppd[24007]:  dst ff:ff:ff:ff:ff:ff  src 0:11:a:a2:b4:f5
Feb 26 14:03:14 weblab pppd[24007]:  [service-name] [host-uniq  c7 5d 00 00]
Feb 26 14:03:14 weblab pppd[24007]: Recv PPPOE Discovery V1T1 PADO session 0x0 length 50
Feb 26 14:03:14 weblab pppd[24007]:  dst 0:11:a:a2:b4:f5  src 0:18:e7:ec:b3:bf
Feb 26 14:03:14 weblab pppd[24007]:  [relay-session-id  00 00 00 00 00 15 17 cc 11 1a] [host-uniq  c7 5d 00 00] [service-name] [AC-name pogylyanka] [service-name pym15a]
Feb 26 14:03:14 weblab pppd[24007]: Recv PPPOE Discovery V1T1 PADO session 0x0 length 52
Feb 26 14:03:14 weblab pppd[24007]:  dst 0:11:a:a2:b4:f5  src 0:26:99:d2:cc:1b
Feb 26 14:03:14 weblab pppd[24007]:  [service-name] [host-uniq  c7 5d 00 00] [AC-name Lviv-Farlep-NAS2] [AC-cookie  13 30 c1 b9 e4 f7 21 ba bd c2 4f 38 25 b0 7d 59]

In this log file you can see our two ISPs – pogylyanka and Lviv-Farlep-NAS2.

When you connect using rp-pppoe there is no problem. But using rp-pppoe for network interfaces configuration using standard tools of Gentoo is deprecated and its support is broken. So I was unable to bring up such interface.

I have also tried to use plain pppd the way it was recommended in Gentoo, but I could not find any configuration option for this in documentation. But I found out that pppd package has pppoe plugin. I suspected that this plugin was borrowed from the same rp-pppoe, that’s why I decided to analyze pppd code for any mention of “acname”. I grep-ped module options with short help. Option in which we are interested is rp_pppoe_ac. It should be specified in pppd options. Here is fragment of my /etc/conf.d/net config:

link_ppp0="eth0"
plugins_ppp0="pppoe"
username_ppp0="vanya_ua"

pppd_ppp0="
        rp_pppoe_ac Lviv-Farlep-NAS2
        lcp-echo-interval 15
        lcp-echo-failure 3
        debug
"

And now when /etc/init.d/net.ppp0 starts pppd connects to the access concentrator we need.

Ділись:

Leave a Reply

Your email address will not be published. Required fields are marked *