Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2012 15:21:23 -0600
From:      Gary Aitken <garya@dreamchaser.org>
To:        freebsd-questions@freebsd.org, jacks.1785@gmail.com
Subject:   Re: pppoe configuration and dns name resolution
Message-ID:  <507DCFD3.2060409@dreamchaser.org>
In-Reply-To: <CACmXQA3FtszXH92JDg9Gwv=YMm00ZL15F2pw3a5MbqfuV7Zd6w@mail.gmail.com>
References:  <CACmXQA3FtszXH92JDg9Gwv=YMm00ZL15F2pw3a5MbqfuV7Zd6w@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 10/16/12 09:08, Jack 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.
> 
> The tun0 interface is created, but when is tried pinging to well
> known sites, e.g. yahoo.com, etc. it says:
> "can't resolve hostname."
> 
> It seems a DNS issue first, but when I put my adsl modem
> in non-bridged mode, I was able to connect to any site.
> The IP address allocated to my PC is via DHCP, so
> no special configuration was needed in modem's
> non-bridged mode.

It's not a DNS issue;
tun0 isn't configured for the proper IP addr

> The problem arise only when I put adsl modem in
> bridged mode and tried dialing via ppp.
> 
> My network schematic is:
> 
> PC <-----------------------> ADSL modem <-----> Internet
>   192.168.1.2   192.168.1.1
> 
> DHCP is enabled in adsl modem.
> 
> I'm pasting my related configuration files if they can help.
> Please tell me if any other files are needed.
> 
> /etc/rc.conf
> 
> hostname="jacklappy"
> ifconfig_fxp0="DHCP"
> 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"

My config is slightly different, w/o dhcp and natd
I don't have any expertise with this, 
but when using bridging it's my understanding you should not configure 
the hardware interface -- in your case, fxp0
Perhaps the ifconfig_fxp0="DHCP" should be specified for tun0 instead.
My rc.conf says
  ifconfog_ep0=""
but then I'm not using dhcp, so I'm not sure whether it belongs on tun0 or fxp0.

> --------------------------------------------------------------------------------------------------
> 
> 
> /etc/resolv.conf
> 
> # Generated by resolvconf
> nameserver 192.168.1.1
> ----------------------------------------------------------------------------
> 
> 
> /etc/ppp/ppp.conf
> 
> default:
> 
> adsl:
>   set log Phase tun command
>   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
>   add default HISADDR
>   enable dns
>   nat enable no

Mine has only the following;
the main thing different is the "enable mssfixup"
and the '!' on the add command
I would think you need to at least get rid of the set ifaddr command,
which is causing tun0 to have the wrong ip addr

set log Phase Chap LCP IPCP CCP tun command
set device PPPoE:ep0
set mtu max 1492
set mru max 1492
enable mssfixup
set dial
set login
set timeout 0
set authname <myloginname>
set authkey <mypassword>
add! default HISADDR

I start ppp using:

/usr/sbin/ppp -quiet -dedicated your_profile

> ----------------------------------------------------------------------------------------
> 
> 
> ifconfig output:
> 
> fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
> 	options=2009<RXCSUM,VLAN_MTU,WOL_MAGIC>
> 	ether 00:16:d3:0c:42:22
> 	inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
> 	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> 	media: Ethernet autoselect (100baseTX <full-duplex>)
> 	status: active
> fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
> 	options=8<VLAN_MTU>
> 	ether 06:e4:0a:1b:50:36
> 	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> 	ch 1 dma -1
> fwip0: flags=8802<BROADCAST,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=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
> 	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
> 	inet6 ::1 prefixlen 128
> 	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
> 	inet 127.0.0.1 netmask 0xff000000
> 	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
> 	options=80000<LINKSTATE>
> 	inet 10.0.0.1 --> 10.0.0.2 netmask 0xffffff00
> 	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> 	Opened by PID 1907
> --------------------------------------------------------------------------------------------------------
> 
> fxp0 is the ethernet interface of my PC via which adsl modem is connected.

tun0 should show the ip addr assigned by your ISP:

tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
        inet 12.32.44.142 --> 216.14.225.104 netmask 0xffffffff 
        Opened by PID 219

Gary



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?507DCFD3.2060409>