Re: diferent ports, diferent routes

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

 



[Once again, please reply on the mailing list !]

KNO a écrit :

You say the packets go out, but how far ? Do they reach the router2 as
expected, meaning that the destination MAC address is router2's MAC
address ? Do they reach the target host ? Does the target host send a
reply packet ?

How can I know if they reach the router2?

Maybe you can run a packet sniffer on the router. Else, check with a packet sniffer on the Linux box that the packets have the destination MAC addresse of the router, then check that the Linux box can reach the router, with ping for example.

They dont reach to target host.

How did you see that ? By running a packet sniffer on the target host ?

Does your Linux box perform SNAT or MASQUERADE on the WAN interface ?

No. Workstations don't have direct access to Internet, only througth
squid, so I dont need to do masquerade, do I?

Sure.

By the way, how do things work when you set the box default route via
router2 ?

That was in important question, you didn't answer it.

Also, there is something unclear in your addressing scheme. You wrote :

> router1 address 192.168.2.9
> router2 address 192.168.2.10
> linux address 192.168.2.22
> linux default gateway 192.168.2.10
> lan workstations use linux as proxy (squid at port 8080) 192.168.2.22

It seems that both your LAN and WAN networks use the same subnet
192.168.2.0/24. And :

> :~# ip route ls
> 192.168.2.0/24 dev eth0  proto kernel  scope link  src 192.168.2.252
> default via 192.168.2.9 dev eth0

I understand these are the routes on the WAN interface. Where are the
interface and route to the LAN ?

You are rigth: Router have only one interface conected to LAN, and
routers (1 and 2) are conected to LAN too.

So your diagram, showing the Linux box between the LAN and the routers, was wrong. One last unclear detail : you said that the default gateway was 192.168.2.10 (router2) but the default route in the main routing table is 192.168.2.9 (router1).



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux