《實(shí)驗(yàn)拓?fù)浣K端服務(wù)器配置9》由會員分享,可在線閱讀,更多相關(guān)《實(shí)驗(yàn)拓?fù)浣K端服務(wù)器配置9(36頁珍藏版)》請?jiān)谘b配圖網(wǎng)上搜索。
1、Slide Title,Body Text,Second Level,Third Level,Fourth Level,Fifth Level,R&S15-,*,第十五章 VLAN間路由,本章提要,單臂路由的原理和配置,三層交換原理,CEF,三層交換配置和調(diào)試,知識要點(diǎn),單臂路由,Trunk鏈路上承載了發(fā)往或離開路由器的多個VLAN的數(shù)據(jù),路由器上的子接口,802.1Q Trunk 鏈路,ISL Trunk 鏈路,三層交換,二層交換機(jī)轉(zhuǎn)發(fā)數(shù)據(jù)的過程,二層交換機(jī)不能做路由,所以路由功能是交給路由器實(shí)現(xiàn)的,三層交換機(jī)轉(zhuǎn)發(fā)數(shù)據(jù)的過程,三層交換機(jī)能夠路由IP數(shù)據(jù)包,重寫IP包,的,的頭部信息,:,:源
2、MAC,和,和目的MAC等改變了,三層轉(zhuǎn)發(fā)時IP數(shù)據(jù)包,的,的變化,收到的IP,數(shù),數(shù)據(jù)包,3,層,SVI,接口(即,VLAN,接口),三層交換的,配,配置,配置:,ip routing,interfacevlan10,router eigrp 50,檢驗(yàn):,showip route,3層交換機(jī),的,的架構(gòu),兩部分相對,獨(dú),獨(dú)立:,Control Plane:運(yùn),行,行各種路由,協(xié),協(xié)議,構(gòu)建,路,路由表,DataPlane,:,:轉(zhuǎn)發(fā)數(shù)據(jù),包,包,基于CEF,的,的三層交換,FIB:路,由,由表的緩沖,,,,和路由表,是,是同步變化,的,的,鄰居表:二,層,層的下一跳,地,地址,基于CEF,
3、的,的三層交換,FIB和鄰,居,居表是早已,經(jīng),經(jīng)準(zhǔn)備好了,的,的,一旦有,數(shù),數(shù)據(jù)要轉(zhuǎn)發(fā),,,,直接查詢FIB表,,利,利用鄰居表,中,中的二層信,息,息直接封裝,幀,幀,把幀發(fā),送,送出去。不,需,需要查詢路,由,由表和發(fā)ARP請求獲,得,得下一跳的,二,二層地址。,基于CEF,的,的三層交換,有的數(shù)據(jù)包,不,不能用硬件,轉(zhuǎn),轉(zhuǎn)發(fā),則只,能,能由路由處,理,理器進(jìn)行路,由,由,開啟CEF,Switch(config-if)#ipcef,Switch(config-if)#iproute-cache cef,On the Cisco Catalyst 4000 switch,On the C
4、isco Catalyst 3550 switch,檢驗(yàn)CEF,Switch#show ipcef typemod,/port,|,vlan_interface,detail,Switch#showip cef vlan 11detailIP CEF with switching(Table Version 11),flags=0 x0 10 routes,0 reresolve,0unresolved(0 old,0new),peak 013 leaves,12nodes,14248 bytes,14 inserts,1 invalidations0 load sharingelements
5、,0 bytes,0references universal per-destinationloadsharing algorithm,id 4B936A242(0)CEF resets,0 revisions ofexisting leavesResolution Timer:Exponential(currently 1s,peak 1s)0in-place/0 abortedmodificationsrefcounts:1061 leaf,1052 nodeTable epoch:0(13entries at this epoch)172.16.11.0/24,version 6,epo
6、ch 0,attached,connected0 packets,0 bytesviaVlan11,0dependenciesvalid gleanadjacency,鄰居表信息,Switch#,showadjacency,typemod/port,|,port-channel,number,|detail|internal|summary,Switch#showadjacencygigabitethernet9/5detail,Protocol InterfaceAddress,IPGigabitEthernet9/5172.20.53.206(11),504 packets,6110 by
7、tes,00605C865B82,000164F83FA50800,ARP03:49:31,實(shí)驗(yàn)1,單,單臂路由實(shí),現(xiàn),現(xiàn)VLAN,間,間路由,實(shí)驗(yàn)?zāi)康?路由器以太,網(wǎng),網(wǎng)接口上的,子,子接口,單臂路由實(shí),現(xiàn),現(xiàn)VLAN,間,間路由的配,置,置,實(shí)驗(yàn)拓?fù)?實(shí)驗(yàn)設(shè)計:用R1實(shí)現(xiàn),在,在不同VLAN上的PC1和PC2的通信,實(shí)驗(yàn)步驟1,:,:在S1,上,上劃分VLAN,S1(config)#vlan2,S1(config-vlan)#exit,S1(config)#intf0/5,S1(config-if)#switchportmodeaccess,S1(config-if)#switchport
8、access vlan 1,S1(config-if)#int f0/6,S1(config-if)#switchportmodeaccess,S1(config-if)#switchportaccess vlan 2,實(shí)驗(yàn)步驟2,:,:把交換,機(jī),機(jī)上的以太,網(wǎng),網(wǎng)接口配置,成,成Trunk接口,S1(config)#intf0/1,S1(config-if)#switchtrunk encap dot1q,S1(config-if)#switchmodetrunk,實(shí)驗(yàn)步驟3,:,:在路由器,的,的物理以太,網(wǎng),網(wǎng)接口下創(chuàng),建,建子接口,,并,并定義封裝,類,類型,R1(config)#i
9、ntg0/0,R1(config-if)#no shutdown,R1(config)#intg0/0.1,R1(config-subif)#encapture dot1q 1native,/以上是,定,定義該子接,口,口承載哪個VLAN流,量,量,由于交,換,換機(jī)上的nativevlan,是,是VLAN1,所以,我,我們這里也,要,要指明該VLAN 就,是,是native vlan。實(shí)際,上,上默認(rèn)時native vlan就是vlan 1。,/在子接,口,口上配置IP地址,這,個,個地址就是VLAN1的網(wǎng)關(guān)了,R1(config)#intg0/0.2,R1(config-subif)#enc
10、apture dot1q 2,實(shí)驗(yàn)調(diào)試,在PC1和PC2上配,置,置IP地址,和,和網(wǎng)關(guān),PC1的網(wǎng)關(guān),指,指向:17.16.1.254,PC1的,網(wǎng),網(wǎng)關(guān)指向:17.16.2.254;,測試PC1,和,和PC2的,通,通信;,注意:如果,計,計算機(jī)有兩,個,個網(wǎng)卡,請,去,去掉另一網(wǎng),卡,卡上設(shè)置的,網(wǎng),網(wǎng)關(guān)。,實(shí)驗(yàn)2,三,三層交換實(shí),現(xiàn),現(xiàn)VLAN,間,間路由,實(shí)驗(yàn)?zāi)康?理解三層交,換,換的概念,配置三層交,換,換,實(shí)驗(yàn)拓?fù)?實(shí)驗(yàn)設(shè)計:用S1實(shí)現(xiàn),在,在不同VLAN上的PC1和PC2的通信,實(shí)驗(yàn)步驟1,:,:在S1上劃,分,分VLAN,S1(config)#vlan2,S1(config-
11、vlan)#exit,S1(config)#intf0/5,S1(config-if)#switchportmodeaccess,S1(config-if)#switchportaccess vlan 1,S1(config-if)#int f0/6,S1(config-if)#switchportmodeaccess,S1(config-if)#switchportaccess vlan 2,實(shí)驗(yàn)步驟2,:,:配置,三,三層交換,S1(config)#ip routing,/以上開,啟,啟S1的路,由,由功能,這,時,時S1就啟,用,用了三層功,能,能。,S1(config)#intvlan
12、1,S1(config-if)#no shutdown,S1(config)#intvlan2,S1(config-if)#no shutdown,/在vlan接口上,配,配置IP地,址,址即可,VLAN 1,接,接口上的地,址,址就是PC1的網(wǎng)關(guān)了,,,,VLAN2接口上,的,的地址就是PC2的網(wǎng),關(guān),關(guān)了。,實(shí)驗(yàn)調(diào)試1,:,:,S1#show iproute,(此處省略,),),172.16.0.0/24 is subnetted,2subnets,C172.16.1.0 is directlyconnected,Vlan1,C172.16.2.0 is directlyconnected
13、,Vlan2,/和路由,器,器一樣,三,層,層交換機(jī)上,也,也有路由表,。,。,實(shí)驗(yàn)調(diào)試2,:,:,在PC1和PC2上配,置,置IP地址,和,和網(wǎng)關(guān),PC1的網(wǎng)關(guān),指,指向:17.16.1.254,PC1的,網(wǎng),網(wǎng)關(guān)指向:17.16.2.254;,測試PC1,和,和PC2的,通,通信;,注意:如果,計,計算機(jī)有兩,個,個網(wǎng)卡,請,去,去掉另一網(wǎng),卡,卡上設(shè)置的,網(wǎng),網(wǎng)關(guān)。,命令匯總,9,、靜,夜,夜四,無,無鄰,,,,荒,居,居舊,業(yè),業(yè)貧,。,。12,月,月-2212,月,月-22,Saturday,December31,2022,10,、雨中黃,葉,葉樹,燈,下,下白頭人,。,。06:18
14、:5906:18:5906:18,12/31/2022 6:18:59 AM,11,、以我,獨(dú),獨(dú)沈久,,,,愧君,相,相見頻,。,。12月-2206:18:5906:18,Dec-2231-Dec-22,12,、故人江海,別,別,幾度隔,山,山川。06:18:5906:18:5906:18,Saturday,December 31,2022,13,、乍,見,見翻,疑,疑夢,,,,相,悲,悲各,問,問年,。,。12,月,月-2212,月,月-2206:18:5906:18:59,December31,2022,14,、他,鄉(xiāng),鄉(xiāng)生,白,白發(fā),,,,舊,國,國見,青,青山,。,。31,十,十,二
15、,二月20226:18:59,上,上午06:18:5912,月,月-22,15,、,比,比,不,不,了,了,得,得,就,就,不,不,比,比,,,,,得,得,不,不,到,到,的,的,就,就,不,不,要,要,。,。,。,。十,二,二,月,月226:18,上,上,午,午12,月,月-2206:18,December31,2022,16,、行動,出,出成果,,,,工作,出,出財富,。,。2022/12/31 6:18:5906:18:59,31December2022,17,、做前,,,,能夠,環(huán),環(huán)視四,周,周;做,時,時,你,只,只能或,者,者最好,沿,沿著以,腳,腳為起,點(diǎn),點(diǎn)的射,線,線向前,
16、。,。6:18:59 上,午,午6:18 上,午,午06:18:5912月-22,9,、沒,有,有失,敗,敗,,只,只有,暫,暫時,停,停止,成,成功,!,!。12,月,月-2212,月,月-22,Saturday,December31,2022,10,、很多事,情,情努力了,未,未必有結(jié),果,果,但是,不,不努力卻,什,什么改變,也,也沒有。,。,。06:18:5906:18:5906:18,12/31/2022 6:18:59 AM,11,、成功就,是,是日復(fù)一,日,日那一點(diǎn),點(diǎn),點(diǎn)小小努,力,力的積累,。,。12月-2206:18:5906:18,Dec-2231-Dec-22,12,、,世,世,間,間,成,成,事,事,,,,,不,不,求,求,其,其,絕,絕,對,對,圓,圓,滿,滿,,,,,留,留,一,一,份,份,不,不,足,足,,,,,可,可,得,得,無,無,限,限,完,完,美,美,。,。,。,。06:19:0006:19:0006:19,Saturday,December31,2022,13,、不知香積,寺,寺,數(shù)里入,云,云峰。12月-2212月-2206:19:0006: