網(wǎng)絡(luò)工程:Cisco路由器配置語句全攻略一

字號:

路由器是工作在OSI參考模型第三層——網(wǎng)絡(luò)層的數(shù)據(jù)包轉(zhuǎn)發(fā)設(shè)備。路由器通過轉(zhuǎn)發(fā)數(shù)據(jù)包來實現(xiàn)網(wǎng)絡(luò)互連。雖然路由器可以支持多種協(xié)議(如 TCP/IP、 IPX/SPX、AppleTalk等協(xié)議),但是在我國絕大多數(shù)路由器運(yùn)行TCP/IP協(xié)議。路由器通常連接兩個或多個由IP子網(wǎng)或點到點協(xié)議標(biāo)識的邏 輯端口,至少擁有1個物理端口。路由器根據(jù)收到數(shù)據(jù)包中的網(wǎng)絡(luò)層地址以及路由器內(nèi)部維護(hù)的路由表決定輸出端口以及下一跳地址,并且重寫鏈路層數(shù)據(jù)包頭實現(xiàn) 轉(zhuǎn)發(fā)數(shù)據(jù)包。路由器通過動態(tài)維護(hù)路由表來反映當(dāng)前的網(wǎng)絡(luò)拓?fù)洌⑼ㄟ^與網(wǎng)絡(luò)上其他路由器交換路由和鏈路信息來維護(hù)路由表。路由器設(shè)備廠商最有名的是 Cisco公司,以下是Cisco路由器配置的常用命令匯總,希望對正在學(xué)習(xí)和應(yīng)用思科路由器的你有幫助。
    啟動接口,分配IP地址:
    router>
    router> enable
    router#
    router# configure terminal
    router(config)#
    router(config)# interface Type Port
    router(config-if)# no shutdown
    router(config-if)# ip address IP-Address Subnet-Mask
    router(config-if)# ^z
    配置RIP路由協(xié)議:30秒更新一次
    router(config)# router rip
    router(config-if)# network Network-Number <--通告標(biāo)準(zhǔn)A,B,C類網(wǎng)-->
    router(config-if)# ^z
    配置IGRP路由協(xié)議:90秒更新一次
    router(config)# router igrp AS-Number <-- AS-Number范圍1~65535-->
    router(config-if)# network Network-Number <--通告標(biāo)準(zhǔn)A,B,C類網(wǎng)-->
    router(config-if)# ^z
    配置Novell IPX路由協(xié)議:Novell RIP 60秒更新一次
    router(config)# ipx routing [node address]
    router(config)# ipx maximum-paths Paths <--設(shè)置負(fù)載平衡,范圍1~512-->
    router(config)# interface Type Port
    router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <--通告標(biāo)準(zhǔn)A,B,C類網(wǎng)-->
    router(config-if)# ^z
    配置DDR:
    router(config)# dialer-list Group-Number protocol Protocol-Type permit[list ACL-Number]
    router(config)# interface bri 0
    router(config-if)# dialer-group Group-Number
    router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number
    router(config-if)# ^z
    配置ISDN:
    router(config)# isdn swith-type Swith-Type
    <--配置ISDN交換機(jī)類型,中國使用basic-net3-->
    router(config-if)# ^z
    配置Frame Relay:
    router(config-if)# encapsulation frame-relay [cisco   IEtf ]
    router(config-if)# frame-relay lmi-type [ansi   cisco   q933a ]
    router(config-if)# bandwidth kilobits
    router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]
    <--配置靜態(tài)Invers ARP表:
    router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf   cisco ] [ payload-compress   packet-by-packet ]
    -->
    <--設(shè)置Keepalive間隔:
    router(config-if)# keepalive Number
    -->
    <--為本地接口指定DLCI:
    router(config-if)# frame-lelay local-dlci Number
    -->
    <--子接口配置:
    router(config-if)# interface Type Port.Subininterface-Number [ multipoint   point-to-point ]
    router(config-subif)# ip unnumbered Interface
    router(config-subif)# frame-lelay local-dlci Number
    -->
    router(config-if)# ^z