# MPD5 config for XS4ALL FTTH



## HiddenWolf (Oct 20, 2015)

Hi,

I've got my FreeBSD 10.1 server setup as a router/firewall with XS4all. Up until now Ive been using PPP. It works, but performance is a bit lacking. I'd like to switch to MPD5, but I can't seem to get a working config.

First off. My ppp settings.

rc.conf

```
## Basic networking
hostname="atlas"                                              
ifconfig_em0_name="lan0"                                      
ifconfig_igb0_name="wan0"
gateway_enable="yes"

## External interface
ifconfig_igb0="up -wol -arp"
ifconfig_igb0_ipv6="inet6 ifdisabled -nud -auto_linklocal -accept_rtadv"

## Internal interface
ifconfig_lan0="inet 10.0.0.1 netmask 255.255.255.0"

## PPOE_config XS4ALL
ppp_enable="yes"
ppp_mode="ddial"
ppp_nat="yes"
ppp_profile="xs4all"
netwait_enable="YES"
netwait_ip="194.109.5.211"
netwait_if="tun0"
```

/etc/ppp/ppp.conf

```
default:
    set log Phase IPCP IPV6CP tun +connect
    disable dns



xs4all:
    ident Fritz!box 7490
    set device PPPoE:vlan0
    set speed sync
    set mru 1492
    set mtu 1492
    set ctsrts off
    enable mssfixup
    disable enddisc
    set server /var/run/ppp/ppoe "" 0177

    set ifaddr 0.0.0.0/0 IP HERE 255.255.255.255 0.0.0.0
    add! default HISADDR
    add! default HISADDR6

    set authname FB7490@xs4all.nl
    set authkey FB7490

    set redial 0 0
    set dial
    set login

    set vj slot comp off
```

This works, but is noticeably slower than the default Fritz!box, so I tried setting up mpd like so.

rc.conf

```
### Basic networking
hostname="Atlas"                                                  
#ifconfig_igb0_name="wan0"                 
ifconfig_em0_name="lan0"                                     
ifconfig_lan0="inet 10.0.0.1/24"                                    # Set local IP4
#ifconfig_lan0_ipv6="inet6 MYIP::/48"                      # Set local IP6

### External interface
ifconfig_igb0="up -wol -arp"
vlans_igb0="vlan0"
create_args_vlan0="vlan 6 -arp"
ifconfig_vlan0="inet inet6 ifdisabled -nud -auto_linklocal -accept_rtadv"

mpd_enable="YES"                                              
gateway_enable="YES"                                          
#ipv6_gateway_enable="YES"
```

/usr/local/etc/mpd5/mpd.conf

```
startup:

default:
    load xs4all

xs4all:
    create bundle static B1
    set iface up-script /etc/mpd5/mpd-linkup.sh
    set iface down-script /etc/mpd5/mpd-linkdown.sh
    set ipcp ranges 0.0.0.0/0 0.0.0.0/0
#    set bundle enable ipv6cp

    create link static L1 pope
    set link action bundle B1
    set link max-redial 0
    set link mtu 1492
    set link keep-alive 10 60
    set link passive enable

    set auth authname fritz3970@xs4all.nl
    set auth password 1234

    set pppoe iface vlan0
    set pppoe service ""

    open
```

When I run mad in the foreground with the service stopped, this is the result.

```
# mpd5                          

Multi-link PPP daemon for FreeBSD

process 1122 started, version 5.7 (root@101amd64-default-job-14 10:27 17-Sep-2015)

[B1] Bundle: Interface ng1 created

mpd.conf:24: Unknown command: 'set link passive enable'. Try "help".

[L1] [L1] Link: OPEN event

[L1] LCP: Open event

[L1] LCP: state change Initial --> Starting

[L1] LCP: LayerStart

[L1] PPPoE: Connecting to ''

PPPoE: rec'd ACNAME "dr11.d12"

[L1] PPPoE: connection successful

[L1] Link: UP event

[L1] LCP: Up event

[L1] LCP: state change Starting --> Req-Sent

[L1] LCP: SendConfigReq #1

[L1]   PROTOCOMP

[L1]   MRU 1492

[L1]   MAGICNUM 3bc55382

[L1] LCP: SendConfigReq #2

[L1]   PROTOCOMP

[L1]   MRU 1492

[L1]   MAGICNUM 3bc55382

[L1] LCP: rec'd Configure Request #187 (Req-Sent)

[L1]   AUTHPROTO PAP

[L1]   MAGICNUM 5f8987c8

[L1] LCP: SendConfigAck #187

[L1]   AUTHPROTO PAP

[L1]   MAGICNUM 5f8987c8

[L1] LCP: state change Req-Sent --> Ack-Sent

[L1] LCP: rec'd Configure Ack #2 (Ack-Sent)

[L1]   PROTOCOMP

[L1]   MRU 1492

[L1]   MAGICNUM 3bc55382

[L1] LCP: state change Ack-Sent --> Opened

[L1] LCP: auth: peer wants PAP, I want nothing

[L1] PAP: using authname "fritz3970@xs4all.nl"

[L1] PAP: sending REQUEST #1 len: 29

[L1] LCP: LayerUp

[L1] PAP: rec'd ACK #1 len: 5

[L1] LCP: authorization successful

[L1] Link: Matched action 'bundle "B1" ""'

[L1] Link: Join bundle "B1"

[B1] Bundle: Status update: up 1 link, total bandwidth 64000 bps

[B1] IPCP: Open event

[B1] IPCP: state change Initial --> Starting

[B1] IPCP: LayerStart

[B1] IPCP: Up event

[B1] IPCP: state change Starting --> Req-Sent

[B1] IPCP: SendConfigReq #1

[B1]   IPADDR 0.0.0.0

[B1]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid

[B1] IPCP: rec'd Configure Reject #1 (Req-Sent)

[B1]   COMPPROTO VJCOMP, 16 comp. channels, no comp-cid

[B1] IPCP: SendConfigReq #2

[B1]   IPADDR 0.0.0.0

[B1] IPCP: rec'd Configure Nak #2 (Req-Sent)

[B1]   IPADDR MYIP

[B1]     MYIP is OK

[B1] IPCP: SendConfigReq #3

[B1]   IPADDR MYIP

[B1] IPCP: rec'd Configure Ack #3 (Req-Sent)

[B1]   IPADDR MYIP

[B1] IPCP: state change Req-Sent --> Ack-Rcvd

[B1] IPCP: rec'd Configure Request #204 (Ack-Rcvd)

[B1]   IPADDR 194.109.5.175

[B1]     194.109.5.175 is OK

[B1] IPCP: SendConfigAck #204

[B1]   IPADDR 194.109.5.175

[B1] IPCP: state change Ack-Rcvd --> Opened

[B1] IPCP: LayerUp

[B1]   MYIP -> 194.109.5.175

[B1] system: command "/etc/mpd5/mpd-linkup.sh ng1 inet MYIP/32 194.109.5.175 '-' '' '' '00:00:00:00:00:00'" returned 32512

[B1] IPCP: parameter negotiation failed

[B1] IPCP: state change Opened --> Stopping

[B1] IPCP: SendTerminateReq #4

[B1] IPCP: LayerDown

[B1] system: command "/etc/mpd5/mpd-linkdown.sh ng1 inet MYIP/32 194.109.5.175 '-' '00:00:00:00:00:00'" returned 32512

[B1] IPCP: rec'd Terminate Ack #4 (Stopping)

[B1] IPCP: state change Stopping --> Stopped

[B1] IPCP: LayerFinish

[B1] Bundle: No NCPs left. Closing links...

[B1] Bundle: closing link "L1"...

[L1] Link: CLOSE event

[L1] LCP: Close event

[L1] LCP: state change Opened --> Closing

[L1] Link: Leave bundle "B1"

[B1] Bundle: Status update: up 0 links, total bandwidth 9600 bps

[B1] IPCP: Close event

[B1] IPCP: state change Stopped --> Closed

[B1] IPCP: Down event

[B1] IPCP: state change Closed --> Initial

[L1] LCP: SendTerminateReq #3

[L1] LCP: LayerDown

[L1] LCP: rec'd Terminate Ack #3 (Closing)

[L1] LCP: state change Closing --> Closed

[L1] LCP: LayerFinish

[L1] Link: DOWN event

[L1] LCP: Down event

[L1] LCP: state change Closed --> Initial
```

I'm a bit out of my depth. I'd appreciate any pointers.

EDIT: I've found the solution to the initial problem. Updated the post to reflect the partially fixed config and the new output.
EDIT2: Removed the IPV6 config for now.


----------

