Multiple IP addresses on the same interface.

Alexandru Dan

Registered
Oct 30, 2015
2
0
1
Bucharest
cPanel Access Level
Root Administrator
Hello,

I have a cPanel server with a range of IP addresses on eth1 nic.
So:

eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:55:56:04:22:68 brd ff:ff:ff:ff:ff:ff
inet 5.35.114.178/29 brd 5.35.114.191 scope global eth1
inet 5.35.114.179/29 brd 5.35.114.183 scope global eth1:cp1

I have addedd a new IP range on the same interface and now it also includes these aliases:
inet 92.115.8.6/24 brd 92.115.8.255 scope global secondary eth1:cp6
inet 92.115.8.7/24 brd 92.115.8.255 scope global secondary eth1:cp7
inet 92.115.8.8/24 brd 92.115.8.255 scope global secondary eth1:cp8
inet 92.115.8.9/24 brd 92.115.8.255 scope global secondary eth1:cp9

The problem is the default gateway which is setup to use the first IP block:
0.0.0.0 5.35.114.177 0.0.0.0 UG 0 0 0 eth1


How do I go about adding a new gateway pertaining to the new IP block so that this new block is usable in cPanel ?
Should I use rt_tables or is there a centos or cpanel way to do it ? What is your recommendation about it ?

Thank you in advance.

Alex.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello :)

This question pertains to the operating system as opposed to the cPanel software itself. The following CentOS document may help guide you:

13.2. Interface Configuration Files

Thank you.
 

Alexandru Dan

Registered
Oct 30, 2015
2
0
1
Bucharest
cPanel Access Level
Root Administrator
Hello :)

This question pertains to the operating system as opposed to the cPanel software itself. The following CentOS document may help guide you:

13.2. Interface Configuration Files

Thank you.

Hello Michael and thank you for your answer.

I asked the question in cpanel forum and not in CentOS because it seems cpanel keeps the network configuration in the system files. Meaning that any modification I make to the routing table or centos network files it will get undone some time in the future because cPanel reapplies network configuration in those files.

My question was more targeted to cPanel if there is a way to do it from cPanel. I understand the basics of linux networking stack and I can make the configuration by myself using route tables, that's not the issue here. I only ask if in doing so I will get problems from cPanel engines inside that server.

Thank you again for your answer!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Meaning that any modification I make to the routing table or centos network files it will get undone some time in the future because cPanel reapplies network configuration in those files.
cPanel will not alter your network configuration during updates. Could you provide an example of this if it's happening on your system?

Thank you.