Setting HSRP Cisco – GNS3 Lab32

Setting HSRP (Hot Standby Router Protocol) Cisco – GNS3 Lab32

  • R1 FastEthernet 0/0 : 172.1.1.2
  • R1 Loopback 0 : 5.5.5.5
  • R2 FastEthernet 0/0 : 172.1.1.1
  • R2 FastEthernet 1/0 : 10.10.10.1
  • R2 FastEthernet 2/0 : 20.20.20.1
  • R3 FastEthernet 0/0 : 10.10.10.2
  • R3 FastEthernet 0/1 : 192.168.10.2
  • R3 HSRP : 192.168.10.1
  • Priority : 200 (Active)
  • R4 FastEthernet 0/0 : 20.20.20.2
  • R4 FastEthernet 0/1 : 192.168.10.3
  • R4 HSRP : 192.168.10.1
  • Priority : 100 (Standby)
  • PC1 : 192.168.10.4

Setting IP address

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

R1(config)# interface loopback 0
R1(config-if)# ip address 5.5.5.5 255.255.255.255
R1(config-if)# exit
  • R2
R2# configure terminal
R2(config)# interface fastEthernet 0/0
R2(config-if)# ip address 172.1.1.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit

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

R2(config)# interface fastEthernet 2/0
R2(config-if)# ip address 20.20.20.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# exit
  • R3
R3# configure terminal
R3(config)# interface fastEthernet 0/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 0/1
R3(config-if)# ip address 192.168.10.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 20.20.20.2 255.255.255.0
R4(config-if)# no shutdown
R4(config-if)# exit

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

Setting OSPF

  • R1
R1(config)# router ospf 1
R1(config-router)# network 172.1.1.0 0.0.0.255 area 0
R1(config-router)# network 5.5.5.0 0.0.0.255 area 0
  • R2
R2(config)# router ospf 1
R2(config-router)# network 172.1.1.0 0.0.0.255 area 0
R2(config-router)# network 10.10.10.0 0.0.0.255 area 0
R2(config-router)# network 20.20.20.0 0.0.0.255 area 0
  • R3
R3(config)# router ospf 1
R3(config-router)# network 10.10.10.0 0.0.0.255 area 0
R3(config-router)# network 192.168.10.0 0.0.0.255 area 0
  • R4
R4(config)# router ospf 1
R4(config-router)# network 20.20.20.0 0.0.0.255 area 0
R4(config-router)# network 192.168.10.0 0.0.0.255 area 0

Setting HSRP

  • R3
R3(config)# interface fastEthernet 0/1
R3(config-if)# standby 1 ip 192.168.10.1
R3(config-if)# standby 1 priority 200
R3(config-if)# standby 1 preempt
R3(config-if)# exit
  • R4
R4(config)# interface fastEthernet 0/1
R4(config-if)# standby 1 ip 192.168.10.1
R4(config-if)# standby 1 priority 100
R4(config-if)# standby 1 preempt
R4(config-if)# exit

Verifikasi HSRP

  • R3
R3# show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP
Fa0/1       1   200  P Active   local           192.168.10.3    192.168.10.1


R3# show standby fastEthernet 0/1
FastEthernet0/1 - Group 1
  State is Active
    2 state changes, last state change 00:02:03
  Virtual IP address is 192.168.10.1
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.344 secs
  Preemption enabled
  Active router is local
  Standby router is 192.168.10.3, priority 100 (expires in 7.516 sec)
  Priority 200 (configured 200)
  IP redundancy name is "hsrp-Fa0/1-1" (default)
  • R4
R4# show standby brief
                     P indicates configured to preempt.
                     |
Interface   Grp Prio P State    Active          Standby         Virtual IP
Fa0/1       1   100  P Standby  192.168.10.2    local           192.168.10.1


R4# show standby fastEthernet 0/1
FastEthernet0/1 - Group 1
  State is Standby
    1 state change, last state change 00:01:38
  Virtual IP address is 192.168.10.1
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.508 secs
  Preemption enabled
  Active router is 192.168.10.2, priority 200 (expires in 9.388 sec)
  Standby router is local
  Priority 100 (default 100)
  IP redundancy name is "hsrp-Fa0/1-1" (default)

Pengujian HSRP

  • Test ping dari PC1 ke R1
  • Test traceroute dari PC1 ke R1 > paket dilewatkan ke R3 (Active)
C1> ip 192.168.10.4/24 192.168.10.1
Checking for duplicate address...
PC1 : 192.168.10.4 255.255.255.0 gateway 192.168.10.1

PC1> show ip

NAME        : PC1[1]
IP/MASK     : 192.168.10.4/24
GATEWAY     : 192.168.10.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 10028
RHOST:PORT  : 127.0.0.1:10029
MTU:        : 1500

PC1> ping 5.5.5.5
84 bytes from 5.5.5.5 icmp_seq=1 ttl=253 time=75.096 ms
84 bytes from 5.5.5.5 icmp_seq=2 ttl=253 time=75.077 ms
84 bytes from 5.5.5.5 icmp_seq=3 ttl=253 time=75.126 ms
84 bytes from 5.5.5.5 icmp_seq=4 ttl=253 time=75.125 ms
84 bytes from 5.5.5.5 icmp_seq=5 ttl=253 time=75.140 ms

PC1> trace 5.5.5.5
trace to 5.5.5.5, 8 hops max, press Ctrl+C to stop
 1   192.168.10.2   15.290 ms  15.240 ms  15.279 ms
 2   10.10.10.1   45.006 ms  45.114 ms  44.861 ms
 3   *172.1.1.2   75.018 ms (ICMP type:3, code:3, Destination port unreachable)

  • Pengujian tambahan, matikan R3
  • Test traceroute dari PC1 ke R1 > paket dilewatkan ke R4 (Standby)
PC1> ping 5.5.5.5
84 bytes from 5.5.5.5 icmp_seq=1 ttl=253 time=75.162 ms
84 bytes from 5.5.5.5 icmp_seq=2 ttl=253 time=75.108 ms
84 bytes from 5.5.5.5 icmp_seq=3 ttl=253 time=75.202 ms
84 bytes from 5.5.5.5 icmp_seq=4 ttl=253 time=75.236 ms
84 bytes from 5.5.5.5 icmp_seq=5 ttl=253 time=75.272 ms

PC1> trace 5.5.5.5
trace to 5.5.5.5, 8 hops max, press Ctrl+C to stop
 1   192.168.10.3   15.076 ms  15.241 ms  14.925 ms
 2   20.20.20.1   45.011 ms  45.072 ms  44.997 ms
 3   *172.1.1.2   74.927 ms (ICMP type:3, code:3, Destination port unreachable)

herdiana3389

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