通過路由器接口配置命令,可以配置:
接口的描述信息接口的傳輸速率接口的ip地址給接口封裝進(jìn)入接口配置模式,使用description命令: 說明該接口連接到北京外國語大學(xué)
Router (config)#int g6/0Router (config-if) # description To-Beijing UniversityRouter (config-if) #進(jìn)入接口配置模式,使用bandwidth命令設(shè)置接口帶寬,帶寬單位是kbps
Router (config)#interface POS3/0Router (config-if) # bandwidth 2500000 (設(shè)置接口帶寬為2.5Gbps)Router (config-if) #進(jìn)入接口配置模式,使用ip address命令配置接口的IP地址 命令格式: ip address
Router (config)#interface f2/3Router (config-if) # ip address 202.112.7.249 255.255.255.252Router (config-if) #進(jìn)入接口配置模式,使用shutdown、no shutdown命令關(guān)閉和開啟接口:
Router (config)#interface f2/3Router (config-if) # shutdown (關(guān)閉接口)Router (config-if) #Router (config-if) # no shutdown (開啟接口)Router (config-if) #可配置的局域網(wǎng)接口類型有以太網(wǎng)、FDDI、ATM和Token Ring等。目前,以太網(wǎng)應(yīng)用最為廣泛,因此這里只介紹幾種以太網(wǎng)標(biāo)準(zhǔn)的接口配置方法。
標(biāo)準(zhǔn)以太網(wǎng)的接口類型為Ethernet,可簡寫為e
Router (config) #interface Ethernet0標(biāo)準(zhǔn)以太網(wǎng)的接口類型為FastEthernet,可簡寫為f
Router (config) #interface f2/1標(biāo)準(zhǔn)以太網(wǎng)的接口類型為GigabitEthernet,可簡寫為f
Router (config) #interface g0/1異步串行接口的接口類型為Async,可簡寫為a。Async接口主要用于連接Modem設(shè)備,為網(wǎng)絡(luò)用戶提供撥號(hào)上網(wǎng)服務(wù)。
Async接口配置如下:
Router (config) #interface a1高速同步串行接口的接口類型是Serial,可簡寫為s。Serial接口主要用于DDN專線、幀中繼、衛(wèi)星、微博等廣域網(wǎng)連接。Serial接口需要配置的參數(shù)有接口帶寬、接口協(xié)議和接口的IP地址等。
Router (config) #interface s1/1POS是Packet over SONET/SDH的縮寫,這是一種利用SONET/SDH 提供的高速傳輸通道直接傳送IP數(shù)據(jù)包的技術(shù)。POS使用的鏈路層協(xié)議主要有PPP和HDLC。POS接口的配置參數(shù)有接口帶寬、接口地址、接口的鏈路層協(xié)議、接口的幀格式、接口的CRC校驗(yàn)和flag等。 在全局配置模式下:
Router(config)#interface POS3/0Router(config-if)#description To TianJingDaXueRouter(config-if)#bandwidth 2500000Router(config-if)#ip address 212.12.37.18 255.255.255.252Router(config-if)#crc 32(可選的校驗(yàn)位是16和32)Router(config-if)#pos framing sdh (可選的幀格式是sdh和sonet)Router(config-if)#no ip directed-broadcastRouter(config-if)#pos flag s1s0 2 (s1s0=00 表示是SONET幀的數(shù)據(jù))Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#exitRouter#環(huán)回(loopback)接口是一種應(yīng)用最為廣泛的虛接口。loopback接口的主要作用有,它作為一臺(tái)路由器的管理地址,使網(wǎng)絡(luò)管理員可以隨時(shí)登錄到路由器上,對(duì)路由器進(jìn)行配置管理。它還可以作為動(dòng)態(tài)路由協(xié)議OSPF和BGP的router id,使路由功能更穩(wěn)定可靠。網(wǎng)絡(luò)管理員為loopback接口分配一個(gè)IP地址作為管理地址,其掩碼應(yīng)為255.255.255.255 在全局配置模式下:
Router(config)# int loopback 0Router(config-if)#ip address 192.167.167.6 255.255.255.255Router(config-if)#no ip route-cacheRouter(config-if)#no ip mroute-cacheRouter(config-if)#exitRouter(config)#exitRouter#新聞熱點(diǎn)
疑難解答
圖片精選