VRRP与VLAN实验(HuaWei)
生活随笔
收集整理的這篇文章主要介紹了
VRRP与VLAN实验(HuaWei)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
? ? 虛擬路由冗余協議(VRRP):是由IETF提出的解決局域網中配置靜態網關出現單點失效現象的路由協議。? ? 通俗點說就是:當局域網中某臺主機網關所對應的路由器接口出現故障時。主機還是可以訪問互聯網(因為在局域網中對這臺主機的網關做了備份----即使用了VRRP協議)
實驗要求:
使VLAN10中的PC1和VLAN20中的PC2能夠ping通主機PC3,且vlan10和valn20中的主機能夠互通。
PC1和PC2的網關都使用虛擬網關(見拓撲圖),并且當交換機S3的GE0/0/3口出現故障時,PC1也能和PC2,PC3通信。
在S1和S2中配置VRRP(選擇性關閉“搶占模式”)。且要配置VRRP認證。
實驗拓撲:
實驗思路:
路由器要有分別去往PC1和PC2的路由。S1和S2也要有去往PC3的路由
S1和S2的vlan1要配置與之路由器接口對應的IP地址。
虛擬網關IP的網段要與所在的vlanID的網段一致。
同一個VRRP備份組的認證方式和密碼要一致。
實驗配置:
[Huawei]sysn?R1 [R1]inter?g0/0/2 [R1-GigabitEthernet0/0/2]ip?add?3.3.3.1?24 [R1-GigabitEthernet0/0/1]ip?add?192.168.1.1?24 [R1-GigabitEthernet0/0/0]ip?add?192.168.2.1?24 [R1]ip?route-static?172.16.1.0?24?192.168.1.2 [R1]ip?route-static?172.31.1.0?24?192.168.2.2[S1]vlan?batch?10?20 [S1]inter?g0/0/3 [S1-GigabitEthernet0/0/3]port?link-type?trunk? [S1-GigabitEthernet0/0/3]port?trunk?allow-pass?vlan?all [S1-GigabitEthernet0/0/3]inter?g0/0/4 [S1-GigabitEthernet0/0/1]port?link-type?trunk? [S1-GigabitEthernet0/0/1]port?trunk?allow-pass?vlan?all [S1]ip?route-static?3.3.3.0?24?192.168.1.1????????去往PC3?的路由 [S1]interface?Vlanif?1 [S1-Vlanif1]ip?add?192.168.1.2?24????????與對端路由器接口IP一個網段 [S1]interface?Vlanif?10 [S1-Vlanif10]ip?address?172.16.1.3?24 [S1-Vlanif10]vrrp?vrid?10?virtual-ip?172.16.1.1??????虛擬網關IP一定要與vlan10的IP同一個網段 [S1-Vlanif10]vrrp?vrid?10?priority?120?????????使其成為master [S1-Vlanif10]vrrp?vrid?10?authentication-mode?md5?huawei??????配置VRRP認證(密碼:huawei) [S1-Vlanif10]inter?vlan?20 [S1-Vlanif20]ip?add?172.31.1.4?24???????????注意一定要為vlan20配置一個IP地址 [S1-Vlanif20]vrrp?vrid?20?virtual-ip?172.31.1.1 [S1-Vlanif20]vrrp?vrid?20?authentication-mode?md5?huawei [S1-Vlanif20]vrrp?vrid?20?preempt-mode?disable?關閉S1中VRRP備份組20的搶占模式[S2]vlan?batch?10?20 [S2]inter?g0/0/4 [S2-GigabitEthernet0/0/4]port?link-type?trunk? [S2-GigabitEthernet0/0/4]port?trunk?allow-pass?vlan?all [S2-GigabitEthernet0/0/4]inter?g0/0/1 [S2-GigabitEthernet0/0/1]port?link-type?trunk? [S2-GigabitEthernet0/0/1]port?trunk?allow-pass?vlan?all [S2]ip?route-static?3.3.3.0?24?192.168.2.1 [S2]interface?Vlanif?1 [S2-Vlanif1]ip?add?192.168.2.2?24 [S2]interface?Vlanif?10 [S2-Vlanif10]ip?add?172.16.1.4?24 [S2-Vlanif10]vrrp?vrid?10?virtual-ip?172.16.1.1 [S2-Vlanif10]vrrp?vrid?10?preempt-mode?disable? [S2-Vlanif10]vrrp?vrid?10?authentication-mode?md5?huawei [S2-Vlanif10]inter?vlan?20 [S2-Vlanif20]ip?add?172.31.1.1?24 [S2-Vlanif20]vrrp?vrid?20?virtual-ip?172.31.1.1 [S2-Vlanif20]vrrp?vrid?20?priority?120 [S2-Vlanif20]vrrp?vrid?20?authentication-mode?md5?huawei[Huawei]sysn?S3 [S3]vlan?batch?10?20 [S3]inter?g0/0/1 [S3-GigabitEthernet0/0/1]port?link-type?access? [S3-GigabitEthernet0/0/1]port?default?vlan?10 [S3-GigabitEthernet0/0/1]inter?g0/0/2 [S3-GigabitEthernet0/0/2]port?link-type?access? [S3-GigabitEthernet0/0/2]por?de?vla?20 [S3-GigabitEthernet0/0/2]inter?g0/0/3 [S3-GigabitEthernet0/0/3]port?link-type?trunk? [S3-GigabitEthernet0/0/3]port?trunk?allow-pass?vlan?all? [S3-GigabitEthernet0/0/2]inter?g0/0/4 [S3-GigabitEthernet0/0/4]port?link-type?trunk? [S3-GigabitEthernet0/0/4]port?trunk?allow-pass?vlan?all實驗驗證:
轉載于:https://blog.51cto.com/ruisir/1983339
總結
以上是生活随笔為你收集整理的VRRP与VLAN实验(HuaWei)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python连接mysql数据库并实现增
- 下一篇: Blogengine-BlogRoll的