91在线观看视频-91在线观看视频-91在线观看免费视频-91在线观看免费-欧美第二页-欧美第1页

您好,歡迎來電子發燒友網! ,新用戶?[免費注冊]

您的位置:電子發燒友網>電子百科>網絡>網絡交換機>

三層交換機配置實例詳解

2018年03月06日 10:45 網絡整理 作者: 用戶評論(0

在校園網、城域教育網中,從骨干網、城域網骨干、匯聚層都有三層交換機的用武之地,尤其是核心骨干網一定要用三層交換機,否則整個網絡成千上萬臺的計算機都在一個子網中,不僅毫無安全可言,也會因為無法分割廣播域而無法隔離廣播風暴。如果采用傳統的路由器,雖然可以隔離廣播,但是性能又得不到保障。而三層交換機的性能非常高,既有三層路由的功能,又具有二層交換的網絡速度。二層交換是基于MAC尋址,三層交換則是轉發基于第三層地址的業務流;除了必要的路由決定過程外,大部分數據轉發過程由二層交換處理,提高了數據包轉發的效率。三層交換機通過使用硬件交換機構實現了IP的路由功能,其優化的路由軟件使得路由過程效率提高,解決了傳統路由器軟件路由的速度問題。因此可以說,三層交換機具有“路由器的功能、交換機的性能”。

另外,連接子網少不了三層交換換。同一網絡上的計算機如果超過一定數量(通常在200臺左右,視通信協議而定),就很可能會因為網絡上大量的廣播而導致網絡傳輸效率低下。為了避免在大型交換機上進行廣播所引起的廣播風暴,可將其進一步劃分為多個虛擬網(VLAN)。但是這樣做將導致一個問題:VLAN之間的通信必須通過路由器來實現。但是傳統路由器也難以勝任VLAN之間的通信任務,因為相對于局域網的網絡流量來說,傳統的普通路由器的路由能力太弱。 而且千兆級路由器的價格也是非常難以接受的。如果使用三層交換機上的千兆端口或百兆端口連接不同的子網或VLAN,就在保持性能的前提下,經濟地解決了子網劃分之后子網之間必須依賴路由器進行通信的問題,因此三層交換機是連接子網的理想設備。

三層交換機詳細配置實例

一:二層交換機的配置:

在三個二層交換機上分別劃出兩VLAN,并將二層交換機上與三層交換或路由器上的接線設置為trunk接口

二:三層交換機的配置:

1:首先在三層交換上劃出兩個VLAN,并進入VLAN為其配置IP,此IP將作為與他相連PC的網關。

2:將與二層交換機相連的線同樣設置為trunk接線,并將三層交換與路由器連接的線設置為路由接口(no switchsport)

3:將路由器和下面的交換機進行單臂路由的配置 實驗最終結果:拓撲圖下各個PC均能相互通信

三層交換機配置實例

交換機的配置命令:

SW 0:

Switch》 Switch》en Switch#conf

Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 2 Switch(config-vlan)#exit Switch(config)#int f0/2

Switch(config-if)#switchport access vlan 2 Switch(config-if)#no shut Switch(config-if)#int f0/3

Switch(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

Switch(config-if)#exit Switch(config)#

SW 1:

Switch》en Switch#conf

Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int f0/2

Switch(config-if)#switchport access vlan 2 % Access VLAN does not exist. Creating vlan 2 Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#int f0/3

Switch(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

Switch(config-if)#

SW 2:

Switch》en

Switch#conf

Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#int f0/2

Switch(config-if)#switchport access vlan 2 % Access VLAN does not exist. Creating vlan 2 Switch(config-if)#exit

Switch(config)#int f0/3

Switch(config-if)#switchport mode trunk Switch(config-if)#

三層交換的配置命令:

Switch》en Switch#conf

Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int f0/1

Switch(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

Switch(config-if)#exit Switch(config)#int f0/2

Switch(config-if)#switchport mode trunk Switch(config-if)#exit Switch(config)#vlan 2 Switch(config-vlan)#exit Switch(config)#int vlan 1 Switch(config-if)#no shut

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up Switch(config-if)#ip address 192.168.1.168 255.255.255.0 Switch(config-if)#exit Switch(config)#int vlan 2

%LINK-5-CHANGED: Interface Vlan2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip add

Switch(config-if)#ip address 192.168.2.168 255.255.255.0 Switch(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

Switch(config-if)#exit Switch(config)#int f0/3

Switch(config-if)#no switchport

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#

Switch(config-if)#ip address 192.168.10.1 255.255.255.0 Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#ip routing Switch(config-if)#exit

Switch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2 Switch(config)# 路由器的配置:

Router》en Router#conf

Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int f0/0 Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up Router(config-if)#exit Router(config)#int f0/1 Router(config-if)#no shut

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#exit Router(config)#int f0/0 Router(config-if)#no shut Router(config-if)#exit Router(config)#int f0/0.1

Router(config-subif)#encapsulation dot1Q 1

Router(config-subif)#ip address 192.168.3.168 255.255.255.0 Router(config-subif)#exit Router(config)#int f0/0.2

Router(config-subif)#encapsulation dot1Q 2 Router(config-subif)#ip add

Router(config-subif)#ip address 192.168.4.168 255.255.255.0 Router(config-subif)#exit

Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1 Router(config)#exit

%SYS-5-CONFIG_I: Configured from console by console Router#conf

Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f0/1

Router(config-if)#ip add

Router(config-if)#ip address 192.168.10.2 255.255.255.0

Router(config-if)#

非常好我支持^.^

(143) 44%

不好我反對

(182) 56%

( 發表人:李倩 )

      發表評論

      用戶評論
      評價:好評中評差評

      發表評論,獲取積分! 請遵守相關規定!

      ?
      主站蜘蛛池模板: 国产三级a三级三级野外 | 女人18毛片水多 | 亚洲一区精品中文字幕 | 黄网站观看 | 色牛网| 天天擦天天干 | 一级特黄a大片免费 | 天天操天天插 | free chinese 国产精品 | 4438x色| 美女国产在线观看免费观看 | 色的视频网站 | 欧美精品videosex极品 | 校园 春色 欧美 另类 小说 | 717影院理论午夜伦不卡久久 | 亚洲午夜一区 | 宅男午夜视频在线观看 | 黄色一级视频网 | 萝l在线精品社区资源 | 日韩日韩| 欧美三级成人 | 网红和老师啪啪对白清晰 | 午夜免费福利网站 | 亚洲人免费视频 | 一区视频在线播放 | 日韩毛片在线视频 | 欧美整片第一页 | 日本成人a视频 | 广东毛片| 亚洲另类激情综合偷自拍 | 免费一区二区三区 | 午夜在线观看视频 | 视频黄色在线 | 午夜影院黄色片 | 男人的天堂在线免费视频 | 国产香蕉一区二区精品视频 | 久久手机免费视频 | 男人的天堂免费网站 | 亚洲欧美日韩动漫 | 免费看日本大片免费 | 国产精品久久久久影院免费 |