Created
February 22, 2019 19:56
-
-
Save bjornbouetsmith/b15c9e511816d448dd0e0747e3a408d8 to your computer and use it in GitHub Desktop.
Option 121 for DHCP static routes pfsense
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Default gateway = 192.168.0.1 | |
Route network 192.168.0.0/24 -> 192.168.0.1 | |
Route network 192.168.1.0/24 -> 192.168.0.250 | |
Convert to hex, separated with : | |
First part is netmask /24 = 18 | |
18 | |
Next part is network | |
192.168.0.0 | |
192 = C0 | |
168 = A0 | |
0 = 00 | |
0 = 00 (But skip duplicate) | |
Result: | |
C0:A8:00 | |
Gateway: | |
192.168.0.1 | |
192 = C0 | |
168 = A0 | |
0 = 00 | |
0 = 01 | |
Result: | |
C0:A8:00:01 | |
Full string: | |
18:C0:A8:00:C0:A8:00:01 | |
Do the same with 192.168.1.0/24 | |
result: | |
18:C0:A8:01:C0:A8:00:FA | |
Add: | |
00 for default route | |
and | |
C0:A8:00:01 which is our default gateway | |
Full resulting string is: | |
18:C0:A8:00:C0:A8:00:01:18:C0:A8:01:C0:A8:00:FA:00:C0:A8:00:01 | |
Which is basically: | |
192.168.0.0/24 -> 192.168.0.1 + 192.168.1.0/24 -> 192.168.0.1 + 0.0.0.0/0 -> 192.168.0.1 | |
Converted to a hex string with a twist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment