bài viết về hsrp

Upload: alexander

Post on 07-Jan-2016

240 views

Category:

Documents


0 download

DESCRIPTION

Bài Viết Về Hsrp

TRANSCRIPT

Bi Vit V HSRP

Bi Vit V HSRP

Tc gi L Vn Cng

I Gii Thiu C Bn V HSRP1. tng quan- Tng quan: cung cp redundancy cho mt group cc user no , ta s dng nhiu router m bo tin cy. i vi HSRP th 1 Router/Switch s c chn lm primary hay active, cc router/SWitch cn li lm standby

- Ta c th t priority cho mt cho mt group no .

2. Cu hnh c bn- HSRP bu chn da vo Priority(0 n 225), Router c priority s c chn lm active, nu priority bng nhau th router no c i ch IP trn interface HSRP cao hn s c chn lm active: vic t Priority nh sau:

Router(config-if)#standby group priority priority

- Thng thng th khi mt Router l active trong HSRP ri th cho d Router mi c Priority cao hn cng khng c chn lm active, tuy nhin ta c th cho php router c priority cao lm active vi bt k lc no.

Router(config-if)#standby group preempt

- Do cc router chy HSRP khng t ng nhn bit c khi no th cc gi ca user khng cn i ra bn ngoi c thng qua n na do m ta phI cu hnh nhn bit c, khi no th mt giao tip ca HSRP router b down khng cn kh nng chuyn traffic cho user na th n s t ng gim priority ca n xung.

Router(config-if)#standby group track type mod/num decrementvalue

Decrementvalue l gi tr ca Priority phI gim xung khi track thy mt interface no b down.

- MI cng giao tip ca HSRP ca router s c mt a ch IP ring. Tuy nhin cc Host s thy router qua mt da ch o khc l Virtual router address.

Router(config-if)#standby group ip ip-address

3. Cu hnh Load balancing- Vi cu hnh loi ny th Ta gi s c hai router chay HSRP. Ta s to ra 2 group v 2 ch IP o cho 2 group ny. Router 1 c Priority ln i vi Group th nht, v c Priority Nh hn i vi Group th hai. Do m Router 1 s l active cho group 1 v s l Standby cho group 2.

- i vi cc host th ta s cu hnh cho mt s host c default gateway l Virtual IP address ca group 1 v mt s host c default gateway l Virtual IP address ca group 2. o m ti s cn bng 2 router. Mi router s m nhim mt lng ti nht nh.

II Cu Hnh Cho S Sau:

1. show run

R1#show run

Building configuration...

Current configuration : 1150 bytes

!

version 12.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R1

!

enable password cisco

!

memory-size iomem 10

ip subnet-zero

!

no ip domain lookup

!

voice call carrier capacity active

!

mta receive maximum-recipients 0

!

interface Loopback0

ip address 192.168.4.1 255.255.255.255

!

interface FastEthernet0/0

ip address 192.168.2.1 255.255.255.0

duplex auto

speed auto

standby 10 ip 192.168.2.15

standby 20 ip 192.168.2.20

standby 20 priority 120

standby 30 ip 192.168.2.30

!

interface Serial0/0

ip address 192.168.1.5 255.255.255.252

no fair-queue

clockrate 64000

!

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

!

interface Serial0/1

no ip address

shutdown

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

ip classless

ip http server

!

access-list 1 permit 172.16.0.0 0.0.3.255

access-list 1 permit 172.16.4.0 0.0.3.255

!

call rsvp-sync

mgcp profile default

!

dial-peer cor custom

!

line con 0

logging synchronous

line aux 0

line vty 0 4

no login

end

R2#show run

Building configuration...

Current configuration : 1060 bytes

!

version 12.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R2

!

enable password cisco

!

memory-size iomem 10

ip subnet-zero

!

no ip domain lookup

!

voice call carrier capacity active

!

mta receive maximum-recipients 0

interface Loopback0

ip address 192.168.4.2 255.255.255.255

!

interface FastEthernet0/0

ip address 192.168.2.2 255.255.255.0

duplex auto

speed auto

standby 10 ip 192.168.2.15

standby 20 ip 192.168.2.20

standby 30 ip 192.168.2.30

standby 30 priority 130

standby 30 preempt

!

interface Serial0/0

ip address 192.168.1.2 255.255.255.252

no fair-queue

!

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

ip classless

ip http server

call rsvp-sync

voice-port 1/0/0

!

voice-port 1/0/1

!

mgcp profile default

!

dial-peer cor custom

!

line con 0

logging synchronous

line aux 0

line vty 0 4

no login

end

R3#show run

Building configuration...

Current configuration : 896 bytes

!

version 12.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R3

!

enable password cisco

!

memory-size iomem 10

ip subnet-zero

!

!

no ip domain lookup

ip host R2 192.168.1.2

ip host R1 192.168.1.5

!

!

voice call carrier capacity active

!

mta receive maximum-recipients 0

!

interface Loopback0

ip address 192.168.4.3 255.255.255.255

!

interface Ethernet0/0

no ip address

shutdown

half-duplex

!

interface Serial0/0

ip address 192.168.1.6 255.255.255.252

!

interface Serial0/1

ip address 192.168.1.1 255.255.255.252

clockrate 64000

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

ip classless

ip http server

!

call rsvp-sync

mgcp profile default

!

dial-peer cor custom

!

line con 0

logging synchronous

line aux 0

line vty 0 4

no login

!

!

end

2. Test show standby show standby brief

R1#show standby

FastEthernet0/0 - Group 10

State is Standby

1 state change, last state change 00:10:53

Virtual IP address is 192.168.2.15

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 0.632 secs

Preemption disabled

Active router is 192.168.2.2, priority 100 (expires in 8.452 sec)

Standby router is local

Priority 100 (default 100)

IP redundancy name is "hsrp-Fa0/0-10" (default)

FastEthernet0/0 - Group 20

State is Active

2 state changes, last state change 00:11:07

Virtual IP address is 192.168.2.20

Active virtual MAC address is 0000.0c07.ac14

Local virtual MAC address is 0000.0c07.ac14 (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 2.024 secs

Preemption disabled

Active router is local

Standby router is 192.168.2.2, priority 100 (expires in 9.724 sec)

Priority 120 (configured 120)

IP redundancy name is "hsrp-Fa0/0-20" (default)

FastEthernet0/0 - Group 30

State is Standby

1 state change, last state change 00:10:54

Virtual IP address is 192.168.2.30

Active virtual MAC address is 0000.0c07.ac1e

Local virtual MAC address is 0000.0c07.ac1e (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 2.432 secs

Preemption disabled

Active router is 192.168.2.2, priority 130 (expires in 7.252 sec)

Standby router is local

Priority 100 (default 100)

IP redundancy name is "hsrp-Fa0/0-30" (default)

R2#show standby

FastEthernet0/0 - Group 10

State is Active

2 state changes, last state change 00:11:52

Virtual IP address is 192.168.2.15

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 1.260 secs

Preemption disabled

Active router is local

Standby router is 192.168.2.1, priority 100 (expires in 7.464 sec)

Priority 100 (default 100)

IP redundancy name is "hsrp-Fa0/0-10" (default)

FastEthernet0/0 - Group 20

State is Standby

1 state change, last state change 00:11:26

Virtual IP address is 192.168.2.20

Active virtual MAC address is 0000.0c07.ac14

Local virtual MAC address is 0000.0c07.ac14 (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 0.712 secs

Preemption disabled

Active router is 192.168.2.1, priority 120 (expires in 8.828 sec)

Standby router is local

Priority 100 (default 100)

IP redundancy name is "hsrp-Fa0/0-20" (default)

FastEthernet0/0 - Group 30

State is Active

2 state changes, last state change 00:11:54

Virtual IP address is 192.168.2.30

Active virtual MAC address is 0000.0c07.ac1e

Local virtual MAC address is 0000.0c07.ac1e (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 2.928 secs

Preemption enabled, min delay 0 sec, sync delay 0 sec

Active router is local

Standby router is 192.168.2.1, priority 100 (expires in 9.132 sec)

Priority 130 (configured 130)

IP redundancy name is "hsrp-Fa0/0-30" (default)

R2#show standby

FastEthernet0/0 - Group 10

State is Active

2 state changes, last state change 00:11:55

Virtual IP address is 192.168.2.15

Active virtual MAC address is 0000.0c07.ac0a

Local virtual MAC address is 0000.0c07.ac0a (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 1.180 secs

Preemption disabled

Active router is local

Standby router is 192.168.2.1, priority 100 (expires in 7.388 sec)

Priority 100 (default 100)

IP redundancy name is "hsrp-Fa0/0-10" (default)

FastEthernet0/0 - Group 20

State is Standby

1 state change, last state change 00:11:29

Virtual IP address is 192.168.2.20

Active virtual MAC address is 0000.0c07.ac14

Local virtual MAC address is 0000.0c07.ac14 (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 0.636 secs

Preemption disabled

Active router is 192.168.2.1, priority 120 (expires in 8.752 sec)

Standby router is local

Priority 100 (default 100)

IP redundancy name is "hsrp-Fa0/0-20" (default)

FastEthernet0/0 - Group 30

State is Active

2 state changes, last state change 00:11:57

Virtual IP address is 192.168.2.30

Active virtual MAC address is 0000.0c07.ac1e

Local virtual MAC address is 0000.0c07.ac1e (default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 0.104 secs

Preemption enabled, min delay 0 sec, sync delay 0 sec

Active router is local

Standby router is 192.168.2.1, priority 100 (expires in 9.308 sec)

Priority 130 (configured 130)

IP redundancy name is "hsrp-Fa0/0-30" (default)

- Ta c th s dng lnh show standby brief

R1#show standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa0/0 10 100 Standby 192.168.2.2 local 192.168.2.15

Fa0/0 20 120 Active local 192.168.2.2 192.168.2.20

Fa0/0 30 100 Standby 192.168.2.2 local 192.168.2.30

R2#show standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa0/0 10 100 Active local 192.168.2.1 192.168.2.15

Fa0/0 20 100 Standby 192.168.2.1 local 192.168.2.20

Fa0/0 30 130 P Active local 192.168.2.1 192.168.2.30

- y th ta thy Router 1 active cho group 20 v standby cho group 30, ngc lI th Router 2 s l active cho group 30 v standby cho group 20

3. Kim tra bng Ethereal- Ta ping mt Host c default l 192.168.2.20 (thuc Group 20) trong HSRP ra ngoi ta thy n s n mt Host c virtual mac l 0000:0c07:ac14: tng ng group 20 v 14 hex l bng 20 decimal, v hai s cui cng ca Virtual mac l ly ra t Group number,

- Tng t ta s dng mt host c default gateway l 192.168.2.30 thc group 30 th ta cng c c kt q tng t. y th a ch mac la 0000:0c07:ac1e. 1e hexa bng 30 decimal

Tr li danh sch cc bi vit