LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-09-2008, 12:20 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
Add two Gateway ip in One NIC in Linux server !!!!


Dear Friends ,

I m using RHEL 4 server . I have a one NIC card in my linux server . I want to add "Two Gateway" at a time in One NIC . Is it possible to do ?

plz inform .. ..
 
Old 07-09-2008, 12:40 PM   #2
dthacker
Member
 
Registered: Nov 2003
Location: Omaha, NE
Distribution: Ubuntu, Kubuntu, Ubuntu Server
Posts: 77

Rep: Reputation: 15
I'm not sure what you mean by gateway.

If you have two addresses assigned to your single NIC you can set each of those as a route to a different subnet.

eth0 listens on 10.20.1.1 and 10.30.1.1

10.20.1.1 can be a route to the 10.20.0.0 network

10.30.1.1 can be a route to the 10.30.0.0 network

But only one of those addresses can be the default route.

HTH! Dave
 
Old 07-09-2008, 01:25 PM   #3
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 14
Posts: 540

Rep: Reputation: 32
dthacker just did not mention you have to create an alias first for the NIC (ie eth0:1), but he was just to the point when told you that each address can be the default route for one subnet.
Ciao
 
  


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
vfe NIC driver: "Add hostname for the NIC card into the /etc/hosts file???" gluesniffmonkey Solaris / OpenSolaris 5 06-09-2008 05:40 PM
How to add a gateway address using ioctl in C in linux ? sweta Linux - Networking 1 12-28-2006 12:26 AM
How can I add a second gateway to my linux router? abefroman Linux - Networking 1 11-20-2005 12:45 PM
How to add second gateway IP on the same NIC? linux_angus Linux - Networking 4 01-21-2004 10:58 PM


All times are GMT -5. The time now is 02:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration