Multiple Network Interfaces

Issues related to configuring your network
Post Reply
KDMIreland
Posts: 3
Joined: 2017/10/09 08:42:11

Multiple Network Interfaces

Post by KDMIreland » 2017/10/09 08:47:36

Hi All,

I have a CentOs server running Cpanel, I wish to add two Network interface cards

Physically both Interfaces are present

I can ping and access Interface 0, But interface 1 won't work at all..

I've included my config files for both Interfaces:


This interface works fine and I can ping it

Code: Select all

DEVICE=eth0
HWADDR=02:00:00:02:AE:65
IPADDR=145.239.123.63
BOOTPROTO=static
ONBOOT=yes
BROADCAST=145.239.123.63
GATEWAY=94.23.211.254
NETMASK=255.255.255.255
This interface won't work.. Cant ping it.. And also can't bring it up, I get the following error:

Code: Select all

Determining if ip address 79.137.96.16 is already in use for device eth1...
RTNETLINK answers: File exists
RTNETLINK answers: Network is unreachable
Here is the config for that interface:

Code: Select all

DEVICE=eth1
HWADDR=02:00:00:59:04:10
IPADDR=79.137.96.16
BOOTPROTO=static
ONBOOT=yes
BROADCAST=79.137.96.16

NETMASK=255.255.255.255

Any help would be appreciated!

Thanks
Oliver

g2morales
Posts: 2
Joined: 2017/10/10 03:27:17

Re: Multiple Network Interfaces

Post by g2morales » 2017/10/10 14:09:38

your net mask is 32 bits which restricts your networks to no hosts. Try adjusting the mask to 24 bits or 16

KDMIreland
Posts: 3
Joined: 2017/10/09 08:42:11

Re: Multiple Network Interfaces

Post by KDMIreland » 2017/10/11 07:23:54

Hey g2morales ,

I tried changing the Net mask to both 16 and 24 bits

I still get the same error

KDMIreland
Posts: 3
Joined: 2017/10/09 08:42:11

Re: Multiple Network Interfaces

Post by KDMIreland » 2017/10/11 07:31:43

*Slight Update*

I found out that If I take eth0 offline and bring up etc1 that works fine!

So each interface will run on its own.. But not both together

What would be the solution to have both up at the same time?

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Multiple Network Interfaces

Post by jlehtone » 2017/10/11 08:55:58

1. I don't know that 'Cpanel' is, but I've seen comments that normal CentOS rules do not apply when you have one.

2. Asking about NetworkManager.service and network.service is probably moot due to #1

3. Facts, please. If there are two networks, what are their details?

4. How do you test? From this host, from other hosts in link-local networks, or from outside, beyond routers?

5. Redundancy. You set ipaddr, netmask, and broadcast. The third is computed from the other two.
Set just IPADDR and PREFIX. The network, broadcast and netmask will be computed automagickally.

6. Files alone do not tell the whole story. There are neat commands to show active configuration:

Code: Select all

ip li
ip -4 ad
ip ro
nmcli d s
nmcli c s
brctl show

Post Reply