1833730 Members
2565 Online
110063 Solutions
New Discussion

Gateway question

 
SOLVED
Go to solution
Gabriel_23
Frequent Advisor

Gateway question

I have a server that has two different IPs, each assigned to it's own nic card. How would I configure the second gateway for the second IP address. For eg. I have a 90 and 91 ip address. The gateway for 90 has been set as the default gateway(netconf file). How would I set it up for the 91 address? Thanks in advance for your help.
7 REPLIES 7
Sanjay_6
Honored Contributor

Re: Gateway question

Hi,

When you say 90 & 91 ip address, is this the last digit of the ip address on the nic card. If so, is the subnet mask same for both the cards. The reason is that hp does not support multiple nics on the same server having ip addresses in the same subnet. Confuses the system.

If this is not the case, then i guess you need to add an extra route to route traffic through the 2nd ip. The default gateway can be one only, but the 2nd nice coule direct some of the traffic through that nic if the route is defined.

To add a route on the fly, use the route command. do man route for more help on this command.

to make a permanent modification and add a route, edit the /etc/rc.config.d/netconf file.

hope this helps.

regds
Gabriel_23
Frequent Advisor

Re: Gateway question

Eg. 90.x.x.x and 91.x.x.x
Ok. Now that you have confirmed that I can only use one default GW. What value would I use for "route_destination" and "route_count" in the netconf file for the second IP address? Thanks for helping
Gabriel_23
Frequent Advisor

Re: Gateway question

Also, if the second gateway is for lan2, should I use [2] as my bracket number when defining the gateway or does it really matter? Thanks,

Gabe
Ron Kinner
Honored Contributor

Re: Gateway question

As Sanjay says there should only be one default gateway. By definition this is the route to use if all else fails. If you had two how would you know which one to use?

Rule of thumb is if one interface has a connection to the internet via gateway x then gateway x should be the default. If both can go to the internet then use the one that has the best bandwidth path. If neither goes to the internet then choose the gateway that can reach the most other subnets and add static routes (with /etc/rc.config.d/netconf or route) for all other subnets that need to be reached via the other gateway.

I know Windows allows you (in fact they seduce you by offering a default gateway blank to fill in for each interface) to have more than one but only the one which shows up at the top of the route print will be used.

Ron
Sanjay_6
Honored Contributor
Solution

Re: Gateway question

Hi,

your question
Also, if the second gateway is for lan2, should I use [2] as my bracket number when defining the gateway or does it really matter? Thanks

Answer, It doesn't really matter. Your first route definition in /etc/rc.config.d/netconf is probably set with the "[0]", so unless you have another entry with a "[1]" you can create the new entry with "[1]". The number within the brackets have nothing to do with the instance number of the lan interface.

the route_count is the number of hops it would take to reach the gateway. If it is on the network and can be reached in 1 hop, you can set this value to "1". The entry for route_destination could be a ip/subnet. If it is a subnet you can use net ip_subnet as the entry for route_destination.

Just do a search on keywords add route and you'll come across a big list of suggestion on how you can do that.

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: Gateway question

Hi,

this link from hp docs site might help,

http://docs.hp.com/en/B2355-90147/ch02s04.html

Hope this helps.

Regds
Gabriel_23
Frequent Advisor

Re: Gateway question

Thank you much for your help. This is what I needed.