[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 432
  • Last Modified:

Static Route


1) I saw a static route like this:

C:\> route -p add mask

2) I am still confused and need confirmation from experts

3) Per my understanding
- mask is subnet

4) So the purpose of the above static route is to let the subnet of going through the Gateway (

5) My question: Is the understanding correct or wrong? any explanation please

1 Solution
static route is defined as follows:

source --- mask --- destination

so with your example above, you got it in reverse.

destination to 10.10.10/24 subnet is reachable towards gateway

this just simply means that when the router receives a packet destined towards the subnet, it will forward it to

makes sense? let me know how i could help you further...
Fred MarshallCommented:
I don't see that you have anything in reverse.  It may be a bit hard to tell.

"route -p add mask"

Is translated as follows:

"Add a persistent route (one that will survive a reboot)
TO the subnet with subnet mask OR /24 (the latter two mean the same thing).
VIA the device with IP address of as the Gateway for this targeted subnet.

I would rephrase your #4 to:
"Send packets destined for the subnet through the as the gateway to that subnet."

Note that I changed your to as the network address for the subnet.    Otherwise you may get a route for only the one IP address of instead of the subnet

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now