Solved

Setup static routes for IP address in CentOS

Posted on 2016-08-15
2
65 Views
Last Modified: 2016-08-26
I have a CentOS VM that has two network interfaces. One interface is connected to our "public lan" that that the other Windows servers and end users are on. The other interface is connected to our "private lan" which is a closed network that the SAN, ESXi hosts, and a few other systems reside. I have to set the CentOS server up this way since our DR backup solution will be maintained by this CentOS server and it will need access to both networks. One to access the internet so it can send the data to the cloud and the other to allow communication with the hosts so it can grab the vmdk files for backup. Both NICs use 192.168.3.x except the Private lan does not use a gateway since there is no reason. What I need to do is point specific 192.168.3 IPs to use the Public interface and other 192.168.3 IPs to use the Private. Below is the ranges I need on each interface.

Public NIC:
192.168.3.2-15 and .66-254
255.255.255.0
192.168.3.1

Private NIC:
192.168.3.16-65
255.255.255

If anyone can provide assistance it would be appreciated. Thanks
0
Comment
Question by:jchillari
2 Comments
 
LVL 12

Accepted Solution

by:
Kent W earned 500 total points
ID: 41756631
Your range is not within an accepted subnet break. You will have to give a Subnet / CIDR to identify the range in which you want to route your 16-65, and it's just not in an acceptable range. If you subnet on the box like this, even if you can technically dance around the bad subnet break, your 16 and 65 IPs will become a network marker and broadcast, and will be unusable.
If you route starting at .16, your only option is /28 (255.255.255.240) which will only route .17-30.
There may be multiple routes you gave give, but that will kill at least 4 IPs (1st and last IPs of any subnet are non-usable).
Here are the accepted IP subnetting breaks.
http://sins.com.au/ip/ip_subnetting2.html
0
 

Author Comment

by:jchillari
ID: 41770878
Thanks for the assistance. We are going to re-ip the management lan so it is on a different subnet and then we won't have to set up routing. Thanks again.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

770 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