LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 03-25-2004, 05:45 PM   #1
Shaun2222
LQ Newbie
 
Registered: Mar 2004
Posts: 4

Rep: Reputation: 0
fedora/redhat: ifcfg-eth0 and ifcfg-eth1


I'm having some trouble hoping you guys can help.

I Have a machine that i am assinging 2 ips to from 2 seperate networks. Both these ips are on totally diffrent networks are are publicly accessible. I also will have to set the gateway for each network.

Right now the problem i am having is that only the network assinged to eth0 is alive and pinable while eth1 appears to be up but it's not accessible.

Here's my configs...


+ifcfg-eth0 & ifcfg-eth1
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=base.ip.of.machine
NETMASK=net.mask.for.network
GATEWAY=gateway.assinged.to.network


/etc/sysconfig/network has the following

NETWORKING=yes
HOSTNAME=hostname.of.machine
GATEWAYDEV=eth0


Can anybody give me a clue what i'm doign wrong here? route only shows a default gw setup for eth0 and not eth1, also when i add default gw to eth1 it still does not seam to work. At this point i'm wondering if something is wrong else where.
 
Old 03-26-2004, 12:21 AM   #2
tr4nsfix
Member
 
Registered: Mar 2004
Location: Toronto, Ontario
Distribution: Debian
Posts: 36

Rep: Reputation: 15
Whats your output from a 'netstat -rn' ?
You can only have one default gateway... this is where traffic goes if it doesn't know where else to go.

why do you have two real world IPs coming into one box on two seperate interfaces out of curiosity?
 
Old 03-26-2004, 01:37 AM   #3
Shaun2222
LQ Newbie
 
Registered: Mar 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I need both public ips to be active for a 2 diffrent services.

216.23.188.61 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.23.188.60 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.144.233.192 0.0.0.0 255.255.255.224 U 0 0 0 eth1
216.23.188.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 216.23.188.1 0.0.0.0 UG 0 0 0 eth0
 
Old 03-26-2004, 12:04 PM   #4
tr4nsfix
Member
 
Registered: Mar 2004
Location: Toronto, Ontario
Distribution: Debian
Posts: 36

Rep: Reputation: 15
From what I can see eth0 is setup as your default gw currently:
0.0.0.0 216.23.188.1 0.0.0.0 UG 0 0 0 eth0

It also looks like its configured with two IP addresses:

216.23.188.61 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
216.23.188.60 0.0.0.0 255.255.255.255 UH 0 0 0 eth0

Since these two IPs are both on the same subnet you don't need to have both there. Are you turning them both on via an ifcfg-eth config? Maybe you have ifcfg-eth0:0 setup? Either way, get rid of one of them.

on eth1 it looks like you have two networks setup:

216.144.233.192 0.0.0.0 255.255.255.224 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1

which one is the correct one? Do you have eth1 setup with an IP address?
Also keep in mind - I'm not sure what you're trying to do is really feasable. You want to have two Internet connection and use both of them for increased bandwith? Something along the lines of bonded ethernet?
 
Old 03-27-2004, 03:08 AM   #5
Shaun2222
LQ Newbie
 
Registered: Mar 2004
Posts: 4

Original Poster
Rep: Reputation: 0
i need both connections becaue one service will be on one network and another service on another. There will be no bonded bandwidth.

As for the 169 address, i'm not sure where that is comming from, it appears that fedora is adding it automatically.

Those 2 ips you are talking about are aliases eth0:1 and eth0:2 there are really 3 ips on eth0 and there will be 3 ips on eth1 as well but for now i'm just trying to get eth1 working.


While screwing with it for a bit i did get eth1 and eth0 pingable for a bit but i dont know how, and when i restart the network and try to figure out how i cant seam to figure it out again.
 
Old 03-27-2004, 09:35 AM   #6
tr4nsfix
Member
 
Registered: Mar 2004
Location: Toronto, Ontario
Distribution: Debian
Posts: 36

Rep: Reputation: 15
You may want to follow this thread also:

http://www.linuxquestions.org/questi...hreadid=162838

It may help you get an idea of why things aren't/won't work even after you can ping each interface.
 
Old 03-27-2004, 01:22 PM   #7
Shaun2222
LQ Newbie
 
Registered: Mar 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I think your confused about what i'm trying to do. I am not trying to have a bonded connection between eth0 and eth1. I simply want connections to eth0 to come in eth0 and respoces to be sent out eth0. If the connection comes in eth1 then the responce be sent out eth1. I just want the machine to be alive on both ips. THey dont need to be bonded,loadbalanced,etc.
 
Old 03-28-2004, 01:24 AM   #8
tr4nsfix
Member
 
Registered: Mar 2004
Location: Toronto, Ontario
Distribution: Debian
Posts: 36

Rep: Reputation: 15
thats not a straight forward thing to do... definatly post here if you get it working.
 
Old 03-31-2007, 12:30 AM   #9
mabao
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
get help

[QUOTE=tr4nsfix]Whats your output from a 'netstat -rn' ?
You can only have one default gateway... this is where traffic goes if it doesn't know where else to go.

why do you have two real world IPs coming into one box on two seperate interfaces out of curiosity

my machine is fc6 which is install yestoday,but both the eth0 and eth1 is not alive.I have inserted the right drives modules.Besides,i have done a lot on the configation,such as /etc/sysconfig/network-scripts/ifcfg-eth0 file...... But it doesn't seen to work...
can you help me,please?
my email:
mabaozhizao@163.com
thanks
 
Old 01-23-2008, 03:25 PM   #10
Spacer76
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
At first sorry to kick this thread up,
The reason to post a reply is for indexing purposes and maybe if the auther hasn't found a way to give some help.

I once did the setup you were talking about.
(2 nic's on a box with different settings, different gateways etc).

The trick is to use different routing tables (search for advanced routing howto).
Also keep in mind a) that you must enable source routing verification in sysctl else nic 1 can give a reply to nic 2 et vice versa.
b) each application on your system must be configged to one nic (=ip/network)
c) if you're using isp's and they block outgoing mail except for their domains then things will be more difficult. The option is to configure for example one sendmail on nic 1/network1 and postfix for example on nic 2/network 2. OR you can try some virtualisation like openvz and let the host machine do the network routing. (which i didn't tried)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot activate eth1 using ifup or using ifcfg-eth1 akay Linux - Hardware 10 12-16-2010 05:10 AM
RH9 ignoring /etc/.../.../ifcfg-eth0 eccles23 Linux - Networking 12 07-16-2005 02:14 PM
editing ifcfg-eth0 nkeever Linux - Newbie 4 05-05-2005 02:46 PM
ifcfg-eth0 configuration problem shyam Linux - Networking 2 08-06-2003 06:25 AM
ifcfg-eth0:X alias problem dgenne Linux - Networking 1 03-17-2002 01:43 AM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration