Solved

Can I make a route to a class B instead of the actual bunch of class Cs?

Posted on 2007-11-20
2
283 Views
Last Modified: 2013-12-23
I have a RHEL5 server that needs static routes to a bunch of class C subnets (192.168.*.0).  Right now I am using this:

route add -net 192.168.1.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.2.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.3.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.4.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.5.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.6.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.7.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.8.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.9.0 netmask 255.255.255.0 gw 172.16.20.1
route add -net 192.168.10.0 netmask 255.255.255.0 gw 172.16.20.1

...but I was wondering, can I just use this?:
route add -net 192.168.0.0 netmask 255.255.0.0 gw 172.16.20.1

I know the broadcast and network addresses will be different if I treat it like a Class B, but for the sake of routing, will it even make a difference?  As far as I can tell, the route should lead me to the same gateway, and once I'm there I should be good, right?

Thanks!
0
Comment
Question by:kamermans
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
Spot_The_Cat earned 500 total points
ID: 20319144
Yes you can but keep it in mind that some routers do not like supernetting addresses so if you introduce a hardware router to take care of this in the future then it may well complain and you may need to revert to the 255.255.255.0 mask. You could route based on this though:

route add -net 192.168.0.0 netmask 255.255.240.0 gw 172.16.20.1

Which would limit the route to 192.168.0.x to 192.168.15.x

Hope that helps.
0
 
LVL 13

Author Closing Comment

by:kamermans
ID: 31410096
Works like a charm - thanks Spot!
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question