Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pppd: pppoe: Determine connection speed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Tue Jun 30, 2015 6:29 pm    Post subject: pppd: pppoe: Determine connection speed Reply with quote

The last weekend a lightning (overvoltage) destroyed my providers router box under my desk. I took the opportunity to replace it with a open source (gentoo hardened) router.

Now it runs all smooth and the connection speed is like it was before.

--> BUT: The old box was able to tell me the pppoe connection speed. How can i determine this with pppd?

Obviously pppoe from the kernel is used:
Code:
lsmod | grep ppp
pppoe                   9840  2
pppox                   2108  1 pppoe
ppp_generic            27660  6 pppoe,pppox
slhc                    5269  1 ppp_generic


Kernel:
Code:
Linux zerberus 3.18.9-hardened-router #1 SMP PREEMPT Sun Jun 28 20:47:44 CEST 2015 x86_64 AMD G-T40E Processor AuthenticAMD GNU/Linux

zcat /proc/config.gz | grep -i ppp
CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOE=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m


I got ppp and rp-ppp installed and started it over /etc/conf.d/net
Code:
net-dialup/ppp-2.4.7::gentoo was built with the following:
USE="ipv6 pam -activefilter -atm -dhcp -eap-tls -gtk -radius"


Code:
net-dialup/rp-pppoe-3.8-r2::gentoo was built with the following:
USE="-X"


my pppd log shows me not much information about the speed of the pppoe
Code:

cat /var/log/pppd.log
Jun 29 23:11:55 zerberus pppd[4335]: LCP terminated by peer
Jun 29 23:11:55 zerberus pppd[4335]: Connect time 1440.0 minutes.
Jun 29 23:11:55 zerberus pppd[4335]: Sent 210616132 bytes, received 3551854646 bytes.
Jun 29 23:11:58 zerberus pppd[4335]: Connection terminated.
Jun 29 23:11:58 zerberus pppd[4335]: Modem hangup
Jun 29 23:12:01 zerberus pppd[4335]: PPP session is 2223
Jun 29 23:12:01 zerberus pppd[4335]: Connected to ..... via interface eth2
Jun 29 23:12:01 zerberus pppd[4335]: Using interface ppp0
Jun 29 23:12:01 zerberus pppd[4335]: Connect: ppp0 <--> eth2
Jun 29 23:12:02 zerberus pppd[4335]: PAP authentication succeeded
Jun 29 23:12:02 zerberus pppd[4335]: peer from calling number ..... authorized
Jun 29 23:12:02 zerberus pppd[4335]: local  IP address aa.bb.cc.dd
Jun 29 23:12:02 zerberus pppd[4335]: remote IP address ee.ff.gg.hh
Jun 29 23:12:02 zerberus pppd[4335]: primary   DNS address ....
Jun 29 23:12:02 zerberus pppd[4335]: secondary DNS address ...


pppd comandline:
Code:
/usr/sbin/pppd plugin rp-pppoe.so unit 0 user myid@myprovider remotename ppp0 linkname ppp0 plugin passwordfd.so noauth defaultroute usepeerdns holdoff 3 child-timeout 60 lcp-echo-interval 15 lcp-echo-failure 3 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp passwordfd 0 defaultmetric 4008 maxfail 0 persist connect true eth2


I read already the wiki https://wiki.gentoo.org/wiki/PPP

EDIT: ppp dokcumentation states:
bzless /usr/share/doc/ppp-2.4.7/README.linux.bz2 wrote:
Now in fact pppd doesn't know anything about how to get modems to dial
or what you have to say to the system at the far end to get it to talk
PPP. That's handled by an external program such as chat, specified
with the connect option to pppd. Chat takes a series of strings to
expect from the modem interleaved with a series of strings to send to
the modem. See the chat man page for more information. Here is a
simple example for connecting to an ISP, assuming that the ISP's
system starts talking PPP as soon as it answers the phone:


Wth this in mind, the logic to know about the modem, would be in the rp-pppoe.so file from http://www.roaringpenguin.com. Lets grad the source ...
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Tue Jul 07, 2015 12:18 am    Post subject: Re: pppd: pppoe: Determine connection speed Reply with quote

schorsch_76 wrote:
The last weekend a lightning (overvoltage) destroyed my providers router box under my desk. I took the opportunity to replace it with a open source (gentoo hardened) router.

Now it runs all smooth and the connection speed is like it was before.

--> BUT: The old box was able to tell me the pppoe connection speed. How can i determine this with pppd?


It's complicated ...

PPPoE is a form of tunnel and line speeds are really "lies to children". I'll try to explain: Your Gentoo router has an Ethernet (wired LAN) connection with a real line speed of 10/100/1000Mbs-1 to the cable or whatever modem. The modem then connects at a lower level to the provider. The speed there is the one you are interested in but it is dependent on a lot of factors - the distance, quality of cabling etc etc.

Your home LAN is also dependent on many of these factors but Ethernet specs are such that you are unlikely to exceed things like distance between switches or cable quality, so when you want say 1Gbps-1, you specify CAT5E cable and keep distances less than 100m. The specs for ADSL and the like - "broadband" - are designed for a much wider range of factors.

Anyway, after the connection to your ISP you have their gear and contention with other users to worry about. The only line speed you should really worry about is the actual throughput you get and this is quite hard to measure.

Your provider's router was able to report your "line speed" because it is both a router and modem (or similar). What I mean is that it had access to both layer 1/2 and layer 3+. Your Gentoo box doesn't - PPPoE is running over the Ethernet connection and doesn't care about line speed. If you used pppd to connect to a modem then you could send AT commands to get the speed back but I don't think you can do this for broadband.

So what I'm getting around to is: what is your Gentoo box actually plugged into?

Cheers
Jon

PS If you are still getting the service you want then the above is all moot - crack on.
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Tue Jul 07, 2015 5:29 am    Post subject: Reply with quote

My gentoo router box is connected to [1]. I have only access over the eth2 Interface to the modem. So i guess, from what you wrote + what i expierenced, it is unpossible except a download to distigish the connection Speed ...

[1] http://www.amazon.de/gp/product/B00582IGVK?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://portage.schorsch-tech.de
git clone https://portage.schorsch-tech.de/portage.git
Back to top
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 221
Location: Toowoomba/Australia

PostPosted: Tue Jul 07, 2015 7:50 am    Post subject: Reply with quote

What are you trying to check? Your adsl sync? Your throughput? Assuming it has similar capabilities to any adsl modem I have used the current sync speed can be checked by going to the web pages on the modem. With my modem I have an expect script that telnets to the modem and gets the current sync for me. What thoughput I can expect is a competely differnent matter. Without checking I am confident in saying I am synced at 8160/384 and that sync speed has nothing to do with what rate I can download at. The time of day is a more reliable indicator of my download speed than my never changing sync. People now home from work and settling down for the evening my 8Mbit link currently has a download speed slower than that of a 1500kbit link.

The only time I have had a changing sync rate there was a line fault and I used my expect script to check the current sync rate for me. When I want to know the current possible throughput (which my sync rate will not tell me) I do speed tests.

If you want to know what downloads speeds have been reaching in recent times a couple of things that come to mind are ntop and ntopng. Have played with both of them and currently looking at using pmacct to generate some accounting data and feed that to rrdtool so I have some pretty graphs to look at telling download speeds over different time periods.
_________________
Beware the grue.
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Tue Jul 07, 2015 8:35 am    Post subject: Reply with quote

Aiken wrote:
What are you trying to check? Your adsl sync? Your throughput? Assuming it has similar capabilities to any adsl modem I have used the current sync speed can be checked by going to the web pages on the modem. With my modem I have an expect script that telnets to the modem and gets the current sync for me. What thoughput I can expect is a competely differnent matter. Without checking I am confident in saying I am synced at 8160/384 and that sync speed has nothing to do with what rate I can download at. The time of day is a more reliable indicator of my download speed than my never changing sync. People now home from work and settling down for the evening my 8Mbit link currently has a download speed slower than that of a 1500kbit link.

The only time I have had a changing sync rate there was a line fault and I used my expect script to check the current sync rate for me. When I want to know the current possible throughput (which my sync rate will not tell me) I do speed tests.

If you want to know what downloads speeds have been reaching in recent times a couple of things that come to mind are ntop and ntopng. Have played with both of them and currently looking at using pmacct to generate some accounting data and feed that to rrdtool so I have some pretty graphs to look at telling download speeds over different time periods.


A agree with what the above says. You could use something like mrtg for simple graphs with the output from an expect script or similar - it's not trivial I'm afraid.

Usually you can do a little ethernet subnet with the modem so that you can talk to it and then have another interface (virtual) that does the pppoe and gets an external IP address OR your modem is a full router, has its own IP and passes an IP down to your eth2. Depends on the ISP and your setup.

Cheers
Jon
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43551
Location: 56N 3W

PostPosted: Tue Jul 07, 2015 9:47 am    Post subject: Reply with quote

schorsch_76,

Some 'modems' have a web interface with lots of useful info. Some don't.
From the manual for you box, (which I can't read) there are no web interface illustrations, so its probably a dumb box.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum