README
author Tero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 15:09:16 +0200
changeset 484 099dee149e74
parent 483 19d084bb4afd
child 507 e3a32f4dff54
permissions -rw-r--r--
document host alias=
438
d45fc43c6073 split out pvl-hosts from pvl-verkko
Tero Marttila <tero.marttila@aalto.fi>
parents: 34
diff changeset
     1
= pvl-hosts =
34
491f7da9d29b pvl.verkko-dhcp: fix polling without syslog; README
Tero Marttila <terom@paivola.fi>
parents:
diff changeset
     2
443
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     3
DNS/DHCP hosts management/integration for ISC bind9 and dhcpd.
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     4
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     5
Also includes network SNMP discovery.
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     6
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     7
== Hosts ==
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     8
The `pvl.hosts-* etc/hosts/test` tools read hosts files as input, which have an ini format, using section names as hostnames to configure attributes for that host:
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
     9
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    10
    [foo]
452
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    11
        ip          = 127.0.0.1
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    12
        ethernet    = 00:11:22:33:44:55
443
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    13
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    14
    [bar]
452
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    15
        ip          = 127.0.0.2
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    16
        ethernet    = 01:23:45:67:89:ab
443
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    17
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    18
The default mechanism uses the basename of the given config file as the domain name, so this example file would generate something like the following output for use in a `zone "test" { ... }` zonefile:
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    19
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    20
    $ pvl.hosts-dns --forward-zone=test etc/hosts/test
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    21
    foo                               A     127.0.0.1
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    22
    bar                               A     127.0.0.2
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    23
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    24
And correspondingly, the reverse zone for 127.0.0.0/8:
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    25
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    26
    $ pvl.hosts-dns --reverse-zone=127 etc/hosts/test
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    27
    1.0.0                             PTR   foo.test.
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    28
    2.0.0                             PTR   bar.test.
Tero Marttila <tero.marttila@aalto.fi>
parents: 438
diff changeset
    29
452
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    30
And the associated DHCP hosts:
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    31
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    32
    $ bin/pvl.hosts-dhcp etc/hosts/test
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    33
    host foo {
480
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
    34
        option host-name foo;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
    35
        hardware ethernet 00:11:22:33:44:55;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
    36
        fixed-address 127.0.0.1;
452
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    37
    }
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    38
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    39
    host bar {
480
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
    40
        option host-name bar;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
    41
        hardware ethernet 01:23:45:67:89:ab;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
    42
        fixed-address 127.0.0.2;
452
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    43
    }
d10f2b2188bb README etc/hosts/test with ethernet and pvl.hosts-dhcp output
Tero Marttila <tero.marttila@aalto.fi>
parents: 448
diff changeset
    44
484
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    45
=== Host aliases ===
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    46
Hosts can specify DNS aliases:
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    47
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    48
    [foo]
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    49
        ip          = 127.0.0.1
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    50
        alias       = test1
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    51
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    52
    [bar]
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    53
        ip          = 127.0.0.2
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    54
        alias       = test2
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    55
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    56
    $ bin/pvl.hosts-forward --forward-zone alias.test etc/hosts/alias.test 
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    57
    foo                               A     127.0.0.1
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    58
    test1                             CNAME foo
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    59
    bar                               A     127.0.0.2
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    60
    test2                             CNAME bar
099dee149e74 document host alias=
Tero Marttila <tero.marttila@aalto.fi>
parents: 483
diff changeset
    61
447
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    62
=== Generated hosts ===
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    63
The hosts file format supports something similar to bind9's $GENERATE directive for hosts:
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    64
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    65
    [asdf{1-3}]
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    66
        ip  = 10.100.100.$
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    67
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    68
    $ bin/pvl.hosts-dns --forward-zone=asdf etc/hosts/asdf 
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    69
    asdf1@asdf                        A     10.100.100.1
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    70
    asdf2@asdf                        A     10.100.100.2
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    71
    asdf3@asdf                        A     10.100.100.3
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    72
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    73
Note that the generate directives are interpreted and compiled directly by pvl.hosts. 
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    74
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    75
Most of the $GENERATE options should be supported, with a little clever hackery:
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    76
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    77
    [asdf{1-5/2}{0,2}]
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    78
       ip  = 10.100.100.$${10}
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    79
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    80
    $ bin/pvl.hosts-dns --forward-zone=asdf2 etc/hosts/asdf2
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    81
    asdf01@asdf2                      A     10.100.100.11
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    82
    asdf03@asdf2                      A     10.100.100.13
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    83
    asdf05@asdf2                      A     10.100.100.15
6f0357759e9b pvl.hosts: fixup and document host expansion
Tero Marttila <tero.marttila@aalto.fi>
parents: 443
diff changeset
    84
448
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    85
This feature can be used for generating reverse delegations:
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    86
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    87
    [foo-{240-247}]
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    88
        forward =
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    89
        reverse = $.240/29.0.0.10.in-addr.arpa
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    90
        ip      = 10.0.0.$
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    91
    
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    92
    $ bin/pvl.hosts-dns --reverse-zone=10 etc/hosts/reverse 
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    93
    240.0.0                           CNAME 240.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    94
    241.0.0                           CNAME 241.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    95
    242.0.0                           CNAME 242.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    96
    243.0.0                           CNAME 243.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    97
    244.0.0                           CNAME 244.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    98
    245.0.0                           CNAME 245.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
    99
    246.0.0                           CNAME 246.240/29.0.0.10.in-addr.arpa.
5ab0ec8200c3 README reverse delegation example
Tero Marttila <tero.marttila@aalto.fi>
parents: 447
diff changeset
   100
    247.0.0                           CNAME 247.240/29.0.0.10.in-addr.arpa.
480
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   101
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   102
=== DHCP Options ===
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   103
The hosts need not specify any fixed ip address, leaving IP address allocation to dhcpd:
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   104
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   105
    [foo]
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   106
        ethernet    = 00:11:22:33:44:55 
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   107
    
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   108
    $ bin/pvl.hosts-dhcp etc/hosts/dhcp1 
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   109
    host foo {
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   110
        option host-name foo;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   111
        hardware ethernet 00:11:22:33:44:55;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   112
    }
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   113
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   114
=== DHCP Boot options ===
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   115
The hosts can specify DHCP boot server/file options:
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   116
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   117
    [foo]
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   118
        ethernet    = 00:11:22:33:44:55
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   119
        boot        = boot.lan:debian/wheezy/pxelinux.0
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   120
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   121
    $ bin/pvl.hosts-dhcp etc/hosts/boot.dhcp 
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   122
    host foo {
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   123
        option host-name foo;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   124
        hardware ethernet 00:11:22:33:44:55;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   125
        next-server boot.lan;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   126
        filename debian/wheezy/pxelinux.0;
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   127
    }
7e44854e85d4 README and test host boot= and dynamic ip=
Tero Marttila <tero.marttila@aalto.fi>
parents: 452
diff changeset
   128
483
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   129
=== DHCP hosts in multiple subnets/domains ===
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   130
A host with different interfaces in multiple domains must specify unique interface names:
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   131
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   132
    [foo.dhcp]
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   133
        [[asdf]]
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   134
            ip              = 10.1.0.1
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   135
            ethernet.eth1   = 00:11:22:33:44:55
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   136
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   137
    [bar.dhcp]
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   138
        [[asdf]]
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   139
            ip              = 10.2.0.1
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   140
            ethernet.eth2   = 55:44:33:22:11:00
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   141
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   142
    $ bin/pvl.hosts-dhcp etc/hosts/dhcp2 
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   143
    host asdf-eth1 {
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   144
        option host-name asdf;
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   145
        hardware ethernet 00:11:22:33:44:55;
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   146
        fixed-address 10.1.0.1;
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   147
    }
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   148
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   149
    host asdf-eth2 {
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   150
        option host-name asdf;
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   151
        hardware ethernet 55:44:33:22:11:00;
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   152
        fixed-address 10.2.0.1;
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   153
    }
19d084bb4afd pvl.hosts.dhcp: test and document hosts on multiple networks
Tero Marttila <tero.marttila@aalto.fi>
parents: 480
diff changeset
   154