DHCP Server...

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
McLin
Beiträge: 21
Registriert: 26.03.2008 23:23:03
Lizenz eigener Beiträge: GNU Free Documentation License
Wohnort: Lohfelden
Kontaktdaten:

DHCP Server...

Beitrag von McLin » 25.12.2008 15:57:28

Hi,

ich habe folgende Situation.
Ich habe in einem Router 8 Netzwerkinterface, und ich möchte gerne für jedes Interface ein Schulungsraum über ein Switch bedienen und extra IP Adress Bereiche vergeben.
Ist das möglich? Und wenn ja wie?

niesommer
Beiträge: 2493
Registriert: 01.10.2006 13:19:37
Lizenz eigener Beiträge: GNU General Public License

Re: DHCP Server...

Beitrag von niesommer » 25.12.2008 16:10:12

Wenn du jedem NIC eine ip geben kannst dan ist das möglich.
gadmin-dhcpd ist ein kleines tolles tool dafür.
Der DHCP Server vergibt dann die ip auf der grundlage über welche ip die anfrage für eine ip am server ankommt.
Falls du aber nur einen "normalen" Router hast und nur eine ip einstellen kannst dann ist das soweit ich weiß nicht möglich.
Gruß niesommer

McLin
Beiträge: 21
Registriert: 26.03.2008 23:23:03
Lizenz eigener Beiträge: GNU Free Documentation License
Wohnort: Lohfelden
Kontaktdaten:

Re: DHCP Server...

Beitrag von McLin » 25.12.2008 16:34:27

Nene sind alles Hardware Nics die ich alle selber konfigurieren kann...
Also könnte ich als Bsp. eth1 192.168.0.50 eth2 192.168.0.51 usw. vergeben und mit dem Tool dann jeweils ein Range eingeben wie die Adressen zu verteilen sind?

niesommer
Beiträge: 2493
Registriert: 01.10.2006 13:19:37
Lizenz eigener Beiträge: GNU General Public License

Re: DHCP Server...

Beitrag von niesommer » 25.12.2008 16:39:50

generell ja, aber jede NIC sollte dann ein eigene netz sein wie z. bsp.: eth0 192.168.1.0 eth2 192.168.2.0
dann werden die bereiche 192.168.2.0 uber eth2 verteilt und 192.168.1.0 über eth0,
dann könnten die bereiche so aus sehen 192.168.1.0 -254 und 192.168.2.0 -254
Gruß niesommer

McLin
Beiträge: 21
Registriert: 26.03.2008 23:23:03
Lizenz eigener Beiträge: GNU Free Documentation License
Wohnort: Lohfelden
Kontaktdaten:

Re: DHCP Server...

Beitrag von McLin » 25.12.2008 16:44:16

Reicht dass wenn ich in der Config eigene Netze anlege? Zieht sich der DHCP Server die einstellungen automatisch aus der Config und vergleicht diese mit der vom NIC?

niesommer
Beiträge: 2493
Registriert: 01.10.2006 13:19:37
Lizenz eigener Beiträge: GNU General Public License

Re: DHCP Server...

Beitrag von niesommer » 25.12.2008 16:49:37

ja, aber du kannst auch zuordnungen anlegen.
Bei mir hat das letztens auf dem Server den ich damit versehen habe ohne zuordnung funktioniert, allerdings habe ich nur 2 nic s verwendet.
Gruß niesommer

McLin
Beiträge: 21
Registriert: 26.03.2008 23:23:03
Lizenz eigener Beiträge: GNU Free Documentation License
Wohnort: Lohfelden
Kontaktdaten:

Re: DHCP Server...

Beitrag von McLin » 25.12.2008 17:10:41

So sehen jetzt meine Configs aus: (natürlich kommen die Samples noch raus.

Interfaces:

Code: Alles auswählen

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    adress 192.168.0.58
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    
iface eth1 inet static
    adress 192.168.4.1
    netmask 255.255.255.0
    network 192.168.4.0
    broadcast 192.168.4.255
    gateway 192.168.0.1
    
iface eth2 inet static
    address 192.168.5.1
    netmask 255.255.255.0
    network 192.168.5.0
    broadcast 192.168.5.255
    gateway 192.168.0.1
     
iface eth3 inet static
    address 192.168.6.1
    netmask 255.255.255.0
    network 192.168.6.0
    broadcast 192.168.6.255
    gateway 192.168.0.1
     
iface eth4 inet static
    address 192.168.7.1
    netmask 255.255.255.0
    network 192.168.7.0
    broadcast 192.168.7.255
    gateway 192.168.0.1
     
iface eth5 inet static
    address 192.168.8.1
    netmask 255.255.255.0
    network 192.168.8.0
    broadcast 192.168.8.255
    gateway 192.168.0.1
     
iface eth6 inet static
    address 192.168.9.1
    netmask 255.255.255.0
    network 192.168.9.0
    broadcast 192.168.9.255
    gateway 192.168.0.1
     
iface eth7 inet static
    address 192.168.10.1
    netmask 255.255.255.0
    network 192.168.10.0
    broadcast 192.168.10.255
    gateway 192.168.0.1
     
iface eth8 inet static
    address 192.168.11.1
    netmask 255.255.255.0
    network 192.168.11.0
    broadcast 192.168.11.255
    gateway 192.168.0.1
dhcpd.conf:

Code: Alles auswählen

#
# Sample configuration file for ISC dhcpd for Debian
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;

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

# 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 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# 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 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# 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.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# 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;
#  }
#}
subnet 192.168.4.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.4.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.4.10 192.168.4.40;

}

subnet 192.168.5.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.5.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.5.10 192.168.5.40;

}

subnet 192.168.6.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.6.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.6.10 192.168.6.40;

}

subnet 192.168.7.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.7.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.7.10 192.168.7.40;

}

subnet 192.168.8.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.8.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.8.10 192.168.8.40;

}

subnet 192.168.9.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.9.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.9.10 192.168.9.40;

}

subnet 192.168.10.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.10.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.10.10 192.168.10.40;

}

subnet 192.168.11.0 netmask 255.255.255.0 

{ 

 option domain-name "proteino.local";

 option domain-name-servers 192.168.0.200;

 option routers 192.168.0.1;

 option broadcast-address 192.168.11.255;

 option subnet-mask 255.255.255.0;

 default-lease-time 86400;

 max-lease-time 604800;

 range 192.168.11.10 192.168.11.40;

}

niesommer
Beiträge: 2493
Registriert: 01.10.2006 13:19:37
Lizenz eigener Beiträge: GNU General Public License

Re: DHCP Server...

Beitrag von niesommer » 25.12.2008 17:31:56

Nu ich würd sagen sieht gut aus, Probiere es doch einfach mal aus.
Rechner auf dhcp holen stellen und einfach mal die Schnittstellen durch probieren.
Gruß niesommer

McLin
Beiträge: 21
Registriert: 26.03.2008 23:23:03
Lizenz eigener Beiträge: GNU Free Documentation License
Wohnort: Lohfelden
Kontaktdaten:

Re: DHCP Server...

Beitrag von McLin » 25.12.2008 18:34:31

Erst nächste Woche;)

Keine Lust an meinen Freien Tagen in die Firma... Das habe ich mal schnell per SSH gemacht...

Antworten