Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

route add question??

Status
Not open for further replies.

atdawgie

Technical User
Sep 29, 2001
60
US
Hi,

Why doesn't this command work? What should the syntax be or is just not possible for these two networks to communicate?
route add 192.168.0.126 mask 255.255.255.0 192.168.1.100

destination computer is at 192.168.0.126 source computer is at 192.168.1.100

error: the route addition failed: The specified mask parameter is invalid. <destination & Mask != Destination.
 
The first parameter would be the subnet you were adding, like 192.168.0.0

The second parameter is the subnet mask 255.255.255.0 indicates a 256 address subnet, 255.255.255.0.0 indicates a 65786 address subnet and 255.0.0.0 is a subnet with over 16 million addresses. For a subnet mask of 255.255.255.0, the subnet would end in .0 as well, not .126

The third parameter is the router address that leads to this subnet. It will need to be on the same subnet as this PC.

99% of the time, you are better off keeping your router table IN YOUR ROUTERS, not in your PCs.


I tried to remain child-like, all I acheived was childish.
 
Basically the problem is no matter what I do, I can't ping and get a reply from either computer.

On the 192.168.0.0 I add the route to the router: route add 192.168.1.0 mask 255.255.255.0 192.168.1.100

192.168.1.100 is the other computer, there is no router.

On the 192.168.1.100 computer:
ip: 192.168.1.100
mask: 255.255.255.0
gateway: 192.168.1.100

I add the route: route add 192.168.0.0 mask 255.255.255.0 192.168.1.100

I tried all sorts of things when I had two routers and it didn't work so now I'm trying it with one router->one computer connection.
 
atdawgie,

Try changing your mask to this --

route add 192.168.0.0 mask 255.255.0.0 192.168.1.100

If you want it to stay, include the -P switch

route add -P 192.168.0.0 mask 255.255.0.0 192.168.1.100

Kmills
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top