bash-3.1$ /sbin/lspci | grep Eth*
Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 144).
Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone] (rev 48).
Notera: Vilket vilka dina kort är.
Netconfig sätter bara upp ett nätverkskort. Det andra måste installeras för hand.
bash-3.1$ vim /etc/rc.d/rc.modules
Notera: Vilket vilka dina kort är.
# 3com 3c509 and 3c579:
#/sbin/modprobe 3c509
# SiS 900/7016 PCI Fast Ethernet
#/sbin/modprobe sis900
Avkommentera:
/sbin/modprobe 3c509
/sbin/modprobe sis900
I det här fallet vill jag ha SiS900 som det första kortet (eth0) och 3c509 som det andra kortet (eth1).
bash-3.1$ vim /etc/modprobe.d/modprobe.conf
alias eth0 sis900
alias eth1 3c509
bash-3.1$ /sbin/modprobe sis900
bash-3.1$ /sbin/modprobe 3c509
bash-3.1$ vim /etc/rc.d/rc.inet1.conf
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").
# Config information for eth0:
IPADDR[0]="192.168.2.5"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""
# Default gateway IP address:
GATEWAY="192.168.2.1"
# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
bash-3.1$ vim /etc/resolv.conf
#search local
search bredbandsbolaget.se
nameserver 81.26.228.3
nameserver 81.26.227.3
bash-3.1$ vim /etc/HOSTNAME
dacke.local
bash-3.1$ ifconfig eth0 192.168.2.5 netmask 255.255.255.0 bash-3.1$ route add default gw 192.168.2.1 bash-3.1$ ifconfig eth0 up
bash-3.1$ vim /etc/rc.d/rc.inet1.conf
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").
# Config information for eth0:
IPADDR[0]="192.168.2.5"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes" Om det föreligger en DHCP anslutning.
DHCP_HOSTNAME[1]="" Om leverantören kräver det.
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""
# Default gateway IP address:
GATEWAY="192.168.2.1"
# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
bash-3.1$ dhcpcd eth1
bash-3.1$ ifconfig eth1 up