Link to home
Start Free TrialLog in
Avatar of Shaun Wingrin
Shaun WingrinFlag for South Africa

asked on

Is it acceptable:2 network cards on 1 server, same subnet?

Say, I've a linux server with 2 network ports. (CentOs)
Ive also 2 identical servers. The one a backup server.
Idea is to manage the backup server via the 2nd ethernet port and if its needed to simply plug the network cable in the live server into 1st ethernet port.
Is it a good idea / acceptable to have the following config for each server?
eth0:192.168.1.51/24
eth1:192.168.1.52/24

Tx
SOLUTION
Avatar of CodeMasterAlex
CodeMasterAlex
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shaun Wingrin

ASKER

Tx. I thought so....
Seems some issue with the ethernet setup on the server..
eth0 responds to a ping on .51 and .52
yet this is the setup:
[root@OPSIPBXB ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 2C:41:38:88:31:02
          inet addr:192.168.1.51  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:70867 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28588 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:38163290 (36.3 MiB)  TX bytes:6199235 (5.9 MiB)
          Interrupt:169 Memory:df900000-df910000

eth1      Link encap:Ethernet  HWaddr 2C:41:38:88:31:03
          inet addr:192.168.1.52  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:909 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:59958 (58.5 KiB)  TX bytes:192 (192.0 b)
          Interrupt:177 Memory:dfa00000-dfa10000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12813 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12813 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2424142 (2.3 MiB)  TX bytes:2424142 (2.3 MiB)

and

[root@OPSIPBXB ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.1.0     *               255.255.255.0   U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         192.168.1.210   0.0.0.0         UG    0      0        0 eth0

and eth1 doesn't respond at all.

[root@OPSIPBXB ~]# uname -a
Linux OPSIPBXB 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@OPSIPBXB ~]#

Server is HPDL120

Any ideas please?
Btw, if I make ether1: 192.168.0.52 I can ping it...?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Tx. I just used a 2nd subnet. Can you explain though how the 2 routing tables will interact?
You are defining routing-rules, where you can specify how they should interact. In the example above the rule is: If there is traffic from or to local IP 192.168.1.52, use routingtable rt2. With this you can also add a second "default gateway" and do other fancy routing-stuff. For more details on advanced routing with linux and iproute2 see http://lartc.org/howto/