From owner-freebsd-questions@FreeBSD.ORG Sat Oct 20 04:12:33 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 199633C1 for ; Sat, 20 Oct 2012 04:12:33 +0000 (UTC) (envelope-from jacks.1785@gmail.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id D3ADC8FC0A for ; Sat, 20 Oct 2012 04:12:32 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id k10so1071549iag.13 for ; Fri, 19 Oct 2012 21:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nAwZBD0A+x5oMzMs7OQDqzPGtnJy2I7Or8wooGtv6i8=; b=stPMOEdan0vluPFq3tTBKp9ObrQqoy4izgF5Zf7Z/y5CbFjswPu7jO77xBVnj/RiAx UsVsWcThDIEwYsuL453+YlD7PEl6FUn2gBj1UWbEQpdeCKwJbLfOZv/FF7oeb0RizqTV ZNBKdeeBaZcdjQ9r3/3+cSF9OKVICO4GpYMyMwJANZ8EfoQLDLsOVzmW/FYwF+Pq7Zsr NzJrLYoHbwL7++M2EAMEBSaCENr14UzNWvy6f+RGF5mnDUASfFHVOBuqiIkr4FGJCpPz AQ2ZkfHZqHQhIur9YWUMwsELeHtWaEm3hIdJ082niLpcUJso+UWdjhwyu1zhxJ0NW7MR jLkg== MIME-Version: 1.0 Received: by 10.50.202.71 with SMTP id kg7mr3486320igc.55.1350706352067; Fri, 19 Oct 2012 21:12:32 -0700 (PDT) Received: by 10.64.11.166 with HTTP; Fri, 19 Oct 2012 21:12:31 -0700 (PDT) In-Reply-To: References: Date: Sat, 20 Oct 2012 09:42:31 +0530 Message-ID: Subject: Re: pppoe configuration and dns name resolution From: Jack To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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: Sat, 20 Oct 2012 04:12:33 -0000 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 set authkey set timeout 120 set redial 0 0 add default HISADDR #enable dns ---------------------------------------------------------------------------------------------------------------------- ## output of ifconfig just after boot: fxp0: flags=8843 metric 0 mtu 1500 options=2009 ether 00:16:d3:0c:42:22 inet 192.168.1.4 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6 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 nd6 options=29 Opened by PID 1231 ---------------------------------------------------------------------------------------------------------------------- ## output of ifconfig after I started ppp using ## service ppp start fxp0: flags=8843 metric 0 mtu 1500 options=2009 ether 00:16:d3:0c:42:22 inet 192.168.1.4 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6 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 nd6 options=29 Opened by PID 1231 ---------------------------------------------------------------------------------------------------------------------- Now it seems to me that there might be some sequence of statements in /etc/ppp/ppp.conf that works, and others don't But what is that magic sequence? PS: In windows there is no problem connecting via ppp, even if I use DHCP server enabled on my adsl modem, and modem is in bridge mode. So, there must be some way in FreeBSD too, that works regardless of whether ip address of fxp0(the ethernet interface to which adsl modem connects to PC), is assigned via a DHCP server on modem or manually. I understand that if DHCP is enabled on adsl modem, and fxp0 is assigned the ip address via this DHCP, then the PPP server of ISP to which we are trying to connect, will also assign a public IP address to the PPP client, which in case of FreeBSD is tun0 interface rather than fxp0 . In other words, tun0 interface here should be PPP client, and PPP server is at ISP side. Ths fxp0 interface is used for both types of traffic - local LAN traffic and the PPP traffic. PC <------------------------------> ADSL modem <--------------> ISP fxp0 (LAN DHCP Client) LAN DHCP server doesn't know about 192.168.1.2 192.168.1.1 LAN tun0 transparent to PPP traffic PPP client ( in bridge mode) PPP Server So, from ISP's PPP server's perspective, the only thing it sees on customer side is PPP client ie tun0 interface. PPP server doesn't know anything about adsl modem in between and any LAN at customer side. adsl modem just acts as a PPP traffic forwarder - that's why it is called a bridge mode of modem. So, tun0 interface is the interface to which ISP's PPP server will assign the public IP address. >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 Is this a FreeBSD design/bheaviour issue? Can anyone throw light on the issue I'm facing? Any possible tricks I might be missing, while configuring PPP interface? Regards, -- Jack