Hi,
I successfully configured my system with multiple Routing table with different gateways. Now m system has more than 100 interfaces (of ourse virtual interfaces) and more than 300 routing tables.
 
ip ru add from 10.0.1.2/32 to 0/0 dev eth0.101 table 1
ip ro add default via 10.0.1.1 table 1

This will make a default gateway 10.0.1.1 for the interface eth0.101. But the problem is all layer 2 traffic is also passed to 10.0.1.1
 
So I made different rules for each network and its works fine.
 
Once again thanks to all.
Regards
Jaison

 
On 11/8/05, Yunus Shaikh <[EMAIL PROTECTED]> wrote:
On Wed, 2005-11-02 at 00:30, Jaison Jose wrote:

hi all
IPROUTE2 supports Multipath Routing . meaning you can have more than one
gateway , balancing traffic on more than one ext interface
however the alogrithm is based on round robin ,
you can set up multipath routing by checking the option in kernel (
Advanced Routing)

ip route add default  nexthop via {IPADD1} dev {IFACE1} weight 1 \
                         nexthop via {IPADD2} dev {IFACE2} weight 1 \
                  nexthop via {IPADD3} dev {IFACE3} weight 1


change weight to prefer a particular gateway


more information  http://lartc.org


regards
yunus



> Hi Dirk,

>       In the diagram just imagine that eth1 and 2 also connected with
> 2 other routers. What I need is I want to ping from 'something' (In
> the diagram,Can be a PC) to the connected interface of our linux box.

>      Multiple default gateways will not work as it will only check the
> first one.

>     Could you please guide me is there any applications to make the
> diagram which you made her so that I can explain little bit more as my
> english is so weak.

> Regards
> Jaison.

> On 11/1/05, Dirk Tilger < [EMAIL PROTECTED]> wrote:
>         On Tue, Nov 01, 2005 at 03:51:15AM -0800, Moeen Alinaghian
>         wrote:
>         > ifconfig eth0 10.0.1.10 netmask 255.255.255.0 up
>         > ifconfig eth1 10.0.2.10 netmask 255.255.255.0 up
>         > ifconfig eth2 10.0.3.10 netmask 255.255.255.0 up
>         > route add default gw 10.0.1.1 dev eth0
>         > route add default gw 10.0.2.1 dev eth1
>         > route add default gw 10.0.3.1 dev eth2
>         >
>         > what's the result, now ?
>        
>         He should have three different default routes. The system will
>         try to
>         use the first one and only if the interface is down, it will
>         try the
>         second. It might be with a very modern scheduler the packets
>         will be
>         distributed in round-robin fashion.
>        
>         Routing as shown above is destination only routing. The system
>         should
>         have a routing table like...
>        
>         10.0.1.0/24 -> eth0
>         10.0.2.0/24 -> eth1
>         10.0.3.0/24 -> eth2
>        
>         ...just from the ifconfig (ifconfig adds routes to interfaces
>         fitting
>         their destination). 'default' is a special target which should
>         map to
>         0.0.0.0/0. When I issue the first routing command, I would
>         expect
>         something like
>        
>         0.0.0.0/0 -> 10.0.1.1 via eth0
>        
>         The other two would add
>         0.0.0.0/0 -> 10.0.2.1 via eth1
>         0.0.0.0/0 -> 10.0.3.1 via eth2
>        
>         When we order the routing table as the kernel would do:
>         smaller netmasks
>         first, we would get:
>        
>         Target            Bits of Netmask            Gateway    
>         Interface
>         10.0.1.0      24                  direct(ARP)      eth0
>         10.0.2.0      24                  direct(ARP)      eth1
>         10.0.3.0      24                  direct(ARP)      eth2
>         0.0.0.0            0                  10.0.1.1      eth0
>         0.0.0.0            0                  10.0.2.1      eth1
>         0.0.0.0            0                  10.0.3.1      eth2
>        
>         I'm a kernel and want to deliver a packet to 10.0.2.6, I go
>         down the
>         table and do:
>         - Is ( 10.0.2.6 AND 255.255.255.0) == 10.0.1.0?
>           --> 10.0.2.0 == 10.0.1.0?
>           --> No
>         - Is ((10.0.2.6 AND 255.255.255.0) == 10.0.2.0?
>           --> 10.0.2.0 == 10.0.2.0?
>           --> Yes
>         - What is the gateway and interface? Gateway is local(ARP) via
>         eth1
>         - Sending ARP packet to eth1 to lookup address of network card
>         for
>           10.0.2.6
>         - (getting the address)
>         - Sending the packet.
>        
>         When I do the same thing for 217.17.202.242 , then the first
>         rule to hit
>         is number four, because every packet would match that
>         destination. This
>         is why it is called the default route. As long as the
>         interface is up,
>         rule 5+6 will never be checked. I'm not sure, but some
>         operating systems
>         will even ignore 5+6 when eth0 is down, as their routing
>         mechanism might
>         have no concept of interfaces that are down.
>        
>         Dirk Tilger
>         Advanced Technologies ME FZ LLC
>         Tel +971 4 367 1071
>         Fax +971 4 367 2529
>         Mob +971 50 8809132
>             +966 55 1650025
>        
>        
>         SPONSORED LINKS
>         Linux operating
>         system
>         Linux os
>         Hosting linux unix
>         web
>         Free linux operating
>         system
>         Linux migration
>         Linux user
>        
>         ______________________________________________________________
>         YAHOO! GROUPS LINKS
>              1.  Visit your group "dubailug" on the web.
>                 
>              2.  To unsubscribe from this group, send an email to:
>                  [EMAIL PROTECTED]
>                 
>              3.  Your use of Yahoo! Groups is subject to the Yahoo!
>                 Terms of Service.
>        
>        
>         ______________________________________________________________
>
>
>
> ______________________________________________________________________
> YAHOO! GROUPS LINKS
>      1.  Visit your group "dubailug" on the web.
>         
>      2.  To unsubscribe from this group, send an email to:
>          [EMAIL PROTECTED]
>         
>      3.  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>         Service.
>
>
> ______________________________________________________________________
--
------------------------------------------------------------------
Name                       : Shaikh Yunus
Email primary              : [EMAIL PROTECTED]
                  : [EMAIL PROTECTED]
Encrypted Mail Preferred
PGP ID                  : 0xA7B0AB1D
Fingerprint = 384E B543 F594 6DCA 358D F646 A3A8 0A65 A7B0 AB1D
------------------------------------------------------------------
     



--
PRIVACY WARNING: For auditing purposes, a copy of this message has been
saved in a permanent database.



YAHOO! GROUPS LINKS






YAHOO! GROUPS LINKS




Reply via email to