Labb 22: HSRP 3

I denna laboration ska vi testa redundans och failover med HSRP (Hot Standby Router Protocol) mellan två multilayer-switchar, MLS1 och MLS2, som är anslutna till en Lager 2-switch (SW1). Till SW1 är även två datorer anslutna, vilka använder HSRP-gruppen för att säkerställa att det alltid finns en tillgänglig default gateway. Routern EDGER är ansluten till en ISP-router, som i sin tur är ansluten till en switch med en server med IP-adressen 8.8.8.8. Dessa tre nätverksenheter har gått inne i ett moln för att simulera Internet anslutning och tillhandahålla DNS-respons från servern.

I detta scenario används HSRP för att skapa en redundant default gateway, där MLS1 är den aktiva routern och MLS2 är standby. Vid ett fel på MLS1 bör MLS2 automatiskt ta över som aktiv router och hantera trafiken utan avbrott.

Topologi

Viktigt: Eftersom IP SLA inte är konfigurerat i denna laboration, måste failover testas genom att manuellt ta ner VLAN 1 på MLS1 snarare än att ta ner det fysiska interfacet anslutet till router EDGER. Detta beror på att HSRP är konfigurerat på VLAN 1 och inte direkt övervakar de fysiska gränssnitten. Utan IP SLA har HSRP ingen inbyggd mekanism för att upptäcka ett fel på det fysiska gränssnittet och kommer därför inte att trigga failover om bara det fysiska interfacet går ner.

Konfigurationer

Router ISP konfigurationer

  • ISP(config)# interface s0/0/0
  • ISP(config-if)# clock rate 64000
  • ISP(config-if)# ip address 29.65.1.2 255.255.255.252
  • ISP(config-if)# no shut
  • ISP(config-if)# interface fa0/0
  • ISP(config-if)# ip address 8.8.8.1 255.255.255.240
  • ISP(config-if)# no shut
  • ISP(config-if)# exit
  • ISP(config)# ip route 172.16.10.0 255.255.255.0 29.65.1.1
  • ISP(config)# end
  • ISP#

Router EDGER konfigurationer

  • EDGER(config)# interface fa0/0
  • EDGER(config-if)# ip address 209.65.1.1 255.255.255.252
  • EDGER(config-if)# no shut
  • EDGER(config-if)# interface fa0/1
  • EDGER(config-if)# ip address 209.65.2.1 255.255.255.252
  • EDGER(config-if)# no shut
  • EDGER(config-if)# interface s0/0/0
  • EDGER(config-if)# ip address 29.65.1.1 255.255.255.252
  • EDGER(config-if)# no shut
  • EDGER(config-if)# exit
  • EDGER(config)# ip route 0.0.0.0 0.0.0.0 29.65.1.2
  • EDGER(config)# ip route 172.16.10.0 255.255.255.0 209.65.1.2
  • EDGER(config)# ip route 172.16.10.0 255.255.255.0 209.65.2.2 5
  • EDGER(config)# end
  • EDGER#

L3-switch konfigurerat som router:

  • MLS1(config)# ip routing
  • MLS1(config)# interface g1/0/1
  • MLS1(config-if)# no switchport
  • MLS1(config-if)# ip address 209.65.1.2 255.255.255.252
  • MLS1(config-if)# no shut
  • MLS1(config-if)# interface vlan 1
  • MLS1(config-if)# ip address 172.16.10.2 255.255.255.0
  • MLS1(config-if)# no shut
  • MLS1(config-if)# exit
  • MLS1(config)# interface vlan 1
  • MLS1(config-if)# standby 1 ip 172.16.10.1
  • MLS1(config-if)# standby 1 priority 120
  • MLS1(config-if)# standby 1 preempt
  • MLS1(config-if)# exit
  • MLS1(config)# ip route 0.0.0.0 0.0.0.0 209.65.1.1
  • MLS1(config)# end
  • MLS1#

L3 switch konfigurera som router

  • MLS2(config)# ip routing
  • MLS2(config-if)# interface g1/0/1
  • MLS2(config-if)# no switchport
  • MLS2(config-if)# ip address 209.65.2.2 255.255.255.252
  • MLS2(config-if)# no shut
  • MLS2(config-if)# interface vlan 1
  • MLS2(config-if)# ip address 172.16.10.3 255.255.255.0
  • MLS2(config-if)# no shut
  • MLS2(config-if)# exit
  • MLS2(config)# interface vlan 1
  • MLS2(config-if)# standby 1 ip 172.16.10.1
  • MLS2(config-if)# standby 1 priority 110
  • MLS2(config-if)# standby 1 preempt
  • MLS2(config-if)# exit
  • MLS2(config)# ip route 0.0.0.0 0.0.0.0 209.65.2.1
  • MLS2(config)# end
  • MLS2#

Server ns1.google.se simulerar Googles DNS-server.

  • ns1.google.se
  • IP Address: 8.8.8.8
  • Subnet Mask: 255.255.255.254
  • Default Gateway: 8.8.8.1
  • DNS Server: 8.8.8.8
  • PC100
  • IP Address: 172.16.10.100
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 172.16.10.1
  • DNS Server: 8.8.8.8
  • PC200
  • IP Address: 172.16.10.100
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 172.16.10.1
  • DNS Server: 8.8.8.8