Re: Routing between 2 ethernet cards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

After installing iproute2-2.2.4-now-ss990417-2.i386.rpm I tried to use it,
and I got some errors. 

If I use ip route list I get
 x.y.8.114 dev eth1  scope link 
 x.y.7.38 dev eth0  scope link 
 x.y.8.112/28 dev eth1  proto kernel  scope link  src x.y.8.114 
 x.y.7.0/24 dev eth0  proto kernel  scope link  src x.y.7.38 
 127.0.0.0/8 dev lo  scope link 
 default via x.y.7.1 dev eth0 

Whenever I try to use ip rule 
 [root@gw1 2.2.16-3smp] ip rule add from x.y.8.114 table 200

I also tried using a number for the table, as well as "new" but I keep
getting the same error. 

I get the following error message.
 [root@gw1 2.2.16-3smp] RTNETLINK error: Invalid argument

The syntax is...
 [root@gw1 2.2.16-3smp]# ip rule help
 Usage: ip rule [ list | add | del ] SELECTOR ACTION
 SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK ]
             [ dev STRING ] [ pref NUMBER ]
 ACTION := [ table TABLE_ID ] [ nat ADDRESS ]
           [ prohibit | reject | unreachable ]
           [ realms [SRCREALM/]DSTREALM ]
 TABLE_ID := [ local | main | default | new | NUMBER ]


Do I have to do anything else when I install iproute2??

Thanks in advance.
Adonis




On Thu, 19 Oct 2000, Randall W. Dean wrote:

> It took me a couple of weeks to find a solution to this problem.  In my 
> case, I had a static PPP connection and was brining on a DSL connection to 
> the internet.  I wanted to have both active for some cut over period.  To 
> make this work, you need to use source routing.  With this, it works like a 
> charm.
> 
> So, for a concrete example:
> 
> eth0 is 99.99.99.99 router 99.99.99.100
> eth1 is 199.199.199.199 router 199.199.199.200
> 
> My default route is set to 99.99.99.100
> 
> Install iproute2
> Edit /etc/iproute2/rt_tables and add a line like "200  other"
> 
> ip rule add from 199.199.199.199 lookup other
> ip route add default via 199.199.199.200 table other
> 
> That's all it takes.  A rule now exists to send out through eth1 any 
> packets that originate from 199.199.199.199 which is what any connection to 
> that interface will have for a response ip address.
> 
> -rwd
> 
> At 10:18 AM 10/19/00 -0400, technews@egsx.com wrote:
> >Hi,
> >
> >I would like to know if a Linux box with two ethermet cards eth0 and eth1
> >can handle the following routing requierments.
> >
> >If traffic is received via eth0 the packets are routed back throught eth0
> >and if traffic is received through eth1 the packets are routed back
> >through eth1.
> >
> >Each ethernet card has its own IP and are connected to different routers
> >that are connected to the net.  Can this be done with static routing? or
> >is there something that has to be installed to do that since the default
> >gateway will always force teh traffic to go over eth0.
> >
> >Thanks in advance
> >Adonis
> >
> >
> >
> >
> >-
> >: send the line "unsubscribe linux-net" in
> >the body of a message to majordomo@vger.kernel.org
> 
> 
> 
> Randall W Dean
> Director, System Software
> Mercury Computer Systems
> 199 Riverneck Road
> Chelmsford, MA 01824
> (978) 256 0052 x1493
> FAX: (978) 256 5205
> 

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux