My system has two NICs, but I've only ever used one up until now. I'd like to start using the second one with a unique static IP address assigned to it. I don't understand how the eth/n interfaces get numbered, or how they relate to the IPADDR[n] and similar statements in rc.inet1.conf.
This is a Slackware system. My rc.inet1.conf resides in /etc/rc.d, and currently has the following IPADDR and NETMASK statements. (I've omitted configuration statements that are not relevant to my questions.)
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
# Config information for eth1:
IPADDR[1]="192.168.1.15"
NETMASK[1]="255.255.255.0"
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
Since I have two NICs, I'd expect one of them to be named eth0 and the other eth1. But the output from an ifconfig shows that they are named eth1 and eth2.
Code:
root@ixian1:/etc/rc.d# ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:23:18:77:0C:E1
inet addr:192.168.1.15 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::222:15ff:fe77:bd1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108065471 errors:0 dropped:67 overruns:0 frame:0
TX packets:103365115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3811807073 (3635.2 Mb) TX bytes:1292149471 (1232.2 Mb)
Interrupt:18
eth2 Link encap:Ethernet HWaddr 00:23:18:76:F4:B8
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:17
Why aren't they named eth0 and eth1? I haven't tested this consciously, but I'm pretty sure everything works fine with my current rc.inet1.conf definition regardless of which of the two NIC RJ45 connectors I plug my (one and only up until now) ethernet cable into.
If I want to have two active and unique IP addresses for this system and I define the second one in rc.inet1.conf to eth00 (the first is already defined to eth1), will this affect the eth/n number assigned to each NIC? Will it map the same way on each reboot?