FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-15-2011, 07:56 PM
Ljubomir Ljubojevic
 
Default CentOS-6 dhcpd

Timothy Murphy wrote:
> Ljubomir Ljubojevic wrote:
>
>> and there is no mention of interfaces, just their IP's, and you can only
>> set DHCP service on the first IP on the interface.
>
> What exactly do you mean when you say that "you can only set DHCP service
> on the first IP on the interface"?
>
>
I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not
hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on
the interface, just for the subnet original, true IP is set.

Since ISC DHCP should be the same, this should be also true for CentOS
version of ISC DHCP server.

Ljubomir
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 08:10 PM
Les Mikesell
 
Default CentOS-6 dhcpd

On 7/15/2011 2:56 PM, Ljubomir Ljubojevic wrote:
> Timothy Murphy wrote:
>> Ljubomir Ljubojevic wrote:
>>
>>> and there is no mention of interfaces, just their IP's, and you can only
>>> set DHCP service on the first IP on the interface.
>>
>> What exactly do you mean when you say that "you can only set DHCP service
>> on the first IP on the interface"?
>>
>>
> I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not
> hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on
> the interface, just for the subnet original, true IP is set.
>
> Since ISC DHCP should be the same, this should be also true for CentOS
> version of ISC DHCP server.

Did you use a 'shared-network' declaration? It still isn't going to be
able to distinguish which address range to give out to any particular
client unless you've specified the hardware ethernet for it, though.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 08:53 PM
Ljubomir Ljubojevic
 
Default CentOS-6 dhcpd

Les Mikesell wrote:
> On 7/15/2011 2:56 PM, Ljubomir Ljubojevic wrote:
>> Timothy Murphy wrote:
>>> Ljubomir Ljubojevic wrote:
>>>
>>>> and there is no mention of interfaces, just their IP's, and you can only
>>>> set DHCP service on the first IP on the interface.
>>> What exactly do you mean when you say that "you can only set DHCP service
>>> on the first IP on the interface"?
>>>
>>>
>> I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not
>> hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on
>> the interface, just for the subnet original, true IP is set.
>>
>> Since ISC DHCP should be the same, this should be also true for CentOS
>> version of ISC DHCP server.
>
> Did you use a 'shared-network' declaration? It still isn't going to be
> able to distinguish which address range to give out to any particular
> client unless you've specified the hardware ethernet for it, though.
>
On the router I am using I guess that info is taken from the router it
self. I just have to declare subnet and that is it. Routers always
respond on any interface with first IP declared on that interface, and
it is always with the first IP. Giving out IP is on the same principle,
request comes on the interface and server queries first IP address of
the interface and searches for the subnet.

But ones again, this is *not* on the CentOS, ISC DHCP version is newer
(4.1.0) then in CentOS 5.6 (3.0.5),

Here is config file and output of the server with only one active subnet
declaration (and coincidence is it is with shared lan) on 5 interface
router:


option domain-name "plnet.rs";
option domain-name-servers x.x.x.x,
x.x.x.y, z.z.z.z;
ddns-update-style none;
default-lease-time 43200;

max-lease-time 86400;
authoritative;

shared-network drlan {

subnet 172.26.21.0 netmask 255.255.255.0 { }



subnet 192.168.219.0 netmask 255.255.255.0 {

range 192.168.219.170 192.168.219.199;

option routers 192.168.219.100;

}



host ljubomir_lap-top { hardware ethernet 00:19B:F1:0B:36;
fixed-address 192.168.219.102; }
host ljubomir_laptop_wifi { hardware ethernet 00:15:af:4e:b2:11;
fixed-address 192.168.219.102; }
host ljubomir_wildfire_wifi { hardware ethernet 90:21:55:e7:16:35;
fixed-address 192.168.219.101; }
}


<start>
Internet Systems Consortium DHCP Server 4.1.0p1

Copyright 2004-2009 Internet Systems Consortium.

All rights reserved.

WARNING: Host declarations are global. They are not limited to the
scope you declared them in. │
Wrote 0 deleted host decls to leases file.

Wrote 0 new dynamic host decls to leases file.

Wrote 3 leases to leases file.



No subnet declaration for tap0 (172.29.0.200).

** Ignoring requests on tap0. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface tap0 is attached. **



No subnet declaration for wpci2 (172.26.16.100).

** Ignoring requests on wpci2. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface wpci2 is attached. **




No subnet declaration for wpci1 (172.26.19.200).

** Ignoring requests on wpci1. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface wpci1 is attached. **


No subnet declaration for wpci3 (172.26.10.100).

** Ignoring requests on wpci3. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface wpci3 is attached. **



No subnet declaration for wpci0 (172.26.14.100).

** Ignoring requests on wpci0. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface wpci0 is attached. **


No subnet declaration for eth1 (172.26.221.100).

** Ignoring requests on eth1. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface eth1 is attached. **



Listening on LPF/eth0/00:19:5f:00:91:96/drlan

Sending on LPF/eth0/00:19:5f:00:91:96/drlan

Sending on Socket/fallback/fallback-net


<emd>

Ljubomir
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 10:30 PM
Les Mikesell
 
Default CentOS-6 dhcpd

On 7/15/2011 3:53 PM, Ljubomir Ljubojevic wrote:
>
>>>>> and there is no mention of interfaces, just their IP's, and you can only
>>>>> set DHCP service on the first IP on the interface.
>>>> What exactly do you mean when you say that "you can only set DHCP service
>>>> on the first IP on the interface"?
>>>>
>>>>
>>> I use ISC DHCP on non-CentOS router. On that router, ISC DHCP will not
>>> hand out IP addresses on second (or virtual eth0:0, eth0:1, ...) IP on
>>> the interface, just for the subnet original, true IP is set.
>>>
>>> Since ISC DHCP should be the same, this should be also true for CentOS
>>> version of ISC DHCP server.
>>
>> Did you use a 'shared-network' declaration? It still isn't going to be
>> able to distinguish which address range to give out to any particular
>> client unless you've specified the hardware ethernet for it, though.
>>
> On the router I am using I guess that info is taken from the router it
> self. I just have to declare subnet and that is it. Routers always
> respond on any interface with first IP declared on that interface, and
> it is always with the first IP. Giving out IP is on the same principle,
> request comes on the interface and server queries first IP address of
> the interface and searches for the subnet.

No, it isn't quite the same. The shared-network declaration should let
dhcpd match up the physical interface with one of the subnets and
associate all that are grouped. But it may give out all of one range
before starting on another in the group.

> But ones again, this is *not* on the CentOS, ISC DHCP version is newer
> (4.1.0) then in CentOS 5.6 (3.0.5),
>
> Here is config file and output of the server with only one active subnet
> declaration (and coincidence is it is with shared lan) on 5 interface
> router:
>
> shared-network drlan {
>
> subnet 172.26.21.0 netmask 255.255.255.0 { }
>
>
>
> subnet 192.168.219.0 netmask 255.255.255.0 {
>
> range 192.168.219.170 192.168.219.199;
>
> option routers 192.168.219.100;
>
> }

You only have one range, so it can't give out anything for the other subnet.


--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-15-2011, 11:59 PM
Timothy Murphy
 
Default CentOS-6 dhcpd

Les Mikesell wrote:

>> But what puzzles me is, what defines the correspondence
>> between interface and network,
>> eg in my case eth1 -> 192.168.2.0/24
>>
>> Surely this should be there independently of dhcpd ?
>
> Dhcpd shouldn't care about the name of the interface, but if the request
> hasn't been forwarded by a router/relay agent it needs to figure out the
> subnet of the interface where the request is received so it uses the
> corresponding range and options for the response.

I'm not sure what router/relay agent is supposed to forward the request.

In my case, I am trying to run dhcpd on my CentOS-6 server,
but I get the message
------------------------------------
alfred dhcpd: No subnet declaration for eth1 (no IPv4 addresses).
alfred dhcpd: ** Ignoring requests on eth1. If this is not what
alfred dhcpd: you want, please write a subnet declaration
alfred dhcpd: in your dhcpd.conf file for the network segment
alfred dhcpd: to which interface eth1 is attached. **
alfred dhcpd:
alfred dhcpd:
alfred dhcpd: Not configured to listen on any interfaces!
------------------------------------

My /etc/dhcpd.conf reads (after removing comments and several hosts)
-------------------------------------
option domain-name "gayleard.com";
option domain-name-servers 208.67.222.222, 208.67.220.220;

default-lease-time 600;
max-lease-time 7200;

authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
}

subnet 192.168.2.0 netmask 255.255.255.0 {

authoritative;

option routers 192.168.2.1;
option subnet-mask 255.255.255.0;

option domain-name "gayleard.com";
option domain-name-servers 208.67.222.222,208.67.220.220;

range 192.168.2.100 192.168.2.250;
range dynamic-bootp 192.168.2.128 192.168.2.254;

host alfred {
hardware 00:1B:21:AB:C9:4C;
fixed-address 192.168.2.2;
}

host blanche {
hardware ethernet 00:1B:77:04:00:12;
fixed-address 192.168.2.7;
}

host blanche-ether {
hardware ethernet 00:36:6B:35:26:8E;
fixed-address 192.168.2.27;
}

host linksys {
hardware ethernet 00:16:B6A:56:B3;
fixed-address 192.168.2.1;
}

# several hosts omitted

}
-------------------------------------

In /etc/sysconfig/network-scripts/ I have
ifcfg-eth0
-------------------------------------
# Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe
DEVICE=eth0
HWADDR=3C:4A:92:77:B3:AE
IPADDR=192.168.1.2
GATEWAY=192.168.1.254
NETMASK=255.255.255.0
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
-------------------------------------
ifcfg-eth1
-------------------------------------
# Intel Corporation 82574L Gigabit Network Connection
DEVICE=eth1
TYPE=Ethernet
HWADDR=00:1B:21:AB:C9:4C
IPADDR=192.168.2.2
NETMASK=255.255.255.0
GATEWAY=192.168.2.1
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=dhcp
IPV6INIT=no
USERCTL=yes
-------------------------------------

eth0 is connected to a Billion modem/router
and thence to the ethernet;
eth1 is connected to a Linksys WRT54GL router.

If anyone can point out the error of my ways
I should be most grateful.


--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2011, 12:02 AM
Timothy Murphy
 
Default CentOS-6 dhcpd

Steve Clark wrote:

> You have to have a subnet declaration(s) that matches an existing
> subnet(s) that is configured on the interface(s) you want to provide
> dynamic addresses for.

But how exactly is a subnet, in my case 192.168.2.0, "configured"
on the interface eth1 ?


--
Timothy Murphy
e-mail: gayleard /at/ eircom.net
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-16-2011, 12:17 AM
Don Krause
 
Default CentOS-6 dhcpd

On Jul 15, 2011, at 4:59 PM, Timothy Murphy wrote:

> Les Mikesell wrote:
>
>>> But what puzzles me is, what defines the correspondence
>>> between interface and network,
>>> eg in my case eth1 -> 192.168.2.0/24
>>>
>>> Surely this should be there independently of dhcpd ?
>>
>> Dhcpd shouldn't care about the name of the interface, but if the request
>> hasn't been forwarded by a router/relay agent it needs to figure out the
>> subnet of the interface where the request is received so it uses the
>> corresponding range and options for the response.
>
> I'm not sure what router/relay agent is supposed to forward the request.
>
> In my case, I am trying to run dhcpd on my CentOS-6 server,
> but I get the message
> ------------------------------------
> alfred dhcpd: No subnet declaration for eth1 (no IPv4 addresses).
> alfred dhcpd: ** Ignoring requests on eth1. If this is not what
> alfred dhcpd: you want, please write a subnet declaration
> alfred dhcpd: in your dhcpd.conf file for the network segment
> alfred dhcpd: to which interface eth1 is attached. **
> alfred dhcpd:
> alfred dhcpd:
> alfred dhcpd: Not configured to listen on any interfaces!
> ------------------------------------
>
> My /etc/dhcpd.conf reads (after removing comments and several hosts)
> -------------------------------------
> option domain-name "gayleard.com";
> option domain-name-servers 208.67.222.222, 208.67.220.220;
>
> default-lease-time 600;
> max-lease-time 7200;
>
> authoritative;
>
> subnet 192.168.1.0 netmask 255.255.255.0 {
> }
>
> subnet 192.168.2.0 netmask 255.255.255.0 {
>
> authoritative;
>
> option routers 192.168.2.1;
> option subnet-mask 255.255.255.0;
>
> option domain-name "gayleard.com";
> option domain-name-servers 208.67.222.222,208.67.220.220;
>
> range 192.168.2.100 192.168.2.250;
> range dynamic-bootp 192.168.2.128 192.168.2.254;
>
> host alfred {
> hardware 00:1B:21:AB:C9:4C;
> fixed-address 192.168.2.2;
> }
>
> host blanche {
> hardware ethernet 00:1B:77:04:00:12;
> fixed-address 192.168.2.7;
> }
>
> host blanche-ether {
> hardware ethernet 00:36:6B:35:26:8E;
> fixed-address 192.168.2.27;
> }
>
> host linksys {
> hardware ethernet 00:16:B6A:56:B3;
> fixed-address 192.168.2.1;
> }
>
> # several hosts omitted
>
> }
> -------------------------------------
>
> In /etc/sysconfig/network-scripts/ I have
> ifcfg-eth0
> -------------------------------------
> # Broadcom Corporation NetXtreme BCM5723 Gigabit Ethernet PCIe
> DEVICE=eth0
> HWADDR=3C:4A:92:77:B3:AE
> IPADDR=192.168.1.2
> GATEWAY=192.168.1.254
> NETMASK=255.255.255.0
> NM_CONTROLLED=no
> ONBOOT=yes
> BOOTPROTO=none
> USERCTL=no
> -------------------------------------
> ifcfg-eth1
> -------------------------------------
> # Intel Corporation 82574L Gigabit Network Connection
> DEVICE=eth1
> TYPE=Ethernet
> HWADDR=00:1B:21:AB:C9:4C
> IPADDR=192.168.2.2
> NETMASK=255.255.255.0
> GATEWAY=192.168.2.1
> NM_CONTROLLED=yes
> ONBOOT=yes
> BOOTPROTO=dhcp
> IPV6INIT=no
> USERCTL=yes
> -------------------------------------
>
> eth0 is connected to a Billion modem/router
> and thence to the ethernet;
> eth1 is connected to a Linksys WRT54GL router.
>
> If anyone can point out the error of my ways
> I should be most grateful.
>
>
> --
> Timothy Murphy
> e-mail: gayleard /at/ eircom.net
> tel: +353-86-2336090, +353-1-2842366
> s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland


I believe you need to wrap your networks in a "shared network" statement. My ISC dhcp server
has no problem issuing address to either nic, and aliased address are no problem either.

The relevant portion of my dhcpd.conf file:

shared-network opt {
subnet 192.168.2.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option routers 192.168.2.150;
option ntp-servers 192.168.2.150;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
}

subnet 192.168.12.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.12.255;
option routers 192.168.12.1;
option ntp-servers 192.168.12.1;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
}

subnet 172.24.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 172.24.1.255;
option routers 172.24.1.1;
option ntp-servers 143.197.200.121;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
#pool {
# range 172.24.1.75 172.24.1.99;
#}
}

subnet 172.24.200.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 172.24.200.255;
option routers 172.24.200.1;
option ntp-servers 143.197.200.121;
option netbios-name-servers 143.197.200.216;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
pool {
range 172.24.200.10 172.24.200.250;
}
}

subnet 172.24.143.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 172.24.143.255;
option routers 172.24.143.1;
option ntp-servers 143.197.200.121;
option netbios-name-servers 143.197.200.216;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
}

subnet 172.24.145.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 172.24.145.255;
option routers 172.24.145.1;
option ntp-servers 143.197.200.121;
option netbios-name-servers 143.197.200.216;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
#pool {
# range 172.24.145.10 172.24.145.250;
#}
}

subnet 172.24.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 172.24.0.255;
option routers 172.24.0.1;
option ntp-servers 143.197.200.121;
ddns-updates-off;
dynamic-bootp-lease-length 7200;
}
}

<-- sniped individual host assignments.. -->

As you can see, we only allocate address to unknown devices out of the 172.24.200/24 pool,
all other hosts/devices are assigned addresses out of the other subnets.

The "opt" in the shared network line is just a name, can be anything.

Take care!


--
Don Krause
Head Systems Geek,
Waver of Deceased Chickens.
Optivus Proton Therapy, Inc.
P.O. Box 608
Loma Linda, California 92354
909.799.8327 Tel
909.799.8366 Fax
dkrause@optivus.com
www.optivus.com
"This message represents the official view of the voices in my head."






_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org