LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-22-2012, 06:56 AM   #1
wsmwk
LQ Newbie
 
Registered: Feb 2012
Location: Pennsylvania
Distribution: centos 6
Posts: 5

Rep: Reputation: Disabled
dual homed centos


newbie networker on centos 6. server has two virtual nics in vmware and DNS has two addresses on *same* network, *same* gateway address. one nic will be firewalled from the outside world.

short story - Today to my surprise ssh to eth0 is working (or at least it appears to be), but yesterday it was not. I don't know if the passage of time resulted in a change at the server, or in the switch. So I'm looking to better understand this issue and how this could now be working when yesterday it was not.

long story - Prior to adding the second nic, eth0 was specified as BOOTPROTO dhcp. Then I added eth1 per config files below. Yesterday ssh and ping worked going in to eth0, but not in to eth1. I tried several variations of config without success. I was told on irc that my routing list looks fine (below) - that I should have only one 0.0.0.0 line and that eth1 will use that gateway. Is that true? In other words since both eth are using the same gateway addresses eth1 should default default to eth0's gateway. (my debian neighbor has two gateway lines, including one for eth1, which I don't have) The same person suggested I do http://kindlund.wordpress.com/2007/1...utes-in-linux/

But then today, it seems to be working and I didn't change anything since last night. Why might it be working now?

Destination Gateway Genmask Flags Metric Ref Use Iface
128.180.2.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
128.180.2.0 0.0.0.0 255.255.254.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 128.180.3.254 0.0.0.0 UG 0 0 0 eth0

eth0 Link encap:Ethernet HWaddr 00:0C:29:45:B0:9F
inet addr:128.180.2.32 Bcast:128.180.3.255 Mask:255.255.254.0
inet6 addr: fe80::20c:29ff:fe45:b09f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:475299 errors:0 dropped:0 overruns:0 frame:0
TX packets:341257 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:33813005 (32.2 MiB) TX bytes:3183249342 (2.9 GiB)

eth1 Link encap:Ethernet HWaddr 00:0C:29:45:B0:A9
inet addr:128.180.2.80 Bcast:128.180.3.255 Mask:255.255.254.0
inet6 addr: fe80::20c:29ff:fe45:b0a9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:197846 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13778455 (13.1 MiB) TX bytes:636 (636.0 b)

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=cas2.lehigh.edu
GATEWAY=128.180.3.254

DEVICE="eth0"
HWADDR="00:0C:29:45:B0:9F"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR=128.180.2.32
NETMASK=255.255.254.0
GATEWAY=128.180.3.254

DEVICE="eth1"
HWADDR="00:0C:29:45:B0:A9"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR=128.180.2.80
NETMASK=255.255.254.0
GATEWAY=128.180.3.254
 
Old 02-22-2012, 07:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
do not do this. one subnet = one IP. Firewalling one makes no logical sense and provides no security compared to just having one interface in the first place.
 
Old 02-22-2012, 07:22 AM   #3
wsmwk
LQ Newbie
 
Registered: Feb 2012
Location: Pennsylvania
Distribution: centos 6
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
do not do this. one subnet = one IP. Firewalling one makes no logical sense and provides no security compared to just having one interface in the first place.
thanks, but multiple subnet connection is not possible. plus, we already have it working for a debian host - one IP is firewalled in the cisco switch and the other is not.
 
Old 02-22-2012, 07:23 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
don't use multiple subnets. just get rid of the other interface. Then you have a technically correct system which works properly. You can put an IP alias on an existing interface if need be, but it's the routing side of things that is just a mess.

Last edited by acid_kewpie; 02-22-2012 at 07:24 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS multi-homed: samba not work as PDC rotondo Linux - Server 1 07-21-2010 10:01 PM
arpwatch on dual-homed PC psychobyte Linux - Networking 1 01-20-2006 03:18 PM
Linux routing on a dual homed pc friendklay Linux - Networking 4 06-08-2005 09:01 AM
Dual-homed machine gubak Linux - Newbie 4 07-28-2004 01:53 AM
Dual Homed server / Two ISPs GuitsBoy Linux - Networking 3 01-13-2004 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration