[svlug] No Networking In Gentoo

Rick Moen rick at linuxmafia.com
Mon Apr 10 10:45:32 PDT 2006


Quoting Lord Sauron (lordsauronthegreat at gmail.com):

> Yeah, I know it's very logical and stuff, however, I'm still not
> totally bash-trained yet.

You know, even though I don't run Gentoo on any box at the moment, I
really groove on their documentation.  It's truly excellent.
Recommended.

> Well, before this I had no clue about the very existance of the lspci
> and lsmod commands, and the rc-update ones were mysterious ones, too. 
> I'm still very ignorant about the workings of Linux, though I'm
> constantly getting better, and that's good news.

As my Aussie friends would say, "No worries."  

You might wish to know, also, about the good 'ol /sbin/ifconfig and
/sbin/route commands.  Here's what a couple of those commands'
incantations return, on my server box:

:r! /sbin/ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:A0:C9:ED:6C:CB  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0x1060 Memory:fa205000-fa205038 

eth1      Link encap:Ethernet  HWaddr 00:D0:B7:93:31:0E  
          inet addr:198.144.195.186  Bcast:198.144.195.191  Mask:255.255.255.248
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:83735991 errors:898 dropped:0 overruns:0 frame:898
          TX packets:93517997 errors:7 dropped:0 overruns:0 carrier:7
          collisions:698434 txqueuelen:1000 
          RX bytes:1389148574 (1.2 GiB)  TX bytes:851906041 (812.4 MiB)
          Interrupt:11 Base address:0x1080 Memory:fa202000-fa202038 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2735227 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2735227 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1626566014 (1.5 GiB)  TX bytes:1626566014 (1.5 GiB)


:r! /sbin/route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
198.144.195.184 0.0.0.0         255.255.255.248 U     0      0        0 eth1
0.0.0.0         198.144.195.185 0.0.0.0         UG    0      0        0 eth1



The "-a" on ifconfig means return results for _all_ network interfaces,
even ones that are unconfigured.  You'll note that it says the box has
three network interfaces (if you include the imaginary, host-internal
"lo" = loopback interface device that any TCP/IP host automatically
has).  Only eth1 has an assigned, public IP:  eth0 is a valide device
but currently unused.

That command can tell you what pretty much any Unix (and, of course, any
Linux distribution) regards as valid network interfaces, and which have
what assigned network addresses.

The "-n" option passed to the route command means "numeric", i.e., don't
try to look up hostnames; just give applicable IP addresses.  The return
values state that remote IP address 198.144.195.185 is the gateway to
the world at large, and is reachable via network device eth1.


:r! lsmod | grep e100
e100                   50036   1

I happened to know that this old heap o'junk uses the Intel e100 driver
for the network interfaces, and "lsmod" shows that it's loaded as a
dymanically loaded module.


And here's selected relevant output from lspci:

:r! lspci | grep Pro

0000:00:0f.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 05)
0000:00:10.0 Ethernet controller: Intel Corporation 82557/8/9 [Ethernet Pro 100] (rev 08)

> Well, "Linux in a Nutshell" is the best I've got.  I'll go search for
> "Network Admin's Guide," but I've got to run now - bye.

In brief:  A reference is a book in which you're intended to look up the
fine details of subjects you basically already know.  A tutorial is one
from which you're intended to read pieces to learn a subject.  (There
are a lot of really bad, and really long, computer books that try to be
both at the same time.)

One might also consider the "quick reference" to be (in a way) a third
category:  That's a reference work that's deliberately as terse as
possible, to save time.  Manpages tend to be quick references, which is
why they funciton so poorly as tutorials.






More information about the svlug mailing list