From owner-freebsd-questions Wed Aug 18 11:20:56 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 849F115994 for ; Wed, 18 Aug 1999 11:20:43 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (loot.cs.rpi.edu [128.213.16.22]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id OAA75997; Wed, 18 Aug 1999 14:20:21 -0400 (EDT) Message-Id: <199908181820.OAA75997@cs.rpi.edu> To: "SuSE Linux 6.1 user" Cc: freebsd-questions@FreeBSD.ORG, crossd@cs.rpi.edu Subject: Re: How do i setup network cards in freebsd In-Reply-To: Message from "SuSE Linux 6.1 user" of "Thu, 19 Aug 1999 01:35:04 +0800." <37BAEEC8.A62C7412@mbox5.singnet.com.sg> Date: Wed, 18 Aug 1999 14:16:22 -0400 From: "David E. Cross" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I will make the one assumption that you are not using DHCP for this... You need to edit /etc/rc.conf. First you need to tell the system which network interfaces to enable, this is done with the variable 'network_interfaces'. This is a space deliminated list of all of the interfaces that you wish to configure. On very recent systems this variable can be set to "auto" to have the system try to config all the interfaces by itself. You likely do not have such a system, so you will need the more manual way. You need to collect a list of all the interfaces on your machine. I do this with the following command: > # ifconfig -a > xl0: flags=8843 mtu 1500 > inet 10.130.1.1 netmask 0xffffff00 broadcast 10.130.1.255 > ether 00:a0:24:bb:00:c4 > media: 100baseTX (100baseTX ) > supported media: autoselect 100baseTX 100baseTX 100baseTX 10baseT/UTP 10baseT/UTP 10baseT/UTP > lp0: flags=8810 mtu 1500 > tun0: flags=8010 mtu 1500 > sl0: flags=c010 mtu 552 > ppp0: flags=8010 mtu 1500 > lo0: flags=8049 mtu 16384 > inet 127.0.0.1 netmask 0xff000000 In this case I have network interfaces: xl0, lp0, tun0, sl0, ppp0, and lo0. Since you don't have them configured at all you will likely not see any of the indented information, since that is a result of the configuration ;). The 'lp0' driver is for a parallel port PLIP interface. "sl0" is a SLIP, 'ppp0' is for PPP. You will not want configure any of these. You will likely wish to configure any remaining interface, and you must configure lo0 (the loopback interface). For the above example the line in /etc/rc.conf is: network_interfaces="xl0 lo0" Now for each interface you need to tell it what IP it has, this is done by interface_IFNAME="options". So for the above example it is: ifconfig_xl0="inet 10.130.1.1 netmask 255.255.255.0" ifconfig_lp0="inet 127.0.0.1" # DO NOT CHANGE THIS. Finally you will want to setup the gateway for the system, this is done via: defaultrouter="IP" In my case this is: defaultrouter="10.130.1.254" So that makes the *entire* network config in /etc/rc.conf be: > network_interfaces="xl0 lo0" > ifconfig_xl0="inet 10.130.1.1 netmask 255.255.255.0" > ifconfig_lp0="inet 127.0.0.1" # DO NOT CHANGE THIS. > defaultrouter="10.130.1.254" That should be all you need to do, just season that information with your own net.interfaces and pepper with your IP addresses. -- David Cross | email: crossd@cs.rpi.edu Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message