Noch einmahl: Kahden verkkokortin interface / dhcpd.conf (liite mukana)

Asmo Koskinen asmo.koskinen at arkki.info
Pe Tammi 16 19:02:12 GMT 2009


Asmo Koskinen kirjoitti:

> auto eth0
> iface eth0 inet static
> address 192.169.1.50
> netmask 255.255.255.0 # Tarkista!
> network 192.169.1.0 # Tarkista!
> broadcast 192.169.1.255 # Tarkista!
> gateway 192.169.1.1 # Tarkista!
> dns-nameservers 192.169.1.1 # Tarkista!

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

----
asmok at ubuntu:~$ ipcalc 192.168.0.0/24
Address:   192.168.0.0          11000000.10101000.00000000. 00000000
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   192.168.0.0/24       11000000.10101000.00000000. 00000000
HostMin:   192.168.0.1          11000000.10101000.00000000. 00000001
HostMax:   192.168.0.254        11000000.10101000.00000000. 11111110
Broadcast: 192.168.0.255        11000000.10101000.00000000. 11111111
Hosts/Net: 254                   Class C, Private Internet

----
asmok at ubuntu:~$ ipcalc 192.168.123.0/24
Address:   192.168.123.0        11000000.10101000.01111011. 00000000
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   192.168.123.0/24     11000000.10101000.01111011. 00000000
HostMin:   192.168.123.1        11000000.10101000.01111011. 00000001
HostMax:   192.168.123.254      11000000.10101000.01111011. 11111110
Broadcast: 192.168.123.255      11000000.10101000.01111011. 11111111
Hosts/Net: 254                   Class C, Private Internet

----

Tärkeintä sen palvelimen kannalta on tietää, mistä mennä ulos (gateway) 
ja mistä nimipalvelimet (dns-nameservers, /etc/resolv.conf) löytyvät.

Asmo.