From owner-freebsd-questions Mon Aug 23 23:31: 1 1999 Delivered-To: freebsd-questions@freebsd.org Received: from gilliam.users.flyingcroc.net (gilliam.users.flyingcroc.net [207.246.128.2]) by hub.freebsd.org (Postfix) with ESMTP id EC67D15837 for ; Mon, 23 Aug 1999 23:28:49 -0700 (PDT) (envelope-from ross@gilliam.users.flyingcroc.net) Received: (from ross@localhost) by gilliam.users.flyingcroc.net (8.9.3/8.9.3) id XAA04627; Mon, 23 Aug 1999 23:28:12 -0700 (PDT) Date: Wed, 18 Aug 1999 11:35:58 -0700 (PDT) Message-Id: <199908240628.XAA04627@gilliam.users.flyingcroc.net> 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 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message