自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

三層交換機(jī)負(fù)載均衡的接口配置過程

網(wǎng)絡(luò) 路由交換
本文主要向大家介紹了三層交換機(jī)負(fù)載均衡的配置的全過程,首先是一些基礎(chǔ)的命令的呈現(xiàn),這是配置的基礎(chǔ),初學(xué)者不妨深刻理解一下,繼而才可以完成后面的工作,認(rèn)真仔細(xì)的按照步驟進(jìn)行吧。

三層交換機(jī)配置——配置一組二層端口

  1. configure terminal 進(jìn)入配置狀態(tài)
  2. nterface range {port-range} 進(jìn)入組配置狀態(tài)

三層交換機(jī)配置——配置三層端口

  1. configure terminal 進(jìn)入配置狀態(tài)
  2. interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 進(jìn)入端口配置狀態(tài)
  3. no switchport 把物理端口變成三層口
  4. ip address ip_address subnet_mask 配置IP地址和掩碼
  5. no shutdown 激活端口

例:

  1. Switch(config)# interface gigabitethernet0/2
  2. Switch(config-if)# no switchport
  3. Switch(config-if)# ip address 192.20.135.21 255.255.255.0
  4. Switch(config-if)# no shutdown

三層交換機(jī)配置——配置VLAN

  1. configure terminal 進(jìn)入配置狀態(tài)
  2. vlan vlan-id 輸入一個(gè)VLAN號(hào), 然后進(jìn)入vlan配態(tài),可以輸入一個(gè)新的VLAN號(hào)或舊的來進(jìn)行修改
  3. name vlan-name 可選)輸入一個(gè)VLAN名,如果沒有配置VLAN名,缺省的名字是VLAN號(hào)前面用0填滿的4位數(shù),如VLAN0004是VLAN4的缺省名字
  4. mtu mtu-size (可選) 改變MTU大小

 

 

例:

 

  1. Switch# configure terminal
  2. Switch(config)# vlan 20
  3. Switch(config-vlan)# name test20
  4. Switch(config-vlan)# end
  5. Switch# vlan database
  6. Switch(vlan)# vlan 20 name test20
  7. Switch(vlan)# exit

三層交換機(jī)配置——端口分配給一個(gè)VLAN

  1. configure terminal 進(jìn)入配置狀態(tài)
  2. interface interface-id 進(jìn)入要分配的端口
  3. switchport mode access 定義二層口
  4. switchport access vlan vlan-id 把端口分配給某一VLAN

例:

  1. Switch# configure terminal
  2. Enter configuration commands, one per line. End with CNTL/Z.
  3. Switch(config)# interface fastethernet0/1
  4. Switch(config-if)# switchport mode access
  5. Switch(config-if)# switchport access vlan 2
  6. Switch(config-if)# end
  7. Switch#
  8. 配置VLAN trunk
  9. configure terminal 進(jìn)入配置狀態(tài)
  10. interface interface-Id 進(jìn)入端口配置狀態(tài)
  11. switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封裝ISL 或 802.1Q 或

三層交換機(jī)配置——自動(dòng)協(xié)商

例:

  1. switchport mode {dynamic {auto | desirable} | trunk} 配置二層trunk模式。
  2. dynamic auto—自動(dòng)協(xié)商是否成為trunk
  3. dynamic desirable—把端口設(shè)置為trunk如果對(duì)方端口是trunk, desirable, 配置Native VLAN
  4. (802.1q)或自動(dòng)模式,trunk—設(shè)置端口為強(qiáng)制的trunk方式,而不理會(huì)對(duì)方端口是否為trunkswitchport access vlan vlan-id 可選)
  5. 指定一個(gè)缺省VLAN, 如果此端口不再是trunkswitchport trunk native vlan vlan-id 指定802.1Q native VLAN號(hào)

  1. Switch# configure terminal
  2. Enter configuration commands, one per line. End with CNTL/Z.
  3. Switch(config)# interface fastethernet0/4
  4. Switch(config-if)# switchport mode trunk
  5. Switch(config-if)# switchport trunk encapsulation dot1q
  6. Switch(config-if)# end

三層交換機(jī)配置——定義TRUNK允許的VLAN

  1. configure terminal子 進(jìn)入配置狀態(tài)
  2. interface interface-id 進(jìn)入端口配置
  3. switchport mode trunk 配置二層口為trunk
  4. switchport trunk allowed vlan {add | all | except | remove} vlan-list可選) 配置trunk允許的VLAN.使用add, all, except, remove關(guān)健字
  5. no switchport trunk allowed vlan 允許所有VLAN通過

例:

  1. Switch(config)# interface fastethernet0/1
  2. Switch(config-if)# switchport trunk allowed vlan remove 2
  3. Switch(config-if)# end

三層交換機(jī)配置——配置Native VLAN(802.1q)

  1. configure terminal 進(jìn)入配置狀態(tài)
  2. interface interface-id 進(jìn)入配置成802.1qtrunk的端口
  3. switchport trunk native vlan vlan-Id 配置native VLAN號(hào)
  4. no switchport trunk native vlan 端口配置命令回到缺省的狀態(tài)

三層交換機(jī)配置——配置基于端口權(quán)值的負(fù)載均衡

  1. configure terminal 進(jìn)入Switch 1配置狀態(tài)
  2. vtp domain domain-name 配置VTP域
  3. vtp mode server 將Switch 1配置成VTP server.
  4. show vtp status 驗(yàn)證VTP的配置
  5. show vlan 驗(yàn)證VLAN
  6. configure terminal 進(jìn)入配置狀態(tài)
  7. interface fastethernet 0/1 進(jìn)入F0/1端口
  8. switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封裝
  9. switchport mode trunk 配置成trunk
  10. show interfaces fastethernet0/1 switchport 驗(yàn)證VLAN配置

#p#

按以上步驟對(duì)想要負(fù)載均衡的接口進(jìn)行配置

在另一個(gè)交換機(jī)上進(jìn)行此配置

  1. show vlan 當(dāng)trunk已經(jīng)起來,在switch2上驗(yàn)證已經(jīng)學(xué)到相的vlan配置
  2. configure terminal 在Switch 1上進(jìn)入配置狀態(tài)
  3. interface fastethernet0/1 進(jìn)入要配置的端口
  4. spanning-tree vlan 8 port-priority 10 將端口權(quán)值10賦與VLAN 8.
  5. spanning-tree vlan 9 port-priority 10 將端口權(quán)值10賦與VLAN 9.
  6. spanning-tree vlan 10 port-priority 10 將端口權(quán)值10賦與VLAN 10.
  7. interface fastethernet0/2 進(jìn)入F0/2
  8. spanning-tree vlan 3 port-priority 10 將端口權(quán)值10賦與VLAN 3.
  9. spanning-tree vlan 4 port-priority 10 將端口權(quán)值10賦與VLAN 4
  10. spanning-tree vlan 5 port-priority 10 將端口權(quán)值10賦與VLAN 5
  11. spanning-tree vlan 6 port-priority 10 將端口權(quán)值10賦與VLAN 10
  12. end 退出
  13. show running-config 驗(yàn)證配置
  14. copy running-config startup-config 保存配置

配置STP路徑值的負(fù)載均衡

Trunk1走VLAN8-10,Trunk2走VLAN2-4

  1. configure terminal 進(jìn)入 Switch 1配置狀態(tài)
  2. interface fastethernet 0/1 進(jìn)入F0/1
  3. switchport trunk encapsulation {isl | dot1q | negotiate}配置封裝
  4. switchport mode trunk 配置Trunk,缺省是ISL封裝
  5. exit 退回

在F0/2口上重復(fù)2-4步驟

  1. exit 退回
  2. show running-config 驗(yàn)證配置
  3. show vlan驗(yàn)證switch1 已經(jīng)學(xué)到Vlan
  4. configure terminal 進(jìn)入配置狀態(tài)
  5. interface fastethernet 0/1 進(jìn)入F0/1
  6. spanning-tree vlan 2 cost 30 設(shè)置Vlan2生成樹路徑值為30
  7. spanning-tree vlan 3 cost 30 設(shè)置Vlan3生成樹路徑值為30
  8. spanning-tree vlan 4 cost 30 設(shè)置Vlan4生成樹路徑值為30
  9. end 退出

在switch1的F0/2上重復(fù)9-11步驟設(shè)置VLAN8,9,10生成樹路徑值為30

  1. end 退出
  2. show running-config 驗(yàn)證配置
  3. copy running-config startup-config 保存配置

負(fù)載均衡在三層交換機(jī)上的配置的全過程就為你介紹完了,按照以上的步驟,相信你一定可以成功完成整個(gè)配置步驟。

【編輯推薦】

  1. 選購三層交換機(jī)的六大關(guān)鍵詞
  2. 因地制宜 解讀Linux集群負(fù)載均衡
  3. 負(fù)載均衡和Web應(yīng)用防火墻作為梭子魚發(fā)展重點(diǎn)
  4. 四種負(fù)載均衡技術(shù)大比拼
  5. 多種交換技術(shù)和CEF及其負(fù)載均衡
責(zé)任編輯:佚名 來源: 論壇
相關(guān)推薦

2009-08-05 10:07:20

交換機(jī)配置實(shí)驗(yàn)

2010-01-15 10:06:56

二層交換機(jī)三層交換機(jī)通訊

2010-09-29 14:01:05

三層交換機(jī)配置DHCP

2010-03-19 13:50:48

三層交換機(jī)

2014-06-25 09:39:17

交換機(jī)三層三層Cisco

2010-01-11 16:40:55

三層交換機(jī)配置實(shí)例

2018-10-31 09:02:36

交換機(jī)三層二層

2010-01-11 13:14:36

配置三層交換機(jī)

2010-01-11 16:26:42

三層交換機(jī)作用

2010-01-11 16:38:20

三層交換機(jī)配置實(shí)例

2013-06-17 10:40:32

三層交換機(jī)交換機(jī)故障交換機(jī)

2018-07-19 12:16:50

交換技術(shù)三層二層

2010-01-20 09:55:10

第二層交換機(jī)三層交換機(jī)

2010-01-11 10:30:31

三層交換機(jī)配置

2010-01-11 10:19:42

三層交換機(jī)配置

2010-03-16 10:24:34

三層交換機(jī)配置

2010-01-25 17:48:39

三層交換機(jī)端口

2010-01-11 16:31:35

思科三層交換機(jī)配置

2012-11-29 10:13:10

交換機(jī)網(wǎng)線布局數(shù)據(jù)備份

2018-11-28 14:19:03

交換機(jī)路由器網(wǎng)絡(luò)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)