使用HCL模擬器配置vrrp

2021-09-27 05:22:40 字數 3357 閱讀 4480

vrrp單備份組配置舉例

組網需求

• • host a 需要訪問 internet 上的 host b,host a 的預設閘道器為 10.1.1.111/24;

• • 當 switch a 正常工作時,host a 傳送給 host b 的報文通過 switch a **;當 switch a 出現

故障時,host a 傳送給 host b 的報文通過 switch b **。

配置步驟

注:intranetswitch僅起交換作用,在這個例子裡不用做配置

(1) 配置 switch a

配置 vlan2。

system-view

[switcha] vlan 2

[switcha-vlan2] port gigabitethernet 1/0/11

[switcha-vlan2] quit

[switcha] inte***ce vlan-inte***ce 2

[switcha-vlan-inte***ce2] ip address 10.1.1.1 255.255.255.0

[switcha-vlan-inte***ce2]quit

[switcha] vlan 3

[switcha-vlan3] port gigabitethernet 1/0/13

[switcha-vlan3] quit

[switcha] inte***ce vlan-inte***ce 3

[switcha-vlan-inte***ce3] ip address 10.1.3.1 255.255.255.0

[switcha-vlan-inte***ce3]quit

[switcha]ip route-static 0.0.0.0 0 10.1.3.2

建立備份組 1,並配置備份組 1 的虛擬 ip 位址為 10.1.1.111。

[switcha]inter vlan 2

[switcha-vlan-inte***ce2] vrrp vrid 1 virtual-ip 10.1.1.111

設定 switch a 在備份組 1 中的優先順序為 110,高於 switch b 的優先順序 100,以保證 switch a 成

為 master 負責**流量。

[switcha-vlan-inte***ce2] vrrp vrid 1 priority 110

設定 switch a 工作在搶占方式,以保證 switch a 故障恢復後,能再次搶占成為 master,即只要

switch a 正常工作,就由 switch a 負責**流量。為了避免頻繁地進行狀態切換,配置搶占延遲時

間為 5 秒。

[switcha-vlan-inte***ce2] vrrp vrid 1 preempt-mode delay 500

(2) 配置 switch b

配置 vlan2。

system-view

[switchb] vlan 2

[switchb-vlan2] port gigabitethernet 1/0/12

[switchb-vlan2] quit

[switchb] inte***ce vlan-inte***ce 2

[switchb-vlan-inte***ce2] ip address 10.1.1.2 255.255.255.0

[switchb-vlan-inte***ce2]quit

[switchb] vlan 3

[switchb-vlan3] port gigabitethernet 1/0/14

[switchb-vlan3] quit

[switchb] inte***ce vlan-inte***ce 3

[switchb-vlan-inte***ce3] ip address 10.1.4.1 255.255.255.0

[switchb-vlan-inte***ce3]quit

[switchb]ip route-static 0.0.0.0 0 10.1.4.2

建立備份組 1,並配置備份組 1 的虛擬 ip 位址為 10.1.1.111。

[switchb] inte***ce vlan-inte***ce 2

[switchb-vlan-inte***ce2] vrrp vrid 1 virtual-ip 10.1.1.111

設定 switch b 在備份組 1 中的優先順序為 100。

[switchb-vlan-inte***ce2] vrrp vrid 1 priority 100

設定 switch b 工作在搶占方式,搶占延遲時間為 5 秒。

[switchb-vlan-inte***ce2] vrrp vrid 1 preempt-mode delay 500

(3) 配置 switch c配置 vlan2。

system-view

[switchc] inter g 1/0/13

[switchc-gigabitethernet1/0/13]port link-mode route

[switchc-gigabitethernet1/0/13]ip add 10.1.3.2 24

[switchc-gigabitethernet1/0/13]undo shut

[switchc-gigabitethernet1/0/13]quit

[switchc] inter g 1/0/14

[switchc-gigabitethernet1/0/14]port link-mode route

[switchc-gigabitethernet1/0/14]ip add 10.1.4.2 24

[switchc-gigabitethernet1/0/14]undo shut

[switchc-gigabitethernet1/0/14]quit

[switchc] vlan 2

[switchc-vlan2] port gigabitethernet 1/0/1

[switchc-vlan2] quit

[switchc] inte***ce vlan-inte***ce 2

[switchc-vlan-inte***ce2] ip address 10.1.2.2 255.255.255.0

[switchc-vlan-inte***ce2]quit

[switchc]ip route 10.1.1.0 24 10.1.3.1

[switchc]ip route 10.1.1.0 24 10.1.4.1

驗證配置

配置完成後,在 host a上可以 ping通 host b。通過 display vrrp verbose 命令檢視配置後的結果顯示 switch a 上備份組 1 的詳細資訊。

HCL模擬器配置DHCP

實驗1 實驗拓撲 配置步驟 在路由器上配置 1 配置介面的 ip 位址。system view h3c inte ce g 0 0 h3c gigabitethernet0 0 ip address 192.168.1.254 24 h3c gigabitethernet0 0 quit 2 啟用 ...

使用HCL模擬器配置DHCP相關專案

實驗3 配置dhcp snooping用於隔絕不信任的埠。實驗拓撲圖如下 dhcp伺服器在路由器上,而swa上有3個vlan,分屬於3個不同網段,dhcp的請求報文是廣播,因此必須在swa上設定中繼才能夠傳到路由器。偽dhcp server已經配置好,將發布172.22.1.1 99的位址池,閘道器...

Genymotion模擬器配置與使用

1.註冊模擬器賬號,並按照指引啟用賬號 此過程中提示商業用還是個人使用,商業使用需要有註冊碼,個人使用不需要註冊碼,我選擇的是個人使用。安裝過程中一定記得要安裝oracle vm virture box虛擬裝置,否則不能執行genymotion模擬器 3.設定genymotion 安裝完成後,開啟g...