Chetan Gaonker | 7f4bf74 | 2016-05-04 15:56:08 -0700 | [diff] [blame] | 1 | # -*- text -*- |
| 2 | ###################################################################### |
| 3 | # |
| 4 | # This is a virtual server that handles DHCP relaying |
| 5 | # |
| 6 | # Only one server can listen on a socket, so you cannot |
| 7 | # do DHCP relaying && run a DHCP server at the same time. |
| 8 | # |
| 9 | ###################################################################### |
| 10 | |
| 11 | server dhcp.eth1 { |
| 12 | listen { |
| 13 | ipaddr = * |
| 14 | port = 67 |
| 15 | type = dhcp |
| 16 | interface = eth1 |
| 17 | } |
| 18 | |
| 19 | # Packets received on the socket will be processed through one |
| 20 | # of the following sections, named after the DHCP packet type. |
| 21 | # See dictionary.dhcp for the packet types. |
| 22 | dhcp DHCP-Discover { |
| 23 | update config { |
| 24 | # IP Address of the DHCP server |
| 25 | DHCP-Relay-To-IP-Address := 192.0.2.2 |
| 26 | } |
| 27 | update request { |
| 28 | # IP Address of the DHCP relay (ourselves) |
| 29 | DHCP-Gateway-IP-Address := 192.0.2.1 |
| 30 | } |
| 31 | ok |
| 32 | } |
| 33 | |
| 34 | dhcp DHCP-Request { |
| 35 | update config { |
| 36 | # IP Address of the DHCP server |
| 37 | DHCP-Relay-To-IP-Address := 192.0.2.2 |
| 38 | } |
| 39 | update request { |
| 40 | DHCP-Gateway-IP-Address := 192.0.2.2 |
| 41 | } |
| 42 | ok |
| 43 | } |
| 44 | } |