OpenBSD 3.8 PPPoE Broadband Connection Howto

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenBSD 3.8 PPPoE Broadband Connection Howto

Siju George
Hi all,

I have a new Broadband Internet connection. It uses PPPoE with a
username and password to connect to internet.
I can connect to Internet with Windows 2003 (easy click and configure)
so the DSL Router is working and the username and password is correct.
I would like to use OpenBSD 3.8 to connect to Internet with it and not
Windows 2003.

I read the man pages and FAQ and did accordingly ( I suppose ) and it
is not working. Could some one please point out as to what could I
have done wrong?

Details of my OpenBSD 3.8 system:

I have two interfaces "rl0" "rl1"

rl0 has the PPPoE connection and rl1 is connected to the LAN Switch.

# ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
        groups: lo
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:50:fc:7d:4e:50
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet6 fe80::250:fcff:fe7d:4e50%rl0 prefixlen 64 scopeid 0x1
rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:08:a1:7b:bf:52
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 172.17.1.1 netmask 0xfff00000 broadcast 172.31.255.255
        inet6 fe80::208:a1ff:fe7b:bf52%rl1 prefixlen 64 scopeid 0x2
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224
pfsync0: flags=0<> mtu 1348
enc0: flags=0<> mtu 1536
pppoe0: flags=a851<UP,POINTOPOINT,RUNNING,SIMPLEX,LINK1,MULTICAST> mtu 1492
        dev: rl0 state: session
        sid: 0x10f1 PADI retries: 1 PADR retries: 0 time: 00:00:06
        groups: pppoe egress
        inet 0.0.0.0 --> 0.0.0.1 netmask 0xffffffff
        inet6 fe80::250:fcff:fe7d:4e50%pppoe0 ->  prefixlen 64 scopeid 0x7

# cat /etc/sysctl.conf |grep inet.ip.forwarding
net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of packets
#
# cat /etc/mygate
cat: /etc/mygate: No such file or directory
#
# cat /etc/hostname.rl0
up
#
# cat /etc/hostname.rl1
inet 172.17.1.1 255.240.0.0 NONE
#
# cat /etc/hostname.pppoe0
pppoedev rl0
!/sbin/ifconfig rl0 up
!/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=xxxxx@yyyyyy
myauthkey=zzzzzz
!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff
!/sbin/route add default 0.0.0.1
link1 up
#
# cat /etc/pf.conf
pass all
#

route show commands hangs for a long time :-(

# route flush
default              0.0.0.1              done
loopback             localhost            done
172.16.1.0           00:11:95:c0:c7:33    done
BASE-ADDRESS.MCAST.N localhost            done
::/128               localhost.broadband. done
::/128               localhost.broadband. done
::127.0.0.0/128      localhost.broadband. done
::224.0.0.0/128      localhost.broadband. done
::255.0.0.0/128      localhost.broadband. done
::ffff:0.0.0.0/128   localhost.broadband. done
2002::/128           localhost.broadband. done
2002:7f00::/128      localhost.broadband. done
2002:e000::/128      localhost.broadband. done
2002:ff00::/128      localhost.broadband. done
fe80::/128           localhost.broadband. done
fe80::250:fcff:fe7d: 00:50:fc:7d:4e:50    done
fe80::208:a1ff:fe7b: 00:08:a1:7b:bf:52    done
fe80::1%lo0          link#6               done
fe80::250:fcff:fe7d: link#7               done
fec0::/128           localhost.broadband. done
#
# sh /etc/netstart
spppcontrol: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy
add net default: gateway 0.0.0.1
#

What could be the problem?

How do I debug this?

Thankyou so much :-)

kind regards

Siju

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Jason McIntyre-2
On Wed, Dec 21, 2005 at 02:54:23AM +0530, Siju George wrote:

>
> I have two interfaces "rl0" "rl1"
>
> rl0 has the PPPoE connection and rl1 is connected to the LAN Switch.
>
> # ifconfig -a
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
>         groups: lo
>         inet 127.0.0.1 netmask 0xff000000
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
> rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 00:50:fc:7d:4e:50
>         media: Ethernet autoselect (100baseTX full-duplex)
>         status: active
>         inet6 fe80::250:fcff:fe7d:4e50%rl0 prefixlen 64 scopeid 0x1
> rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 00:08:a1:7b:bf:52
>         media: Ethernet autoselect (100baseTX full-duplex)
>         status: active
>         inet 172.17.1.1 netmask 0xfff00000 broadcast 172.31.255.255
>         inet6 fe80::208:a1ff:fe7b:bf52%rl1 prefixlen 64 scopeid 0x2
> pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224
> pfsync0: flags=0<> mtu 1348
> enc0: flags=0<> mtu 1536
> pppoe0: flags=a851<UP,POINTOPOINT,RUNNING,SIMPLEX,LINK1,MULTICAST> mtu 1492
>         dev: rl0 state: session
>         sid: 0x10f1 PADI retries: 1 PADR retries: 0 time: 00:00:06
>         groups: pppoe egress
>         inet 0.0.0.0 --> 0.0.0.1 netmask 0xffffffff
>         inet6 fe80::250:fcff:fe7d:4e50%pppoe0 ->  prefixlen 64 scopeid 0x7
>
> # cat /etc/sysctl.conf |grep inet.ip.forwarding
> net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of packets
> #
> # cat /etc/mygate
> cat: /etc/mygate: No such file or directory
> #
> # cat /etc/hostname.rl0
> up

you don't need this file, since hostname.pppoe0 effectively brings the
interface up

> #
> # cat /etc/hostname.rl1
> inet 172.17.1.1 255.240.0.0 NONE
> #
> # cat /etc/hostname.pppoe0
> pppoedev rl0
> !/sbin/ifconfig rl0 up
> !/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=xxxxx@yyyyyy
> myauthkey=zzzzzz
> !/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff
> !/sbin/route add default 0.0.0.1
> link1 up

are you cut'n'paste here? that is not helpful...

- the spppcontrol line should all be on one line: you need a `\' otherwise
- try `link1 up' -> `up'

to debug this - try following the steps in ppp(8). it is easy to set up
and debug. it might show some info you are missing.

jmc

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

J.C. Roberts-2
In reply to this post by Siju George
On Wed, 21 Dec 2005 02:54:23 +0530, Siju George <[hidden email]>
wrote:

>I have a new Broadband Internet connection. It uses PPPoE with a
>username and password to connect to internet.

Hi Siju,

You left out a few important details about the service package from your
provider. PPPoE is cheap way for providers to prevent people from
stealing service (i.e. hooking up their own DSL gear to an
abandoned/unused line).

I've seen PPPoE used in service packages with a dynamic IP and service
packages with a static IP (or a small block of static IP's).

At times the service provider will be using DHCP to configure the
external interface (often based in the DSL modem/router itself) and
other times, they don't offer DHCP and you're expected to configure the
interface yourself.

Details of the exact kind of service package you have from your provider
and occasionally info on the DSL hardware you're using are needed to
figure out how things should be set up on your end.

Kind Regards,
JCR

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Alex M.-2
In reply to this post by Siju George
Siju George wrote:

>Hi all,
>
>I have a new Broadband Internet connection. It uses PPPoE with a
>username and password to connect to internet.
>I can connect to Internet with Windows 2003 (easy click and configure)
>so the DSL Router is working and the username and password is correct.
>I would like to use OpenBSD 3.8 to connect to Internet with it and not
>Windows 2003.
>  
>
>Details of my OpenBSD 3.8 system:
>
>I have two interfaces "rl0" "rl1"
>
>rl0 has the PPPoE connection and rl1 is connected to the LAN Switch.
>
>  
>
Not entirely sure that you have to set up PPPoE for rl0. I never did
this for the interface
connected to my dsl router. All I did was give the interface an ip, set
my default gateway
to my router's ip, put my isp's nameserver in /etc/resolv.conf and it
just worked.
I don't know about your router but I can manage mineusing a web browser.
That is,
I point my web browser to my router and I set all my PPPoE
settings through that.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Siju George
In reply to this post by J.C. Roberts-2
Thankyou so much Rickie, Jason,Chris, Alex and JC for the replies :-)

On 12/21/05, J. C. Roberts <[hidden email]> wrote:

> On Wed, 21 Dec 2005 02:54:23 +0530, Siju George <[hidden email]>
> wrote:
>
> >I have a new Broadband Internet connection. It uses PPPoE with a
> >username and password to connect to internet.
>
> Hi Siju,
>
> You left out a few important details about the service package from your
> provider. PPPoE is cheap way for providers to prevent people from
> stealing service (i.e. hooking up their own DSL gear to an
> abandoned/unused line).
>

Sorry :-( I'll explain further.

> I've seen PPPoE used in service packages with a dynamic IP and service
> packages with a static IP (or a small block of static IP's).
>
> At times the service provider will be using DHCP to configure the
> external interface (often based in the DSL modem/router itself) and
> other times, they don't offer DHCP and you're expected to configure the
> interface yourself.
>

The service package I have requires me to logon first using a username
and password.
The IP address is provided by dhcp.
But since I have asked for a scheme that gives me a Static IP every
time dhcp provides me the same IP. I know the IP and Subnetmask and
Default gateway I should be getting ( they have told me) and I get it
all the time using PPPoE on Win2k3 with the username and password.

> Details of the exact kind of service package you have from your provider
> and occasionally info on the DSL hardware you're using are needed to
> figure out how things should be set up on your end.
>

Its a ADSL Router from HUAWEI
Model No. WA1003A
Has both option for LAN and wireless.
Internet connection comes by a telephone cable.

When the settings are in factory mode. I just need to use the

"Connect using a broadband connection that requires a user name and password"

in Windows 2003 and it connects automatically. No need to supply any phone no.

Authentication and connection is by username and password only.

Is there anything more I should add about the Hardware?

Thankyou so much for being kind and helpful :-)

kind regards

Siju

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

stefan hoffmann
In reply to this post by Siju George
hi Siju,

Siju George wrote:
> so the DSL Router is working and the username and password is correct.
> What could be the problem?

If it is a DSL _router_ you just have to setup a normal network, PPPoE
is handled by the router.

If it is a DSL _modem_ you have to setup PPPoE.


mfG
--> stefan <--

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Bruno Carnazzi
In reply to this post by Siju George
  Hi,

At home, I have your working target :)
I use an OBSD/i386 3.8 box connected to an ADSL router, but configured
in bridge mode (modem-only). If you use a router, you don't have to
configure PPPoE on your OBSD. If you use a bridge (seems to be your
case), you need to configure PPPoE on your OBSD box, which will
receive a public IP from your ISP. For me, using 'chap' as an
authentication did the trick. I've documented all my "adventure" at
http://carbonara.kicks-ass.org/doku.php?id=openbsd:pppoerouter (in
French, sorry !)

OpenBSD helped me to understand PPPoE "under the hood". In my mind,
it's an excellent (the best ?) teaching platform and a wonderfull
production system.

Long life to OpenBSD !!

On 12/21/05, Siju George <[hidden email]> wrote:

> Hi all,
>
> I have a new Broadband Internet connection. It uses PPPoE with a
> username and password to connect to internet.
> I can connect to Internet with Windows 2003 (easy click and configure)
> so the DSL Router is working and the username and password is correct.
> I would like to use OpenBSD 3.8 to connect to Internet with it and not
> Windows 2003.
>
> I read the man pages and FAQ and did accordingly ( I suppose ) and it
> is not working. Could some one please point out as to what could I
> have done wrong?
>
> Details of my OpenBSD 3.8 system:
>
> I have two interfaces "rl0" "rl1"
>
> rl0 has the PPPoE connection and rl1 is connected to the LAN Switch.
>
> # ifconfig -a
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33224
>         groups: lo
>         inet 127.0.0.1 netmask 0xff000000
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
> rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 00:50:fc:7d:4e:50
>         media: Ethernet autoselect (100baseTX full-duplex)
>         status: active
>         inet6 fe80::250:fcff:fe7d:4e50%rl0 prefixlen 64 scopeid 0x1
> rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         lladdr 00:08:a1:7b:bf:52
>         media: Ethernet autoselect (100baseTX full-duplex)
>         status: active
>         inet 172.17.1.1 netmask 0xfff00000 broadcast 172.31.255.255
>         inet6 fe80::208:a1ff:fe7b:bf52%rl1 prefixlen 64 scopeid 0x2
> pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33224
> pfsync0: flags=0<> mtu 1348
> enc0: flags=0<> mtu 1536
> pppoe0: flags=a851<UP,POINTOPOINT,RUNNING,SIMPLEX,LINK1,MULTICAST> mtu 1492
>         dev: rl0 state: session
>         sid: 0x10f1 PADI retries: 1 PADR retries: 0 time: 00:00:06
>         groups: pppoe egress
>         inet 0.0.0.0 --> 0.0.0.1 netmask 0xffffffff
>         inet6 fe80::250:fcff:fe7d:4e50%pppoe0 ->  prefixlen 64 scopeid 0x7
>
> # cat /etc/sysctl.conf |grep inet.ip.forwarding
> net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of packets
> #
> # cat /etc/mygate
> cat: /etc/mygate: No such file or directory
> #
> # cat /etc/hostname.rl0
> up
> #
> # cat /etc/hostname.rl1
> inet 172.17.1.1 255.240.0.0 NONE
> #
> # cat /etc/hostname.pppoe0
> pppoedev rl0
> !/sbin/ifconfig rl0 up
> !/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=xxxxx@yyyyyy
> myauthkey=zzzzzz
> !/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff
> !/sbin/route add default 0.0.0.1
> link1 up
> #
> # cat /etc/pf.conf
> pass all
> #
>
> route show commands hangs for a long time :-(
>
> # route flush
> default              0.0.0.1              done
> loopback             localhost            done
> 172.16.1.0           00:11:95:c0:c7:33    done
> BASE-ADDRESS.MCAST.N localhost            done
> ::/128               localhost.broadband. done
> ::/128               localhost.broadband. done
> ::127.0.0.0/128      localhost.broadband. done
> ::224.0.0.0/128      localhost.broadband. done
> ::255.0.0.0/128      localhost.broadband. done
> ::ffff:0.0.0.0/128   localhost.broadband. done
> 2002::/128           localhost.broadband. done
> 2002:7f00::/128      localhost.broadband. done
> 2002:e000::/128      localhost.broadband. done
> 2002:ff00::/128      localhost.broadband. done
> fe80::/128           localhost.broadband. done
> fe80::250:fcff:fe7d: 00:50:fc:7d:4e:50    done
> fe80::208:a1ff:fe7b: 00:08:a1:7b:bf:52    done
> fe80::1%lo0          link#6               done
> fe80::250:fcff:fe7d: link#7               done
> fec0::/128           localhost.broadband. done
> #
> # sh /etc/netstart
> spppcontrol: SIOCSIFGENERIC(SPPPIOSDEFS): Device busy
> add net default: gateway 0.0.0.1
> #
>
> What could be the problem?
>
> How do I debug this?
>
> Thankyou so much :-)
>
> kind regards
>
> Siju

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

J.C. Roberts-2
In reply to this post by Siju George
On Wed, 21 Dec 2005 19:27:12 +0530, Siju George <[hidden email]>
wrote:

>> Details of the exact kind of service package you have from your provider
>> and occasionally info on the DSL hardware you're using are needed to
>> figure out how things should be set up on your end.
>>
>
>Its a ADSL Router from HUAWEI
>Model No. WA1003A
>Has both option for LAN and wireless.
>Internet connection comes by a telephone cable.

It may have seemed strange for me to ask for this info but in many
cases, including yours, it can make things real simple...

This modem/router you have actually has a http based administration
console built into the device and through the admin console you can
configure the device itself to do your PPPoE for you. This means you can
just use dhcp for your external interface and not run pppoe on your
openbsd box.

Details for accessing the web admin console on the device and setting up
the pppoe are probably in the "quick-start" guide.
http://www.huawei.com/products/terminal/pdf/view.do?f=360&ctype=0

Also you mentioned "wireless" so are you *sure* about the part number
you posted. There is a "WA1003A-RU" model number as well that
specifically mentions wireless.

I also stumbled across some info for setting the VPI/VCI values but they
may or may not apply to your telco/provider/country. If the defaults
don't work, you may need to ask your provider for the correct values.
http://www.vinuthomas.com/Forums/viewtopic/p=26302.html

jcr

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Siju George
In reply to this post by Bruno Carnazzi
On 12/22/05, Bruno Carnazzi <[hidden email]> wrote:

>   Hi,
>
> At home, I have your working target :)
> I use an OBSD/i386 3.8 box connected to an ADSL router, but configured
> in bridge mode (modem-only). If you use a router, you don't have to
> configure PPPoE on your OBSD. If you use a bridge (seems to be your
> case), you need to configure PPPoE on your OBSD box, which will
> receive a public IP from your ISP. For me, using 'chap' as an
> authentication did the trick. I've documented all my "adventure" at
> http://carbonara.kicks-ass.org/doku.php?id=openbsd:pppoerouter (in
> French, sorry !)
>

Merci tellement Bruno : -) C'est bien moi l'a obtenu traduit de

http://babelfish.altavista.com/babelfish/tr

my protocol is also CHAP and it is working well now.

Thankyou so much again for the info and link.

kind Regards

Siju

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Siju George
In reply to this post by J.C. Roberts-2
On 12/23/05, J. C. Roberts <[hidden email]> wrote:
> It may have seemed strange for me to ask for this info but in many
> cases, including yours, it can make things real simple...

> Also you mentioned "wireless" so are you *sure* about the part number
> you posted. There is a "WA1003A-RU" model number as well that
> specifically mentions wireless.
>

Yes the BOX and the modem says it is "WA1003A" only but from the
datasheet of "WA1003A" I find that the pic resembles the wireless one
have it here.

> I also stumbled across some info for setting the VPI/VCI values but they
> may or may not apply to your telco/provider/country. If the defaults
> don't work, you may need to ask your provider for the correct values.
> http://www.vinuthomas.com/Forums/viewtopic/p=26302.html
>

Thankyou so much once again for teling me about the above website :-)

Kind Regards

Siju

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD 3.8 PPPoE Broadband Connection Howto

Siju George
In reply to this post by J.C. Roberts-2
On 12/23/05, J. C. Roberts <[hidden email]> wrote:
>
> It may have seemed strange for me to ask for this info but in many
> cases, including yours, it can make things real simple...
>

Thankyou so much JC for all the helpand suport porvided :-)

The office was closed since I got your mail so I could check out
things only todday.

> This modem/router you have actually has a http based administration
> console built into the device and through the admin console you can
> configure the device itself to do your PPPoE for you. This means you can
> just use dhcp for your external interface and not run pppoe on your
> openbsd box.
>

Yes it does have a http based administration console and it came
configured as you said.

It would give the interface 192.168.1.1 IP while using dhcp and the
router NATs packets to the internet IP.  was not very much in favour
of this because I was not sure the NATing speed of the router and how
it would perfor under heavy load. I preferred to give the internet IP
to the NIC and let OpenBSD do the NATing.

So I called up the providers and they told me to reset the modem to
factory settings and use Windows XP to connect to internet because
they knew to configure pppoe on windows XP only when the modem is in
the factory settings.

I saw that my pppoe configuration get stuck in the phase

pppoe0: phase authenticate

so as bruno suggested I gave CHAP instead of PAP and re did all
configurations from the begining and it is working. Thankyou JC for
all the explanation once again :-))))

kind regards

Siju