powah
2006-02-23, 09:23 AM CST
My computer has two NIC cards.
How to assign different IP subnet addresses to them (eth0 and eth1) dynamically by dhcp?
e.g.
eth0 get 192.168.0.2
eth1 get 192.168.3.2
My dhcpd.conf is:
ddns-update-style interim;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
range 192.168.0.2 192.168.0.254;
}
subnet 192.168.3.0 netmask 255.255.255.0 {
option routers 192.168.3.1;
range 192.168.3.2 192.168.3.254;
}
ifcfg-eth0 and ifcfg-eth1 are similar.
/etc/sysconfig/network-scripts/ifcfg-eth1 is:
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:30:48:83:E9:11
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=rose
USERCTL=no
IPV6INIT=no
PEERDNS=no
How to assign different IP subnet addresses to them (eth0 and eth1) dynamically by dhcp?
e.g.
eth0 get 192.168.0.2
eth1 get 192.168.3.2
My dhcpd.conf is:
ddns-update-style interim;
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
range 192.168.0.2 192.168.0.254;
}
subnet 192.168.3.0 netmask 255.255.255.0 {
option routers 192.168.3.1;
range 192.168.3.2 192.168.3.254;
}
ifcfg-eth0 and ifcfg-eth1 are similar.
/etc/sysconfig/network-scripts/ifcfg-eth1 is:
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:30:48:83:E9:11
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=rose
USERCTL=no
IPV6INIT=no
PEERDNS=no