From owner-freebsd-questions@FreeBSD.ORG Tue Jan 29 03:33:46 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 1A8CE16A417 for ; Tue, 29 Jan 2008 03:33:46 +0000 (UTC) (envelope-from bhuvaneswari.ramkumar@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by mx1.freebsd.org (Postfix) with ESMTP id 5748613C47E for ; Tue, 29 Jan 2008 03:33:45 +0000 (UTC) (envelope-from bhuvaneswari.ramkumar@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so2195871fgg.35 for ; Mon, 28 Jan 2008 19:33:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=BRv6HQQLRVp75N4Isx99GAV5k4Nc3IYIAa+evmwOklk=; b=R6whlOMfhiVQaDffPZ/GJeY31HUfqrLkpyDvxY9SsDeTHrzUnb1Bt43TgAQd4Z+6PX8BmIVb3gfmb3T5tnwuggN8SDSO4bbmdfNYSei2F/ZylyVhAEUgKS9/RT6CgnYi1rpy1ruGLn+QjQGyj6J5V6sqa/w0q8bEXf0LzaUMhHs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=nKRfzGoJ9CW3I2W7CnUHSOzD8HkES68PEinAxKw7Z/VVGmj8MdsdiaMIE5E2dKaGTvH0TtJeHP/r8LevXTPrvyIAbXBR24ptkX5LsqH1dFIshEsps8uD3/YcB/sjAt/FTP1+AIcbaKjgPyVGY2fTVhWQMYqiVSub+i7adAMvplk= Received: by 10.86.84.5 with SMTP id h5mr5960836fgb.27.1201577621986; Mon, 28 Jan 2008 19:33:41 -0800 (PST) Received: by 10.86.96.13 with HTTP; Mon, 28 Jan 2008 19:33:41 -0800 (PST) Message-ID: <7c7927920801281933y421b9d52ua5c19f0bbb046f39@mail.gmail.com> Date: Mon, 28 Jan 2008 22:33:41 -0500 From: "Bhuvaneswari Ramkumar" Sender: bhuvaneswari.ramkumar@gmail.com To: "Giorgos Keramidas" In-Reply-To: <20080129023722.GA23798@kobe.laptop> MIME-Version: 1.0 References: <7c7927920801281329n609abb8ah63a18f1afb56099d@mail.gmail.com> <20080128214202.GO41095@hal.rescomp.berkeley.edu> <7c7927920801281518h5adfb91dta827fcae39ebc09a@mail.gmail.com> <20080129010633.GA6442@kobe.laptop> <7c7927920801281810o17d39136qbc49b8c2ea44719@mail.gmail.com> <7c7927920801281803r87b733epb6788f93e6ac512d@mail.gmail.com> <20080129023722.GA23798@kobe.laptop> X-Google-Sender-Auth: 1e605775a05e059e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 03:33:46 -0000 Giorgos, Thanks a lot for the excellent reply, yes I do have some questions about this but before that: the unplumb operation for pilp0 doesnt work. ifconfig: SIOCIFDESTROY: Invalid argument is the message I get for this. Sincerely, Bhuvana On Mon, Jan 28, 2008 at 9:37 PM, Giorgos Keramidas wrote: > 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 > > >