From owner-freebsd-questions@FreeBSD.ORG Tue Oct 16 21:21:31 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82077740 for ; Tue, 16 Oct 2012 21:21:31 +0000 (UTC) (envelope-from garya@dreamchaser.org) Received: from nightmare.dreamchaser.org (nightmare.dreamchaser.org [12.32.44.142]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1A78FC12 for ; Tue, 16 Oct 2012 21:21:30 +0000 (UTC) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [12.32.36.73]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id q9GLLN0B015372; Tue, 16 Oct 2012 15:21:23 -0600 (MDT) (envelope-from garya@dreamchaser.org) Message-ID: <507DCFD3.2060409@dreamchaser.org> Date: Tue, 16 Oct 2012 15:21:23 -0600 From: Gary Aitken User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120609 Thunderbird/13.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org, jacks.1785@gmail.com Subject: Re: pppoe configuration and dns name resolution References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [12.32.36.65]); Tue, 16 Oct 2012 15:21:23 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 21:21:31 -0000 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 set authkey add! default HISADDR I start ppp using: /usr/sbin/ppp -quiet -dedicated your_profile > ---------------------------------------------------------------------------------------- > > > ifconfig output: > > fxp0: flags=8843 metric 0 mtu 1500 > options=2009 > ether 00:16:d3:0c:42:22 > inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 > nd6 options=29 > media: Ethernet autoselect (100baseTX ) > status: active > fwe0: flags=8802 metric 0 mtu 1500 > options=8 > ether 06:e4:0a:1b:50:36 > nd6 options=29 > ch 1 dma -1 > fwip0: flags=8802 metric 0 mtu 1500 > lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0 > nd6 options=29 > lo0: flags=8049 metric 0 mtu 16384 > options=600003 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 > inet 127.0.0.1 netmask 0xff000000 > nd6 options=21 > tun0: flags=8051 metric 0 mtu 1500 > options=80000 > inet 10.0.0.1 --> 10.0.0.2 netmask 0xffffff00 > nd6 options=21 > 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 mtu 1492 inet 12.32.44.142 --> 216.14.225.104 netmask 0xffffffff Opened by PID 219 Gary