Noch einmahl: Kahden verkkokortin interface / dhcpd.conf (liite mukana)
Kari Rantakari
kari.rantakari at po.lapua.fi
La Tammi 17 05:10:59 GMT 2009
Lainaus Asmo Koskinen <asmo.koskinen at arkki.info>:
>
> Kari, tällainenkin laskin on olemassa:
>
> http://jodies.de/ipcalc?host=192.169.1.0&mask1=24&mask2=
>
> Löytyy myös ubuntulle: "sudo apt-get install ipcalc"
>
> ----
> asmok at ubuntu:~$ ipcalc 192.169.1.0/24
> Address: 192.169.1.0 11000000.10101001.00000001. 00000000
> Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000
> Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111
> =>
> Network: 192.169.1.0/24 11000000.10101001.00000001. 00000000
> HostMin: 192.169.1.1 11000000.10101001.00000001. 00000001
> HostMax: 192.169.1.254 11000000.10101001.00000001. 11111110
> Broadcast: 192.169.1.255 11000000.10101001.00000001. 11111111
> Hosts/Net: 254 Class C
>
>
> Tärkeintä sen palvelimen kannalta on tietää, mistä mennä ulos (gateway)
> ja mistä nimipalvelimet (dns-nameservers, /etc/resolv.conf) löytyvät.
>
> Asmo.
>
> --
> ubuntu-fi mailing list
> ubuntu-fi at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-fi
>
Huomenta Asmo
Siirsin "laboratorion" kotiin, kun alkoi iltalomat loppua.
Nyt mulla on telewellin adls-modeemi TW-EA-1000, josta olen poistanut DHCP:n
serverin interface on tämän näköinen:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.50
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.254
dns-nameservers 192.168.0.1
auto eth1
iface eth1 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
Onko OK?
ja dhcp.conf tälläinen
#
# Default LTSP dhcpd.conf config file.
#
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.20 192.168.1.250;
option domain-name "example.com";
option domain-name-servers 192.168.1.1;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
# next-server 192.168.0.254;
# get-lease-hostnames true;
option subnet-mask 255.255.255.0;
option root-path "/opt/ltsp/i386";
if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
filename "/ltsp/i386/pxelinux.0";
} else {
filename "/ltsp/i386/nbi.img";
}
host hpljp2015 {
hardware ethernet 00:14:38:E6:46:A1;
fixed-address 192.168.1.10;
}
}
Entäs tämä??
Kun käynnistää dhcp:n, ...
root at mannikko:~# /etc/init.d/dhcp3-server restart
* Stopping DHCP server dhcpd3 [ OK ]
* Starting DHCP server dhcpd3 [ OK ]
root at mannikko:~#
... syslogiin tulee ilmoitus
JJan 17 07:01:38 mannikko dhcpd: Internet Systems Consortium DHCP Server V3.1.1
Jan 17 07:01:38 mannikko dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Jan 17 07:01:38 mannikko dhcpd: All rights reserved.
Jan 17 07:01:38 mannikko dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Jan 17 07:01:40 mannikko dhcpd: Internet Systems Consortium DHCP Server V3.1.1
Jan 17 07:01:40 mannikko dhcpd: Copyright 2004-2008 Internet Systems Consortium.
Jan 17 07:01:40 mannikko dhcpd: All rights reserved.
Jan 17 07:01:40 mannikko dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Jan 17 07:01:40 mannikko dhcpd: Wrote 1 leases to leases file.
Jan 17 07:01:40 mannikko dhcpd:
Jan 17 07:01:40 mannikko dhcpd: No subnet declaration for eth1 (192.168.1.254).
Jan 17 07:01:40 mannikko dhcpd: ** Ignoring requests on eth1. If this is not what
Jan 17 07:01:40 mannikko dhcpd: you want, please write a subnet declaration
Jan 17 07:01:40 mannikko dhcpd: in your dhcpd.conf file for the network segment
Jan 17 07:01:40 mannikko dhcpd: to which interface eth1 is attached. **an 17
06:52:52 mannikko -- MARK --
Kun käynnistää verkon, ....
root at mannikko:~# /etc/init.d/networking restart
* Reconfiguring network interfaces...
RTNETLINK answers: No such process
* if-up.d/mountnfs[eth0]: waiting for interface eth1 before doing NFS mounts
[ OK ]
root at mannikko:~#
... syslogiin tulee
an 17 07:05:42 mannikko avahi-daemon[4800]: Interface eth0.IPv4 no longer
relevant for mDNS.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Leaving mDNS multicast group on
interface eth0.IPv4 with address 192.168.0.50.
Jan 17 07:05:42 mannikko dhcpd: receive_packet failed on eth0: Network is down
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Withdrawing address record for
fe80::219:d1ff:fe92:343e on eth0.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Withdrawing address record for
192.168.0.50 on eth0.
Jan 17 07:05:42 mannikko NetworkManager: <info> (eth0): carrier now OFF (device
state 1)
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Interface eth1.IPv4 no longer
relevant for mDNS.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Leaving mDNS multicast group on
interface eth1.IPv4 with address 192.168.1.254.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Withdrawing address record for
fe80::250:4ff:fe7c:b97c on eth1.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Withdrawing address record for
192.168.1.254 on eth1.
Jan 17 07:05:42 mannikko NetworkManager: <info> (eth1): carrier now OFF (device
state 1)
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Joining mDNS multicast group on
interface eth0.IPv4 with address 192.168.0.50.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: New relevant interface eth0.IPv4
for mDNS.
Jan 17 07:05:42 mannikko avahi-daemon[4800]: Registering new address record for
192.168.0.50 on eth0.IPv4.
Jan 17 07:05:42 mannikko kernel: [ 3186.985471] ADDRCONF(NETDEV_UP): eth0: link
is not ready
Jan 17 07:05:42 mannikko ltsp: # Creating dsa-hostkey for mannikko
Jan 17 07:05:42 mannikko ltsp: # Creating rsa-hostkey for mannikko
Jan 17 07:05:42 mannikko ltsp: # Creating dsa-hostkey for 192.168.0.50
Jan 17 07:05:42 mannikko ltsp: # Creating rsa-hostkey for 192.168.0.50
Jan 17 07:05:42 mannikko ltsp: # Creating dsa-hostkey for 192.168.1.254
Jan 17 07:05:42 mannikko ltsp: # Creating rsa-hostkey for 192.168.1.254
Jan 17 07:05:43 mannikko avahi-daemon[4800]: Joining mDNS multicast group on
interface eth1.IPv4 with address 192.168.1.254.
Jan 17 07:05:43 mannikko kernel: [ 3187.064336] eth1: setting full-duplex.
Jan 17 07:05:43 mannikko avahi-daemon[4800]: New relevant interface eth1.IPv4
for mDNS.
Jan 17 07:05:43 mannikko avahi-daemon[4800]: Registering new address record for
192.168.1.254 on eth1.IPv4.
Jan 17 07:05:43 mannikko NetworkManager: <info> (eth1): carrier now ON (device
state 1)
Jan 17 07:05:43 mannikko ltsp: # Creating dsa-hostkey for mannikko
Jan 17 07:05:43 mannikko ltsp: # Creating rsa-hostkey for mannikko
Jan 17 07:05:43 mannikko ltsp: # Creating dsa-hostkey for 192.168.0.50
Jan 17 07:05:43 mannikko ltsp: # Creating rsa-hostkey for 192.168.0.50
Jan 17 07:05:43 mannikko ltsp: # Creating dsa-hostkey for 192.168.1.254
Jan 17 07:05:43 mannikko ltsp: # Creating rsa-hostkey for 192.168.1.254
Jan 17 07:05:44 mannikko avahi-daemon[4800]: Registering new address record for
fe80::250:4ff:fe7c:b97c on eth1.*.
Jan 17 07:05:44 mannikko kernel: [ 3188.464865] 0000:00:19.0: eth0: Link is Up
100 Mbps Full Duplex, Flow Control: RX/TX
Jan 17 07:05:44 mannikko kernel: [ 3188.464870] 0000:00:19.0: eth0: 10/100
speed: disabling TSO
Jan 17 07:05:44 mannikko NetworkManager: <info> (eth0): carrier now ON (device
state 1)
Jan 17 07:05:44 mannikko kernel: [ 3188.466977] ADDRCONF(NETDEV_CHANGE): eth0:
link becomes ready
Jan 17 07:05:45 mannikko ntpdate[7603]: step time server 91.189.94.4 offset
-0.012649 sec
Jan 17 07:05:45 mannikko avahi-daemon[4800]: Registering new address record for
fe80::219:d1ff:fe92:343e on eth0.*.
Jan 17 07:05:48 mannikko ntpdate[7744]: step time server 91.189.94.4 offset
-0.000516 sec
Jan 17 07:05:53 mannikko kernel: [ 3197.180026] eth1: no IPv6 routers present
Jan 17 07:05:54 mannikko kernel: [ 3199.004026] eth0: no IPv6 routers present
Serveri menee nettiin ok, mutta clientti ei saa yhteyttä. Jää vaan pyytämään ip:tä
Jotenkin vaan tuntuu, ettei eth1 osaa viedä dhcp:lle???
--
terveisin
Kari Rantakari
044-4384765
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/