Re: pppoe configuration and dns name resolution

2012-10-21 Thread Jack
Hi

This time I configured as simple as possible
with minimal settings, and voila things worked.
I successfully connected to internet in both
cases - DHCP server disabled in adsl modem, and
DHCP server enabled in adsl modem.

Thanks all  of you guys for helping. :)

Here are config files:

## /etc/rc.config
hostname=jacks_lappy

ifconfig_fxp0=DHCP

# The below line is to be used if DHCP server on adsl
# modem is disabled.

#ifconfig_fxp0=inet 192.168.1.4 netmask 255.255.255.0

# This is assigned to telnet to adsl modem and configure it,
# if you don't wanna communicate with modem, remove
# this line. It doesn't affect ppp connectivity, in any way -
# I tried removing it  and got connected successfully.

sshd_enable=YES
moused_enable=YES
powerd_enable=YES
# Set dumpdev to AUTO to enable crash dumps, NO to disable
dumpdev=AUTO

hald_enable=YES
dbus_enable=YES

---

## /etc/ppp/ppp.conf:

default:
 set log Phase tun command

adsl:
 set device PPPoE:fxp0

#MRU is optional too, you can remove it
# w/o affecting ppp connectivity.

 set mru 1492
 #set mtu 1492
# This was the cause of failure.
 # See man ppp for more info.
 # If MTU is set, ppp will not accept MRU values less than MTU.
 # e.g. MTU = 1492. Now if your ISP has MTU = 1460(my case), then
 # ppp on your PC, will not connect to ppp server at your ISP side.
 # So DO NOT set MTU explicitly.


 set authname myusername
 set authkey mypassword   
 set dial
 set login

 add default HISADDR

 enable dns
# a must, if DHCP server is enabled in adsl modem
# and if you don't wanna edit   /etc/resolv.conf
# each time before connecting tp ISP's ppp server.
#Now you don't need to touch /etc/resolv.conf

-

My /etc/resolv.conf is updated each time I start
ppp, so I didn't needed to edit it.
I simply started ppp via

ppp -ddial adsl

I also didn't start ppp at bootup, as it requires that
your adsl modem must be powered on before FreeBSD
begins booting, which is not the usual case for me.

Also, as soon as I started ppp, an ip address is assigned to
tun0  interface by ISP, while fxp0 was assigned its ip
address via DHCP server enabled in adsl modem, even before
I attempted to dial ppp. That is expected.

I also tested this configuration with DHCP server disabled
in adsl modem and it too worked successfully, except
I need to chnage the line fxp0=DHCP to manually assigned
ip address one, no other change was needed.

The problem might be I was I trying to explcitly set MTU
to be 1492, which ppp takes as minimum value - ie no MTU
value less than 1492 is agreed upon by user ppp.

My ISP's MTU was 1460, and since 1460  1492, so ppp
was not agreeing upon MTU value and no connection was
made.

Thanks again all  of you guys for sorting this out. :)

Mean while I created a script to start and stop ppp
service for a profile. This script is specifically written for
csh/tcsh shell - the default one for FreeBSD, so some
changes need to be made if it is to be run in other
shells.

Just go to c shell and type
pppdo profilename start | stop

where 'profilename' is the desired profilename defined in
etc/ppp/ppp.conf, and either you 'start' ppp or 'stop' ppp.


 


Here goes the script:  pppdo.sh

#!/bin/csh

if ( $#argv != 2 ) then
   echo Usage: $0 ppp_profile start | stop
   exit
endif

switch ($2)
case start:
/usr/sbin/ppp -ddial $1
; breaksw
case stop:
killall -INT ppp
killall -HUP ppp
; breaksw
  default:
echo $0 : Invalid Cmd
; breaksw
endsw

-

 NOTE: before executing this script make sure it is executable
 If not, type this at shell:
 chmod +x ./pppdo.sh

 After executing this script try pinging to a remote site to confirm
 connectivity, e.g. type this at shell:
 ping -c5 freebsd.org
 If you get 0.0% packet loss, then you made it!


So, the only files that require modifications are
/etc/ppp/ppp.conf   and   /etc/rc.conf

No other file need to be modified to use user ppp,
no matter whether DHCP server on your adsl modem
is enabled or disabled, it doesn't matter - just use the
configuration mention above.

Then use the script as:

./pppdo adsl start

to start the ppp profile named adsl(tun0 interface is
created), and use

./pppdo adsl stop
to stop the ppp. This will destroy the tun0 interface too.


 PS: The user account from which this script is to be run, must be a
 member of network group too, though network group need not to be
 the user's login group. This is the requirement of user ppp itself, and
 not of this script.



Regards
-- 
Jack
___

Re: pppoe configuration and dns name resolution

2012-10-20 Thread Polytropon
On Sat, 20 Oct 2012 09:42:31 +0530, Jack wrote:
 Hi again,
 
 This time I disabled DHCP on my fxp0 interface and
 in my adsl modem too.
 But the problem still exists.
 
 This time I tried both approaches:
  assigned an IP address explicitly to fxp0, and
 then no explicit assignment to fxp0.

That should be the easiest test setting.



 I still don' get why FreeBSD is having trouble
 connecting via PPP.

Seems to be a specific problem. There is no general problem with
PPPoE on FreeBSD.



 I am trying every combinations that might work,
 but still no luck.
 Any help will be appreciated.

Try to limit variables as much as possible. Control one thing
per time.



 I'm posting my config files. The statements in comments
 are those that I already tried enabling them.
 
 
 ## /etc/rc.conf
 hostname=jacks_lappy
 #ifconfig_fxp0=DHCP
 #ifconfig_tun0=
 ifconfig_fxp0=inet 192.168.1.4 netmask 255.255.255.0
 #ifconfig_fxp0=

Is this IP inside your network?

In my old setting, I had defined the IP for the NIC connected
to the modem as 192.168.0.1, but my own network (and therefor
also the 2nd NIC in the machine) in 192.168.1.* - I don't know
if the first could have been omitted, just doing =up for the
NIC connected to the modem.




 sshd_enable=YES
 moused_enable=YES
 powerd_enable=YES
 # Set dumpdev to AUTO to enable crash dumps, NO to disable
 dumpdev=AUTO
 
 hald_enable=YES
 dbus_enable=YES

No problem here, not related.



 routerenable=NO

This option does not exist. See /etc/defaults/rc.conf for a list
of them. I haven't used that option in the working setup.



 #defaultrouter=192.168.1.1

Correct - I also did not define a default router.



 ppp_enable=YES
 ppp_mode=ddial
 ppp_nat=NO
 ppp_profile=adsl
 ppp_adsl_unit=0

I've also not used the last parameter. The tun0 interface would
have been generated automatically.

Everything implies that the _kernel_ has all the neccessary
functionality enabled (tun interface, PPPoE related netgraph
modules and NIC support).



 I tried to specify tun0 interface explicitly,
 but still no luck.

No need to do so.



 When I start ppp using:
   service ppp start
 
 It shows tun0 is busy.

Which is correct.



 ## etc/resolv.conf
 #Open DNS nameservers:
 nameserver 208.67.222.222
 nameserver 208.67.220.220

Those are OpenDNS resolvers. I've been using two provided by my
ISP, and also ran named myself later on.




 ## /etc/ppp/ppp.conf
 
 default:
  set log Phase chat lcp ipcp ccp tun command lqm
  set ifaddr 10.0.0.1/0  10.0.0.2/0  0.0.0.0  0.0.0.0
  # set ifaddr 10.0.0.1/0 10.0.0.2/0  255.255.255.255 0.0.0.0
  nat enable no
 
 adsl:
  set device PPPoE:fxp0
  #set device PPPoE:tun0
  set mru 1492
  set mtu 1492
  set ctsrts off
  set speed sync
  set dial
 
  enable lqr
 
  set login
  set authname myusername
  set authkey mypassword 
  set timeout 120
  set redial 0 0
 
  add default HISADDR
  #enable dns


Why not try a minimal configuration?

myispname:
set device PPPoE:fxp0
set authname myusername
set authkey mypassword
set dial
set login
add default HISADDR

That should be everything which is needed. For better diagnostics,
add your custom options (like lpr or redial) later on.

As I said, all my examples and suggestions are taken from a working
example, different OS versions, different physical modems.



--
 
 ## output of ifconfig just after boot:
 
 fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
   options=2009RXCSUM,VLAN_MTU,WOL_MAGIC
   ether 00:16:d3:0c:42:22
   inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255
   inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6
   nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
   media: Ethernet autoselect (100baseTX full-duplex)
   status: active

Looks good so far - connected to the modem.




 tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500
   options=8LINKSTATE
   nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
   Opened by PID 1231

Does not look good - no IP assigned.



 ## output of ifconfig after I started ppp using
 ## service ppp start

The ppp should have been started automatically...



 fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
   options=2009RXCSUM,VLAN_MTU,WOL_MAGIC
   ether 00:16:d3:0c:42:22
   inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255
   inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6
   nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
   media: Ethernet autoselect (100baseTX full-duplex)
   status: active

Again, looks correct.




 tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500
   options=8LINKSTATE
   nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
   Opened by PID 1231

And again no IP here.



 

Re: pppoe configuration and dns name resolution

2012-10-20 Thread RW
On Sat, 20 Oct 2012 09:42:31 +0530
Jack wrote:

 Hi again,
 
 This time I disabled DHCP on my fxp0 interface and
 in my adsl modem too.
 But the problem still exists.
 
 This time I tried both approaches:
  assigned an IP address explicitly to fxp0, and
 then no explicit assignment to fxp0.

I'd leave fxp0 unset until you've fixed the other problems - it's not
necessary for PPP. 

Modems and routers in PPPoE bridging mode don't normally require any
adjustment or other access so there's probably no need to assign
address anyway.


 I still don' get why FreeBSD is having trouble
 connecting via PPP.

The original problem you quoted was with DNS and
that's explained by the DHCP on fxp0 overwriting resolv.conf with the
router/modem's own non-functional DNS proxy.


As regards ppp.conf mine was simply:

default:
  set log Phase tun command

adsl:
  set device PPPoE:vr0
  set authname my username
  set authkey  my password
  add default HISADDR


 ppp_adsl_unit=0
 
 
 I tried to specify tun0 interface explicitly,
 but still no luck.
 When I start ppp using:
   service ppp start
 It shows tun0 is busy.

Don't try to specify the tun device number. I've noticed in the past
that occasionally tun0 becomes unusable and ppp will switch to tun1.
I've seen this happen when I've been restarting ppp a lot. 


 From my understanding it shoud not matter whether fxp0 is
 assigned the  ip address via DHCP server on local lan or via
 manually - at least this concept works on windows.
 
 But in FreeBSD, if I enable dhcp on fxp0, then
 /etc/resolv.conf is created each time I boot in FreeBSD,
 so the only nameserver being 192.168.1.1, ie adsl
 modem ethernet interface.
 Even if I edit it to include nameservers of my ISP or OpenDNS
 this file is created each time FreeBSD boots, and these entries
 are lost, with only entry being 192.168.1.1
 

There's no good reason to use DHCP in this case, you can simply set a
static private IP address (typically a high address in the same /24 as
the modem). If you really must use DHCP then it can be reconfigured
globally or per interface  (type apropos dhclient).

  
I notice that the original resolv.conf you quoted was set by resolvconf.
I've never used this so I can't comment on whether it's helping or
hindering. I suspect it aimed at laptops switching between different
networks.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-19 Thread Polytropon
On Thu, 18 Oct 2012 20:03:50 +0100, RW wrote:
 On Tue, 16 Oct 2012 20:38:47 +0530
 Jack wrote:
  /etc/resolv.conf
  
  # Generated by resolvconf
  nameserver 192.168.1.1
 
 If 192.168.1.1 is the modem, how can it be a proxy nameserver? It
 doesn't have an internet connection if it's not terminating PPP.
 
 You have
 
ifconfig_fxp0=DHCP
 
 which means  you are picking up DHCP from the modem itself not the
 other side of the PPP link.  In bridging mode you only need to
 configure the underlying ethernet device if you want to route back-out
 into the router's LAN (PPPoE and IP can share a lan).
 
 You don't necessarily need DHCP with PPPoE because PPP can deliver the
 IP address, DNS etc by itself. If the ISP requires you to use DHCP you
 should probably have configured the tun0 interface instead of fxp0.

Exactly that's what I did describe in my message: Configuration
data is set in ppp.conf, no DHCP involved, and the actual IP will
be delivered to the tun0 interface, while fxp0 (in this case)
can be used for involving with NAT (if required). Setting the
nameserver to an _actual_ nameserver (either running named on
the machine, or relying on the ISP's nameservers) is required.
This is the easiest approach to dealing with PPPoE modems (if
they are used as actual modems without any additional routing,
DHCP or other functionality).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-19 Thread Jack
Hi again,

This time I disabled DHCP on my fxp0 interface and
in my adsl modem too.
But the problem still exists.

This time I tried both approaches:
 assigned an IP address explicitly to fxp0, and
then no explicit assignment to fxp0.

I still don' get why FreeBSD is having trouble
connecting via PPP.

I am trying every combinations that might work,
but still no luck.
Any help will be appreciated.
I'm posting my config files. The statements in comments
are those that I already tried enabling them.


## /etc/rc.conf
hostname=jacks_lappy
#ifconfig_fxp0=DHCP
#ifconfig_tun0=
ifconfig_fxp0=inet 192.168.1.4 netmask 255.255.255.0
#ifconfig_fxp0=

sshd_enable=YES
moused_enable=YES
powerd_enable=YES
# Set dumpdev to AUTO to enable crash dumps, NO to disable
dumpdev=AUTO

hald_enable=YES
dbus_enable=YES

routerenable=NO
#defaultrouter=192.168.1.1

ppp_enable=YES
ppp_mode=ddial
ppp_nat=NO
ppp_profile=adsl
ppp_adsl_unit=0


I tried to specify tun0 interface explicitly,
but still no luck.
When I start ppp using:
  service ppp start

It shows tun0 is busy.

--

## etc/resolv.conf
#Open DNS nameservers:
nameserver 208.67.222.222
nameserver 208.67.220.220


--

## /etc/ppp/ppp.conf

default:
 set log Phase chat lcp ipcp ccp tun command lqm
 set ifaddr 10.0.0.1/0  10.0.0.2/0  0.0.0.0  0.0.0.0
 # set ifaddr 10.0.0.1/0 10.0.0.2/0  255.255.255.255 0.0.0.0
 nat enable no

adsl:
 set device PPPoE:fxp0
 #set device PPPoE:tun0
 set mru 1492
 set mtu 1492
 set ctsrts off
 set speed sync
 set dial

 enable lqr

 set login
 set authname myusername
 set authkey mypassword   
 set timeout 120
 set redial 0 0

 add default HISADDR
 #enable dns

--

## output of ifconfig just after boot:

fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=2009RXCSUM,VLAN_MTU,WOL_MAGIC
ether 00:16:d3:0c:42:22
inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255
inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet autoselect (100baseTX full-duplex)
status: active
fwe0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
options=8VLAN_MTU
ether 06:e4:0a:1b:50:36
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
ch 1 dma -1
fwip0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
inet 127.0.0.1 netmask 0xff00
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500
options=8LINKSTATE
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
Opened by PID 1231

--

## output of ifconfig after I started ppp using
## service ppp start

fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=2009RXCSUM,VLAN_MTU,WOL_MAGIC
ether 00:16:d3:0c:42:22
inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255
inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
media: Ethernet autoselect (100baseTX full-duplex)
status: active
fwe0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
options=8VLAN_MTU
ether 06:e4:0a:1b:50:36
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
ch 1 dma -1
fwip0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
inet 127.0.0.1 netmask 0xff00
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500
options=8LINKSTATE
nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
Opened by PID 1231

--

Now it seems to me that there might be some sequence of statements in

Re: pppoe configuration and dns name resolution

2012-10-18 Thread RW
On Tue, 16 Oct 2012 20:38:47 +0530
Jack wrote:


 My network schematic is:
 
 PC --- ADSL modem - Internet
  192.168.1.2   192.168.1.1
 
...
 /etc/resolv.conf
 
 # Generated by resolvconf
 nameserver 192.168.1.1

If 192.168.1.1 is the modem, how can it be a proxy nameserver? It
doesn't have an internet connection if it's not terminating PPP.

You have

   ifconfig_fxp0=DHCP

which means  you are picking up DHCP from the modem itself not the
other side of the PPP link.  In bridging mode you only need to
configure the underlying ethernet device if you want to route back-out
into the router's LAN (PPPoE and IP can share a lan).

You don't necessarily need DHCP with PPPoE because PPP can deliver the
IP address, DNS etc by itself. If the ISP requires you to use DHCP you
should probably have configured the tun0 interface instead of fxp0.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-17 Thread Jack
On Tue, Oct 16, 2012 at 9:19 PM, Mark Blackman m...@exonetric.com wrote:

 On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote:

 I 'll try mpd5. Thanks.

 Actually, I was concerned with userland ppp, becoz of the
 scenarios where we have a FreeBSD machine and the only
 way to connect to internet is an adsl modem in bridge mode
 (assuming the mode in modem, can't be  changed).
 In such case the only utilty is ppp, which can be of help.

 Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe
 I'm missing your point.

 - Mark

Mark,  what I meant is when we have, say a fresh FreeBSD install, then
the only service we have at expose is ppp. To be able to use mpd5, or
other ports/packages we first need to connect to internet then only
we can install/use mpd5. So, by default we are stuck at using ppp builtin
with FreeBSD.

And yes by bridge mode I meant that username and password
are to be provided to OS, rather than storing them inside adsl modem.

The bridge mode works fine in my Windows XP setup. Nothing special
to configure, just need to go to network connections and create a new
connection, using username and password.
In XP, I'm using DHCP too, so that I don't need to manually
confgure interface IP address.

That's why I'm sure that my network setup is not a issue. The issue lies
somewhere in FreeBSD configuration or somewhere else.


Regards
-- 
Jack
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-17 Thread Jack
Hi,

 Thank you guys for your suggestions, and sharing your
 experiences with me.

 This time I deleted old /var/log/ppp.log file, and
 I did modify /etc/ppp/ppp.conf - just the location
 of ifaddr line is changed and some more logging
 options set -nothing else is changed.
 .

 The file is this now:

 /etc/ppp/ppp.conf :

 default:

 adsl:
 set log Phase chat lcp ipcp ccp tun command lqm

 set ifaddr 10.0.0.1/0  10.0.0.2/0  255.255.255.0  0.0.0.0

  set device PPPoE:fxp0
  set mru 1492
  set mtu 1492
  set ctsrts off
  set speed sync
  set dial

  enable lqr

  set login
  set authname myusername
  set authkey mypassword
  set timeout 120
  set redial 0 0

# set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
 # now this interface is set up at 2nd line in adsl profile

 add default HISADDR
  enable dns

  nat enable no



 -

Then I rebooted FreeBSD, in verbose mode enabled.

 After it booted,  I started ppp like this:

 #ppp -ddial adsl

 Here is the shell o/p along with verbose lines

 /usr/sbin/ppp -ddial adsl

 Working in ddial mode
 Using interface: tun0

  ;verbose lines
 tun0: buf attached
 WARNING: attempt to domain_add(netgraph) after domainfinalize()

 
-

 The output of ifconfig is:

 fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
 options=2009RXCSUM,VLAN_MTU,WOL_MAGIC
 ether 00:16:d3:0c:42:22
 inet 192.168.1.2 netmask 0xff00 broadcast 192.168.1.255
 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
 media: Ethernet autoselect (100baseTX full-duplex)
 status: active
 fwe0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
 options=8VLAN_MTU
 ether 06:e4:0a:1b:50:36
 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
 ch 1 dma -1
 fwip0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
 lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0
 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL
 lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6
 inet6 ::1 prefixlen 128
 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
 inet 127.0.0.1 netmask 0xff00
 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
 tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500
 options=8LINKSTATE
nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
 Opened by PID 1731

 
-

 The   /var/log/ppp.log   file contents:

 http://justpaste.it/1fcw



  Is there some standard sequence for the contents of /etc/ppp/ppp.conf ?
  I guess that may be the problem.



  The bridge mode works fine in my Windows XP setup. Nothing special
  to configure, just need to go to network connections and create a new
  connection, using username and password.
  In XP, I'm using DHCP too, so that I don't need to manually
  confgure interface IP address.

  That's why I'm sure that my network setup is not a issue. The issue lies
  somewhere in FreeBSD configuration or somewhere else.




  On Tue, Oct 16, 2012 at 9:19 PM, Mark Blackman m...@exonetric.com wrote:
  
   On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote:
  
   I 'll try mpd5. Thanks.
  
   Actually, I was concerned with userland ppp, becoz of the
   scenarios where we have a FreeBSD machine and the only
   way to connect to internet is an adsl modem in bridge mode
   (assuming the mode in modem, can't be  changed).
   In such case the only utilty is ppp, which can be of help.
  
   Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe
   I'm missing your point.
  


  Mark,
  what I meant to say is when we have, say a fresh FreeBSD install, then
  the only service we have at expose is ppp. To be able to use mpd5, or
  other ports/packages we first need to connect to internet then only
  we can install/use mpd5. So, by default we are stuck at using ppp builtin
  with FreeBSD. :(

  By bridge mode I meant that username and password
  are to be provided to OS, rather than storing them inside adsl modem.

PS:  I sent this mail with /var/log/ppp.log contents yesterday but
   it seems that list moderator rejected the post due to its large
   size.
   So, I'm pasting the link for contents of /var/log/ppp.log



 Regards
-- 
Jack
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-16 Thread Mark Blackman

On 16 Oct 2012, at 16:08, Jack jacks.1...@gmail.com wrote:

 Hi
 
 I'm new as a FreeBSD user, and trying to configure my
 pppoe connection.

[snip]

 
 fxp0 is the ethernet interface of my PC via which adsl modem is connected.
 
 Any suggestions  ...

Consider using the ports mpd5 daemon for a PPPoE connection instead.
I had a lot of trouble getting PPPoE to work with userland 'ppp', but
mpd5 worked fine. 

- Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-16 Thread Jack
On Tue, Oct 16, 2012 at 8:49 PM, Mark Blackman m...@exonetric.com wrote:

 On 16 Oct 2012, at 16:08, Jack jacks.1...@gmail.com wrote:

 Hi

 I'm new as a FreeBSD user, and trying to configure my
 pppoe connection.

 [snip]


 fxp0 is the ethernet interface of my PC via which adsl modem is connected.

 Any suggestions  ...

 Consider using the ports mpd5 daemon for a PPPoE connection instead.
 I had a lot of trouble getting PPPoE to work with userland 'ppp', but
 mpd5 worked fine.

 - Mark

I 'll try mpd5. Thanks.

Actually, I was concerned with userland ppp, becoz of the
scenarios where we have a FreeBSD machine and the only
 way to connect to internet is an adsl modem in bridge mode
(assuming the mode in modem, can't be  changed).
In such case the only utilty is ppp, which can be of help.

I'm using FreeBSD 9.1 RC-2.

Regards
-- 
Jack
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-16 Thread Mark Blackman

On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote:

 I 'll try mpd5. Thanks.
 
 Actually, I was concerned with userland ppp, becoz of the
 scenarios where we have a FreeBSD machine and the only
 way to connect to internet is an adsl modem in bridge mode
 (assuming the mode in modem, can't be  changed).
 In such case the only utilty is ppp, which can be of help.

Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe
I'm missing your point.

- Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-16 Thread Mark Blackman

On 16 Oct 2012, at 16:49, Mark Blackman m...@exonetric.com wrote:

 
 On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote:
 
 I 'll try mpd5. Thanks.
 
 Actually, I was concerned with userland ppp, becoz of the
 scenarios where we have a FreeBSD machine and the only
 way to connect to internet is an adsl modem in bridge mode
 (assuming the mode in modem, can't be  changed).
 In such case the only utilty is ppp, which can be of help.
 
 Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe
 I'm missing your point.

More accurately, bridge mode (on the modem) means your FreeBSD box will
need to be the termination point of the PPPoE link rather than the modem
itself and so you need to run something to terminate the PPPoE packets
and mpd5 will do that (among other things).

- Mark

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-16 Thread andrew clarke
On Tue 2012-10-16 20:38:47 UTC+0530, Jack (jacks.1...@gmail.com) wrote:

 I'm new as a FreeBSD user, and trying to configure my
 pppoe connection.
 
 After reading handbook and searching on various forums,
 I prepared the ppp.conf file, and tried starting the ppp via
 # ppp -ddial adsl
 
 Here 'adsl' is the profile name, in /etc/ppp/ppp.conf.
 I also tried
 #ppp -auto adsl
 but the error message was same.

...

I use a similar setup here except I use static IPs for both the ADSL modem
(in bridge mode) and the FreeBSD box connecting to it. The FreeBSD box
then runs a DHCP server (dns/dnsmasq in ports) for any other machines
on my LAN to talk to.

 I'm pasting my related configuration files if they can help.
 Please tell me if any other files are needed.

Nothing really stands out glancing at your configs. I'd be looking for
clues in /var/log/ppp.log.

 tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500
   options=8LINKSTATE
   inet 10.0.0.1 -- 10.0.0.2 netmask 0xff00
   nd6 options=21PERFORMNUD,AUTO_LINKLOCAL
   Opened by PID 1907

tun0 should have been reassigned a public address here by the remote
PPP host (your ISP). Also the MTU is still stuck at 1500 despite you
correctly configuring 1492 in ppp.conf. So I think the PPP negotiation
is failing. ppp.log may explain why.

Mine looks like this:

tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1492
options=8LINKSTATE
inet 58.6.247.132 -- 203.215.15.252 netmask 0x
Opened by PID 45904


Below is my (edited) rc.conf  ppp.conf. I simply start  stop the PPP
session with service ppp start  service ppp stop as root.


## /etc/rc.conf

hostname=blizzard.phoenix
ifconfig_bge0=inet 192.168.1.4  netmask 255.255.255.0

zfs_enable=YES
syslogd_flags=-c
gateway_enable=YES
sshd_enable=YES
inetd_enable=YES
fusefs_enable=YES
openntpd_enable=YES
dovecot_enable=YES
named_enable=NO
dnsmasq_enable=YES
postfix_enable=YES

sendmail_enable=NO
sendmail_submit_enable=NO
sendmail_outbound_enable=NO
sendmail_msp_queue_enable=NO

ppp_enable=YES
ppp_mode=ddial
ppp_nat=YES
ppp_profile=iinet

firewall_enable=YES
firewall_script=/etc/ipfw.rules
firewall_logging=YES


## /etc/ppp/ppp.conf

default:
  set log phase chat lcp ipcp ccp tun command lqm
  set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255
  nat enable yes
  disable lqr
  disable ipv6cp
  set echoperiod 30
  enable echo

iinet:
  set device PPPoE:bge0
  set authname myusername
  set authkey mypassword
  set dial
  set login
  set mru 1492
  set mtu 1492
  set redial 15 0
  add default HISADDR
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: pppoe configuration and dns name resolution

2012-10-16 Thread Polytropon
On Tue, 16 Oct 2012 20:38:47 +0530, Jack wrote:
 I'm new as a FreeBSD user, and trying to configure my
 pppoe connection.

I've been using PPPoE with a DSL modem for many years, using
FreeBSD 4, 5 and 7 with the system's PPPoE tools. The IP
was provided to the computer directly, so no DHCP in the
modem involved (real modem mode).

In /etc/ppp/ppp.conf, I did simply define:

myispname:
set device PPPoE:xl0
set authname customer1234567@myispname
set authkey X
set dial
set login
add default HISADDR

No further changes to that file. Note that here, xl0 is the
interface directly connected to the modem.

And in /etc/rc.conf:

ifconfig_xl0=192.168.0.1 netmask 0xff00
ppp_enable=YES
ppp_profile=myispname
ppp_mode=ddial
ppp_nat=YES

So the system would automatically start the connection
at boot time. The tun0 interface would then be associated
the public IP designated when the PPPoE connection was up
and running.

Note that ppp_nat only has been needed to transition the
connection through a 2nd NIC into the local net, making my
machine a gateway (including related services, such as natd
and dhcpd).

I also think initializing the NIC xl0 is not entirely needed,
maybe up would have been sufficient.

For actually being able to use PPPoE, I did add the required
components to the kernel, because that approach was state of
the art at those times. :-)

In /etc/resolv.conf I did add the nameservers published by
my ISP. Anything worked automatically, I did not need to make
further changes.

Basically my setup looks like yours, except that (as I said) I
did not use any additional features of the DSL modem (as it
did not have such features). :-)


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org