mån 2006-03-13 klockan 16:27 +1000 skrev James Collins:
> Thanks for the pointer Mark. Unfortunally the printed manual I have doesn't
> explain the tcp_outgoing_address completely. It comments that it only
> overrides the systems default gateway and doesn't mention you can use it
> under acl's.
Squid has no control over which gateway to use. All it can say is to ask
the OS to "please use this specific source address when I make
connections".
Which gateway or NIC to use is a business of the routing settings in
your OS. Multihomed routing like you described generally requires policy
routing to be configured to route the traffic to the correct gateway(s)
depending on source address or whatever criterias you have other han
just destination.
Please note that there is an alternative and much easier solution to
your original problem. Simply configure your OS to route the IP
addresses of the site in question via the second gateway and leave
tcp_outgoing_address alone. Your OS and Squid will then do what they
should automatically.
So you will have
NIC 1:
ip = x.y.z.a/mask
default gateway = x.y.z.b
NIC 2:
ip = x.y.y.a/mask
no default gateway
Static routes:
ip.of.site via x.y.y.b
x.y.z = ISP1
x.y.y = ISP2
Hmm... upon reading your question again it seems these two NICs are to
be connected to the same Ethernet? If so then no new NIC is needed. Just
assign a second IP address to the existing one.
Additionally routing of requests to parents is done via the cache_peer +
cache_peer_access directives. You only need to play the games with
routing if you need different IP level routers, or different source
addresses to be used for the traffic.
Regards
Henrik
This archive was generated by hypermail pre-2.1.9 : Sat Apr 01 2006 - 12:00:04 MST