Share via


Route Add

Question

Monday, November 6, 2017 7:03 AM

Hi,

I need to add a route in windows routing table having a range of subnets starting from 172.16.21.0 to 172.16.60.0 with subnet mask 255.255.255.0 for all subnets instead of entering all the subnets manually. Is it possible?

Thanks.

All replies (13)

Tuesday, November 7, 2017 5:53 AM

Yes, it is possible.

We could add the following route "route ADD 172.16.0.0 mask 255.255.0.0 gateway" in command line.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, November 7, 2017 6:05 AM

  Sounds like an exam question to me.

Bill


Tuesday, November 7, 2017 7:50 AM

It will add all subnets having 172.16.0.0. I need to add only from 172.16.21.0 till 172.16.60.0.


Tuesday, November 7, 2017 10:00 AM

Hi,

Thank you for your warm reminder.

Please try to run "route add 172.16.21.0 mask 255.255.254.0 gateway" and "route add 172.16.60.0 mask 255.255.254.0 gateway" to check again.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, November 9, 2017 3:09 AM

Hi,

Was the issue resolved?

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, November 9, 2017 6:51 AM

getting the below error:

C:\WINDOWS\system32>route add 172.16.21.0 mask 255.255.254.0 172.16.51.1
The route addition failed: The parameter is incorrect.

172.16.51.1 is the default gateway.


Thursday, November 9, 2017 7:16 AM

Hi,

I think the default gateway should be 172.16.21.1, please check the issue again with this.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, November 9, 2017 7:38 AM

no the default gateway is correct.


Friday, November 10, 2017 4:23 AM

Hi,

Sorry for my mistake.

I have tested the issue on my side, we could run command line "route add 172.16.21.0 mask 255.255.255.0 172.16.51.1 if 12" (check your interface and modify the number) to achieve your goal.

Bests,

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, November 14, 2017 1:43 AM

Hi,

Any update?

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, November 16, 2017 8:20 AM

Hi,

Was the issue resolved?

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, November 16, 2017 8:52 AM

Hi,

I created a list of all the subnets in notepad and then copied in CMD.

Thanks.


Thursday, November 16, 2017 8:56 AM

Hi,

Thank you for your feedback. 

If there are any reply is useful for you, please mark it as an answer to help more customers to resolve same issue quickly.

If you have any concerns, please reply to us at any time.

Bests,

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].