Solved

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

Posted on 2007-11-20
2
278 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Lets look at the default installation and configuration of FreeProxy 4.10 REQUIREMENTS 1. FreeProxy 4.10 Application - Can be downloaded here (http://www.handcraftedsoftware.org/index.php?page=download) 2. Ensure that you disable the windows fi…
Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now