Re: [LINUX:3912] 2.Ethernet karti

Murat Cakir (mcakir@simko.com.tr)
Mon, 05 Jan 1998 11:06:09 +0200


Cagri Koksal wrote:

> linux ether=0,0,eth0 ether=0,0,eth1 parametrelerini verdim. Yine
> kartlari boot ederken irq ve base adreslerini belirledi ama sadece biri
> icin surucu yukledi.

evet, bunu lilo.conf a da koyabilirsin,
append = "ether=0,0,eth1" seklinde.

> Son care olarak Space.c dosyasinda, ethernet_howto'da dedigi gibi
> bir degisiklik yaptim, kerneli yeniden derledim ama bu sefer 1 karti bile
> tanimadi. Bu durumda ne yapabilirim ? Yardimci olabileceklere simdiden
> tesekkurler.

buna gerek yoktu. Kernelinin 3c509 u desteklemesi yeterli, bunu ekleyip
tekrar denemen yeterli olur.

/etc/rc.d/rc.inet1 (ya da baska bir startup dosyasina da yazabilirsin)
asagidaki gibi ikinci ethernet kartini tanit.
bu dosyada birinci kart 11.11.1.11
ikinci kart 191.11.1.22
sonu .1 ile bitenler ise gateway gibisinden koydum.

Bu arada 3com configurasyonunda pnp kaldirilmis olmali (bunu zaten
yapmissin)

iyi denemeler 8-)

murat

#! /bin/sh
#
# rc.inet1 This shell script boots up the base INET system.
#
# Version: @(#)/etc/rc.d/rc.inet1 1.01 05/27/93
#

HOSTNAME=`cat /etc/HOSTNAME`

# Attach the loopback device.
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo

# IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure
the
# eth0 interface. If you're only using loopback or SLIP, don't include
the
# rest of the lines in this file.

# Edit for your setup.
IPADDR="11.11.1.11" # REPLACE with YOUR IP address!
NETMASK="255.255.0.0" # REPLACE with YOUR netmask!
NETWORK="11.11.0.0" # REPLACE with YOUR network address!
BROADCAST="11.11.255.255" # REPLACE with YOUR broadcast address,
if you
# have one. If not, leave blank and edit below.
GATEWAY="11.11.1.1" # REPLACE with YOUR gateway address!

# Uncomment the line below to configure your ethernet card.
/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
/sbin/ifconfig eth1 191.11.1.22 broadcast 191.11.1.255 netmask
255.255.255.0

# If the line above is uncommented, the code below can also be
uncommented.
# It sees if the ethernet was properly initialized, and gives the admin
some
# hints about what to do if it wasn't.
if [ ! $? = 0 ]; then
cat << END
Your ethernet card was not initialized properly. Here are some reasons
why this
may have happened, and the solutions:
1. Your kernel does not contain support for your card. Including all
the
network drivers in a Linux kernel can make it too large to even boot,
and
sometimes including extra drivers can cause system hangs. To support
your
ethernet, either edit /etc/rc.d/rc.modules to load the support at
boottime,
or compile and install a kernel that contains support.
2. You don't have an ethernet card, in which case you should comment out
this
section of /etc/rc.d/rc.inet1. (Unless you don't mind seeing this
error...)
END
fi
# Uncomment these to set up your IP routing table.
/sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0
if [ ! "$GATEWAY" = "" ]; then
/sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1
fi
/sbin/route add -net 191.11.1.0 netmask 255.255.255.0 eth1
/sbin/route add default gw 191.11.1.1 dev eth1
# End of rc.inet1

-- 
Murat Cakir - System Administrator
SIMKO (Siemens A.G.- Turkiye)               S-mail   : Simko - Siemens
mcakir@simko.com.tr                         Esat Caddesi No 44
Phone    : +90-312-4173311 / 133            Kucukesat 06660
Fax      : +90-4257958                      Ankara / Turkiye