Przedstawiam moje działające ustawienia.
/etc/network/interfaces
Kod: Zaznacz cały
# 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
address 83.19.28.220
netmask 255.255.255.248
gateway 83.19.28.217
network 83.19.28.0
broadcast 83.19.28.255
auto eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.0.0.0
auto eth2
iface eth2 inet static
address 10.0.0.2
netmask 255.0.0.0
Kod: Zaznacz cały
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp3-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"
Kod: Zaznacz cały
ddns-update-style none;
option domain-name-servers 194.204.159.1, 194.204.152.34;
default-lease-time 600;
max-lease-time 7200;
subnet 10.0.0.0 netmask 255.0.0.0 {
option subnet-mask 255.0.0.0;
option routers 10.0.0.1;
option broadcast-address 10.0.0.255;
ignore unknown-clients;
#Admin
host Ja {
hardware ethernet 00:30:4F:79:9A:03;
fixed-address 10.0.0.3;
}
#Olga
host P102_1 {
hardware ethernet 00:03:0D:84:30:6A;
fixed-address 10.1.2.1;
}
i tam lista hostow
}
Chcę ustawić DHCP na drugim interfejsie lecz coś te ustawienia nie działają
/etc/network/interfaces
Kod: Zaznacz cały
# 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
address 83.19.28.220
netmask 255.255.255.248
gateway 83.19.28.217
network 83.19.28.0
broadcast 83.19.28.255
auto eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.0.0.0
auto eth2
iface eth2 inet static
address 10.0.0.2
netmask 255.0.0.0
Kod: Zaznacz cały
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/dhcp3-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1 eth2"
Kod: Zaznacz cały
ddns-update-style none;
option domain-name-servers 194.204.159.1, 194.204.152.34;
default-lease-time 600;
max-lease-time 7200;
subnet 10.0.0.0 netmask 255.0.0.0 {
option subnet-mask 255.0.0.0;
option routers 10.0.0.1;
option broadcast-address 10.0.0.255;
ignore unknown-clients;
#Admin
host Ja {
hardware ethernet 00:30:4F:79:9A:03;
fixed-address 10.0.0.3;
}
#Olga
host P102_1 {
hardware ethernet 00:03:0D:84:30:6A;
fixed-address 10.1.2.1;
}
i tam lista hostow
}
subnet 10.0.0.0 netmask 255.0.0.0 {
option subnet-mask 255.0.0.0;
option routers 10.0.0.2;
option broadcast-address 10.0.0.255;
ignore unknown-clients;
#Ola
host P111_1 {
hardware ethernet 02:03:0D:85:31:7A;
fixed-address 10.1.11.1;
}
}
Wiem, że "subnet 10.0.0.0 netmask 255.0.0.0" są takie same dla obydwóch interfejsów ale o to mi chodzi.