From owner-freebsd-questions@FreeBSD.ORG Tue Jan 29 02:37:32 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C597F16A46D for ; Tue, 29 Jan 2008 02:37:32 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-out-04.forthnet.gr (mx-out.forthnet.gr [193.92.150.104]) by mx1.freebsd.org (Postfix) with ESMTP id 35E4A13C4FB for ; Tue, 29 Jan 2008 02:37:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mx-av-04.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-04.forthnet.gr (8.13.8/8.13.8) with ESMTP id m0T2bS1V006684; Tue, 29 Jan 2008 04:37:28 +0200 Received: from MX-IN-04.forthnet.gr (mx-in-04.forthnet.gr [193.92.150.163]) by mx-av-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id m0T2bS9B031126; Tue, 29 Jan 2008 04:37:28 +0200 Received: from kobe.laptop (ppp47-170.adsl.forthnet.gr [62.1.64.170]) by MX-IN-04.forthnet.gr (8.14.2/8.14.2) with ESMTP id m0T2bQwx006160; Tue, 29 Jan 2008 04:37:27 +0200 Authentication-Results: MX-IN-04.forthnet.gr smtp.mail=keramida@ceid.upatras.gr; spf=neutral Authentication-Results: MX-IN-04.forthnet.gr header.from=keramida@ceid.upatras.gr; sender-id=neutral Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m0T2bQgU041205; Tue, 29 Jan 2008 04:37:26 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m0T2bM0F041183; Tue, 29 Jan 2008 04:37:22 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 29 Jan 2008 04:37:22 +0200 From: Giorgos Keramidas To: Bhuvaneswari Ramkumar Message-ID: <20080129023722.GA23798@kobe.laptop> References: <20080128214202.GO41095@hal.rescomp.berkeley.edu> <7c7927920801281518h5adfb91dta827fcae39ebc09a@mail.gmail.com> <20080129010633.GA6442@kobe.laptop> <7c7927920801281803r87b733epb6788f93e6ac512d@mail.gmail.com> <7c7927920801281810o17d39136qbc49b8c2ea44719@mail.gmail.com> <7c7927920801281329n609abb8ah63a18f1afb56099d@mail.gmail.com> <20080128214202.GO41095@hal.rescomp.berkeley.edu> <7c7927920801281518h5adfb91dta827fcae39ebc09a@mail.gmail.com> <20080129010633.GA6442@kobe.laptop> <7c7927920801281803r87b733epb6788f93e6ac512d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c7927920801281810o17d39136qbc49b8c2ea44719@mail.gmail.com> <7c7927920801281803r87b733epb6788f93e6ac512d@mail.gmail.com> Cc: freebsd-questions@freebsd.org, ccowart@rescomp.berkeley.edu Subject: Re: Network configuration in FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2008 02:37:32 -0000 On 2008-01-28 21:03, Bhuvaneswari Ramkumar wrote: > ok here u go, the exact output of the the commands: Excellent! Thank you :-) > #ifconfig -a > > em0: flags=8802 mtu 1500 > options=b > ether :0d:56:f0:f1:ba > media:Ethernet autoselect (100baseTX ) > status: active > > plip0:flags=108810 mtu 1500 > lo0:flags=8049 MTU 16384 > inet 127.0.0.1 netmask 0xff000000 > inet ::1 prefixlen 128 > inet6 fe80 :: 1% lo0 prefixlen 64 scopeid 0x3 See the `active' status and the `media' description? This means you have a network cable connected and FreeBSD has autodetected that you are using a full-duplex 100 Mbit/s link. That's good :) On 2008-01-28 21:10, Bhuvaneswari Ramkumar wrote: > the netstat reads: > > #netstat -nr > > Routing tables > > Internet: > Destination Gateway Flags REfs Use Netif Expire > 127.0.0.1 127.0.0.1 UH 0 41 lo0 > > > Internet 6 > > Destination Gateway Flags Netif > Expire > ::1 ::1 UH lo0 > fe80::%lo0/64 fe80::1%lo0 U lo0 > fe80::1%lo0 link#3 UHL lo0 > ff01::/32 ::1 U lo0 > ff02 :: %lo0/32 ::1 UC lo0 Hmmm. There seems to be something very 'odd' about your interfaces. * There is no `lo0' loopback interface, which commonly uses the 127.0.0.1 address. * The 127.0.0.1 address is assigned to plip0 (IP over parallel port), which seems wrong. * The em0 interface has no address. Can you try the following commands, so see if you can *manually* set up the interfaces? 1. Bringing down the 'plip0 interface ------------------------------------- # ifconfig plip0 unplumb This should bring down and delete the plip0 interface. You don't really need it when em0 starts working. 2. Bringing up the `lo0' loopback interface ------------------------------------------- # ifconfig lo0 inet 127.0.0.1/32 up This will bring up the `lo0' interface, with the correct address. 3. Bringing up the em0 interface -------------------------------- Finally, try bringing up the `em0' interface with dhclient OR ifconfig. You don't need *both*. One of them should be sufficient... 3.1. Using a dynamic/automatic address for em0 ---------------------------------------------- If you are using DHCP (automatic address configuration, i.e. from a DSL modem, or similar) it should be sufficient to run: # dhclient em0 3.2. Using a static address for em0 ----------------------------------- If you are not using DHCP, and you have a `static' address, like the one I use on the workstation I'm using to type this, you should be able to use ifconfig like: # ifconfig inet a.b.c.d/count up where `a.b.c.d' is the IP address you want to assign, and `count' a number like `24' or `28'. The correct settings depends on how your network is configured, but an example would look like: # ifconfig em0 192.168.1.180/24 up 4. Check that em0 really got an address and is "UP" --------------------------------------------------- Then you should see something like: em0: flags=8802 mtu 1500 options=b ether :0d:56:f0:f1:ba inet 192.168.1.180 netmask 0xffffff00 broadcast 192.168.1.255 media:Ethernet autoselect (100baseTX ) status: active 5. Add the default router/gateway --------------------------------- If you see the "UP" flag in the first line, and you get the `inet' line options correctly (address and netmask), the final step should be to configure the `default router', i.e.: # route add default 192.168.1.1 6. Saving it all in `/etc/rc.conf' for the next boot ---------------------------------------------------- If you get all the steps right, and you _do_ get connectivity going, then you should be able to manually edit the file `/etc/rc.conf' and set configure everything by using something similar to: network_interfaces='lo0 em0' ifconfig_lo0='inet 127.0.0.1/32' ifconfig_em0='inet 192.168.1.180/24' defaultrouter='192.168.1.1' The syntax is really simple, but if you need an explanation of what it all means, please feel free to ask :) - Giorgos