All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] help on routing
@ 2007-03-02  8:41 Kamen TOMOV
  2007-03-04 11:37 ` Ivan Vladimirov
  2007-03-04 12:12 ` Ivan Vladimirov
  0 siblings, 2 replies; 3+ messages in thread
From: Kamen TOMOV @ 2007-03-02  8:41 UTC (permalink / raw)
  To: lartc

We have a router with two external and one internal interfaces and it
doesn't work as we'd like to. We need it to route all the trafic
through one of the external interfaces and to access a few networks
through the other.

Currently it seems that all the packets with source address from the
inernal network are routed correctly. The problem is with the packets
that originate from the router. For some reason they are routed
through the default interface. Does anybody know why does that happen?

# ip rule ls
0:      from all lookup local
200:    from 192.168.1.0/24 to a.b.c.0/24 lookup 202
201:    from e.f.g.0/24 lookup 201
201:    from 192.168.1.0/24 to 62.44.96.0/19 lookup 201
201:    from 127.0.0.0/8 to 62.44.96.0 lookup 201
202:    from a.b.c.0/24 lookup 202
32766:  from all lookup main
32767:  from all lookup default

# ip route ls
e.f.g.0/24 dev eth3  scope link  metric 1
a.b.c.0/24 dev eth2  scope link
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
127.0.0.0/8 dev lo  scope link
default via a.b.c.1 dev eth2

ip route ls table 201
default via e.f.g.1 dev eth3  proto static  src e.f.g.52 realm 201
prohibit default  proto static  metric 1

ip route ls table 202
default via a.b.c.1 dev eth2  proto static  src a.b.c.4 realm 202
prohibit default  proto static  metric 1

Your help is appreciated.

-- 
Камен
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] help on routing
  2007-03-02  8:41 [LARTC] help on routing Kamen TOMOV
@ 2007-03-04 11:37 ` Ivan Vladimirov
  2007-03-04 12:12 ` Ivan Vladimirov
  1 sibling, 0 replies; 3+ messages in thread
From: Ivan Vladimirov @ 2007-03-04 11:37 UTC (permalink / raw)
  To: lartc

Kamen TOMOV wrote:
> We have a router with two external and one internal interfaces and it
> doesn't work as we'd like to. We need it to route all the trafic
> through one of the external interfaces and to access a few networks
> through the other.
>
> Currently it seems that all the packets with source address from the
> inernal network are routed correctly. The problem is with the packets
> that originate from the router. For some reason they are routed
> through the default interface. Does anybody know why does that happen?
>
> # ip rule ls
> 0:      from all lookup local
> 200:    from 192.168.1.0/24 to a.b.c.0/24 lookup 202
> 201:    from e.f.g.0/24 lookup 201
> 201:    from 192.168.1.0/24 to 62.44.96.0/19 lookup 201
> 201:    from 127.0.0.0/8 to 62.44.96.0 lookup 201
> 202:    from a.b.c.0/24 lookup 202
> 32766:  from all lookup main
> 32767:  from all lookup default
>
> # ip route ls
> e.f.g.0/24 dev eth3  scope link  metric 1
> a.b.c.0/24 dev eth2  scope link
> 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
> 127.0.0.0/8 dev lo  scope link
> default via a.b.c.1 dev eth2
>
> ip route ls table 201
> default via e.f.g.1 dev eth3  proto static  src e.f.g.52 realm 201
> prohibit default  proto static  metric 1
>
> ip route ls table 202
> default via a.b.c.1 dev eth2  proto static  src a.b.c.4 realm 202
> prohibit default  proto static  metric 1
>
> Your help is appreciated.
>
>   
Because locally originated packets use IP addres of the external
interface looking only main table
To resolve this you need to apply rules for external interfaces of the
router
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] help on routing
  2007-03-02  8:41 [LARTC] help on routing Kamen TOMOV
  2007-03-04 11:37 ` Ivan Vladimirov
@ 2007-03-04 12:12 ` Ivan Vladimirov
  1 sibling, 0 replies; 3+ messages in thread
From: Ivan Vladimirov @ 2007-03-04 12:12 UTC (permalink / raw)
  To: lartc

Kamen TOMOV wrote:
> We have a router with two external and one internal interfaces and it
> doesn't work as we'd like to. We need it to route all the trafic
> through one of the external interfaces and to access a few networks
> through the other.
>
> Currently it seems that all the packets with source address from the
> inernal network are routed correctly. The problem is with the packets
> that originate from the router. For some reason they are routed
> through the default interface. Does anybody know why does that happen?
>
> # ip rule ls
> 0:      from all lookup local
> 200:    from 192.168.1.0/24 to a.b.c.0/24 lookup 202
> 201:    from e.f.g.0/24 lookup 201
> 201:    from 192.168.1.0/24 to 62.44.96.0/19 lookup 201
> 201:    from 127.0.0.0/8 to 62.44.96.0 lookup 201
> 202:    from a.b.c.0/24 lookup 202
> 32766:  from all lookup main
> 32767:  from all lookup default
>
> # ip route ls
> e.f.g.0/24 dev eth3  scope link  metric 1
> a.b.c.0/24 dev eth2  scope link
> 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
> 127.0.0.0/8 dev lo  scope link
> default via a.b.c.1 dev eth2
>
> ip route ls table 201
> default via e.f.g.1 dev eth3  proto static  src e.f.g.52 realm 201
> prohibit default  proto static  metric 1
>
> ip route ls table 202
> default via a.b.c.1 dev eth2  proto static  src a.b.c.4 realm 202
> prohibit default  proto static  metric 1
>
> Your help is appreciated.
>
>   
A little correction  for my previos post
local packets look in Local table not main
ip r ls table 0

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-03-04 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-02  8:41 [LARTC] help on routing Kamen TOMOV
2007-03-04 11:37 ` Ivan Vladimirov
2007-03-04 12:12 ` Ivan Vladimirov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.