最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

乾頤堂安德CCIEv5.0實(shí)驗(yàn)指南:STP中通過(guò)Port-priority完成Vlan間流量的負(fù)載均衡

2020-03-18 11:08 作者:乾頤堂  | 我要投稿

第39章 通過(guò)Port-priority完成Vlan間流量的負(fù)載均衡

39.1 理論基礎(chǔ)

在交換網(wǎng)絡(luò)中,通常在匯聚層會(huì)做主根和備份根完成冗余。假設(shè)兩臺(tái)設(shè)備分別為SW1和SW2,而網(wǎng)絡(luò)中有兩個(gè)VLAN,vlan10和vlan 100,很多時(shí)候會(huì)把SW1做為vlan10的主根,同時(shí)作為vlan100的備份根(secondary root),相反的SW2做為vlan100的主根,作為vlan10 的備份根。

本文檔講述的是在兩條trunk鏈路上應(yīng)用port-priority對(duì)不同vlan的流量做負(fù)載的情況,即端口優(yōu)先級(jí)的用法

讓我們講回生成樹(shù),當(dāng)我們的根已經(jīng)確定下來(lái)的時(shí)候,非根交換機(jī)通過(guò)兩條trunk鏈路連接到根,在非根交換機(jī)上有且只有一個(gè)根端口,如何選舉:選出一條到達(dá)根的最小開(kāi)銷(xiāo)的鏈路(但此時(shí)兩條trunk鏈路cost同為19);接下來(lái)通過(guò)最小的發(fā)送者的Bridge ID(2字節(jié)優(yōu)先級(jí)+6字節(jié)的MAC地址組成)選舉,但是此時(shí)發(fā)送者是同一臺(tái)交換機(jī),Bridge ID相同,無(wú)法選出;

最后最小的Port ID(由端口優(yōu)先級(jí)+Port ID組成)優(yōu)選,這將是我們研究的內(nèi)容。需要注意的是分為默認(rèn)的發(fā)送者的端口ID以及根設(shè)備上收到的端口ID(見(jiàn)上一章生成樹(shù)操作部分)

不得不說(shuō)的是,這是RS CCIE考試中經(jīng)常遇到的題目之一

其在MST模式下的命令格式如下

spanning-tree ? mst instance_id port-priority priority

本實(shí)驗(yàn)演示vlan中的配置命令

39.2 拓?fù)涿枋?/h1>

SW1和SW2之間Trunk鏈路,Sw1為兩個(gè)VLAN的根,兩個(gè)Vlan:Vlan 10和Vlan 100

圖39-1 修改STP參數(shù)

39.3 實(shí)驗(yàn)步驟

39.3.1 完成Vlan和Trunk的配置

在Sw1和Sw2上分別做如下配置

SW2(config)#vlan ? 10

SW2(config-vlan)#vlan

SW2(config-vlan)#vlan ? 100

!

SW2(config)#int ? range f0/5 - 6

SW2(config-if-range)# ? switchport trunk encapsulation dot1q

SW2(config-if-range)# ? switchport mode trunk

?

SW2#show interfaces trunk

?

Port??????? Mode????? ???????Encapsulation? Status??????? Native vlan

Fa0/5?????? on?????????????? 802.1q???????? trunking????? 1

Fa0/6?????? on?????????????? 802.1q???????? trunking????? 1

?

Port??????? Vlans allowed on trunk

Fa0/5?????? 1-4094

Fa0/6?????? 1-4094

?

把SW1和SW2的10口劃入Vlan 100

SW2(config)#int f0/10

SW2(config-if)#switchport mode access

SW2(config-if)#switchport access vlan 100

驗(yàn)證:

SW2#show vlan brief

?

VLAN Name???????????????????????????? Status??? Ports

---- -------------------------------- --------- -------------------------------

1??? default????????????????????????? active??? Fa0/1, Fa0/3, Fa0/4, Fa0/7

??????????????????????????????????????????????? Fa0/8, Fa0/9, Fa0/11, Fa0/12

??????????????????????????????????????????????? Fa0/13, Fa0/14, Fa0/15, Fa0/16

??????? ????????????????????????????????????????Fa0/17, Fa0/18, Fa0/19, Fa0/20

??????????????????????????????????????????????? Fa0/21, Fa0/22, Fa0/23, Fa0/24

??????????????????????????????????????????????? Gi0/1, Gi0/2

10?? VLAN0010???????????????????????? active???

100? VLAN0100???????????????????????? active??? Fa0/10

39.3.2 把SW1配置成為Vlan10和vlan100的根

來(lái)看默認(rèn)的情況

SW1(config)#spanning-tree ? vlan 100 priority 0

SW1(config)#spanning-tree ? vlan 10 priority 0

?

兩臺(tái)路由器上在相應(yīng)接口配置地址

驗(yàn)證:

R1#ping 10.1.1.2

?

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

最主要的是驗(yàn)證生成樹(shù)的情況:

SW1#? sh spanning-tree vlan 100

?

VLAN0100

? Spanning tree enabled protocol ieee

? Root ID??? Priority??? 100

???????????? Address???? 9caf.ca47.8c00

???????????? This bridge is the root

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

?

? Bridge ID? Priority??? 100??? (priority 0 sys-id-ext 100)

???????????? Address???? 9caf.ca47.8c00

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

???????????? Aging Time? 15? sec

?

Interface?????????? Role Sts Cost????? Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa0/5?????????????? Desg FWD 19??????? 128.7??? P2p ---sw1是根交換機(jī),所以其接口都為轉(zhuǎn)發(fā)狀態(tài)

Fa0/6?????????????? Desg FWD 19??????? 128.8??? P2p

Fa0/10????????????? Desg FWD 19??????? 128.12?? P2p

?

查看SW2的情況:

SW2#sh spanning-tree vlan 100

?

VLAN0100

? Spanning tree enabled protocol ieee

? Root ID??? Priority??? 100

???????????? Address???? 9caf.ca47.8c00

???????????? Cost??????? 19

???????????? Port??????? 5 (FastEthernet0/5)

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

?

? Bridge ID? Priority??? 32868? (priority 32768 sys-id-ext 100)

???????????? Address???? 0016.9dd7.5180

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

???????????? Aging Time 15

?

Interface?????????? Role Sts Cost????? Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa0/5?????????????? Root FWD 19??????? 128.5??? P2p

Fa0/6?????????????? Altn BLK 19??????? 128.6??? P2p---就像我們前邊分析的一樣,根據(jù)cost(19)和BID無(wú)法選出根端口,此時(shí)的情況是由于默認(rèn)情況下6口的port id大于5口的端口ID ,也就是說(shuō)現(xiàn)在VLAN100的流量經(jīng)過(guò)的是F0/5

?Fa0/10????????????? Desg FWD 19??????? 128.10?? P2p Edge

如果此時(shí)VLAN10也有流量的話,其實(shí)也是經(jīng)過(guò)f0/5的,我們查看spanning的情況:

?

SW2#sh spanning-tree vlan 10

?

VLAN0010

? Spanning tree enabled protocol ieee

? Root ID??? Priority??? 10

????? ???????Address???? 9caf.ca47.8c00

???????????? Cost??????? 19

???????????? Port??????? 5 (FastEthernet0/5)

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

?

? Bridge ID? Priority??? 32778? (priority 32768 sys-id-ext 10)

???????????? Address???? 0016.9dd7.5180

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

???????????? Aging Time 300

Interface?????????? Role Sts Cost????? Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa0/5?????????????? Root FWD 19??????? 128.5??? P2p

Fa0/6?????????????? Altn BLK 19??????? 128.6??? P2p

39.3.3 通過(guò)修改Cost值或者port-priority可以做到Vlan間的負(fù)載均衡

不過(guò)兩者的不同之處是port-priority在根上修改來(lái)影響,端口的Cost在非根上修改,這一點(diǎn)我們?cè)谏弦徽轮v解STP對(duì)比過(guò)程時(shí)的最后一步提及

SW1(config)#int ? f0/6

SW1(config-if)#spanning-tree ? vlan 100 port-priority ?

? <0-240>? port priority in increments of 16

對(duì)端口優(yōu)先級(jí)來(lái)說(shuō),默認(rèn)是128,越小越優(yōu)先

SW1(config-if)#spanning-tree ? vlan 100 port-priority 0

我們針對(duì)vlan100修改了優(yōu)先級(jí)0,那么此時(shí)f0/6會(huì)由阻塞變?yōu)檗D(zhuǎn)發(fā)

?

?

SW2#sh spanning-tree vlan 100

?

Interface? ?????????Role Sts Cost????? Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa0/5?????????????? Altn BLK 19??????? 128.5??? P2p

Fa0/6?????????????? Root FWD 19??????? 128.6??? P2p

Fa0/10????????????? Desg FWD 19??????? 128.10?? P2p Edge

我們?cè)诰唧w的查看一下SW1:

SW1#sh spanning-tree interface f0/6 detail

?Port 8 (FastEthernet0/6) of VLAN0010 is designated forwarding

?? Port path cost 19, Port priority 128, Port Identifier 128.8.

?? Designated root has priority 10, address 9caf.ca47.8c00

?? Designated bridge has priority 10, address 9caf.ca47.8c00

?? Designated port id is 128.8, designated path cost 0

?? Timers: message age 0, forward delay 0, hold 0

?? Number of transitions to forwarding state: 2

?? Link type is point-to-point by default

?? BPDU: sent 533, received 153

?

?Port 8 (FastEthernet0/6) of VLAN0100 is designated forwarding

?? Port path cost 19, Port priority 0, Port Identifier?? 0.8.

?? Designated root has priority 100, address 9caf.ca47.8c00

?? Designated bridge has priority 100, address 9caf.ca47.8c00

?? Designated port id is 0.8, designated path cost 0

?? Timers: message age 0, forward delay 0, hold 0

?? Number of transitions to forwarding state: 1

?? Link type is point-to-point by default

?? BPDU: sent 476, received 2

此時(shí)如果有Vlan10 的流量,那么是經(jīng)過(guò)5口轉(zhuǎn)發(fā)的:

SW2#sh spanning-tree vlan 10

Interface?????????? Role Sts Cost????? Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa0/5???????? ??????Root FWD 19??????? 128.5??? P2p

Fa0/6?????????????? Altn BLK 19??????? 128.6??? P2p

?

自然也可以通過(guò)修改非根設(shè)備的cost來(lái)做到這種效果,我們演示一下vlan10的情況:

SW2(config-if)#int ? f0/6

SW2(config-if)# ? spanning-tree vlan 10 cost 1---自然我們要把cost改小,那么將優(yōu)選該接口

?

SW2#show spanning-tree vlan 10

?

VLAN0010

? Spanning tree enabled protocol ieee

? Root ID??? Priority??? 10

???????????? Address???? 9caf.ca47.8c00

???????????? Cost??????? 1

???????????? Port??????? 6 (FastEthernet0/6)

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

?

? Bridge ID? Priority??? 32778? (priority 32768 sys-id-ext 10)

???????????? Address???? 0016.9dd7.5180

???????????? Hello Time?? 2 sec? Max Age 20 sec? Forward Delay 15 sec

???????????? Aging Time 300

?

Interface?????????? Role Sts Cost????? Prio.Nbr Type

------------------- ---- --- --------- -------- --------------------------------

Fa0/5?????????????? Altn BLK 19??????? 128.5??? P2p

Fa0/6?????????????? Root FWD 1???????? 128.6??? P2p

實(shí)驗(yàn)完成

乾頤堂安德CCIEv5.0實(shí)驗(yàn)指南:STP中通過(guò)Port-priority完成Vlan間流量的負(fù)載均衡的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
横峰县| 钟山县| 扎赉特旗| 宁南县| 漳州市| 鄄城县| 松潘县| 临邑县| 安平县| 陇西县| 佛学| 抚宁县| 西华县| 汶上县| 金塔县| 吴忠市| 县级市| 吴江市| 郑州市| 南投县| 久治县| 乌海市| 乐东| 宁化县| 纳雍县| 临安市| 轮台县| 绥江县| 铜陵市| 于都县| 孝昌县| 永宁县| 灵武市| 沈阳市| 勐海县| 两当县| 万山特区| 新宾| 黄浦区| 彭泽县| 衡阳县|