Yes, eth0 and eth1 should be on different subnets; if not, the router doesn't
know which interface should be used to send traffic to another device on that
subnet.

Best,
Justin

On Jan 30, 2008 7:47 AM, Daren Tay <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I revisited the issue after getting a box to test
>
> I have set up a vyatta router with 4 ports
>
> eth0: 192.168.1.232 (WAN) -> simulate gateway#1
> eth1: 192.168.1.233 (WAN) -> simulate gateway#2
> eth2: 192.168.20.1 (LAN) -> simulate LAN #1, represented by a laptop
> 192.168.20.2 :: to route through eth0 for gateway 192.168.1.1
> eth3: 192.168.30.1 (LAN) -> simulate LAN #2, represented by a laptop
> 192.168.30.2 :: to route through eth1 for gateway 192.168.1.2
>
> I can't get eth3 to work somehow.. I think the laptop needs to be connected
> using a cross cable (using different laptops)
> but .20.x side is working fine. As attached is the config.
>
> I then run the ip tool on 192.168.30.0..
>
> but i still can't route out.
>
> when i set the gateway, it routes out, but via that gateway...
>
> both 192.168.1.1 abd 1.2 and adsl modems... or should I be ensuring both
> eth0 and eth1 are of different subnet?
> below is the config i did...
> ========================================
> vyatta:~# ip route add default via 192.168.1.2 dev eth1 tab 2
> vyatta:~# ip rule add from 192.168.30.0/24 tab 2 priority 600
> vyatta:~# ip route list
> 192.168.20.0/24 dev eth2  proto kernel  scope link  src 192.168.20.1
> 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.232
> 192.168.1.0/24 dev eth1  proto kernel  scope link  src 192.168.1.233
> 192.168.30.0/24 dev eth3  proto kernel  scope link  src 192.168.30.1
> vyatta:~# ip rule list
> 0:      from all lookup 255
> 600:    from 192.168.30.0/24 lookup 2
> 32766:  from all lookup main
> 32767:  from all lookup default
> =========================================
>
>
> Food for thought? More testing to be done tomorrow!
>
> Thanks folks!
> Daren
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Daren Tay
> Sent: Tuesday, January 08, 2008 11:50 AM
> To: Robert Bays
>
> Cc: vyatta-users@mailman.vyatta.com
> Subject: Re: [Vyatta-users] Managing different subnet with different
> gateway
>
>
> Ok roberts, will take note of that.
>
> My concern is just to ensure the 2 subnet have their traffic routed through
> their respective gateways as different bandwidth is purchased for them :)
>
> Thanks man!
> Daren
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Robert Bays
> Sent: Tuesday, January 08, 2008 2:59 AM
> To: vyatta-users@mailman.vyatta.com
> Subject: Re: [Vyatta-users] Managing different subnet with different
> gateway
>
>
> Daren,
>
> I would still setup a global default route in the router to handle
> traffic not explicitly source routed.
>
> Cheers,
> Robert.
>
> Daren Tay wrote:
> > Hi guys,
> >
> > one more question:
> > say I do the below mentioned way to have multi-gateway setup, but there'll
> > still be a default gateway set in xorpsh yeah?
> > Will this affect how traffic is routed out?
> >
> > Or should I just do away with the default gateway setup?
> >
> > Thanks!
> > Daren
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Daren Tay
> > Sent: Saturday, January 05, 2008 12:32 PM
> > To: vyatta-users@mailman.vyatta.com
> > Subject: Re: [Vyatta-users] Managing different subnet with different
> > gateway
> >
> >
> > Ah silly me, the obvious
> >
> > Thanks!
> > Daren
> >
> > -----Original Message-----
> > From: Robert Bays [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, January 05, 2008 7:00 AM
> > To: Daren Tay
> > Cc: vyatta-users@mailman.vyatta.com
> > Subject: Re: [Vyatta-users] Managing different subnet with different
> > gateway
> >
> >
> > Running traceroute from a system on each subnet should show you
> > different paths.
> >
> > cheers.
> >
> > Daren Tay wrote:
> >> Cool guys :)
> >>
> >> I'm gonna give the ip rule a test when I head back to office on monday,
> > but
> >> how do I determine that it is working?
> >>
> >> Once that is done, I'll look into the bandwidth throttling.
> >>
> >> Daren
> >>
> >> -----Original Message-----
> >> From: Robert Bays [mailto:[EMAIL PROTECTED]
> >> Sent: Saturday, January 05, 2008 5:17 AM
> >> To: Daren Tay
> >> Cc: vyatta-users@mailman.vyatta.com
> >> Subject: Re: [Vyatta-users] Managing different subnet with different
> >> gateway
> >>
> >>
> >> Daren,
> >>
> >> Yep.  The tool is the standard linux ip command.  The "ip rule from"
> >> part tells the system that anything from this address should go to table
> >> n.  Each table has a separate default route.
> >>
> >> XORP *shouldn't* kill these routes since they aren't in the master
> >> table.  YMMV.  As Aubrey correctly pointed out, you will want to add
> >> these commands to your startup files so they are added at each boot.
> >>
> >> As for tracking bandwidth, you could also poll interface stats using
> >> SNMP and rrdtool/mrtg.  (ifOutOctets)
> >>
> >> Good Luck!
> >>
> >> Cheers,
> >> Robert.
> >>
> >>
> >>
> >> Daren Tay wrote:
> >>> Hi guys,
> >>>
> >>> yeah I want to route them out different gateway.
> >>>
> >>> what is this ip tool you are refering to? you mean the standard 'ip'
> >> command
> >>> over the linux kernel?
> >>> And if I issue these command, won't xorp override it everytime i do a
> >> commit
> >>> within it? I thought Vyatta overrides any routing/settings the kernel
> >> has..
> >>> so base on what you are advicing me,
> >>>> #ip route add default via 10.0.0.1 dev eth0 tab 1
> >>>> #ip route add default via 10.1.0.1 dev eth1 tab 2
> >>>> #ip rule add from 192.168.16.0/24 tab 1 priority 500
> >>>> #ip rule add from 192.168.17.024 tab 2 priority 600
> >>> say my subnet 1 is 192.168.16.0/24
> >>> subnet 2 is 192.168.17.0/24
> >>>
> >>> by add the above, i can define the default gateway out?
> >>>
> >>> And as my original question mention, will it interfere with Vyatta's
> >>> settings (static routing etc), or vice versa?
> >>>
> >>> On a side note, am I able to track bandwidth usage on each of this
> >>> interface?
> >>>
> >>> Thanks!
> >>> Daren
> >>>
> >>> -----Original Message-----
> >>> From: Aubrey Wells [mailto:[EMAIL PROTECTED]
> >>> Sent: Friday, January 04, 2008 6:19 AM
> >>> To: Robert Bays
> >>> Cc: Daren Tay; vyatta-users@mailman.vyatta.com
> >>> Subject: Re: [Vyatta-users] Managing different subnet with different
> >>> gateway
> >>>
> >>>
> >>> hmmm I did not know you could do that with ip in linux. very
> >>> interesting. you just solved a problem for me as well, thanks. :-)
> >>>
> >>> ------------------
> >>> Aubrey Wells
> >>> Senior Engineer
> >>> Shelton | Johns Technology Group
> >>> A Vyatta Ready Partner
> >>> www.sheltonjohns.com
> >>>
> >>>
> >>> On Jan 3, 2008, at 1:14 PM, Robert Bays wrote:
> >>>
> >>>> Daren,
> >>>>
> >>>> If I am understanding you correctly you want to route the first local
> >>>> interface out one gateway and the second local interface out the
> >>>> second
> >>>> gateway.  You would need to use source based routing to do what you
> >>>> are
> >>>> looking for.  That's not currently supported in the cli, but you can
> >>>> do
> >>>> it from the linux command prompt using the ip tool.  Something like
> >>>> this
> >>>> should work for you.
> >>>>
> >>>> #ip route add default via 10.0.0.1 dev eth0 tab 1
> >>>> #ip route add default via 10.1.0.1 dev eth1 tab 2
> >>>> #ip rule add from 192.168.16.0/24 tab 1 priority 500
> >>>> #ip rule add from 192.168.17.024 tab 2 priority 600
> >>>>
> >>>> Cheers,
> >>>> Robert.
> >>>>
> >>>>
> >>>> Daren Tay wrote:
> >>>>> Hi there,
> >>>>>
> >>>>> my intention is just to use one router to handle 2 subnet.
> >>>>> But each subnet has their own gateway, so how do I specify the
> >>>>> different
> >>>>> gateway on the router?
> >>>>>
> >>>>> Thanks!
> >>>>> Daren
> >>>>>
> >>>>>    -----Original Message-----
> >>>>>    *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> >>>>>    *Nick Davey
> >>>>>    *Sent:* Thursday, January 03, 2008 11:25 PM
> >>>>>    *To:* Daren Tay
> >>>>>    *Cc:* vyatta-users@mailman.vyatta.com
> >>>>>    *Subject:* Re: [Vyatta-users] Managing different subnet with
> >>>>>    different gateway
> >>>>>
> >>>>>    I don't know if I'm understanding this right. You want to add a
> >>>>>    second subnet on a second interface of the Vyatta router? In that
> >>>>>    case, yes it will work fine, without much extra configuration (you
> >>>>>    may need to modify your NAT/firewall rules). That's a pretty
> >>>>>    straight forward setup though. If you are looking to add a second
> >>>>>    router to your network, with a second network behind that router
> >>>>> you
> >>>>>    would need to add static routes for the network behind the second
> >>>>>    router, and a default route on the second router. Alternatively
> >>>>> you
> >>>>>    could use a simple routing protocol like RIP. Make sense?
> >>>>>
> >>>>>    On Jan 3, 2008 3:13 AM, Daren Tay <[EMAIL PROTECTED]
> >>>>>    <mailto:[EMAIL PROTECTED]>> wrote:
> >>>>>
> >>>>>        Hi guys,
> >>>>>
> >>>>>        happy 2008 wherever you guys are!
> >>>>>
> >>>>>        I have a question:
> >>>>>        Currently my vyatta router is handling one subnet with one
> >>>>>        gateway, using
> >>>>>        NAT for the servers.
> >>>>>        SO basically its just static routing.
> >>>>>
> >>>>>        I now need to add another subnet (different project) into the
> >>>>>        picture, which
> >>>>>        has its own gateway.
> >>>>>        Can the vyatta router handle 2 different subnet, each with its
> >>>>>        own gateway?
> >>>>>
> >>>>>        Do advice ;)
> >>>>>
> >>>>>        Thanks!
> >>>>>        Daren
> >>>>>
> >>>>>        _______________________________________________
> >>>>>        Vyatta-users mailing list
> >>>>>        Vyatta-users@mailman.vyatta.com
> >>>>>        <mailto:Vyatta-users@mailman.vyatta.com>
> >>>>>        http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> >>>>>
> >>>>>
> >>>>>
> >>>>> ----------------------------------------------------------------------
> -
> > -
> >>>>> _______________________________________________
> >>>>> Vyatta-users mailing list
> >>>>> Vyatta-users@mailman.vyatta.com
> >>>>> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> >>>> _______________________________________________
> >>>> Vyatta-users mailing list
> >>>> Vyatta-users@mailman.vyatta.com
> >>>> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> >>> _______________________________________________
> >>> Vyatta-users mailing list
> >>> Vyatta-users@mailman.vyatta.com
> >>> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> >> _______________________________________________
> >> Vyatta-users mailing list
> >> Vyatta-users@mailman.vyatta.com
> >> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> >
> > _______________________________________________
> > Vyatta-users mailing list
> > Vyatta-users@mailman.vyatta.com
> > http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> >
> > _______________________________________________
> > Vyatta-users mailing list
> > Vyatta-users@mailman.vyatta.com
> > http://mailman.vyatta.com/mailman/listinfo/vyatta-users
> _______________________________________________
> Vyatta-users mailing list
> Vyatta-users@mailman.vyatta.com
> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
>
> _______________________________________________
> Vyatta-users mailing list
> Vyatta-users@mailman.vyatta.com
> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
>
> _______________________________________________
> Vyatta-users mailing list
> Vyatta-users@mailman.vyatta.com
> http://mailman.vyatta.com/mailman/listinfo/vyatta-users
>
>
_______________________________________________
Vyatta-users mailing list
Vyatta-users@mailman.vyatta.com
http://mailman.vyatta.com/mailman/listinfo/vyatta-users

Reply via email to