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 10-15-2008, 12:40 PM
"Marcus Moeller"
 
Default DHCP static hosts and subnet configuration

Hi all.

I have set up a DHCP server with multiple subnet configurations (let's
say subnet A and B). Within that I have declared pools and static
hosts addresses.

Now, if I have set up a static host entry (with fixed-address) in
Subnet B for a specific machine and try to connect to Subnet A with
that NIC (where it should obtain an address from the range), this does
not work unless I add a static host entry for that machine to the
Subnet A declaration, too. I even have to assign a fixed-address,
there.

I just want the NIC to clain it's address from the range on Subnet A
and to assign a fixed address on Subnet B.

Best Regards
Marcus
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2008, 05:08 PM
Paul Heinlein
 
Default DHCP static hosts and subnet configuration

On Wed, 15 Oct 2008, Marcus Moeller wrote:


Hi all.

I have set up a DHCP server with multiple subnet configurations
(let's say subnet A and B). Within that I have declared pools and
static hosts addresses.


Now, if I have set up a static host entry (with fixed-address) in
Subnet B for a specific machine and try to connect to Subnet A with
that NIC (where it should obtain an address from the range), this
does not work unless I add a static host entry for that machine to
the Subnet A declaration, too. I even have to assign a
fixed-address, there.


I just want the NIC to clain it's address from the range on Subnet A
and to assign a fixed address on Subnet B.


You can assign multiple host blocks for the same NIC, using a
fixed-address directive in one but not in other. dhcpd will try for
the best match. If the request arrives from subnet-B, and the fixed
address is on that net, then that's the block that gets used.
Otherwise, the less specific block will be used. E.g.,


host myhost {
hardware ethernet 11:22:33:44:55:66;
fixed-address myhost.mydom.com;
}
host myhost-roam {
hardware ethernet 11:22:33:44:55:66;
}

--
Paul Heinlein <> heinlein@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2008, 05:16 PM
"John"
 
Default DHCP static hosts and subnet configuration

I just want the NIC to clain it's address from the range on Subnet A
and to assign a fixed address on Subnet B.

JohnStanley Writes:

You can assign in your dhcp.con file for your hosts to obtain an ip based
upon the host MAC Address or Host Name. Try That..

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2008, 05:42 PM
"John"
 
Default DHCP static hosts and subnet configuration

I just want the NIC to clain it's address from the range on Subnet A
> and to assign a fixed address on Subnet B.

JohnStanley Writes:
In reading your post a couple more times, I think I see what you are after.
Elaborate a little more on what you want exactly.
You want the NIC to get an addy from the dhcpd server from the Subnet A
address pool and then want to also obtain an addy from the Subnet B Fixed
addy pool so the clients nics has two Ips? Correct?
This I am not sure can be done with dhcpd. However you can specify NIC to
fixed static addys and the nic harware address in the dhcp.conf file.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2008, 06:49 PM
"Marcus Moeller"
 
Default DHCP static hosts and subnet configuration

Dear Paul.

> You can assign multiple host blocks for the same NIC, using a fixed-address
> directive in one but not in other. dhcpd will try for the best match. If the
> request arrives from subnet-B, and the fixed address is on that net, then
> that's the block that gets used. Otherwise, the less specific block will be
> used. E.g.,
>
> host myhost {
> hardware ethernet 11:22:33:44:55:66;
> fixed-address 172.16.1.1;
^^ modified
> }
> host myhost-roam {
> hardware ethernet 11:22:33:44:55:66;
> }

Hmm, that does not really work on two different subnets. I have tried
to add a host declaration with fixed-address on the 'static' Subnet B
and one on the dynamic Subnet A with just the MAC address and
ddns-domain-name.

The client won't obtain an IP address on subnet A unless I add a
fixed-address declaration to it, too.

Marcus
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-15-2008, 06:52 PM
"Marcus Moeller"
 
Default DHCP static hosts and subnet configuration

Dear John,

> In reading your post a couple more times, I think I see what you are after.
> Elaborate a little more on what you want exactly.
> You want the NIC to get an addy from the dhcpd server from the Subnet A
> address pool and then want to also obtain an addy from the Subnet B Fixed
> addy pool so the clients nics has two Ips? Correct?

The client can just connect to two networks handled by the DHCP server
(on different NICs of course )

On Subnet A it should receive a dynamic address within the range and
on Subnet be it should just obtain the address defined in it's host
declaration.

> This I am not sure can be done with dhcpd. However you can specify NIC to
> fixed static addys and the nic harware address in the dhcp.conf file.

How does that work?

Best Regards
Marcus
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-16-2008, 06:02 AM
"John"
 
Default DHCP static hosts and subnet configuration

>This I am not sure can be done with dhcpd. However you can specify NIC to
> fixed static addys and the nic harware address in the dhcp.conf file.

>How does that work?

JohnStanley Writes:
This is what I am talking about at the end of the ".conf" file below. That
is what you are trying or wantting to accomplish? This is actualy a
confiuration I use. In all respect I have a question for you.... Are you
wantting to try this solution because you cant access another subnet? If now
you are then you need to have a look at your routing tables in your routers
or vlan configuration on your switches. That's just question or two I could
be wrong.


subnet 192.168.0.0 netmask 255.255.255.0 {
# Default gateway router
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;

option nis-domain "domain_name here";
option domain-name "domain_name here";
option domain-name-servers 192.168.0.100;

# My GMT Time Offset EST!
option time-offset -5;
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# Selects point-to-point node (default is hybrid). Don't change this unless
# you understand Netbios very well
# option netbios-node-type 2;

# Dhcpd server will give out addresses between 128 and 254. 255 is Broadcast
don't forget.
range dynamic-bootp 192.168.0.128 192.168.0.254;
default-lease-time 21600;
max-lease-time 43200;


# Next here is the kickstarts getting pulled in.
#
# machine_name_here:/kickstarts/ks.cfg is the nfs share
# For a kickstart confgiuration file
# filename "/kickstarts/ks.cfg";
# next-server 10.2.7.3;
}

# I'm handing out fixed addresses and host names for the following mac
addresses.

host machine_name here {
hardware ethernet 00:80:5f:1d:57:47;
fixed-address 192.168.0.2;
}

# This one here has the Option Host Name to add.

host machine_name_here {
hardware ethernet 00:50:8b:d3:f9:ed;
fixed-address 192.168.0.30;
option host-name "client_name_here";
}
host machine_name_here {
hardware ethernet 00:50:8b:e1:5d:dc;
fixed-address 192.168.0.31;
option host-name "host_name_here";
option subnet-mask 255.255.255.0;
}


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-16-2008, 07:51 PM
"Marcus Moeller"
 
Default DHCP static hosts and subnet configuration

>>This I am not sure can be done with dhcpd. However you can specify NIC to
>> fixed static addys and the nic harware address in the dhcp.conf file.
>
>>How does that work?
>
> JohnStanley Writes:
> This is what I am talking about at the end of the ".conf" file below. That
> is what you are trying or wantting to accomplish? This is actualy a
> confiuration I use. In all respect I have a question for you.... Are you
> wantting to try this solution because you cant access another subnet? If now
> you are then you need to have a look at your routing tables in your routers
> or vlan configuration on your switches. That's just question or two I could
> be wrong.

Dear John.

This is definitely not what I am trying to do. I try to line out the
setup again:

Subnet A (192.168.2.x) <-> DHCP Server with 2 NICs <-> Subnet B (10.1.0.0)

Clients on Subnet A should get a static IP from the host declaration.
Clients on Subnet B should obtain dynamic IP addresses from a range.

The two subnets are not physically connected but a Client should be
able to connect to Subnet A or to Subnet B as well.

Best Regards
Marcus
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-17-2008, 12:32 PM
"John"
 
Default DHCP static hosts and subnet configuration

The two subnets are not physically connected but a Client should be
able to connect to Subnet A or to Subnet B as well.

JohnStanley Writes:
This is what is confusing. If there *NOT* Physically Connected you will
never CONNECT to them. Hope you can calculate SNs ans SNMs. You can add as
many Nested code blocks you need for Subnets. My advice for you is to use
the 10.x.x.x range of addys to give you more subnets to work with. So give
this a go.

option domain-name "YOU.com";
option domain-name-servers "192.168.0.1, 193.190.63.172"
option subnet-mask 255.255.255.0; # Global Subnet mask
default-lease-time 600;
max-lease-time 7200;

# Here is Subnet number 1.
subnet 192.168.0.0 netmask 255.255.255.240 { # Subnet for first 13 devices,
10 of which are servers, 3 printers
range 192.168.0.10 192.168.0.13; # Range of IP's for our printers only.
option subnet-mask 255.255.255.240;
option broadcast-address 192.168.0.15; # This is the subnets broadcast
address.
option routers 192.168.0.14; # The gateway of this subnet.
option time-servers 192.168.0.14; # Gateway is running a timeserver.
option ntp-servers 192.168.0.14; # Gateway running a timeserver.
}

# Here is Subnet number 2.
subnet 192.168.0.16 netmask 255.255.255.224 { # Subnet for 29 computers
range 192.168.0.17 192.168.0.45;
option subnet-mask 255.255.255.224;
option broadcast-address 192.168.0.47;
option routers 192.168.0.46;
}
group {
host server1 { # the first fixed server for subnet 192.168.0.0/28
server-name server1;
hardware ethernet 0a:23:f2:56:33:x0;
fixed-address 192.168.0.1;
}
host server2 {
server-name server2;
hardware ethernet 0a:23:f2:56:33:x0;
fixed-address 192.168.0.2;
}
}

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 10-17-2008, 01:55 PM
"Filipe Brandenburger"
 
Default DHCP static hosts and subnet configuration

Hi,

On Fri, Oct 17, 2008 at 08:32, John <jses27@gmail.com> wrote:
> # Here is Subnet number 2.
> subnet 192.168.0.16 netmask 255.255.255.224 { # Subnet for 29 computers

Isn't this wrong? If the netmask is .224, it should be either
192.168.0.0-31 or 192.168.0.32-63. 192.168.0.16 does not make sense
here.

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

Thread Tools




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

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