【正文】
uterPT 2臺(tái);直連線;交叉線;DCE 串口線PC1 IP: Submask: Gateway: PC2 IP: Submask: Gateway: S3560 en conf t hostname S3560 vlan 10 exit vlan 20 exit interface fa 0/10 switchport access vlan 10 exit interface fa 0/20 switchport access valn 20 exit end show vlan conf t interface vlan 10 ip address no shutdown exit interface vlan 20 ip address no shutdown end show ip route show runing conf t router rip network network version 2 end show ip route R1 en conf t hostname R1 interface fa 0/0 no shutdown ip address interface serial 2/0 no shutdown ip address clock rate 64000 end show ip route conf t router rip network network version 2 exitR2 en conf t hostname R2 interface fa 0/0 no shutdown ip address interface serial 2/0 no shutdown ip address end show ip route conf t router rip network netword version 2 end 實(shí)驗(yàn)十二 路由器OSPF動(dòng)態(tài)路由配置實(shí)驗(yàn)?zāi)康膌 掌握OSPF協(xié)議的配置方法:l 掌握查看通過(guò)動(dòng)態(tài)路由協(xié)議OSPF學(xué)習(xí)產(chǎn)生的路由;l 熟悉廣域網(wǎng)線纜的鏈接方式;實(shí)驗(yàn)背景 假設(shè)校園網(wǎng)通過(guò)一臺(tái)三層交換機(jī)連到校園網(wǎng)出口路由器上,路由器再和校園外的另一臺(tái)路由器連接?,F(xiàn)要做適當(dāng)配置,實(shí)現(xiàn)校園網(wǎng)內(nèi)部主機(jī)與校園網(wǎng)外部主機(jī)之間的相互通信。為了簡(jiǎn)化網(wǎng)管的管理維護(hù)工作,學(xué)校決定采用OSPF協(xié)議實(shí)現(xiàn)互通。技術(shù)原理l OSPF開放式最短路徑優(yōu)先協(xié)議,是目前網(wǎng)路中應(yīng)用最廣泛的路由協(xié)議之一。屬于內(nèi)部網(wǎng)管路由協(xié)議,能夠適應(yīng)各種規(guī)模的網(wǎng)絡(luò)環(huán)境,是典型的鏈路狀態(tài)協(xié)議。OSPF路由協(xié)議通過(guò)向全網(wǎng)擴(kuò)散本設(shè)備的鏈路狀態(tài)信息,使網(wǎng)絡(luò)中每臺(tái)設(shè)備最終同步一個(gè)具有全網(wǎng)鏈路狀態(tài)的數(shù)據(jù)庫(kù),然后路由器采用SPF算法,以自己為根,計(jì)算到達(dá)其他網(wǎng)絡(luò)的最短路徑,最終形成全網(wǎng)路由信息。實(shí)驗(yàn)步驟l 新建packet tracer拓?fù)鋱Dl (1)在本實(shí)驗(yàn)中的三層交換機(jī)上劃分VLAN10和VLAN20,其中VLAN10用于連接校園網(wǎng)主機(jī),VLAN20用于連接R1。l (2)路由器之間通過(guò)V35電纜通過(guò)串口連接,DCE端連接在R1上,配置其時(shí)鐘頻率64000。l (3)主機(jī)和交換機(jī)通過(guò)直連線,主機(jī)與路由器通過(guò)交叉線連接。l (4)在S3560上配置OSPF路由協(xié)議。l (5)在路由器RR2上配置OSPF路由協(xié)議。l (6)將PCPC2主機(jī)默認(rèn)網(wǎng)關(guān)設(shè)置為與直連網(wǎng)路設(shè)備接口IP地址。l (7)驗(yàn)證PCPC2主機(jī)之間可以互相同信;實(shí)驗(yàn)設(shè)備PC 2臺(tái);Switch_3560 1臺(tái);RouterPT 2臺(tái);直連線;交叉線;DCE串口線PC1 IP: Submask: Gateway: PC2 IP: Submask: Gateway: S3560 en conf t hostname S3569 vlan 10 exit vlan 20 interface fa 0/10 switchport access vlan 10 exit int fa 0/20 switchport access valn 20 exit interface valn 10 ip address no shutdown exit interface vlan 20 ip address no shutdown end show ip route conf t router ospf 1 network area 0 network area 0 end show ip route R1 en conf t hostname R1 interface fa 0/0 no shutdown ip address exit interface serial 2/0 no shutdown clock rate 64000 ip address end show ip route conf t router ospf 1 network area 0 network area 0 end show ip route R2 en conf t hostname R2 interface fa 0/0 no shutdown ip address exit interface serial 2/0 no shutdown ip address end show ip route conf t router ospf 1 network area 0 network area 0 end show ip route實(shí)驗(yàn)十三 路由器綜合路由配置實(shí)驗(yàn)?zāi)繕?biāo) 掌握綜合路由器的配置方法; 掌握查看通過(guò)路由重分布學(xué)習(xí)產(chǎn)生的路由; 熟悉廣域網(wǎng)線纜的鏈接方式;實(shí)驗(yàn)背景 假設(shè)某公司通過(guò)一臺(tái)三層交換機(jī)連到公司出口路由器R1上,路由器R1再和公司外的另一臺(tái)路由器R2連接。三層交換機(jī)與R1間運(yùn)行RIPV2路由協(xié)議,R1與R2間運(yùn)行OSPF路由協(xié)議。現(xiàn)要做適當(dāng)配置,實(shí)現(xiàn)公司內(nèi)部主機(jī)與公司外部主機(jī)之間的相互通信。 技術(shù)原理 為了支持本設(shè)備能夠運(yùn)行多個(gè)路由協(xié)議進(jìn)程,系統(tǒng)軟件提供了路由信息從一個(gè)路由進(jìn)程重分布到另一個(gè)路由進(jìn)程的功能。比如你可以將OSPF路由域的路由重新分布后通高RIP路由域中,也可以將RIP路由域的路由重新分布后通告到OSPF路由域中。路由的相互重分布可以在所有的IP路由協(xié)議之間進(jìn)行。 要把路由從一個(gè)路由域分布到另一個(gè)路由域,并且進(jìn)行控制路由重分布,在路由進(jìn)程配置模式中執(zhí)行以下命令: redistribute protocol [metric metric][metrictype metrictype][match internal|external type|nssaexternal type][tag tag][routemap routemapname][subnets]實(shí)驗(yàn)步驟 新建Packet Tracer拓?fù)鋱D (1)PC與交換機(jī)間用直連線連接;PC與路由、路由與路由之間用交叉線連接。 (2)在三層上劃分2個(gè)Vlan,運(yùn)行RIPV2協(xié)議;R2運(yùn)行OSPF協(xié)議。 (5)在路由器R1上左側(cè)配置RIPV2路由協(xié)議;右側(cè)配置OSPF協(xié)議。 (6)在R1路由進(jìn)程中引入外部路由,進(jìn)行路由重分布。 (7)將PCPC2主機(jī)默認(rèn)網(wǎng)關(guān)分別設(shè)置為與直接網(wǎng)絡(luò)設(shè)備接口IP地址。 (8)驗(yàn)證PCPC2主機(jī)之間可以互相通信;實(shí)驗(yàn)設(shè)備Router_1841 2臺(tái);Switch_3560 1臺(tái);直通線;交叉線PC0 IP: Submask: Gageway: PC1 IP: Submask: Gageway: Switch0 en conf t vlan 2 exit int fa 0/10 switchport access vlan 2 exit int vlan 1 ip address no shutdown exit int vlan 2 ip address no shutdown end show int vlan 1 conf t router rip network network version 2Router0 en conf t host R1 inf fa 0/0 ip address no shutdown int fa 0/1 ip address no shutdown exit router rip network version 2 router ospf 1 network area 0Route1 en conf t host R2 int fa 0/1 ip address no shutdown int fa 0/0 ip address no shutdown exit router ospf 1 network area 0 network area 0 end show ip routeRouter0 end show ip route show run show ip route ping (success) ping (success)PC0 ping (Replay form : Destination host unreachable)Switch_3560 show ip rout (只有兩條直連路由)Router0 conf t router rip redistribute ospf 1 exit router ospf 1 redistribute rip subnets endRouter1 show ip routePC0 ping (Replay form : byes=32 time=125ms TTL=125)說(shuō)明:本例在Packet Tracer ,在Packet Tracer 、需要給Switch0指定靜態(tài)路由:ip route 42 / 4