weixin_39895096
2020-12-25 23:55 阅读 3

Pox with proxy server

I want advice about For example, I have a simple topology with a switch (sw) a host(h)(10.0.0.1) and server(s)(10.0.0.2), in which I run a simple python HTTP server in port 1212. Additionally in IP, for example, 10.0.0.3 in port 4353 I have a proxy server, more particularly a Squid server, which I use for caching. I use the example of ip_loadbalancer with some modifications of course. My use case is that I want h(host) make a get request in s(server) with wget, I want this request to be redirected to a proxy. As I understand after study the given example I use method _pick_server and I tuple key I place ip and port of the proxy and the proxy will make the call in the server if it is not in the cache. Am I right? Because it seems to simple for me and I think that I have misunderstood something.

该提问来源于开源项目:noxrepo/pox

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

4条回答 默认 最新

  • weixin_40002009 weixin_40002009 2020-12-25 23:55

    I'm not clear on why you're using ip_loadbalancer in this case if you only have one server... ?

    点赞 评论 复制链接分享
  • weixin_39895096 weixin_39895096 2020-12-25 23:55

    It's that a simplified example. I have two switches which in each of them I have a proxy server. With some rules, I choose which proxy server I'll use. So, I want to use this example. But my main question is that need to redirect the packet in ip and port of proxy of our choice? So in this example change the tuple key?

    点赞 评论 复制链接分享
  • weixin_39895096 weixin_39895096 2020-12-25 23:55

    My main problem is how to direct the packet through a proxy. So, I have a host (h1) which I want to send an Http request to a server (s). I want this packet reach the server through a proxy. (The proxy is the Squid proxy to run in 10.0.0.3 in port 4563, for example. )

    点赞 评论 复制链接分享
  • weixin_40002009 weixin_40002009 2020-12-25 23:55

    I'd suggest starting with a simplified setup.

    Have one "client" host (10.0.0.1), two "proxy" hosts (10.0.0.4 and 10.0.0.5), and one "server" host (10.0.0.3). Connect these all with a single switch.

    Instead of running a proxy in the two proxy nodes, start by just running a simple webserver in each one.

    Launch misc.ip_loadbalancer using --ip=10.0.0.2 --servers=10.0.0.4,10.0.0.5

    You should hopefully be able to make requests from the client and they go to one web server or the other in the proxy nodes.

    Now switch the proxy nodes to actually run a proxy server. It should have the backend set as 10.0.0.3 where you run the real web server.

    The problem you'll run into is that the proxies won't be able to reach real web server because ip_loadbalancer doesn't do that, if I recall correctly. You'll have to modify it in such a way that it will work or that it will play nice with some more general forwarding component (like l2_learning).

    点赞 评论 复制链接分享

相关推荐