Setting Server Load Balancing Cisco – GNS3 Lab39

Setting Server Load Balancing (SLB) Cisco – GNS3 Lab39

  • R1 FastEthernet 0/0 : 10.10.10.1
  • R1 Loopback 0 : 192.168.10.100
  • R2 FastEthernet 0/0 : 20.20.20.1
  • R2 Loopback 0 : 192.168.10.100
  • R3 FastEthernet 0/0 : 192.168.10.1
  • R3 FastEthernet 1/0 : 10.10.10.2
  • R3 FastEthernet 2/0 : 20.20.20.2
  • R4 FastEthernet 0/0 : 192.168.10.2
  • R5 FastEthernet 0/0 : 192.168.10.3

Setting IP address

  • R1
R1# configure terminal
R1(config)# interface fastEthernet 0/0
R1(config-if)# ip address 10.10.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit

R1(config)# interface loopback 0
R1(config-if)# ip address 192.168.10.100 255.255.255.0
R1(config-if)# exit

R1(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.2
R1(config)# ip http server
  • R2
R2# configure terminal
R2(config)# interface fastEthernet 0/0
R2(config-if)# ip address 20.20.20.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit

R2(config)# interface loopback 0
R2(config-if)# ip address 192.168.10.100 255.255.255.0
R2(config-if)# exit

R2(config)# ip route 0.0.0.0 0.0.0.0 20.20.20.2
R2(config)# ip http server
  • R3
R3# configure terminal
R3(config)# interface fastEthernet 0/0
R3(config-if)# ip address 192.168.10.1 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit

R3(config)# interface fastEthernet 1/0
R3(config-if)# ip address 10.10.10.2 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit

R3(config)# interface fastEthernet 2/0
R3(config-if)# ip address 20.20.20.2 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit
  • R4
R4# configure terminal
R4(config)# interface fastEthernet 0/0
R4(config-if)# ip address 192.168.10.2 255.255.255.0
R4(config-if)# no shutdown
R4(config-if)# exit

R4(config)# ip route 0.0.0.0 0.0.0.0 192.168.10.1
  • R5
R5# configure terminal
R5(config)# interface fastEthernet 0/0
R5(config-if)# ip address 192.168.10.3 255.255.255.0
R5(config-if)# no shutdown
R5(config-if)# exit

R5(config)# ip route 0.0.0.0 0.0.0.0 192.168.10.1

Setting SLB

  • R3 – server farm
R3(config)# ip slb serverfarm sys-ops-farm
R3(config-slb-sfarm)# predictor roundrobin
R3(config-slb-sfarm)# real 10.10.10.1
R3(config-slb-real)# weight 2
R3(config-slb-real)# inservice
R3(config-slb-real)# exit
R3(config-slb-sfarm)# real 20.20.20.1
R3(config-slb-real)# weight 1
R3(config-slb-real)# inservice
R3(config-slb-real)# exit
R3(config-slb-sfarm)# exit
  • R3 – virtual server
R3(config)# ip slb vserver sys-ops-virtual
R3(config-slb-vserver)# virtual 192.168.10.100 tcp www
R3(config-slb-vserver)# serverfarm sys-ops-farm
R3(config-slb-vserver)# inservice
R3(config-slb-vserver)# exit

Pengujian

  • Telnet dari R4 dan R5 ke virtual IP R3
R4# telnet 192.168.10.100 80
Trying 192.168.10.100, 80 ... Open

R5# telnet 192.168.10.100 80
Trying 192.168.10.100, 80 ... Open
  • Verifikasi SLB
R3# show ip slb vservers
slb vserver      prot  virtual               state         conns
-------------------------------------------------------------------
SYS-OPS-VIRTUAL  TCP   192.168.10.100:80     INSERVICE     2

R3# show ip slb serverfarms
server farm      predictor    nat   reals   bind id
---------------------------------------------------
SYS-OPS-FARM     ROUNDROBIN   none  2       0

R3# show ip slb reals
real                  server farm      weight  state          conns
-------------------------------------------------------------------
10.10.10.1            SYS-OPS-FARM     2       OPERATIONAL    2
20.20.20.1            SYS-OPS-FARM     1       OPERATIONAL    1

herdiana3389

A system administrator with skills in system administration, virtualization, linux, windows, networking, cloud computing, container, etc.