← Back to team overview

sslug-teknik team mailing list archive

Re: dhcpd på två interface av totalt tre ?

 

Hej Michael
Ok få se nu....

Michael Rasmussen wrote:

On Thu, 22 Jul 2004 23:08:13 +0200, Håkan Larsson wrote:


Hur lave et tomt subnet for eth1 som har dynamisk adress? mvh Håkan

Jeg antager, at ifconfig giver følgende svar:
eth0 Link encap:Ethernet HWaddr 00:50:FC:34:BE:BC inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6462342 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5666443 errors:0 dropped:0 overruns:3 carrier:0
collisions:0 txqueuelen:1000 RX bytes:2566379803 (2447.4 Mb) TX bytes:3019066440 (2879.2 Mb) Interrupt:11 Base address:0xd100 eth1 Link encap:Ethernet HWaddr 00:48:54:D2:06:0E inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:11161041 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12703225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 RX bytes:535104667 (510.3 Mb) TX bytes:1191127780 (1135.9 Mb) Interrupt:10 Base address:0xf000 eth2 Link encap:Ethernet HWaddr 00:20:18:32:2C:AE inet addr:172.16.1.1 Bcast:172.16.255.255 Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6201510 errors:0 dropped:0 overruns:0 frame:16638
          TX packets:5647862 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 RX bytes:2961291271 (2824.1 Mb) TX bytes:1686918636 (1608.7 Mb) Interrupt:9 Base address:0x300 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:19777 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19777 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 RX bytes:2809195 (2.6 Mb) TX bytes:2809195 (2.6 Mb)


Ok så långt eth2 är då dynamisk mot interner.

Indhold af dchpd.conf skal så være som følger:
#eth0

Mitt ena LAN följer.

subnet 192.168.2.0 netmask 255.255.255.0 {
#address range on eth0
range 192.168.2.100 192.168.2.199;
default-lease-time 86400;
max-lease-time 86400;

# Set the default gateway to be used by
# the clients
option routers 192.168.2.1;

# Set the broadcast address and subnet mask
# to be used by the DHCP clients
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;

# <optional>
# Set the DNS server to be used by the
# DHCP clients
option domain-name-servers 172.16.1.1;

# Set the NTP server to be used by the
# DHCP clients
option nntp-server 172.16.1.1;

# If you specify a WINS server for your Windows clients,
# you need to include the following option in the dhcpd.conf file:
option netbios-name-servers 172.16.1.1;
# </optional>
}

#eth1
subnet 192.168.1.0 netmask 255.255.255.0 {
}

Ok Jag antar att eth1 nu är ett "tomt subnät"


#eth2
subnet 172.16.0.0 netmask 255.255.0.0 {
#address range on eth0
range 172.16.2.0 172.16.255.250;
default-lease-time 86400;
max-lease-time 86400;

# Set the default gateway to be used by
# the clients
option routers 172.16.1.1;

# Set the broadcast address and subnet mask
# to be used by the DHCP clients
option broadcast-address 172.16.255.255;
option subnet-mask 255.255.0.0;

# <optional>
# Set the DNS server to be used by the
# DHCP clients
option domain-name-servers 172.16.1.1;

# Set the NTP server to be used by the
# DHCP clients
option nntp-server 172.16.1.1;

# If you specify a WINS server for your Windows clients,
# you need to include the following option in the dhcpd.conf file:
option netbios-name-servers 172.16.1.1;
# </optional>
}


Ok jag tror jag förstår din tanke. Jag ska prova detta i morgon
Antagligen kommer det att fungera :-)

Tack för hjälpen!

Mvh Håkan




Follow ups

References