eth0: MACE at XX:XX:XX:XX:XX:XX, chip revision 9.64 eth1: DC21143 at 0x1000 (PCI bus 0, device 14), h/w address XX:XX:XX:XX:XX:XX, and requires IRQ24 (provided by PCI BIOS). de4x5.c:V0.544 1999/5/8 davies@maniac.ultranet.com
in this example, eth0 refers to built-in motherboard ethernet, while eth1 refers to a PCI ethernet card, both of which happen to be installed for this discussion. Only one of either may be present, depending on your computer. XX:XX:XX:XX:XX:XX is the MAC address of each interface. de4x5.c is the driver (compiled into the kernel) handling all low-level communication between the ethernet devices and the kernel or other upper level software. The tulip driver is also commonly used.
if no ethernet devices are registered, or no ethernet driver support is compiled into the kernel, none of the configuration options described below will be relevant, with the exception of ppp.
network: ifcfg-eth0: ifcfg-eth1: NETWORKING=yes DEVICE=eth0 DEVICE=eth1 HOSTNAME=the_hostname IPADDR=192.168.0.10 IPADDR=192.168.0.1 GATEWAY=192.168.0.10 NETMASK=255.255.255.0 NETMASK=255.255.255.0 GATEWAYDEV=eth0 NETWORK=192.168.0.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 BROADCAST=192.168.0.255 ONBOOT=yes GATEWAY=192.168.0.10 ONBOOT=yes
(this example assumes the presence of 2 ethernet connections as described above)
/sbin/ifconfig eth1 192.168.0.1 [netmask 255.255.255.0] up /sbin/ifconfig eth0 192.168.0.10 [netmask 255.255.255.0] up /sbin/route add -host 192.168.0.1 netmask 255.255.255.0 eth1 /sbin/route add -host 192.168.0.10 netmask 255.255.255.0 eth0 /sbin/route add -net 192.168.0.0 netmask 255.255.255.0 eth1 /sbin/route add default gw 192.168.0.10
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.10 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth1 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.10 0.0.0.0 UG 0 0 0 eth0
+-+- ppp0 -+------------------+- 28.8 modem -+- internet + + 6500 (Linux/MacOS8.5.1) 192.168.0.4 -+ eth0 + + + Quadra650 (MacOS8.1) 192.168.0.3 -+------ 192.168.0.1 PTP200/G3 (MacOS8.5.1/IPNR) -+- 33.6 modem -+- internet + + Linux IP: 192.168.0.4 + Netmask: 255.255.255.0 6500 (MacOS8.5.1) 192.168.0.2 -+ Router IP: 192.168.0.1
DEVICE=eth0 IPADDR=192.168.0.4 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT=yes #BOOTPROTO=none #R4 only? #GATEWAY=192.168.0.1
Note the comment on the GATEWAY variable. It appears that if this variable is uncommented, the following file may not be necessary.
NETWORKING=yes FORWARD_IPV4=false #R5 only? HOSTNAME=linux.home.org DOMAINNAME=home.org GATEWAY=192.168.0.1 GATEWAYDEV=eth0
This file handles the gateway device entry in the routes table.
# IP FQDN alias 127.0.0.1 localhost loopback 192.168.0.1 powercc.home.org powercc 192.168.0.2 6500.home.org 6500 192.168.0.3 quadra.home.org quadra 192.168.0.4 linux.home.org linux
# /etc/networks for the home LAN default 0.0.0.0 # this line not required but is traditional loopnet 127.0.0.0 # this line not required homenet 192.168.0.0 # this line not required
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.4 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0