An elementary question on LANs

Reindl Harald h.reindl at thelounge.net
Sat Jul 16 18:41:07 UTC 2011



Am 16.07.2011 20:24, schrieb Timothy Murphy:
>> It's mapped using 'HWADDR' in the
>> /etc/sysconfig/network-scripts/ifcfg-ethX and/or in
>> /etc/udev/rules.d/70-persistent-net.rules.
> 
> These establish a correspondence between the interfaces
> and the MAC addresses of the NICs

yes, /etc/udev/rules.d/70-persistent-net.rule do this

> And ifcfg-ethX sets up a correspondence between MAC addresses
> and IP addresses of the NICs,
> in my case eth1 -> 192.168.2.2 .

i would NOT use HWADDR in ifcfg-ethX becasue it is
useless and if you want to change the devices
with /etc/udev/rules.d/70-persistent-net.rules you
have always to look at ifcfg-ethX

DEVICE=ethX is enough in ifcfg-ethX

> It would be possible to deduce from this that eth1 corresponds
> to the subnet 192.168.2.0 .
> But dhcpd does not appear to make this deduction.

if you want really control what dhcpd provides
you have to set MAC->IP paris in dhcpd.conf

host whatever {
 hardware ethernet 00:90:3E:C8:D0:3C;
 fixed-address 192.168.1.7;
}

> If I might ask, are you running dhcpd under CentOS-6 ?
> Is anybody running dhcpd under CentOS-6 ?
> If so, I would be very interested to see your dhcpd.conf
> and ifcfg-ethX .
> 
> I should say that dhcpd ran (and is running) perfectly
> under CentOS-5.6 , but not under CentOS-6

this here is dhcpd under Fedora 15 and works the same way
like 10 years ago - i guess you did not realize that
"dhcpd.conf" is in recent releases located under
"/etc/dhcp/dhcpd.conf" and not directly in /etc/
and playing the whole time with a ignored config-file

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.1.2
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
BROADCAST=192.168.1.255
NETMASK=255.255.255.0
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED=no
USERCTL=no
IPV6INIT=no
________________

[root at srv-rhsoft:~]$ cat /etc/dhcp/dhcpd.conf
authoritative;
ddns-update-style none;
ddns-updates off;
default-lease-time 86400;
max-lease-time 259200;
log-facility local7;

subnet 192.168.1.0 netmask 255.255.255.0 {
 option domain-name "rhsoft.net";
 option domain-name-servers 192.168.1.2;
 option routers 192.168.1.1;
 option smtp-server 192.168.1.2;
 option pop-server 192.168.1.2;
 option ntp-servers 192.168.1.2;
 option time-servers 192.168.1.2;
 option subnet-mask 255.255.255.0;
 option broadcast-address 192.168.1.255;
 range 192.168.1.150 192.168.1.200;
}

host drucker {
 hardware ethernet 00:17:A4:6E:2E:94;
 fixed-address 192.168.1.10;
}

host telefon {
 hardware ethernet 00:0E:08:DD:9C:FD;
 fixed-address 192.168.1.15;
}

host drucker-eth {
 hardware ethernet 00:17:A4:6E:2E:95;
 fixed-address 192.168.1.14;
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20110716/99d6df20/attachment.bin 


More information about the users mailing list