PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:network:cisco:glbp:glbp

This is an old revision of the document!


GLBP

  • ASW1
en
conf t
!
vlan 10
exit
!
int range f0/1 - 2
switchport mode access
switchport access vlan 10
no shut
exit
int f0/8
switchport mode access
switchport access vlan 10
spanning-tree portfast
no shut
exit
int gig0/1
switchport mode access
switchport access vlan 10
spanning-tree portfast
no shut
exit
!
end
  • ASW2
en
conf t
!
vlan 2
exit
!
int range f0/1 - 2
switchport mode access
switchport access vlan 2
spanning-tree portfast
no shut
exit
int gig0/1
switchport mode access
switchport access vlan 2
spanning-tree portfast
no shut
exit
!
end
  • ASW3

As a simple IP terminal.

en
conf t
!
no cdp run
no spanning-tree vlan 1-4094
spanning-tree portfast default
!
int vlan 1
ip addr 172.16.10.121 255.255.255.0
no shut
exit
!
ip default-gateway 172.16.10.254
!
end
  • SW1
en
conf t
!
ip routing
!
vlan 3,10
exit
!
int vlan 3
ip address 172.16.3.1 255.255.255.0
no shut
exit
int vlan 10
ip address 172.16.10.1 255.255.255.0
glbp 10 ip 172.16.10.254
glbp 10 priority 105
glbp 10 preempt
no shut
exit
int f1/0/1
switchport mode access
switchport access vlan 10
no shut
exit
int f1/0/2
switchport mode access
switchport access vlan 3
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • SW2
en
conf t
!
ip routing
!
vlan 4,10
exit
!
int vlan 10
ip address 172.16.10.2 255.255.255.0
glbp 10 ip 172.16.10.254
glbp 10 preempt
no shut
exit
int vlan 4
ip address 172.16.4.2 255.255.255.0
no shut
exit
int f1/0/1
switchport mode access
switchport access vlan 10
no shut
exit
int f1/0/2
switchport mode access
switchport access vlan 4
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • R1
en
conf t
!
int f0/0
ip address 172.16.3.3 255.255.255.0
no shut
exit
int f0/1
ip address 172.16.2.3 255.255.255.0
glbp 2 ip 172.16.2.254
glbp 2 preempt
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • R2
en
conf t
!
int f0/0
ip address 172.16.4.4 255.255.255.0
no shut
exit
int f0/1
ip address 172.16.2.4 255.255.255.0
glbp 2 ip 172.16.2.254
glbp 2 preempt
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • PC1
route delete 172.16.0.0 mask 255.255.0.0 172.16.10.1 metric 1 if 25
route add 172.16.0.0 mask 255.255.0.0 172.16.10.254 metric 1 if 25
  • PC2
sudo ip route del 172.16.0.0/16 via 172.16.2.3
sudo ip route add 172.16.0.0/16 via 172.16.2.254
SW1#
*Mar  1 02:14:30.318: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
*Mar  1 02:14:30.453: %SYS-5-CONFIG_I: Configured from console by console
SW1#
*Mar  1 02:15:21.883: %LINK-3-UPDOWN: Interface FastEthernet1/0/2, changed state to up
*Mar  1 02:15:22.890: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/2, changed state to up
SW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#int f1
*Mar  1 02:15:49.909: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, changed state to up
SW1(config)#int f1/0/2
SW1(config-if)#int f0/1
                    ^
% Invalid input detected at '^' marker.

SW1(config)#int f1/0/2
SW1(config-if)#int vlan 10
SW1(config-if)#
*Mar  1 02:16:24.286: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
SW1(config-if)#
*Mar  1 02:16:30.091: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.3.3 on Vlan3 from LOADING to FULL, Loading Done
SW1(config-if)#ip addr
SW1(config-if)#ip address 172.16.10.254 255.255.255.0
SW1(config-if)#glb
SW1(config-if)#glbp 10
SW1(config-if)#glbp 10 ip
SW1(config-if)#glbp 10 ip 172.16.10.254
%GLBP is not supported by the switch stack

SW1(config-if)#

Catalyst 3750 platform not supported GLBP.

redesign.

  • ASW1
en
conf t
!
vlan 10
exit
!
int range f0/1 - 2
switchport mode access
switchport access vlan 10
no shut
exit
no shut
exit
!
end
  • ASW2
en
conf t
!
vlan 2
exit
!
int range f0/1 - 2
switchport mode access
switchport access vlan 2
spanning-tree portfast
no shut
exit
int f0/8
switchport mode access
switchport access vlan 2
spanning-tree portfast
int gig0/1
switchport mode access
switchport access vlan 2
spanning-tree portfast
no shut
exit
!
end
  • ASW3

As a simple IP terminal.

en
conf t
!
no cdp run
no spanning-tree vlan 1-4094
spanning-tree portfast default
!
int vlan 1
ip addr 172.16.10.121 255.255.255.0
no shut
exit
!
ip default-gateway 172.16.10.254
!
end
  • SW1
en
conf t
!
ip routing
!
vlan 3,10
exit
!
int vlan 3
ip address 172.16.3.1 255.255.255.0
no shut
exit
int vlan 10
ip address 172.16.10.1 255.255.255.0
standby 10 ip 172.16.10.254
standby 10 priority 105
standby 10 preempt
no shut
exit
int f1/0/1
switchport mode access
switchport access vlan 10
no shut
exit
int f1/0/2
switchport mode access
switchport access vlan 3
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • SW2
en
conf t
!
ip routing
!
vlan 4,10
exit
!
int vlan 10
ip address 172.16.10.2 255.255.255.0
standby 10 ip 172.16.10.254
standby 10 preempt
no shut
exit
int vlan 4
ip address 172.16.4.2 255.255.255.0
no shut
exit
int f1/0/1
switchport mode access
switchport access vlan 10
no shut
exit
int f1/0/2
switchport mode access
switchport access vlan 4
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • R1
en
conf t
!
int f0/0
ip address 172.16.3.3 255.255.255.0
no shut
exit
int f0/1
ip address 172.16.2.3 255.255.255.0
glbp 2 ip 172.16.2.254
glbp 2 priority 105
glbp 2 preempt
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • R2
en
conf t
!
int f0/0
ip address 172.16.4.4 255.255.255.0
no shut
exit
int f0/1
ip address 172.16.2.4 255.255.255.0
glbp 2 ip 172.16.2.254
glbp 2 preempt
no shut
exit
!
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
exit
!
end
  • PC1
route delete 172.16.0.0 mask 255.255.0.0 172.16.10.254 metric 1 if 25
route add 172.16.0.0 mask 255.255.0.0 172.16.2.254 metric 1 if 25
  • PC2
sudo ip route del 172.16.0.0/16 via 172.16.2.3
sudo ip route add 172.16.0.0/16 via 172.16.2.254
R1#sh glbp brief
Interface   Grp  Fwd Pri State    Address         Active router   Standby router
Fa0/1       2    -   105 Active   172.16.2.254    local           172.16.2.4
Fa0/1       2    1   -   Active   0007.b400.0201  local           -
Fa0/1       2    2   -   Listen   0007.b400.0202  172.16.2.4      -
R1#
R2#show glbp brief
Interface   Grp  Fwd Pri State    Address         Active router   Standby router
Fa0/1       2    -   100 Standby  172.16.2.254    172.16.2.3      local
Fa0/1       2    1   -   Listen   0007.b400.0201  172.16.2.3      -
Fa0/1       2    2   -   Active   0007.b400.0202  local           -
C:\WINDOWS\system32>ping 172.16.10.121 -t

Pinging 172.16.10.121 with 32 bytes of data:
Request timed out.
Request timed out.
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=2ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253
Reply from 172.16.10.121: bytes=32 time=1ms TTL=253

Ping statistics for 172.16.10.121:
    Packets: Sent = 34, Received = 32, Lost = 2 (5% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2ms, Average = 1ms
Control-C
^C
C:\WINDOWS\system32>
C:\WINDOWS\system32>arp -a | findstr 254
  172.16.2.254          00-07-b4-00-02-01     dynamic
64 bytes from 172.16.10.121: icmp_seq=23 ttl=253 time=1.78 ms
64 bytes from 172.16.10.121: icmp_seq=24 ttl=253 time=1.86 ms
^C
--- 172.16.10.121 ping statistics ---
24 packets transmitted, 24 received, 0% packet loss, time 23038ms
rtt min/avg/max/mdev = 1.702/1.865/3.759/0.399 ms
✘╹◡╹✘  18-09-23 20:11:43 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 REACHABLE
✘╹◡╹✘  18-09-23 20:11:46 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 REACHABLE
✘╹◡╹✘  18-09-23 20:11:48 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 REACHABLE
✘╹◡╹✘  18-09-23 20:11:48 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 STALE
✘╹◡╹✘  18-09-23 20:11:49 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 STALE
✘╹◡╹✘  18-09-23 20:11:49 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 STALE
✘╹◡╹✘  18-09-23 20:11:50 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:01 STALE
✘╹◡╹✘  18-09-23 20:11:50 /home/wnoguchi
% ip neigh clear 172.16.2.254
Command "clear" is unknown, try "ip neigh help".
✘╹◡╹✘  18-09-23 20:12:06 /home/wnoguchi
% ip neigh delete 172.16.2.254
Device and destination are required arguments.
✘╹◡╹✘  18-09-23 20:12:15 /home/wnoguchi
% sudo ip neigh delete 172.16.2.254 dev enx84afec739c0a
✘╹◡╹✘  18-09-23 20:12:25 /home/wnoguchi
% ping 172.16.10.121
PING 172.16.10.121 (172.16.10.121) 56(84) bytes of data.
64 bytes from 172.16.10.121: icmp_seq=1 ttl=253 time=2.81 ms
64 bytes from 172.16.10.121: icmp_seq=2 ttl=253 time=1.94 ms
^C
--- 172.16.10.121 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.940/2.378/2.816/0.438 ms
✘╹◡╹✘  18-09-23 20:12:41 /home/wnoguchi
% ip neigh delete 172.16.2.254
Device and destination are required arguments.
✘╹◡╹✘  18-09-23 20:12:45 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:02 REACHABLE
✘╹◡╹✘  18-09-23 20:12:51 /home/wnoguchi
% ping 172.16.10.121
PING 172.16.10.121 (172.16.10.121) 56(84) bytes of data.
64 bytes from 172.16.10.121: icmp_seq=1 ttl=253 time=1.82 ms
64 bytes from 172.16.10.121: icmp_seq=2 ttl=253 time=1.77 ms
^C
--- 172.16.10.121 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.778/1.803/1.828/0.025 ms
✘╹◡╹✘  18-09-23 20:13:02 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:02 REACHABLE
✘╹◡╹✘  18-09-23 20:13:53 /home/wnoguchi
% ping 172.16.10.121
PING 172.16.10.121 (172.16.10.121) 56(84) bytes of data.
64 bytes from 172.16.10.121: icmp_seq=1 ttl=253 time=1.81 ms
64 bytes from 172.16.10.121: icmp_seq=2 ttl=253 time=1.83 ms
^C
--- 172.16.10.121 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.814/1.826/1.838/0.012 ms
✘╹◡╹✘  18-09-23 20:13:56 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:02 DELAY
✘╹◡╹✘  18-09-23 20:13:58 /home/wnoguchi
% ping 172.16.10.121
PING 172.16.10.121 (172.16.10.121) 56(84) bytes of data.
64 bytes from 172.16.10.121: icmp_seq=1 ttl=253 time=2.10 ms
64 bytes from 172.16.10.121: icmp_seq=2 ttl=253 time=2.69 ms
^C
--- 172.16.10.121 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.102/2.397/2.693/0.299 ms
✘╹◡╹✘  18-09-23 20:14:02 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:02 PROBE
✘╹◡╹✘  18-09-23 20:14:04 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a  FAILED
✘╹◡╹✘  18-09-23 20:14:06 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a  FAILED
✘╹◡╹✘  18-09-23 20:14:08 /home/wnoguchi
% ping 172.16.10.121
PING 172.16.10.121 (172.16.10.121) 56(84) bytes of data.
64 bytes from 172.16.10.121: icmp_seq=1 ttl=253 time=2.80 ms
^C
--- 172.16.10.121 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 2.805/2.805/2.805/0.000 ms
✘╹◡╹✘  18-09-23 20:14:11 /home/wnoguchi
% ip neighbour show | fgrep 254
172.16.2.254 dev enx84afec739c0a lladdr 00:07:b4:00:02:02 REACHABLE
✘╹◡╹✘  18-09-23 20:14:12 /home/wnoguchi
% ping 172.16.10.121
PING 172.16.10.121 (172.16.10.121) 56(84) bytes of data.
64 bytes from 172.16.10.121: icmp_seq=1 ttl=253 time=1.87 ms
64 bytes from 172.16.10.121: icmp_seq=2 ttl=253 time=1.84 ms
64 bytes from 172.16.10.121: icmp_seq=3 ttl=253 time=1.81 ms
64 bytes from 172.16.10.121: icmp_seq=4 ttl=253 time=1.77 ms
64 bytes from 172.16.10.121: icmp_seq=5 ttl=253 time=1.79 ms
64 bytes from 172.16.10.121: icmp_seq=6 ttl=253 time=1.78 ms
^C
--- 172.16.10.121 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5008ms
rtt min/avg/max/mdev = 1.778/1.814/1.873/0.048 ms

Let's say R1 shut down.

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int f0/1
R1(config-if)#shut
R1(config-if)#
*Sep 23 11:14:16.978: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 1 state Active -> Init
*Sep 23 11:14:16.986: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 2 state Active -> Init
R1(config-if)#
*Sep 23 11:14:16.990: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.4.4 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
R1(config-if)#
*Sep 23 11:14:18.978: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
*Sep 23 11:14:19.978: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
R1(config-if)#
R2#
*Sep 23 11:17:15.566: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 1 state Listen -> Active
*Sep 23 11:17:16.302: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 2 state Standby -> Active
R2#sh glbp standby
R2#sh glbp brief
Interface   Grp  Fwd Pri State    Address         Active router   Standby router
Fa0/1       2    -   100 Active   172.16.2.254    local           unknown
Fa0/1       2    1   -   Active   0007.b400.0201  local           -
Fa0/1       2    2   -   Active   0007.b400.0202  local           -
R2#
*Sep 23 11:17:43.646: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.3.3 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Dead timer expired
R2#

back to normal

R1#sh glbp
FastEthernet0/1 - Group 2
  State is Active
    3 state changes, last state change 00:00:30
  Virtual IP address is 172.16.2.254
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.368 secs
  Redirect time 600 sec, forwarder timeout 14400 sec
  Preemption enabled, min delay 0 sec
  Active is local
  Standby is 172.16.2.4, priority 100 (expires in 8.704 sec)
  Priority 105 (configured)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    001b.2a77.66d3 (172.16.2.3) local
    0024.c431.126f (172.16.2.4)
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Active
      3 state changes, last state change 00:00:01
    MAC address is 0007.b400.0201 (default)
    Owner ID is 001b.2a77.66d3
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Client selection count: 13
  Forwarder 2
    State is Listen
    MAC address is 0007.b400.0202 (learnt)
    Owner ID is 0024.c431.126f
    Redirection enabled, 598.720 sec remaining (maximum 600 sec)
    Time to live: 14398.720 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 172.16.2.4 (primary), weighting 100 (expires in 10.080 sec)
    Client selection count: 12
R2#sh glbp
FastEthernet0/1 - Group 2
  State is Standby
    4 state changes, last state change 00:01:29
  Virtual IP address is 172.16.2.254
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.128 secs
  Redirect time 600 sec, forwarder timeout 14400 sec
  Preemption enabled, min delay 0 sec
  Active is 172.16.2.3, priority 105 (expires in 11.648 sec)
  Standby is local
  Priority 100 (default)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    001b.2a77.66d3 (172.16.2.3)
    0024.c431.126f (172.16.2.4) local
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Listen
      2 state changes, last state change 00:01:11
    MAC address is 0007.b400.0201 (learnt)
    Owner ID is 001b.2a77.66d3
    Time to live: 14399.680 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 172.16.2.3 (primary), weighting 100 (expires in 9.856 sec)
    Client selection count: 3
  Forwarder 2
    State is Active
      1 state change, last state change 00:16:15
    MAC address is 0007.b400.0202 (default)
    Owner ID is 0024.c431.126f
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
    Client selection count: 2










References

tech/network/cisco/glbp/glbp.1537702331.txt.gz · Last modified: 2018/09/23 20:32 by wnoguchi