LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 05-25-2009, 11:20 AM   #1
gsaminath
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
Unhappy Multiple ips/gateways one NIC - Routing


Hi Team,

I need two logical interfaces & two gateways to be configured in one NIC.

One server with two logical interfaces eth0:0 & eth0:1 configured with two gateways in single physical eth0 interface (NIC)accordingly.

Requirement : We are trying to splitup eth0 into two logical interfaces & two separate ip segments to be used on those interfaces also with two different gateways accordingly.

Both ips needs to be reachable in the network.

If we are configuring like this eth0:0 interface ips services were not working. Please suggesst asap.

pls let me know is it possible on this? if so please provide us the config., or link.

FEDORA LINUX server (Kernel : Vmlinux2.6.5-1.358smp)



Regards,
Saminath. G.
 
Old 05-25-2009, 12:10 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
interfaces don't have default gateways, routing tables do, which are abstracted from physical interfaces. How are you expecting two default gateways to work? What information is supposed to be used to determine whether one is used over the other?
 
Old 05-26-2009, 07:02 AM   #3
gsaminath
LQ Newbie
 
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Multiple ips/gateways one NIC - Routing

Hi Chris,
I couldnt get your query right. All i am looing for is "whether we can have two logical interfaces configured using single physical interface for (ex)
eth0 --> physical interface ( no ip segment on this )
need to have two sub-interface under it

eth0:0 --- > segment X
where vlan 10 to be used in this interface

eth0:1 --- > segment Y
vlan 20 to be used in this interface

and have static route added say default route added pointing to nexthop(gateway) X and specific route added pointing to nexthop(gateway) Y ".

Also provide configuration template or reference link if possible.
 
Old 05-26-2009, 08:33 AM   #4
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Like Chris was trying to clarify, "default routes" and "static routes" are different things. You can only have one "default route" - a route of last resort. You can have multiple routes off a network.

Simply by creating the logical interfaces, the system will create routes to the connected subnets. You would need to add "static routes" if one of those stub subnets had other subnets that needed to be reached.

For instance, given:
Internet <> nic0:0 - host - nic0:1 <> private_subnet1 <> private_subnet2

'host' would have a "default route" (thru nic0:0) to 'Internet' and a "static route" (thru nic0:1) to 'private_subnet2'.
 
Old 05-27-2009, 02:28 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
you're talking about having aliased interfaces there, e.g. eth0:1 but using vlans on them. aliased interfaces are NOT vlans, they are just additional addresses on the same subnet, very very very different thing. You need to understand the difference and decide what you actually want.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing to multiple gateways The Jesus Linux - Networking 6 09-20-2012 01:58 AM
NIC, iSCSI, multiple gateways b1f30 Linux - Networking 1 07-04-2008 06:20 PM
Routing with multiple gateways dimavo Linux - Networking 6 08-07-2007 02:09 AM
Advanced Networking - Multiple gateways, routing question/shorewall micaheli Linux - Networking 2 09-30-2004 12:05 AM
multiple ips, multiple gateways, one interface drpixel Linux - Networking 6 12-04-2002 12:56 AM


All times are GMT -5. The time now is 02:08 PM.

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