• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

OpenSuse dhcp Fixed Address ueber dns namen

bpr

Newbie
Hallo,
ich habe bereits ein wenig gesucht, ich habe verschiedene dokumentationen gelesen und alles moeglich und ich bin an dem problem seit ca einer Stunde... Ich glaube, dass ein paar weitere Augen den Fehler vielleicht finden koennten.

Was ich moechte ist:

Code:
 host reality1 {
                  hardware ethernet 00:20:ED:5D:FD:7E;
                  fixed-address reality1.unit2.lokal;
          }

Und das der dhcp ueber den dns dem Client die Ip zuweist, welche im bind/named steht.

Hier meine relevanten configs:

/etc/dhcpd.conf
Code:
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "unit2.lokal";
option domain-name-servers 192.168.2.1;

option routers 192.168.2.1;


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

# if you do not use dynamical DNS updates:
#
# this statement is needed by dhcpd-3 needs at least this statement.
# you have to delete it for dhcpd-2, because it does not know it.
#
# if you want to use dynamical DNS updates, you should first read
# read /usr/share/doc/packages/dhcp-server/DDNS-howto.txt
ddns-update-style none; ddns-updates off;


# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 192.168.2.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 192.168.2.0 netmask 255.255.255.0 {
#  range 192.168.2.100 192.168.2.199;
#  option routers 192.168.2.1;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.20 192.168.2.39;
  default-lease-time 600;
  max-lease-time 7200;

  zone unit2.lokal. {
    primary 192.168.2.1;
  }
  zone 0.2.168.192.in-addr.arpa. {
    primary 192.168.2.1;
  }
}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
group {
	
	host reality1 {
		hardware ethernet 00:20:ED:5D:FD:7E;
		fixed-address reality1.unit2.lokal;
	}

	host reality3 {
		hardware ethernet 00:0F:EA:F5:EA:C8;
		fixed-address reality3.unit2.lokal;
	}

	host reality4 {
  		hardware ethernet 00:07:E9:C2:FE:5E;
  		fixed-address reality4.unit2.lokal;
	}
	
	host SEC0015993EA63B {
		hardware ethernet 00:15:99:3E:A6:3B;
		fixed-address SEC0015993EA63B.unit2.lokal;
	}
}
# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}

/etc/named.d/unit2.lokal.conf
Code:
zone "unit2.lokal" IN {
	type master;
	file "master/unit2.lokal";	
	notify yes;
	forwarders { 192.168.1.254; };
	
	allow-update {
		192.168.2.1;
	};

};

zone "2.168.192.in-addr.arpa" IN {
	type master;
	file "master/2.168.192.in-addr.arpa";
	allow-update {
		192.168.2.1;
	};
};

/var/lib/named/master/unit2.lokal
Code:
$TTL 86400
@     IN     SOA    ns1.unit2.lokal.     hostmaster.unit2.lokal. (
                    2010060801 ; serial
                    21600      ; refresh after 6 hours
                    3600       ; retry after 1 hour
                    604800     ; expire after 1 week
                    86400 )    ; minimum TTL of 1 day

      		IN     NS     ns1.unit2.lokal.

             	IN     A       192.168.2.1

ns1          	IN     A       192.168.2.1
ftp          	IN     CNAME   ns1
www          	IN     CNAME   ns1

liser		IN	A	192.168.2.1
cacti		IN	A	192.168.2.1
nagios		IN	A	192.168.2.1
webmin		IN	A	192.168.2.1
free-sa		IN	A	192.168.2.1
mrtg		IN	A	192.168.2.1

reality1	IN	A	192.168.2.11
reality2	IN	A	192.168.2.12
reality3	IN	A	192.168.2.13
reality4	IN	A	192.168.2.14

SEC0015993EA63B	IN	A	192.168.2.250

/var/lib/named/master/2.168.192.in-addr.arpa
Code:
$TTL 38400
@ 	IN	SOA	ns1.unit2.lokal. hostmaster.unit2.lokal. (
			2010060803
			10800
			3600
			43200
			38400 )
	IN	NS	ns1.unit2.lokal.
1	IN	PTR	ns1.unit2.lokal.
1	IN	PTR	liser.unit2.lokal.
11	IN	PTR	reality1.unit2.lokal.
12	IN	PTR	reality2.unit2.lokal.
13	IN	PTR	reality3.unit2.lokal.
14	IN	PTR	reality4.unit2.lokal.

250	IN	PTR	SEC0015993EA63B.unit2.lokal.

/etc/sysconfig/dhcpd
Code:
## Path: 	Network/DHCP/DHCP server
## Description: DHCP server settings
## Type:	string
## Default:	""
## ServiceRestart: dhcpd
#
# Interface(s) for the DHCP server to listen on.
# 
# A special keyword is ANY, it will cause dhcpd to autodetect available
# interfaces.
#
# Examples: DHCPD_INTERFACE="eth0"
#           DHCPD_INTERFACE="eth0 eth1 eth2 tr0 wlan0"
#           DHCPD_INTERFACE="internal0 internal1"
#           DHCPD_INTERFACE="ANY"
#
DHCPD_INTERFACE="eth1"

## Type:        list(yes,no,auto,)
## Default:     
## Description: Restart dhcp server when interface goes up (again)
#
# When the dhcp server is listening on a virtual interface, e.g. bridge,
# bonding or vlan, and this interface gets deleted and recreated during
# a network restart, dhcpd will stop answering requests on this interface
# and needs a restart as well.
# Begining with SLE-10 SP3, we install an if-up.d post script (see ifup(8)
# and also ifservices(5)), enabled in auto mode by default. This variable
# can be used to force or avoid the dhcp server restart:
#
#   no:   do not restart dhcpd
#  yes:   force a dhcp server restart
# auto:   (default) restart for virtual interfaces (bond,bridge,vlan) when
#         all interfaces used in DHCPD_INTERFACE variable are up as well.
#
# Except of this global setting, the variable can be specified per interface
# in the interface configurations (/etc/sysconfig/network/ifcfg-$name).
#
DHCPD_IFUP_RESTART=""

## Type:	yesno
## Default:	yes
## ServiceRestart: dhcpd
#
# Shall the DHCP server dhcpd run in a chroot jail (/var/lib/dhcp)?
#
# Each time you start dhcpd with the init script, /etc/dhcpd.conf will 
# be copied to /var/lib/dhcp/etc/.
# 
# Some files that are important for hostname to IP address resolution
# (/etc/{gai.conf,nsswitch.conf,resolv.conf,host.conf,hosts,localtime},
# /lib/lib{resolv.so.*,libnss_*.so.*,libpthread.so.0,libdl.so.2}) will
# also be copied to the chroot jail by the init script when you start
# it (less than 1MB altogether).
# 
# The pid file will be in /var/lib/dhcp/var/run/dhcpd.pid. 
#
DHCPD_RUN_CHROOTED="yes"

## Type:	string
## Default:	""
## ServiceRestart: dhcpd
#
# Since version 3, dhcpd.conf can contain include statements. 
# If you enter the names of any include files here, _all_ conf
# files will be copied to $chroot/etc/, when dhcpd is started in the 
# chroot jail. (/etc/dhcpd.conf is always copied.)
#
# For your convenience, you can also specify entire directories, like 
# "/etc/dhcpd.conf.d".
#
# Example: "/etc/dhcpd.conf.shared /etc/dhcpd.conf.bootp-clients"
#
DHCPD_CONF_INCLUDE_FILES=""

## Type:	string
## Default:	"dhcpd"
## ServiceRestart: dhcpd
#
# Leave empty or enter "root" to let dhcpd run as root. 
# Enter "dhcpd" to run dhcpd as user 'dhcpd'.
#
DHCPD_RUN_AS="dhcpd"

## Type:	string
## Default:	""
## ServiceRestart: dhcpd
#
# Other arguments that you want dhcpd to be started with
# (e.g. "-p 1234" for a non-standard port to listen on)
#
DHCPD_OTHER_ARGS=""

## Type:	string
## Default:	""
## ServiceRestart: dhcpd
#
# You may specify another dhcpd binary to be run. 
# The full path needs to be specified.
#
# If empty, the default applies. 
#
DHCPD_BINARY=""

/var/log/messages
Code:
Jun  8 12:30:55 liser dhcpd: reality3.unit2.lokal: host unknown.
Jun  8 12:30:55 liser dhcpd: DHCPREQUEST for 192.168.2.20 from 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:30:55 liser dhcpd: ns1.unit2.lokal: host unknown.
Jun  8 12:30:55 liser dhcpd: DHCPACK on 192.168.2.20 to 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:32:14 liser dhcpd: reality4.unit2.lokal: host unknown.
Jun  8 12:32:14 liser dhcpd: DHCPREQUEST for 192.168.2.22 from 00:07:e9:c2:fe:5e (Reality4) via eth1
Jun  8 12:32:14 liser dhcpd: ns1.unit2.lokal: host unknown.
Jun  8 12:32:14 liser dhcpd: DHCPACK on 192.168.2.22 to 00:07:e9:c2:fe:5e (Reality4) via eth1
Jun  8 12:32:18 liser dhcpd: reality1.unit2.lokal: host unknown.
Jun  8 12:32:18 liser dhcpd: DHCPREQUEST for 192.168.2.23 from 00:20:ed:5d:fd:7e (REALITY1) via eth1
Jun  8 12:32:18 liser dhcpd: DHCPACK on 192.168.2.23 to 00:20:ed:5d:fd:7e (REALITY1) via eth1
Jun  8 12:32:18 liser dhcpd: DHCPREQUEST for 192.168.2.21 from 00:00:00:00:00:10 (Reality2) via eth1
Jun  8 12:32:18 liser dhcpd: DHCPACK on 192.168.2.21 to 00:00:00:00:00:10 (Reality2) via eth1
Jun  8 12:35:55 liser dhcpd: reality3.unit2.lokal: host unknown.
Jun  8 12:35:55 liser dhcpd: DHCPREQUEST for 192.168.2.20 from 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:35:55 liser dhcpd: ns1.unit2.lokal: host unknown.
Jun  8 12:35:55 liser dhcpd: DHCPACK on 192.168.2.20 to 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:37:14 liser dhcpd: reality4.unit2.lokal: host unknown.
Jun  8 12:37:14 liser dhcpd: DHCPREQUEST for 192.168.2.22 from 00:07:e9:c2:fe:5e (Reality4) via eth1
Jun  8 12:37:14 liser dhcpd: ns1.unit2.lokal: host unknown.
Jun  8 12:37:14 liser dhcpd: DHCPACK on 192.168.2.22 to 00:07:e9:c2:fe:5e (Reality4) via eth1
Jun  8 12:37:18 liser dhcpd: reality1.unit2.lokal: host unknown.
Jun  8 12:37:18 liser dhcpd: DHCPREQUEST for 192.168.2.23 from 00:20:ed:5d:fd:7e (REALITY1) via eth1
Jun  8 12:37:18 liser dhcpd: DHCPACK on 192.168.2.23 to 00:20:ed:5d:fd:7e (REALITY1) via eth1
Jun  8 12:37:23 liser dhcpd: DHCPREQUEST for 192.168.2.21 from 00:00:00:00:00:10 (Reality2) via eth1
Jun  8 12:37:23 liser dhcpd: DHCPACK on 192.168.2.21 to 00:00:00:00:00:10 (Reality2) via eth1

Jun  8 12:46:25 liser dhcpd: DHCPRELEASE of 192.168.2.20 from 00:0f:ea:f5:ea:c8 (desktop) via eth1 (found)
Jun  8 12:46:33 liser dhcpd: reality3.unit2.lokal: host unknown.
Jun  8 12:46:33 liser dhcpd: DHCPDISCOVER from 00:0f:ea:f5:ea:c8 via eth1
Jun  8 12:46:33 liser dhcpd: DHCPOFFER on 192.168.2.20 to 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:46:33 liser dhcpd: DHCPREQUEST for 192.168.2.20 (192.168.2.1) from 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:46:33 liser dhcpd: DHCPACK on 192.168.2.20 to 00:0f:ea:f5:ea:c8 (desktop) via eth1
Jun  8 12:47:11 liser dhcpd: reality1.unit2.lokal: host unknown.
Jun  8 12:47:11 liser dhcpd: DHCPREQUEST for 192.168.2.23 from 00:20:ed:5d:fd:7e (REALITY1) via eth1
Jun  8 12:47:11 liser dhcpd: DHCPACK on 192.168.2.23 to 00:20:ed:5d:fd:7e (REALITY1) via eth1
Jun  8 12:47:14 liser dhcpd: reality4.unit2.lokal: host unknown.
Jun  8 12:47:14 liser dhcpd: DHCPREQUEST for 192.168.2.22 from 00:07:e9:c2:fe:5e (Reality4) via eth1
Jun  8 12:47:14 liser dhcpd: DHCPACK on 192.168.2.22 to 00:07:e9:c2:fe:5e (Reality4) via eth1
Jun  8 12:47:26 liser dhcpd: DHCPREQUEST for 192.168.2.21 from 00:00:00:00:00:10 (Reality2) via eth1
Jun  8 12:47:26 liser dhcpd: DHCPACK on 192.168.2.21 to 00:00:00:00:00:10 (Reality2) via eth1

Was passiert:
Die Computer die die festen Adressen bekommen sollen, kriegen leider andere - und zwar die, die aus dem pool kommen sprich 20 - 39.
Ich will aber, dass sie die bekommen sollen, die im DNS hinterlegt sind.

Der SE0015993EA63B ist ein Samsung Drucker und soll die 250 haben.

Ich hoffe jemand kann da einmal rueber schauen und sagen wo der Fehler ist :(

Danke euch im vorraus, fuer eure Hilfe.
 

stka

Guru
Hä was machst du denn da. Ein dhcp-Server weißt ein IP-Adresse zu und NICHT einen fqdn. Das muss so heißen:
fixed-address 192.168.0.45;
oder eine IP aus deinem Bereich
 
OP
B

bpr

Newbie
Ich will die ip dort aber nicht reinschreiben, da es doppelt gemoppelt ist, es geht naemlich auch ohne Ip Adressen. Ich habe das zwar temporaer mit der IP Adresse geloest, jedoch weiss ich - da ich es schon mal umgesetzt habe - dass es auch anders geht.

Der Vorteil liegt dabei wohl klar auf der Hand, bei IP Adressenaenderungen musst du nicht an zwei stellen etwas aendern sondern nur in der Zone File.

Gruss
Bjoern
 

stka

Guru
Umgekehrt wird ein Schuh draus. Du vergibst eine IP über DHCP und nur das kann DHCP und dann trägt der DHCP-Server die IP im DNS ein. Das nennt man DDNS.
 
Oben