Subject: Re: configuring Ethernet Card (on a IPv4 network)
To: bsd-help (E-Mail) <netbsd-help@netbsd.org>
From: Timo Schoeler <wanker4freedom@web.de>
List: netbsd-help
Date: 04/25/2005 13:51:46
hi,

> Hello all :)
> I just installed NetBSD 2.0.2 - but before I proceed,
> i want to make it clear that I am not a Unix newbie -
> I've used Linux since 2.2, FreeBSD 4.7++ before.
>
> In some forums/mailing lists, I usually get this reply
> - "Why the heck did you switch over the this (xyz) OS
> - stick with what works for you ....." and such kind
> of replies, I wish to make it clear WHY i prefer
> NetBSD over other Unices -
>
> a) Linux Distros of late are getting too fat
> (fat==bloated) - I mean a minimum of 1 - 2 GB for a
> 'normal' install (with 1000's of programs and
> libraries i doubt I will ever use....

that's one of the things NetBSD has i love :)

> b) Since I changed some of my periphrals - importantly
> the mouse - FreeBSD does not support the new
> periphrals - the mouse in particular - it malfunctions
> (whatever - the driver or the mouse on FreeBSD)...
> besides almost all optical mice available here
> malfunction - Samsung / LG.
>
> c) I installed 1.6 version of NETBSD some time back
> and it was great, lean, powerful yet elegant (at that
> time I did not have a LAN card - using PPP)! Sadly the
> very next day the CD failed (bad media ?) and for some
> reason the MBR was corrupted (?).... so I had to
> suffice with Linux for a while .... Now that I have
> procured NetBSD 2.0.2.. i do not see any reason why I
> should switch back to those systems.
>
> I suppose I have clarified myself (in case someone
> flares up)
>
> Now - I had some problems configuring my Ethernet Card
> (RealTek 8139) at rtk0;
>
> 1st thing - the card is detected properly - here is
> the dmesg output -
> +------------------------------------------------+
> rtk0 at PCI2 dev13
> function 0: RealTek 8139 10/100 Base Tx
> rtk0 interrupting at IRQ 3
> rtk0: Ethernet Address 00:0b:2b:0f:f9:0f
> akphy0 at rtk0 phy7: Generic IEEE802.3U media
> interface
> +------------------------------------------------+
>
> But on boot (before/after login) - the ethernet card
> is NOT activated (the power LED is off and the packets
> LED is static - where it should have been blinking).
>
> I queried 'ifconfig' using ifconfig -a and these were
> the results -
> +-----------------------------------------------+
> rtk0: Flags=8802<BROADCAST, SIMPLEX, MULTICAST>
> MTU/500
> address: 00:0b:2b:0f:f9:0f
> media: Ethernet autoselect
> status : active
> +-----------------------------------------------+
>
> Another note - I do not have extensive experience with
> ifconfig - since I have not used it much on either
> Linux or BSD.
>
> Besides I could NOT find any ifconfig.rtk0 or any
> ifconfig* files in /etc/ !!!!
>
> I did read the afterboot(8) man pages - but found
> little information on how to write my own
> ifconfig.rtk0.

ifconfig output and the fact that there's not ifconfig.rtk0 show that 
the card's not set up well (however, i never didn't run into this 
scenario myself -- was there some error or so when you installed the 
system?).

a simple ifconfig.XXX (please use e.g. rtk0, fxp0, gem0 or whatever for 
XXX) is like this:

up
www.xxx.yyy.zzz netmask 0xNNNNNNNN media autoselect

where www.xxx.yyy.zzz is the ip address of the host and the netmask is 
given in hex, for a /24 that is 0xffffff00

> Besides I am still in a dilema as to wether I need to
> 'insert' any driver modules as the kernel boots - in
> FBSD it was located in /boot/ - but i cannot find any
> such file in /boot/. Again someone on #netbsd
> (freenode) said netBsd 'may' have (or not have) the
> feature of dynamically loadable kernel modules (???).

LKMs are supported by NetBSD -- although the GENERIC kernel should run 
nearly everything you want...

> If someone could just explain to me, or highlight me
> in this area, it would be great.
> Wether i have goofed up somewhere, or I have done
> something wrong, or I have yet to do some
> configuration to get the LAN card working. Besides
> some extra pointers (resources) would also be fine.
>
> Another thing, does CSH support tab-completion (like
> the newer BASH shells)?

there is some Emacs style csh-stuff (i don't remember), but ksh is your 
friend.

if you like to run a more sophisticated shell (like tcsh, bash etc.) 
please have a look into pkgsrc/shells

> Thank you,
> RSK

you're welcome & HTH,

-- 
Timo Schoeler | http://macfinity.net/~tis | timo.schoeler@macfinity.net
//macfinity -- finest IT services | http://macfinity.net
Key fingerprint = F844 51BE C22C F6BD 1196  90B2 EF68 C851 6E12 2D8A

There are 10 types of people in the world. Those who understand binary 
and those who don't.