在线观看www成人影院-在线观看www日本免费网站-在线观看www视频-在线观看操-欧美18在线-欧美1级

您好,歡迎來電子發(fā)燒友網(wǎng)! ,新用戶?[免費注冊]

您的位置:電子發(fā)燒友網(wǎng)>電子百科>網(wǎng)絡(luò)>網(wǎng)絡(luò)交換機>

三層交換機配置實例詳解

2018年03月06日 10:45 網(wǎng)絡(luò)整理 作者: 用戶評論(0
關(guān)鍵字:三層交換機(9512)

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

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

三層交換機詳細配置實例

一:二層交換機的配置:

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

二:三層交換機的配置:

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

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

3:將路由器和下面的交換機進行單臂路由的配置 實驗最終結(jié)果:拓撲圖下各個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%

( 發(fā)表人:李倩 )

      發(fā)表評論

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

      發(fā)表評論,獲取積分! 請遵守相關(guān)規(guī)定!

      ?
      主站蜘蛛池模板: 91大神精品全国在线观看 | 亚洲天堂ww| 高清成人 | 色老头·com| 成人在色线视频在线观看免费大全 | 在线视频免费观看 | 5月丁香婷婷 | cijilu刺激 国产| 亚洲色播永久网址大全 | 国产综合免费视频 | 人操人操 | 高清影院在线欧美人色 | 亚州国产精品精华液 | 在线观看你懂的网站 | 一区二区三区影院 | 91网站免费在线观看 | 黄色网毛片 | 2017亚洲男人天堂 | 欧美日韩高清一区 | 欧美一区二区三区不卡片 | 中国成人免费视频 | 天天干夜夜拍 | 天堂网在线www最新版在线 | 男女交性视频免费 | 中文字幕第13亚洲另类 | tube69欧美最新片 | www在线视频观看 | 国产成人一区二区在线不卡 | 亚洲午夜久久久 | 国外免费一级 | 99久久婷婷免费国产综合精品 | 日本a级特黄三级三级三级 日本边添边爱边摸边做边爱 | 日韩免费毛片视频 | 唐人呦一呦xxxx视频 | 深夜大尺度视频在线观看 | 日本久本草精品 | 欧美1314www伊人久久香网 | 69xxxⅹxxxxxx日本 | 亚洲综合色婷婷中文字幕 | 日本高清高色 | 天天综合天天做天天综合 |