From f2b9130a22f7de1e74a1d41475d4eb98dcb5600a Mon Sep 17 00:00:00 2001 From: IDEZ Ugo Date: Wed, 15 Sep 2021 11:05:41 +0200 Subject: [PATCH] lb --- sio2/sisr/05-lb/lvs | 7 +++++++ sio2/sisr/05-lb/recup | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 sio2/sisr/05-lb/lvs create mode 100755 sio2/sisr/05-lb/recup diff --git a/sio2/sisr/05-lb/lvs b/sio2/sisr/05-lb/lvs new file mode 100755 index 0000000..44f7e77 --- /dev/null +++ b/sio2/sisr/05-lb/lvs @@ -0,0 +1,7 @@ +#!/bin/bash + +echo 1 > /proc/sys/net/ipv4/ip_forward +ipvsadm -A -t 192.168.0.150:80 -s rr +ipvsadm -a -t 192.168.0.150:80 -r 172.16.0.1:80 -m +ipvsadm -a -t 192.168.0.150:80 -r 172.16.0.2:80 -m + diff --git a/sio2/sisr/05-lb/recup b/sio2/sisr/05-lb/recup new file mode 100755 index 0000000..2d322f7 --- /dev/null +++ b/sio2/sisr/05-lb/recup @@ -0,0 +1,6 @@ +#!/bin/bash + +while [ TRUE ] +do +curl -s http://192.168.0.150 -o /dev/null +done