New IPs? Problem

ldjnetworks

Verified User
Joined
Apr 23, 2005
Messages
39
Recently I requested some additional IP addresses from my data center. They assigned me a new block but the gateway information is different from my first set of /29. When I add the IPs via Admin -> IP Management there is no place to enter different gateway information for that /29 block. Can someone explain how I can do that?


Thanks,
Dustin
 
Thanks for the reply. I do not need netmask information. I need to know how to set a different GATEWAY on a virtual network device. I need eth0:5 to have a different gateway than eth0:1 for example. Thanks you in advance.
 
Doesn't it work if you add IP with proper netmask in directadmin?

While you have only one connection (one upstream), you should not worry much. Server will use default gateway.
 
By the way, what OS are you using there?

If CentOS:

1. Add default GATEWAY information into /etc/sysconfig/network

Code:
# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server.domain.com
GATEWAY=195.xxx.xxx.xxx

and

2. Remove GATEWAY information from /etc/sysconfig/network-scripts/ifcfg-eth0

Code:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:00:00:00:00:00
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.248
IPADDR=195.xxx.xxx.xxx
 
Last edited:
I can not use the default gateway, it doesn't work with the new IP block. I don't want to change the default gateway, I just want to use a different gateway for specific IPs. The default gateway will not work with the new IP block, so they need their own gateway information. I'm using CentOS 5.
 
Did you follow my instructions in Post#5 ? Didn't it help you?

p.s. This is a common system issue, and mostly has nothing with directadmin, while you're not going to use directadmin interface to manage IPs. Thus you'd better google. You might need to set up source routing on your centos.
 
As stated previously I DO NOT want to remove the current default gateway and replace it. I simply want all traffic on the devices eth0:5-10 to use a DIFFERENT default gateway. I will Google it as you obviously don't understand my issue. Thank you for your assistance anyway.
 
I do not suggest you total removing. According to CentOS documentation that is how it should be organized. And does not really matter how many gateways, you gonna use.

See the link and just try and do that.
 
Last edited:
A server generally only has one gateway, and that's generally through the default network. The link Alex posted shows you how to set one gateway.

You can't do it through DirectAdmin because it's not standard.

You might find some helpful information here (linuxhomenetworking.com).

Jeff
 
Thanks Jeff!

If I were to ask for a 2nd network drop from my colo, could I tell directadmin to use eth1 for a certain range of IP's instead of eth0?
 
Last edited:
Check to see how DirectAdmin adds IP#s. I believe it's a script, and if so it can possibly be modified to add IP#s to eth1 instead of eth0.

But it's not that simple at all; each daemon which sends data would by default use eth0 and the main server IP#, unless you configure it to do otherwise.

Jeff
 
Back
Top