maintenance
IMPORTANT NOTICE: SCHEDULED MAINTENANCE AT 2020-02-19 6:00 AM GMT

Changes

Template:Networking rutx manual routing

297 bytes added, 18:03, 4 December 2019
no edit summary
Static routes specify over which interface and gateway a certain host or network can be reached. In this page you can configure your own custom routes.
[[Image:Networking_RUTX_manual_static routes_ipv4_v1.png]]Here is an example of Static IPv4 Routes
[[Image:Networking_RUTX_manual_static routes_ipv4_v1.png]]<table class="nd-mantable"> <tr> <th>field nameField</th> <th>valueValue</th> <th>descriptionDescription</th> </tr> <tr> <td>Routing tableInterface</td> <td>MAIN | WAN | WAN2 mobile | WAN3lan; Defaultdefault: '''MAIN'''</tdb> <td>Defines which table will be used for the route in questionmobile</tdb> </tr> <tr> <td>Interface</td> <td>LAN | WAN(Wired) | WAN2(Mobile) | WAN3(WiFi) | VPN instances; Default: '''WAN(Wired)'''</td> <td>The zone where the target network resides</td> </tr> <tr> <td>Destination address'''Target<span class="asterisk">*'''</span></td> <td>ipip4; Defaultdefault: '''<b>0.0.0.0'''</b></td> <td>The address of the destination network</td> </tr> <tr> <td>Netmask'''<span class="asterisk">*'''</span></td> <td>ipnetmask; Defaultdefault: '''0<b>255.0255.0255.0'''255</b></td> <td>A Mask that is applied to the Target to determine to what actual IP addresses the routing rule applies</td> </tr> <tr> <td>Gateway</td> <td>ip; Defaultdefault: " "<b>none</b></td> <td>Defines where the router should send all the traffic that applies to the rule</td> </tr> <tr> <td>Metric</td> <td>integer; Defaultdefault: '''<b>0'''</b></td> <td>The '''Metric''' <b>metric</b> value is used as a sorting measure. If a packet about to be routed fits two rules, the one with the higher lower metric is applied.</td></tr><tr><td>MTU</td><td>integer [64..9000]; default: <b>1500</b></td><td>Sets the maximum transmission unit (MTU) size. It is the largest size of a protocol data unit (PDU) that can be transmitted in a single network layer transaction.</td></tr><tr><td>Route Type</td><td>unicast | local | broadcast | multicast | unreachable | prohibit | backhole | anycast | -- custom -- ; default: <b>unicast</b></td><td>Selects route type. Each type specifies a different behavior for the route:<ul><li><b>unicast</b> -</li><li><b>local</b> - routes of this type are added to the 'local' routing table and used only for locally hosted IPs.</li><li><b>broadcast</b> - routes of this type are added to the 'local' routing table and used by link layer devices that support the broadcast address principle.</li><li><b>multicast</b> -</li><li><b>unreachable</b> -</li><li><b>prohibit</b> - used to prohibit traffic to specified host or network. When a destination is prohibited, the kernel sends a 'Network is unreachable' response the source address.</li><li><b>blackhole</b> - packets that match this type of route are discarded without any response.</li><li><b>anycast</b> -</li><li><b>-- custom --</b> -</li></ul></td> </tr></table>
<span class="asterisk">*</span><b>Additional notes on Target & Netmask:</b>
'''*Additional notes on Destination & You can define a rule that applies to a single IP like this:<ul><li><b>Target</b>: some IP</li><li><b>Netmask</b>:'''255.255.255.255</li></ul>Furthermore, you can define a rules that apply to a range of IPs. Refer to the table below for examples.<table class="nd-mantable"><tr><th>Target</th><th>Netmask</th><th>Description</th></tr><tr><td>192.168.2.0</td><td>255.255.255.240</td><td>Applies to IPs in the 192.168.2.0 - 192.168.2.15 range.</td></tr><tr><td>192.168.2.240</td><td>255.255.255.240</td><td>Applies to IPs in the 192.168.2.240 - 192.168.2.255 range.</td></tr><tr><td>192.168.2.161</td><td>255.255.255.0</td><td>Applies to IPs in the 192.168.2.0 - 192.168.55.255 range.</td></tr><tr><td>192.168.0.0</td><td>255.255.0.0</td><td>Applies to IPs in the 192.168.0.0 - 192.168.255.255 range.</td></tr><tr><td>192.168.2.161</td><td>255.255.255.255</td><td>Only applies to 192.168.2.161.</td></tr></table>
You can define a rule that applies to a single IP like this: Destination - some IP; Netmask - 255.255.255.255. Furthermore, you can define a rule that applies to a segment of IPs like this: Destination – some IP that STARTS some segment; Netmask – Netmask that defines how large the segment is. e.g.:
<table class="nd-mantable">
<tr>
<th>field name</th>
<th>value</th>
<th>description</th>
</tr>
<tr>
<td>192.168.55.161</td>
<td>255.255.255.255</td>
<td>Only applies to 192.168.55.161</td>
</tr>
<tr>
<td>192.168.55.0</td>
<td>255.255.255.240</td>
<td>Applies to IPs in the 192.168.55.0 - 192.168.55.255</td>
</tr>
<tr>
<td>192.168.55.240</td>
<td>255.255.255.240</td>
<td>192.168.55.240 - 192.168.55.255</td>
</tr>
<tr>
<td>192.168.55.161</td>
<td>255.255.255.0</td>
<td>192.168.55.0 - 192.168.55.255</td>
</tr>
<tr>
<td>192.168.0.0</td>
<td>255.255.0.0</td>
<td>192.168.0.0 - 192.168.255.255</td>
</tr>
</table>
 
===Static ARP entries===
----
Static ARP entries are used to bind a MAC address to a specific IP address. For example, if you want a device to get the same IP every time it connects to the router, you can create a Static ARP entry by binding that device’s MAC address to the desired IP address. The router will then create an entry in the ARP table, which in turn will make sure that that device will get the specified IP address every time.
 
[[Image:Network routing static routes static arp entries.PNG]]
Settings for Static IPv6 routes are the same as for IPv4 only that the target IP and and gateway are different.
<br />
==Dynamic Routes==

Navigation menu