?
Solved

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

Posted on 2007-11-20
2
Medium Priority
?
284 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 2000 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses

764 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