summaryrefslogtreecommitdiffstats
path: root/raddb/sites-available/dhcp.relay
blob: 76d1e1003437f08b95a560711836c135a69ba763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- text -*-
######################################################################
#
#	This is a virtual server that handles DHCP relaying
#
#	Only one server can listen on a socket, so you cannot
#	do DHCP relaying && run a DHCP server at the same time.
#
######################################################################

server dhcp.eth1 {
	listen {
		ipaddr = *
		port = 67
		type = dhcp
		interface = eth1
	}

	#  Packets received on the socket will be processed through one
	#  of the following sections, named after the DHCP packet type.
	#  See dictionary.dhcp for the packet types.
	dhcp DHCP-Discover {
		update config {
			# IP Address of the DHCP server
			&DHCP-Relay-To-IP-Address := 192.0.2.2
		}
		update request {
			# IP Address of the DHCP relay (ourselves)
			&DHCP-Gateway-IP-Address := 192.0.2.1
		}
		ok
	}

	dhcp DHCP-Request {
		update config {
			# IP Address of the DHCP server
			&DHCP-Relay-To-IP-Address := 192.0.2.2
		}
		update request {
			&DHCP-Gateway-IP-Address := 192.0.2.2
		}
		ok
	}
}