forked from oldengremlin/route-4-dhcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
33 lines (26 loc) · 1.7 KB
/
README.html
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
<h1>route-4-dhcp</h1>
Calculate Classless Route Option 121, <a href="https://tools.ietf.org/html/rfc3442">RFC 3442</a>, The Classless Static Route Option for Dynamic Host Configuration Protocol (DHCP) version 4
<h2>Classless Route Option Format</h2>
The code for this option is 121, and its minimum length is 5 bytes.<br>
This option can contain one or more static routes, each of which consists of a destination descriptor and the IP address of the router that should be used to reach that destination.<br>
<pre> Code Len Destination 1 Router 1
+-----+---+----+-----+----+----+----+----+----+
| 121 | n | d1 | ... | dN | r1 | r2 | r3 | r4 |
+-----+---+----+-----+----+----+----+----+----+
Destination 2 Router 2
+----+-----+----+----+----+----+----+
| d1 | ... | dN | r1 | r2 | r3 | r4 |
+----+-----+----+----+----+----+----+</pre>
<h2>Sample use</h2>
<pre>$ rfc3442.route-4-dhcp.pl 10.0.0.0/8 192.168.88.2 172.16.0.0/12 192.168.88.2 192.168.0.0/16 192.168.88.2 0.0.0.0/0 192.168.88.1
option_121_route_10.0.0.0/8_via_192.168.88.2 : 0x080ac0a85802
option_249_route_10.0.0.0/8_via_192.168.88.2 : 0x080ac0a85802
option_121_route_172.16.0.0/12_via_192.168.88.2 : 0x0cac10c0a85802
option_249_route_172.16.0.0/12_via_192.168.88.2 : 0x0cac10c0a85802
option_121_route_192.168.0.0/16_via_192.168.88.2 : 0x10c0a8c0a85802
option_249_route_192.168.0.0/16_via_192.168.88.2 : 0x10c0a8c0a85802
option_121_route_0.0.0.0/0_via_192.168.88.1 : 0x00c0a85801
option_249_route_0.0.0.0/0_via_192.168.88.1 : 0x00c0a85801
aggregate_opt_121 : 0x080ac0a858020cac10c0a8580210c0a8c0a8580200c0a85801
aggregate_opt_249 : 0x080ac0a858020cac10c0a8580210c0a8c0a8580200c0a85801</pre>
See more http://oldengremlin.blogspot.com/2016/10/routeros-dhcp.html