Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-26-2011, 02:19 AM   #1
LQ Newbie
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Route defaut Gateway to other Interface

Hello Folks,

I have a server with two public IP address, on the same interface like:
eth0 and the alias eth0:0 and is working ok.

Exists two interfaces eth1 and eth2.
Is possible to route the default gateway in the eth1 to eth0 and the eth2 to eth0:0 ?

eth1: 192.168.1/24 -> eth0
eth2: 192.168.2/24 -> eth0:0

I try some examples with ip route, and iptables mark without success. Can anyone post some example to i make this rules?

Old 10-28-2011, 01:12 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296

Have a look at the man page for the route command:
man route
It contains several examples.

Kind regards,



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
packet coming through one interface route out via another interface and SNAT also saiyen2002 Linux - Networking 2 09-14-2009 06:56 PM
/etc/sysconfig/route-interface default gateway serge Linux - Networking 2 01-29-2009 10:05 PM
My gateway can't route michaelsanford Linux - Networking 0 04-20-2005 05:05 PM
default route without a gateway scylla Linux - Networking 1 10-21-2004 01:40 AM
Ip Route Voice Gateway digicom Linux - Networking 1 08-22-2001 10:43 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:53 AM.

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