How can I make eth0 is working?

ME dugan at libwais.sonoma.edu
Sat Jul 15 13:01:44 PDT 2000


On Sat, 15 Jul 2000, John F. Kohler wrote:
[chop]
> I am still having difficulty.  I have a (non linux) router that has the
> address of 192.168.1.1
> and it works well to my mac LC which has 192.168.1.2 and the imac which
> has 192.168.1.3, under the "no protocol" selection.  I don't understand
> DHCP or BOOTP.

DHCP and BOOTP are protocols for allowing networked machines to
"automagically" find out all  of thier networking information on for their
subnet.

Please note!: This requires that you run a service/server that you
configure on one of your machines to answer their requests as the clients
may auutomagically configure their netwrk settings only as a result of
your setting up a service to *tell** them what they should have as network
settings.

Here is a brief review of how this works:
1) You install a BOOTP/DHCP server on a machine like you linux box.

2) You go around to each machine to gather the "MAC" (Media Access
Control not Macintosh) address for each machine on your network that wants
to use DHCP or BOOTP. (Sometimes, the MAC address is also called the
Hardware Address, Ethernet Address, or NIC Address (Network Interface
Card).)

(With DHCP, you do not *need* to gather all of the MAC addresses if you
use truely dynamic assignments, but I think it is better to have static
assignments for small networks. BOOTP needs static assignments. I'll try
to explain this later if it is desired.) 

 a.) for the Macs with the TCP/IP control panel it is often as simple as
going to the TCP/IP control panel and then selecting either "Advanced" (if
it exists) or "More Info" or look through the menus for the "More Info"
while your have the TCP/IP control panel in the foreground.
 b) for the earlier MacTCP days, I think you went to the NETWORK control
panel and option-click the ethernet/ethertalk interface and then the MAC
address shows up under the name.
 c) for windows machines (Different for Windows 2k/NT and 95/98) try
either IPCONFIG /all as a command line (NT/2000) or WINIPCFG (95/98) for a
GUI based display of settings.

3) Once you have gathered all of the MAC addresses from your machines, you
then go to your BOOTP or DHCP cofigurfation files (often in *NIX being
/etc/bootptab or /etc/dhcpd.conf respectively.) In these files you then
make entries that correspond to each machine and the netwrking information
these machines will be handed out.

Here is a simple example of a simple DHCP entry usiong the ISC DHCP
server:

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.224.0;
option domain-name "my.sonoma.edu";
allow unknown-clients;
allow bootp;
option domain-name-servers 172.16.0.1, 172.16.0.9;

subnet 172.16.0.0 netmask 255.255.224.0 {
   option broadcast-address 172.16.31.255;
   option routers 172.16.0.1;
   range 172.16.0.200 172.16.0.254;
}

        host nerds {
           hardware ethernet 00:60:08:FE:53:FE;
           fixed-address 172.16.0.9;
        }

Here is a simple example of a simple BOOTP config file:


.mytemplate:hd=/tftpboot:vm=auto:\
        :ht=ethernet:\
        :bf=bootImage-client2:rp=/export/dr2:\
        :gw=172.16.32.1:sm=255.255.224.0:

#Station #0:
client0:ip=172.16.51.50:ha=0060fe034514:\
       :tc=.mytemplate:

In looking at the above, know that is is not a trivial task to undertake
to set up a bootp or dhcp service, but if you have more than 7 machines
and/or people that visit you with laptops or desktop machines for games,
etc.  you may find it easier to learn how to set these up on your home
LAN than to set up the visiting machines or newly added machines.

I use them on my networks, and even have my laptop set up with 3+
interfaces, to do IP Masq with DHCP to offer addresses to people that
connect to my portable network. I can use PPP via dial-up modem or a DSL,
Ethernet, wireless etherer  etc based IP address.

Once you know DHCP or BOOTP setting it up elsewhere is trivial, and is a
good experience for technical work.

Between the two, I would learn DHCP as it is newer, and has more features
and documented "vendor options."

Mac OS X uses a kind of DHCP service to make their netw-booting clients
work too. 

http://libweb.sonoma.edu/mike/macnc/ (for some info on this)
(ALSO have RFCs there on DHCP/BOOTP and vendor extentions.)

If you desire to install a DHCP server, there are some well writen
HOW-TO's on setting up a DHCP service. If you find difficulty in
understanding something from these, feel free to bring it here, and we
will do our best to answer your questions. More technical questions, or
patchhes would bet be directed to the DHCP mailing list from ISC.

> I need to know which configuration tool is best for a beginner,
> "netconf" or "netcfg"
> or "control-panel"  They all seem to be similar.

I do not use these tools to set up my networks. Someone else here will
likely have commentary on which one is better for a beginner. If nobody
can help you with the use of these tools, I can try to walk you through aa
manual setup. (Use of the tools they offer you in your OS is a better way
to go about setting things up as you can apply this knowledge with other
people's same distro. (I have stuck the the first way I learned which was
manual...)

> I have tried entering 192.168.1.4 in several places for "IP" addresses
> in those configuration tools, but can't seem to do either of the
> following:
> 
> a) ping the mac from the linux
> b)ping the linux from the mac.
> 
> I can have either mac ping itself, the other one or the router.

Again, if nobody else can walk you through the tools listed above, I can
walk you through some command line checks for your interface and routing
entries, then you can do searches throug the config files to edit entries,
or then try to use one of the tools.

Understanding what is done from the command line is helpful in diagnosing
or troubleshooting problems that are not fixed with the standard tools for
setting up network interfaces. "ifconfig" "ping" "netstat" "route" and
"traceroute" are some of the more popular/common ones.

Hope this answers some questions,
-ME





More information about the talk mailing list