From 66492933c89a9b1dd969abbe68dd36406a7d8be9 Mon Sep 17 00:00:00 2001 From: LAFORET Kyllian Date: Wed, 15 Sep 2021 11:08:28 +0200 Subject: [PATCH] lb --- sio2/sisr/05-lb/lvs.sh | 9 +++++++++ sio2/sisr/05-lb/recup.sh | 5 +++++ 2 files changed, 14 insertions(+) create mode 100755 sio2/sisr/05-lb/lvs.sh create mode 100755 sio2/sisr/05-lb/recup.sh diff --git a/sio2/sisr/05-lb/lvs.sh b/sio2/sisr/05-lb/lvs.sh new file mode 100755 index 0000000..f4ac3aa --- /dev/null +++ b/sio2/sisr/05-lb/lvs.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "1" > /proc/sys/net/ipv4/ip_forward + +ipvsadm -A -t 192.168.0.141:80 -s rr + +ipvsadm -a -t 192.168.0.141:80 -r 172.16.0.1:80 -m +ipvsadm -a -t 192.168.0.141:80 -r 172.16.0.2:80 -m + diff --git a/sio2/sisr/05-lb/recup.sh b/sio2/sisr/05-lb/recup.sh new file mode 100755 index 0000000..7cb1970 --- /dev/null +++ b/sio2/sisr/05-lb/recup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +while [ true ] + do + curl -s http://192.168.0.141 -o /dev/null + done