از بهترین دورههای آموزشی با قیمتی استثنایی بهرهمند شوید.
همین الان شروع کن!در سری سناریو های سیسکو امروز می خواهیم به آموزش راه اندازی HSRP بپردازیم. ابتدا سناریو را تشریح می کنیم و روش حل مسئله را باز می کنیم و با هم این سناریو را انجام می دهیم : سناریو زیر را طبق خواسته ها انجام دهید :
خب ما کلا" قراره تو سناریوهای این تیپی فقط کانفیگ کنیم و هیچ توضیح اضافه ای هم ندیم.
قدم به قدم بریم جلو
قسمت اول
R1# R1#!R1 R1#EN R1#CONF T Enter configuration commands, one per line. End with CNTL/Z. R1(config)#INT ETH 0/0 R1(config-if)#NO SHUT R1(config-if)# R1(config-if)#INT ETH 0/1 R1(config-if)#NO SHUT R1(config-if)# R1(config-if)#INT ETH 0/1.2 R1(config-subif)#ENCAPSULATION DOT1Q 2 R1(config-subif)#IP ADD 192.168.2.10 255.255.255.0 R1(config-subif)# R1(config-subif)#INT ETH 0/1.4 R1(config-subif)#ENCAPSULATION DOT1Q 4 R1(config-subif)#IP ADD 192.168.4.10 255.255.255.0 R1(config-subif)# R1(config-subif)#
R2# R2#EN R2#CONF T R2(config)#INT ETH 0/0 R2(config-if)#NO SHUT R2(config-if)#INT ETH 0/2.2 R2(config-subif)#ENCAPSULATION DOT1Q 2 R2(config-subif)#IP ADD 192.168.2.11 255.255.255.0 R2(config-subif)# R2(config-subif)#INT ETH 0/2.4 R2(config-subif)#ENCAPSULATION DOT1Q 4 R2(config-subif)#IP ADD 192.168.4.11 255.255.255.0
R1#SHOW IP INT BRief Interface IP-Address OK? Method Status Protocol Ethernet0/1.2 192.168.2.10 YES manual up up Ethernet0/1.4 192.168.4.10 YES manual up up R2#SHOW IP INT BRief Interface IP-Address OK? Method Status Protocol Ethernet0/2.2 192.168.2.11 YES manual up up Ethernet0/2.4 192.168.4.11 YES manual up up
PC1# PC1#!PC1 PC1#EN PC1#CONF T Enter configuration commands, one per line. End with CNTL/Z. PC1(config)# PC1(config)#INT ETH 1/0 PC1(config-if)#NO SHUT PC1(config-if)#IP ADD 192.168.2.20 255.255.255.0 PC1(config-if)# PC1(config-if)#IP ROUTE 0.0.0.0 0.0.0.0 192.168.2.1 PC1(config)#
PC2# PC2#!PC2 PC2#EN PC2#CONF T Enter configuration commands, one per line. End with CNTL/Z. PC2(config)# PC2(config)#INT ETH 1/1 PC2(config-if)#IP ADD 192.168.4.20 255.255.255.0 PC2(config-if)#NO SHUT PC2(config-if)# PC2(config-if)#IP ROUTE 0.0.0.0 0.0.0.0 192.168.4.1 PC2(config)#EXIT PC2# *Apr 16 06:27:03.176: %SYS-5-CONFIG_I: Configured from console by console PC2# *Apr 16 06:27:05.081: %LINK-3-UPDOWN: Interface Ethernet1/1, changed state to up *Apr 16 06:27:06.093: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/1, changed state to up PC2#
SW# SW#!SW SW#EN SW#CONF T SW(config)# SW(config)#INT ETH 0/1 SW(config-if)#SWITCHPORT TRUNK ENCAPSULATION DOT1Q SW(config-if)#SWITCHPORT MODE TRUNK SW(config-if)# SW(config-if)#INT ETH 0/2 SW(config-if)#SWITCHPORT TRUNK ENCAPSULATION DOT1Q SW(config-if)#SWITCHPORT MODE TRUNK SW(config-if)# SW(config-if)#VLAN 2 SW(config-vlan)#VLAN 4 SW(config-vlan)# SW(config-vlan)#INT ETH 1/0 SW(config-if)#SWITCHPORT SW(config-if)#SWITCHPORT MODE ACCESS SW(config-if)#SWITCHPORT ACCESS VLAN 2 SW(config-if)# SW(config-if)#INT ETH 1/1 SW(config-if)#SWITCHPORT SW(config-if)#SWITCHPORT MODE ACCESS SW(config-if)#SWITCHPORT ACCESS VLAN 4 SW(config-if)#
2.از ما خواسته شد که اولا HSRP کانفیگ کنیم و همچنین مبحث LOAD-BALANCING را هم داشته باشیم :
R1(config)# R1(config)#INT ETH 0/1.2 R1(config-subif)#STANDBY 2 IP 192.168.2.1 R1(config-subif)#STANDBY 2 PREEMPT R1(config-subif)#STANDBY 2 PRIORITY 200 R1(config-subif)# R1(config-subif)#INT ETH 0/1.4 R1(config-subif)#STANDBY 4 IP 192.168.4.1 R1(config-subif)#STANDBY 4 PREEMPT R1(config-subif)#STANDBY 4 PRIORITY 150 R1(config-subif)#
R2(config)# R2(config)#INT ETH 0/2.2 R2(config-subif)#STANDBY 2 IP 192.168.2.1 R2(config-subif)#STANDBY 2 PREEMPT R2(config-subif)#STANDBY 2 PRIORITY 150 R2(config-subif)# R2(config-subif)#INT ETH 0/2.4 R2(config-subif)#STANDBY 4 IP 192.168.4.1 R2(config-subif)#STANDBY 4 PRIORITY 200 R2(config-subif)#STANDBY 4 PREEMPT R2(config-subif)#
3.در ادامه از ما خواسته شد که : در هر 2 سمت TRACK بنویسید که در صورت از کار افتادن لینک پشت روتر طرف مقابل ، روتر دیگر بلافاصله ACTIVE شود.
R1(config)# R1(config)#TRACK 1 INT ETH 0/0 LINE-PR R1(config-track)# R1(config-track)#INT ETH 0/1.2 R1(config-subif)#STANDBY 2 TRACK 1 DECREMENT 100 R1(config-subif)# R1(config-subif)#INT ETH 0/1.4 R1(config-subif)#STANDBY 4 TRACK 1 DECREMENT 100 R1(config-subif)# R1(config-subif)#
R2(config)# R2(config)#TRACK 2 INT ETH 0/0 LINE-PR R2(config-track)# R2(config-track)#INT ETH 0/2.2 R2(config-subif)#STANDBY 2 TRACK 2 DECREMENT 100 R2(config-subif)# R2(config-subif)# R2(config-subif)#INT ETH 0/2.4 R2(config-subif)#STANDBY 4 TRACK 2 DECREMENT 100 R2(config-subif)#
حالا آنچه را که خواسته شد بررسی می کنیم :
R1# R1#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/1.2 2 200 P Active local 192.168.2.11 192.168.2.1 Et0/1.4 4 150 P Standby 192.168.4.11 local 192.168.4.1 R1# R1# R2# R2#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/2.2 2 150 P Standby 192.168.2.10 local 192.168.2.1 Et0/2.4 4 200 P Active local 192.168.4.10 192.168.4.1 R2# R2# R1(config)#INT ETH 0/0 R1(config-if)#SHUT R1(config-if)#EXIT R1(config)#EXIT R1# R1# R1#CONF T R1#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/1.2 2 100 P Standby 192.168.2.11 local 192.168.2.1 Et0/1.4 4 150 P Standby 192.168.4.11 local 192.168.4.1 R1# R2# R2#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/2.2 2 150 P Active local 192.168.2.10 192.168.2.1 Et0/2.4 4 200 P Active local 192.168.4.10 192.168.4.1 R2# R1(config)#INT ETH 0/0 R1(config-if)#NO SHUT R1(config-if)#EXIT R1(config)#EXIT R1# R1# R1#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/1.2 2 200 P Active local unknown 192.168.2.1 Et0/1.4 4 150 P Standby 192.168.4.11 local 192.168.4.1 R1# R2(config)#INT ETH 0/0 R2(config-if)#SHUTdown R2# R2#SHOW STANdby BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/2.2 2 50 P Standby 192.168.2.10 local 192.168.2.1 Et0/2.4 4 100 P Speak 192.168.4.10 unknown 192.168.4.1 R2# R2# R2# R2#SHOW STANdby BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/2.2 2 50 P Standby 192.168.2.10 local 192.168.2.1 Et0/2.4 4 100 P Standby 192.168.4.10 local 192.168.4.1 R2# R2(config)#INT ETH 0/0 R2(config-if)#NO SHUT R2(config-if)# R2(config-if)# R2# R2# R2#SHOW STANdby BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/2.2 2 150 P Standby 192.168.2.10 local 192.168.2.1 Et0/2.4 4 200 P Active local unknown 192.168.4.1 R2# R2# R1# R1#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/1.2 2 200 P Active local 192.168.2.11 192.168.2.1 Et0/1.4 4 150 P Standby 192.168.4.11 local 192.168.4.1 R1# R1#
در انتها از ما خواسته شد بین روتر ها احراز هویت انجام گیرد :
R1(config)#INT ETH 0/1.2 R1(config-subif)#STANDBY 2 AUTHENTICATION MD5 KEY-STRING CISCO R1(config-subif)# R1(config-subif)#INT ETH 0/1.4 R1(config-subif)#STANDBY 2 AUTHENTICATION MD5 KEY-STRING CISCO R1(config-subif)# R2(config)# R2(config)# R2(config)#INT ETH 0/2.2 R2(config-subif)#STANDBY 2 AUTHENTICATION MD5 KEY-STRING CISCO R2(config-subif)# R2(config-subif)# R2(config-subif)# R2(config-subif)#INT ETH 0/2.4 R2(config-subif)#STANDBY 2 AUTHENTICATION MD5 KEY-STRING CISCO R2(config-subif)# R1# R1#SHOW STANDBY BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/1.2 2 200 P Active local 192.168.2.11 192.168.2.1 Et0/1.4 4 150 P Standby 192.168.4.11 local 192.168.4.1 R1# R1# R2# R2# R2#SHOW STANdby BRief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Et0/2.2 2 150 P Standby 192.168.2.10 local 192.168.2.1 Et0/2.4 4 200 P Active local 192.168.4.10 192.168.4.1 R2# R2#
کارشناس ارشد سیسکو
صادق شعبانی ( هکر قانونمند ، مهندس مایکروسافت ، کارشناس ارشد سیسکو ) : انسانی که کنار میکشه هیچوقت پیروز نمیشه و انسانی که پیروز میشه هیچوقت کنار نمی کشه.
زمان پاسخ گویی روز های شنبه الی چهارشنبه ساعت 9 الی 18
فقط به موضوعات مربوط به محصولات آموزشی و فروش پاسخ داده می شود