Pppoe: Broadcast Control User Authentication Speed Control Accounting
Pppoe: Broadcast Control User Authentication Speed Control Accounting
Broadcast Control
User Authentication
Speed Control
Accounting
What is PPPoE?
Point to Point Protocol over Ethernet
Specification is RFC-2516
From the specification: “It (PPPoE) is intended to be used with broadband
remote access technologies that provide a bridged Ethernet topology, when
access providers wish to maintain the session abstraction associated with
PPP.
PPP (Point to Point Protocol) is traditionally used on serial links – things like
modems, T1’s, DS3’s, etc. PPPoE adapts the PPP protocol to a broadcast
medium (Ethernet).
Makes available all the tools used for managing dialup users to the
broadband provider.
Advantages to using PPPoE
Reduces broadcast traffic on the network.
Adds privacy – customers can not talk directly to each other – only
through gateway.
Access control – customers must authenticate before being allowed
online.
Accounting – easy to track customer use, many options for billing.
Speed control – set upload/download rates
With some creative networking can be used to send late or non-
paying customers to a ‘pay up’ page – more on this later.
Scales well - can handle thousands of users.
Who uses PPPoE?
Nearly all DSL service is provisioned as PPPoE (or it’s close cousin
PPPoA)
Why?
PPPoE facilitates multiple providers sharing a single physical network.
PPPoE works closely with the RADIUS protocol (an Authentication
Protocol we will cover shortly).
PPPoE allows a user to specify a username, a password, and a service
name (for selecting the service provider you wish to use).
The service name is used to route the authentication request to the
correct providers RADIUS server for authentication.
Disadvantages to PPPoE
Requires a broadcast domain between the client and server.
Not supported directly on Windows prior to Windows XP. Requires
(buggy) 3rd party software for 95, 98, NT, 2000, ME
Some customers dislike the ‘dialup’ feel of a PPPoE connection.
There are a few poor PPPoE client implementations in consumer
routers – they either fail to connect or retry extremely rapidly.
PPPoE uses overhead in the packet of 8 bytes – the maximum
packet content is reduced from 1500 to 1492 octets. This causes
problems for sites with broken PMTUD (discussed shortly)
PPPoE is not good on marginal links – it takes the server and client
some time to figure out a link has failed and to establish a new
connection (read this as marginal 900Mhz links that renegotiate).
Broadcast Traffic
Broadcast traffic can be the bane of the wireless ISP. It wastes
bandwidth and broadcast storms can bring the network to a halt.
PPPoE helps to eliminate the broadcast storms.
PPPoE uses a (very large) broadcast packet to locate the PPPoE
server.
The server and client must be on a broadcast domain – it won’t work
through a router.
Possible ways to do this:
Small PPPoE server at each tower.
Central PPPoE server, entire network one broadcast domain.
Central PPPoE server, VLANS to each tower or AP.
Canopy SM’s can be set to only allow PPPoE traffic.
Privacy
PPPoE can lightly encrypt the traffic between the client and the
server providing some (very weak) protection against
eavesdropping.
Blocking everything other than PPPoE at the SM prevents Windows
customers from seeing each other in “Network Neighborhood”.
Yes – you really can and should click “All IPv4”, “ARP”, and “All
others” in the Packet Filter Configuration. This prevents anything
other than PPPoE from getting through.
Access Control and Accounting
Authentication can either be done at the PPPoE server or using an
external RADIUS server.
Local authentication checks the user against a database at the
PPPoE server.
RADIUS (Remote Authentication Dial In User Service) was
developed to authenticate dialup users. RADIUS is in widespread
usage and can easily be modified to support additional capabilities.
RADIUS can be used to set nearly every aspect of a PPPoE
session ie. IP Address, DNS servers, Filters, Rate Limits, Time
Limits, Transfer Limits, etc.
RADIUS servers can proxy requests to other RADIUS servers – this
makes roaming possible.
Access Control and Accounting
PPPoE and RADIUS are your hook into many of the tools that have
been developed by and for ISP’s to allow them to control and bill
users.
The PPPoE server reports to the RADIUS server the details of a
connection at termination (or periodically if configured) including
time online, number of packets, etc.
Parsing the RADIUS accounting data is a basic function of any of
the dedicated ISP billing software packages – Billmax, Rodopi,
Platypus, Freeside, etc. This allows you to bill based on usage if
so desired. Some billing packages can enforce usage limits as well
if needed (shut off the user, restrict speeds or take other action).
Fri Jan 12 20:10:37 2007
Service-Type = Framed-User
Framed-Protocol = PPP
NAS-Port-Id = 5702
NAS-Port-Type = 15
User-Name = "toledohealth-sm"
Calling-Station-Id = "00:0F:66:39:D9:3D"
Called-Station-Id = "pppoe"
Attr-87 = "ether2"
Acct-Session-Id = "81700f93"
Framed-IP-Address = 64.246.97.246
Acct-Authentic = RADIUS
Acct-Session-Time = 86288
Acct-Input-Octets = 5492944
Attr-52 = "\000\000\000"
Acct-Input-Packets = 55159
Acct-Output-Octets = 56887685
Attr-53 = "\000\000\000"
Acct-Output-Packets = 75482
Acct-Status-Type = Stop
Acct-Terminate-Cause = User-Request
NAS-Identifier = "MikroTik"
NAS-IP-Address = 64.246.96.225
Acct-Delay-Time = 0
Client-IP-Address = 64.246.96.225
Realm = "NULL"
Timestamp = 1168650637
Request-Authenticator = Verified
Sample Radius User Entries
mark Auth-Type = System
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 1.2.3.4, <- assigns a specific IP to this user
Framed-Compression = Van-Jacobson-TCP-IP,
Framed-MTU = 1500
This will give the user to 512k down, 128k up with a burst rate of 2M/384k. The burst
threshold is 1M/256k. The burst is limited to a 60 second window. The queue
has a priority of 8
PPPoE Servers
There are several PPPoE server implementations:
Mikrotik – inexpensive, smaller deployments (hundreds to a few
thousand users).
ServPoET (midprice – up to 6000 simultaneous PPPoE sessions)
Redback (expensive – thousands of sessions)
Cisco (making Redback look inexpensive – as big as you want)
Free/OpenBSD – runs in userland, pretty slow. not recommended.
Others?
Amplex uses the Mikrotik Implementation
Low cost
Reliable
Plenty of people in the WISP community are familiar with it.
Mikrotik includes many other useful features (other than PPPoE).
PPPoE Startup and Redundancy
Multiple PPPoE Servers can exist on one broadcast network.
The client (customer) side initiates a connection with a PADI
(PPPoE Active Discovery Initiation) packet.
The servers respond with a PADO (PPPoE Active Discovery Offer)
– the client chooses one server from the (possibly multiple)
responses it sees. Usually the first responding server is chosen –
making for a crude load balancing mechanism.
Mikrotik PPPoE Configuration
Setting up a Mikrotik PPPoE Server
Were going to assume you have a working Mikrotik installation with
at least 2 Ethernet interfaces.
The Mikrotik can be set up completely from the command line or
using the GUI interface.
We are going to put the gateway (connection to the Internet) on
Ether1 and the PPPoE server on Ether2.
Mikrotik recommends NOT putting an IP address on the PPPoE
interface for security reasons – we routinely ignore this
recommendation.
Amplex assigns public IP addresses to all of our customers – you
can also use private IP space and NAT if desired with PPPoE.
Create an IP Pool to assign to PPPoE customers
[admin@MikroTik] ip pool> ip pool add creates new item with specified property values.
1 * name="default-encryption" local-address=64.246.96.225
remote-address=pppoe-pool use-compression=no use-vj-compression=no
use-encryption=yes only-one=default change-tcp-mss=yes
dns-server=64.246.100.1,64.246.115.1,64.246.109.1
Use the print command to see a summary of users or print d for a detailed view.
[admin@CanopyNorth] ppp secret> print
Flags: X - disabled
# NAME SERVICE CALLER-ID PASSWORD PROFILE REMOTE-ADDRESS
0 mark pppoe xxxxxxxx default 172.23.0.10
1 dobbs pppoe xxxxxxxx default 172.23.0.11
[admin@MikroTik] ppp>
Tell Mikrotik where to find the RADIUS servers:
GPS Junction
Box – 1 and 6
Jumped on RJ-11’s
Typical
Mikrotik RB532 Wireless Site
With 564 Enclosure
Daughterboard
Main Power Supply
Homebrew Canopy
Power Injector – Battery Charger
Ethernet lines to Relay – batteries
Mikrotik, Power lines vs. line power
to 24VDC
SyncPipe Power
Relay – Ethernet
loopback,
2 24VDC Sealed detects mains
Lead Acid Batteries power failure
WISP Sitebox
Schematic
Dear User – pay your bill
How to suspend users without turning them off completely
Here is a good trick for non-paying users… can be used anytime you can
control the IP assigned to the customer:
Have your billing system assign a private IP address to suspended users – our
billing system creates the RADIUS file for us automatically with private IP’s for
suspended users.
Have the router policy-route traffic with a private source address to a Unix box.
Use the kernel firewall (ipfw) to rewrite packets arriving at the Unix box from the
private source IP addresses to the destination address of the Unix host.
Have Apache serve up a web page of your choice.
Email and other local services continue to work – but any web page they try to go
to returns your ‘pay up’ webpage.
This method cuts down on customers that think something is broken with your
network when you have intentionally shut them off.
Cisco and Unix Configurations:
Create a filter list to match the traffic you want to policy route:
(sets the next hop of any http packets coming from 192.168.0.xxx addresses to 64.246.100.1)
interface FastEthernet5/0/0.1
description Wireless LAN
ip policy route-map AmplexServerPolicy
On a FreeBSD box:
junior# ipfw list
00100 fwd 64.246.100.1 tcp from 192.168.0.0/24 to any dst-port 80
65535 allow ip from any to any
junior#
So what happens? HTTP requests for any page made from clients with private IP addresses are shown the web
page you place in /usr/local/www/suspended/index.html
Our page just tells them the billing system has suspended them – they have to call or send money to get back
online. This could be integrated with a payment method but we have not done this yet.