日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

华为交换机综合实验

發(fā)布時間:2023/12/9 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 华为交换机综合实验 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.內(nèi)網(wǎng)IP地址為172.16.0.0/16 合理分配
2.sw1/2之間互為備份
3.vlan1流量全部走左邊,vlan2流量全部走右邊
4.使用VRRP 實(shí)現(xiàn)網(wǎng)關(guān)備份
5.使用生成樹,所有設(shè)備通過DHCP獲取地址
6.r1,sw1,sw2運(yùn)行ospf實(shí)現(xiàn)全網(wǎng)可達(dá)

Sw1 sysname sw1 # vlan batch 2 100 # stp instance 1 root primary //設(shè)置根網(wǎng)橋 stp instance 2 root secondary # dhcp enable # stp region-configuration //生成樹配置region-name ainstance 1 vlan 1 // 分組 ,每個組一個生成樹instance 2 vlan 2active region-configuration //激活配置 # ip pool vlan1gateway-list 172.16.128.3network 172.16.128.0 mask 255.255.224.0lease day 0 hour 2 minute 0dns-list 8.8.8.8 # ip pool vlan2gateway-list 172.16.96.3network 172.16.96.0 mask 255.255.224.0dns-list 114.114.114.144 114.114.114.114 # interface Vlanif1ip address 172.16.128.1 255.255.224.0vrrp vrid 1 virtual-ip 172.16.128.3vrrp vrid 1 priority 120 //優(yōu)先級越大,誰將是主網(wǎng)關(guān)vrrp vrid 1 track interface Ethernet0/0/3 reduced 30 //上行鏈路追蹤,如果檢查到該接口斷了,則優(yōu)先級減30dhcp select global # interface Vlanif2ip address 172.16.96.1 255.255.224.0vrrp vrid 1 virtual-ip 172.16.96.3vrrp vrid 1 track interface Ethernet0/0/5 reduced 30dhcp select global # interface Vlanif100 //由于華為模擬器接口改為三層時配不了地址,所以用vlan100代替ip address 172.16.32.2 255.255.224.0 # interface Eth-Trunk0port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/2port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/3port link-type accessport default vlan 100 # interface GigabitEthernet0/0/1 //把二個物理接口虛擬成一個接口eth-trunk 0 # interface GigabitEthernet0/0/2eth-trunk 0 # ospf 1silent-interface all //沉默接口,如果網(wǎng)絡(luò)中vlan很多,鏈路中會收發(fā)大量的hello包,占用大量鏈路資源,所以選擇沉默一些接口undo silent-interface Vlanif100undo silent-interface Eth-Trunk0undo silent-interface Vlanif2area 0.0.0.0network 172.16.32.2 0.0.0.0area 0.0.0.1abr-summary 172.16.0.0 255.255.0.0 //區(qū)域1路由匯總network 172.16.128.1 0.0.0.0network 172.16.96.1 0.0.0.0 Sw2 sysname sw2 # vlan batch 2 100 # stp instance 1 root secondary stp instance 2 root primary # dhcp enable # stp region-configurationregion-name ainstance 1 vlan 1instance 2 vlan 2active region-configuration # ip pool vlan1gateway-list 172.16.128.3network 172.16.128.0 mask 255.255.224.0lease day 0 hour 2 minute 0dns-list 8.8.8.8 # ip pool vlan2gateway-list 172.16.96.3network 172.16.96.0 mask 255.255.224.0dns-list 114.114.114.144 114.114.114.114 # interface Vlanif1ip address 172.16.128.2 255.255.224.0vrrp vrid 1 virtual-ip 172.16.128.3dhcp select global # interface Vlanif2ip address 172.16.96.2 255.255.224.0vrrp vrid 1 virtual-ip 172.16.96.3vrrp vrid 1 priority 120vrrp vrid 1 track interface Ethernet0/0/5 reduced 30dhcp select global # interface Vlanif100ip address 172.16.64.2 255.255.224.0 # interface Eth-Trunk0port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/2port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/3port link-type accessport default vlan 100 # interface GigabitEthernet0/0/1eth-trunk 0 # interface GigabitEthernet0/0/2eth-trunk 0 # ospf 1 router-id 2.2.2.2silent-interface allundo silent-interface Vlanif100undo silent-interface Vlanif2undo silent-interface Eth-Trunk0area 0.0.0.0network 172.16.64.2 0.0.0.0area 0.0.0.1area 0.0.0.2abr-summary 172.16.0.0 255.255.0.0network 172.16.96.2 0.0.0.0network 172.16.128.2 0.0.0.0 Sw3 sysname sw3 # vlan batch 2 # stp region-configurationregion-name ainstance 1 vlan 1instance 2 vlan 2active region-configuration # interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/2port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/3port link-type accessstp edged-port enable # interface Ethernet0/0/4port link-type accessport default vlan 2stp edged-port enable Sw4 sysname sw4 # vlan batch 2 # stp region-configurationregion-name ainstance 1 vlan 1instance 2 vlan 2active region-configuration # interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/2port link-type trunkport trunk allow-pass vlan 2 # interface Ethernet0/0/3port link-type accessstp edged-port enable # interface Ethernet0/0/4port link-type accessport default vlan 2stp edged-port enable R1 sysname r1 # acl number 2000 rule 5 permit source 172.16.0.0 0.0.255.255 # interface GigabitEthernet0/0/0ip address 172.16.32.1 255.255.224.0 # interface GigabitEthernet0/0/1ip address 10.1.1.1 255.255.255.0 nat outbound 2000 # interface GigabitEthernet0/0/2ip address 172.16.64.1 255.255.224.0 # ospf 1 router-id 1.1.1.1 default-route-advertise //下放本地靜態(tài)缺省area 0.0.0.0 network 10.1.1.0 0.0.0.255 network 172.16.0.0 0.0.255.255 network 172.16.32.0 0.0.0.255 network 172.16.64.1 0.0.0.0 # ip route-static 0.0.0.0 0.0.0.0 10.1.1.2R2 sysname LSP # interface GigabitEthernet0/0/0ip address 10.1.1.2 255.255.255.0 # interface LoopBack0ip address 2.2.2.2 255.255.255.0

總結(jié)

以上是生活随笔為你收集整理的华为交换机综合实验的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。