From owner-freebsd-questions@freebsd.org Fri Jun 15 22:08:21 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 748FA101E253 for ; Fri, 15 Jun 2018 22:08:21 +0000 (UTC) (envelope-from va6bmj@gmail.com) Received: from mail-ua0-x244.google.com (mail-ua0-x244.google.com [IPv6:2607:f8b0:400c:c08::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFBD785D0C for ; Fri, 15 Jun 2018 22:08:20 +0000 (UTC) (envelope-from va6bmj@gmail.com) Received: by mail-ua0-x244.google.com with SMTP id s13-v6so7355607uad.2 for ; Fri, 15 Jun 2018 15:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AOJL8eJU4XdOwq9dJtek73yFypn5U+K0XYE7X9mEARM=; b=tJlJwCKnWo0LNIOPXfTIv2kmECLHI0as/E3rfeeAp1EJaxUc7CLXt8uKANgWc11wL4 E8ElbfhdUhIkt9L9HM2QL7fFj3ibRA/KQgTOUNKXUkQB6FTbqGet/FNNvOT8zd3u7963 jDctsLBxVzgii68oCYMO5zqqGePUPeODb1pujkf1/9JSs/NLYXff1f2VeXKelL4ftphU CkSdVysaZKiu1qbjabwY8wRl+dp3f/bfdZRPoFynMQMhDlDsVRiHOun89ndx6j2tkqE+ D0V2QZ1pQdQSzsKJxC65QG5UMW5Iz75my0DIpzNq1+je+VXILtGdV3Xpecdmu4H+WYqX cFsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AOJL8eJU4XdOwq9dJtek73yFypn5U+K0XYE7X9mEARM=; b=hvzWY2D+0Bku/ygF6sDXaq3qyVJUeG7g+R+sDbwKpx2vrx3q2X9qnVijfddHqeoQRT rI5T/74vQWC6TUFN4kIGy2GGlmLfM4s8R24tLWNiFFtuScEzjs50Yyf6wLkquOmVc4ea MFZHBjOn8n0pMQwHmp+yQIzgYBDJgoK5ALwwwe83Z7lgpVLqHnWuCVPa9R77wTLtHF6T YXAGbvsBguY0GN/YWGyDA0xfQ9so5ajqleEPPu1lszTqkadZmCBIWZk/A8BJWw2JFJ+q g+7Aw1ZWm+InKAxWZuYkaggOv4ebcaTbpDjXfyORBKbiwMAI0SQvYYcwtAqNtsNOdizq txMA== X-Gm-Message-State: APt69E3YbR6ro9O6pXeghTHVNehpmykCCDi8r+6Pxn7wGmBGBTUc1u2x TrY65OiGkmVz3X07VyUknzzbVZS7Yg+xfwofZeK5Lg== X-Google-Smtp-Source: ADUXVKJdakdeT9MK7VkvyorbS8xQyqJBJe3Uhn6su5B7CoVmLGq81CF8KyP/3D51zLVSx0/BylfNCPRZ5XSOzAriKtk= X-Received: by 2002:ab0:4c6c:: with SMTP id d44-v6mr2312606uag.2.1529100500039; Fri, 15 Jun 2018 15:08:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:46e:0:0:0:0:0 with HTTP; Fri, 15 Jun 2018 15:08:19 -0700 (PDT) In-Reply-To: <20180615233707.8645c246.freebsd@edvax.de> References: <20180613102426.3874c581.freebsd.ed.lists@sumeritec.com> <20180613162137.5cc6794a.freebsd.ed.lists@sumeritec.com> <3E3890A6-72F9-4D80-A021-837FFDB35A39@theory14.net> <20180614093928.6f39434e.freebsd.ed.lists@sumeritec.com> <20180614161923.5246ae81.freebsd.ed.lists@sumeritec.com> <20180615102548.1c686d1b.freebsd.ed.lists@sumeritec.com> <20180615233707.8645c246.freebsd@edvax.de> From: B J Date: Fri, 15 Jun 2018 22:08:19 +0000 Message-ID: Subject: Re: Problems Connecting Laptop To Modem To: Polytropon Cc: freebsd@dreamchaser.org, Chris Gordon , freebsd-questions , Erich Dollansky Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2018 22:08:21 -0000 > From your netstat output (later on), it seems that you > connect to 192.168.0.1, so if this really is the IP of > one of your machines, there's a big problem with your > current configuration. > At the moment, it doesn't look like a hardware issue. The laptop is second-hand. It was in rough shape when I got it from the previous owners so I'm thinking that there might be an on-board hardware malfunction. It might be the hard drive as it didn't want to boot at first because of, if I remember correctly, some corrupted sectors. I have some extra HDs on hand. I might try swapping one of those with the one that's in the machine, installing FreeBSD, and then seeing if I get the same problem. Since the laptop's not essential to what I do at home, I may as well have a bit of fun with it, right? > > My suggestion: > > Take a machine that properly connects to your modem/router and > gains Internet access this way as desired. Collect information > about which values exist on your network. Don't guess values. :-) > > The following commands should work on FreeBSD and Linux: > > # arp -a > > # netstat -rn > > # ifconfig -a > > (depending on Linux, the "ip" program has to be used instead) > > Even though it might sound stupid, use pen & paper to make a > small diagram of your network. Write down the IPs and other > elements of the configuration. > > If you have a Linux live system connecting without any further > configuration, it's quite possible you have a DHCP server in > your modem/router running. In that case, don't try to configure > things manually, it will just interfere with this mechanism. > Instead, use > > ifconfig_nfe0="DHCP" > > in /etc/rc.conf. A variation is > > ifconfig_nfe0="SYNCDHCP" > > Check /etc/rc.conf for duplicate entries. The _last_ entry > of the same kind will be in effect, as it's basically just > a shell script with assignments to shell variables. > > Of course you need to specify the default router address, but > don't guess it - determine it from a different system. If it > is the _default_ address that your modem/router uses (and you > didn't change it), maybe consult its documentation, the address > should be listed there. It can be things like 192.168.0.1, > 192.168.1.1, 192.168.178.1, who knows. > > Check if HDCP populated /etc/resolv.conf. In many settings, > the modem/router will also be a nameserver (even if it just > "relays" your queries and the replies). This means: The IP > you're seeing there is the IP of your modem/router. > > In worst case, don't configure anything in /etc/rc.conf and do > a little experimentation. Run a tcpdump (or maybe Wireshark, > ex Ethereal) on your network interface and then do all the steps > manually: Configure the interface, set default routing, try to > obtain an IP via DHCP (using dhclient), and see it /etc/resolv.conf > gets populated (which DHCP should fill with the correct values). > Then try to ping internally with IP, extermally with IP, try to > resolve a hostname, ping it, open a browser for a HTTP connection, > and so on. Monitor what you're doing as initially mentioned (to > see if you actually _see_ what you expect, like ARP messages, > a DHCP handshake, ICMP pings, and HTTP traffic). If this all > works, make the settings permanent - even if you only verified > that using DHCP was the correct thing to begin with. :-) > > Good luck! > PS. > "Trial & error" is not a programming concept. ;-) I've been writing code off and on for more than 40 years, going back to the days of WATFOR and WATFIV. Trial-and-error programming helped me finish my B. Sc. Thanks to everyone for all the advice and information. Two things have come from this. One is that I finally set up my tower machines so that the systems on them are now nearly identical to what I have on my laptop. I've been meaning to do this for years but I had little incentive to do so. The second one is that I'm learning something about networking, which should help me with what I have at home. BMJ