轉載自:https://blog.csdn.net/qq_42833924/article/details/89790004
爲自己學習方便故轉載,如果大家覺得有幫助,請爲原文點贊。
1.基本配置
R> enable 從用戶模式進入特權模式
R# disable 從特權模式退到用戶模式
R# logout (或exit) 退出Cisco設備
R# show history 查看先前輸入的命令(默認10個)
R# terminal history size #_of_commands 改變歷史緩存的大小(最大256)
R# terminal no editing 禁用編輯特性(移去no參數爲啓用)
R# configure terminal 進入配置模式(退出爲end或CTRL-Z)
R(config)# hostname name 改變路由器的名稱
R(config)# banner motd delimiting_character banner_character delimiting_character 設置登錄橫幅
R(config-line)# exec-timeout minutes_# seconds_# 更改休止超時(默認10分鐘)
R# show hosts 查看路由器解析表中的靜態和動態DNS條目
R> show version 查看路由器綜合信息
R# show line 驗證線路的配置
R# show processes 查看設備的各個進程的CPU使用率
R# show users 查看登錄到這臺設備上的所有用戶
R# show sessions 查看當前掛起的已經打開的telnet會話
R# term ip netmask-format bit-count|decimal|hexadecimal 改變子網掩碼顯示方式(在當前登錄會話期間有效,在子線路模式下即可保存)
R(config)# ip host name_of_host [TCP_port_#] IP_address […] 創建主機靜態解析表(可指定多達8個IP地址)
R(config)# ip name-server IP_address_of_DNS_server […] 配置通過訪問DNS服務器動態解析主機(可指定多達6個DNS服務器)
R(config)# no ip domain-lookup 禁用DNS查詢
R> ping destination_IP_address_or_host_name 查看與目的主機的連通性
R> traceroute destination_IP_address_or_host_name 查看與目的主機間的路由器
R# [telnet|connect] name_of_the_destination|destination_IP_address 打開telnet會話
R# resume connection_# 恢復一個特定的會話
R# disconnect connection_# 結束一已掛起的telnet會話無須恢復它並隨後從中退出
R# clear line line_# 結束某人的會話
R# no debug all (或undebug all) 禁用debug
R(config)# service timestamps debug datetime msec 在debug輸出中顯示時間戳
R# terminal monitor 從VTY或輔助線路端口登錄執行,路由器將在屏幕上顯示報告消息
R(config-line)# logging synchronous在該線路上報告信息後路由器在新提示符後重新顯示未打完的命令
2.文件操作
R# show running-config 查看正在運行(當前)的配置文件
R# show startup-config 查看NVRAM中的配置文件
R# copy running-config|startup-config tftp 將配置備份到TFTP服務器
R# copy tftp startup-config|running-config 從TFTP服務器將配置恢復到路由器
R# copy startup-config running-config 從NVRAM中將配置恢復到RAM中
R# copy running-config startup-config 將RAM中的配置文件保存到NVRAM
R# erase startup-config 刪除NVRAM中的配置文件
R# copy flash tftp 備份IOS鏡像到TFTP服務器
R# show flash 查看閃存中的文件
3.啓動配置
R# setup 運行系統配置會話
R(config)# boot system flash name_of_IOS_file_in_flash 啓動時加載閃存中的指定IOS文件
R(config)# boot system tftp IOS_image_name IP_address_of_server 啓動時加載TFTP服務器裏的IOS文件
R(config)# boot system rom 啓動時加載ROM中的迷你IOS文件(啓動與這三個命令的順序有關)
R(config)# config-register 0x hexadecimal_value 改變寄存器的值
rommon 5> confreg 0x2142 2600、3600系列啓動後按CTRL-BREAK進入ROMMON模式,改變寄存器的值
R> o/r 0x2142 其他系列路由器改變寄存器的值的方法
4.密碼設置
R(config)# line console 0 進入控制檯接口配置模式
R(config-line)# password console_password 配置控制檯口令
R(config)# line vty 0 4 進入虛擬終端線路配置模式(根據路由器及IOS最少5個直到很多)
R(config-line)# login 接上條命令,允許進行Telnet訪問
R(config-line)# password telnet_password 接上條命令,配置Telnet口令
R(config)# line aux 0 進入輔助端口配置模式
R(config-line)# password console_password 接上條命令,配置輔助端口口令
R(config)# enable password privileged_password 配置特權EXEC口令(不加密)
R(config)# enable secret privileged_password 配置特權EXEC口令(加密)
5.接口配置
R(config)# interface type [slot_#/] port_# 進入接口子配置模式
R(config-if)# description interface_description 添加接口描述
R(config-if)# no shutdown 啓用該接口
R(config)# interface loopback port_# 創建環回接口
R(config-if)# media-type aui|10baset|100baset|mii 指定該接口連接的介質類型
R(config-if)# speed 10|100|auto 指定該接口速率
R(config-if)# [no] half-duplex 指定該接口雙工模式
R(config-if)# clock rate rate_in_bits_per_second 指定該DCE串行接口速率
R> show controller serial [slot_#/] port_# 驗證該接口是DCE還是DTE,注意空格
R(config-if)# bandwidth rate_in_Kbps 改變該接口的帶寬值
R(config-if)# ip address IP_address subnet_mask 配置該接口IP地址
R(config)# ip subnet-zero IOS12.0前默認禁用0子網,此命令爲啓用
R(config-if)# ip directed-broadcast IOS12.0後默認禁用定向廣播,此命令爲啓用
R# show interfaces [type [slot_#/] port_#] 驗證接口配置
R# show ip interfaces [type [slot_#/] port_#] [brief] 驗證接口IP配置
6.CDP
R(config)# [no] cdp run 啓用/禁用CDP
R(config-if)# [no] cdp enable 基於接口啓用/禁用CDP
R# show cdp 查看CDP狀態
R# show cdp interface 查看基於接口的CDP配置
R# show cdp neighbors [detail] 查看與用戶Cisco設備相連的CDP鄰居的摘要/詳細清單
R# show cdp entry neighbor's_name 查看一個指定鄰居的詳細信息
R# show cdp traffic 查看CDP通信量的統計信息
7.路由
R(config)# ip route destination_network_# [subnet_mask] IP_address_of_next_hop_neighbor|interface_to_exit [administrative_distance] [permanent] 配置IP靜態路由
R(config)# ip route 0.0.0.0 0.0.0.0 IP_address_of_next_hop_neighbor|interface_to_exit [administrative_distance] [permanent] 配置默認路由
R(config)# ip classless 使有類協議接受非一致性子網掩碼或不連續子網
R(config)# interface type [slot_#/] port_#. subinterface_# [point-to-point|multipoint] 創建子接口
R(config-subif)# encapsulation isl|dotlq VLAN_# 指定子接口中繼類型和相關的VLAN
R(config)# router name_of_the_IP_routing_protocol 進入路由選擇協議的配置模式
R# show ip route 查看IP路由表
8.RIP
R(config)# router rip 配置IP RIP
R(config-router)# network IP_network_# 指定哪些接口參與路由選擇進程
R(config-router)# version 1|2 只接受和發送RIP版本1或2(默認只產生RIPv1更新,而兩個版本的更新都接收)
R(config-router)# ip rip send|receive version 1 | version 2 | version 1 2 在特定接口上控制在發送或接收RIP更新時使用哪個版本的RIP
R# show ip protocols 查看在路由器上已配置並運行的所有IP路由選擇協議
R# show ip route [name_of_the_IP_routing_protocol] 查看路由選擇表
R# debug ip rip 幫助進行故障排除
9.IGRP
R(config)# router igrp AS_# 配置IP IGRP
R(config-router)# network IP_network_# 通告網絡號
R(config-router)# neighbor IP_address_of_neighbor 配置單播更新
R(config-router)# passive-interface type [slot_#/] port_# 允許該接口在IGRP中通告但它不監聽或發送IGRP更新
R(config-router)# traffic-share min across-interfaces 使路由器只使用最佳路徑但又在路由選擇表中放入替代路徑
R(config-router)# timers basic update_# invalid_# holddown_# flush_# [sleeptime_#] 調整定時器(默認時,update=90,invalid=270,holddown=280,flush=630)
R(config-router)# no metric holddown 關閉壓制定時器(默認)
R(config-router)# distance administrative_distance_# 調整管理距離(取值範圍是1-255,默認爲100)
R(config-router)# default-metric bandwidth_# delay_# reliability_# load_# MTU_# 調整度量值
R(config-router)# metric weights tos_# K1_# K2_# K3_# K4_# K5_# 調整度量權重值(默認時,K1(帶寬)=K3(可靠性)=1,K2(延遲)=K4(負載)=K5(MTU)=0)
R(config-router)# variance multiplier_# 啓用IGRP非同等成本路徑(變化因子值1-128默認爲1)
R(config-router)# traffic-share balanced 配置負載均衡
R(config-router)# maximum-paths paths_# 配置負載均衡的路徑條數(取值範圍是1-6)
R# debug ip igrp events 提供路由器和鄰居間發生的每一步操作信息
R# debug ip igrp transactions 提供有關包含在路由更新中路由的詳細信息
10.EIGRP
R(config)# router eigrp AS_# 配置EIGRP
R(config-router)# network IP_network_# 通告網絡號
R(config-if)# ip bandwidth-percent eigrp AS_# percent_# 設置pacing(調速)佔給定接口帶寬的百分數(默認爲50%)
R(config-router)# distance administrative_distance_# 調整管理距離(取值範圍是1-255,默認對於內部路由是90而外部是170)
R(config-router)# default-metric bandwidth_# delay_# reliability_# load_# MTU_# 調整度量值
R(config-router)# metric weights tos_# K1_# K2_# K3_# K4_# K5_# 調整度量權重值(默認時,K1(帶寬)=K3(可靠性)=1,K2(延遲)=K4(負載)=K5(MTU)=0)
R(config-if)# ip hello-interval eigrp AS_# seconds_# 在給定接口上設置Hello間隔(默認對於低速的NBMA網絡是60秒,其他是5秒)
R(config-if)# ip hold-time eigrp AS_# seconds_# 在給定接口上設置Hello保持定時器(默認是3倍的Hello間隔)
R(config-router)# passive-interface type [slot_#/] port_# 允許該接口在EIGRP中通告但它不監聽或發送EIGRP更新
R(config-router)# no auto-summary 取消對路由的自動彙總
R(config-if)# ip summary-address eigrp AS_# network_address network_mask 創建不在有類邊界上的彙總地址
R(config)# eigrp log-neighbor-changes 記錄在某個鄰居上發生的變化
R# show ip route eigrp 查看被EIGRP學習到的路由
R# show ip route network_address 查看指定目的地的路由信息
R# show ip eigrp topology 查看EIGRP的拓撲表
R# show ip eigrp interfaces 查看加入到EIGRP路由器所有接口的概述
R# show ip eigrp neighbor [detail] 顯示和本路由器已形成鄰居關係的所有路由器
R# show ip eigrp traffic 顯示每個包類型的發出和接收的數量
R# show ip eigrp events 查看每個EIGRP事件的日誌
R# debug ip eigrp 提供路由器和它的鄰居之間發生的每一步操作
R# debug eigrp packets 查看在該路由器和它的鄰居之間發送的數據包類型
R# debug eigrp neighbors 查看鄰居的信息
11.OSPF
R(config)# router ospf process_ID 配置OSPF
R(config-router)# network IP_address wildcard_mask area area_# 指定接口進入OSPF區域
R(config-if)# ip ospf cost cost_value 給接口指定成本(取值範圍是1-65535)
R(config-router)# neighbor IP_address_of_neighbor 手動配置鄰居
R(config-router)# neighbor IP_address_of_neighbor priority value 指定鄰居的優先級(取值範圍是0-255,255爲DR,0爲不可能成爲DR)
R(config-if)# ip ospf network non-broadcast 手工配置非廣播網絡類型
R(config-router)# area area_id stub 允許創建存根區域
R(config-router)# area area_id stub no-summary 允許創建完全存根區域
R(config-router)# area area_id nssa 允許創建次存根區域
R(config-router)# area area_id virtual-link router_id 連接不連續區域爲骨幹區域0
R(config-router)# area area_id range network_address network_mask 在區域邊界路由器上彙總在給定區域中的路由器使用的IP地址空間到其他的區域
R(config-router)# summary-address network_address network_mask 在自治系統邊界路由器上彙總外部路由
R# show ip ospf 概述所有OSPF相關的信息
R# show ip ospf process-id 與上相同,而不僅僅是指定的進程
R# show ip ospf border-routers 顯示在此自治系統中所有ABR和ASBR的路由器ID
R# show ip ospf database 顯示鏈路狀態數據庫
R# show ip ospf interface 顯示接口的OSPF參數和其他的指定到此接口上的OSPF信息
R# show ip ospf neighbor [detail] 顯示每個OSPF鄰居和鄰接狀態
R# debug ip ospf adj 報告路由器建立到其他路由器的鄰接關係進程
R# debug ip ospf events 報告路由器上的OSPF事件
R# debug ip ospf packet 報告OSPF LSA分組的內容
12.ACL
R(config)# access-list 1-99|1300-1999 permit|deny source_IP_address [wildcard_mask] [log] 創建標準編號IP ACL
R(config-if)# ip access-group ACL_# in|out 在指定接口上啓動ACL
R(config-line)# access-class standard_ACL_# in|out 在指定若干線路上啓動ACL以限制對路由器的Telnet訪問
R(config)# access-list 100-199|2000-2699 permit|deny IP_protocol source_address source_wildcard_mask [protocol_information] destination_address destination_wildcard_mask [protocol_information] [log] 創建擴展編號IP ACL
R(config)# ip access-list standard ACL_name 創建標準命名ACL(從IOS11.2開始支持)
R(config-std-acl)# permit|deny source_IP_address [wildcard_mask] 輸入標準ACL命令
R(config)# ip access-list extended ACL_name 創建擴展命名ACL(從IOS11.2開始支持)
R(config-ext-acl)# permit|deny IP_protocol source_IP_address wildcard_mask [protocol_information] destination_IP_address wildcard_mask [protocol_information] [log] 輸入擴展ACL命令
R(config-if)# ip access_group ACL_name in|out 啓動命名ACL
R# show ip interfaces 驗證訪問列表
R# show access-lists [ACL_#_or_name] 顯示ACL中的語句
R# show ip access-list [ACL_#_or_name] 顯示IP ACL中的語句
R# clear access-list counters [ACL_#_or_name] 對指定ACL中的匹配計數器清零
13.NAT PAT 配置負載分發
R(config)# ip nat inside source static inside_local_source_IP_address inside_global_source_IP_address 定義NAT靜態轉換
R(config)# ip nat outside source static outside_global_destination_IP_address outside_local_destination_IP_address 定義NAT靜態轉換
R(config-if)# ip nat inside|outside 指定路由器上哪些接口在內部,哪些在外部
R(config)# ip nat outside source list standard_IP_ACL_# pool NAT_pool_name 爲重疊地址轉換配置NAT
R(config)# ip nat inside source list standard_IP_ACL_# pool NAT_pool_name 定義動態NAT,指定轉換哪些內部設備的源地址
R(config)# ip nat pool NAT_pool_name beginning_inside_global_IP_address ending_inside_global_IP_address netmask subnet_mask_of_addresses|prefix-length length 創建源內部全局IP地址池
R(config)# ip nat inside source list standard_IP_ACL_# pool NAT_pool_name overload 定義PAT,指定哪臺內部設備會轉換其源地址
R(config)# ip nat pool pool_name beginning_inside_local_IP_address ending_inside_local_IP_address prefix-length subnet_mask_bits type rotary 指定提供服務的設備上配置的內部IP地址
R(config)# ip nat inside destination list standard_ACL_# pool pool_name 指定外部設備用來訪問內部資源的全局IP地址
R# show ip nat translations [verbose] 查看路由器上的(詳細)地址轉換信息
R# show ip nat statistics 查看路由器上的地址轉換的統計信息
R# clear ip nat translation * 清除所有NAT表項
R# clear ip nat translation inside|outside global_IP_address|local_IP_address 清除轉換表中的指定動態條目
R# clear ip nat translation protocol inside global_IP_address global_port local_IP_address local_port 清除轉換表中的指定動態條目
R# debug ip nat 提供IOS對每個已轉換分組所做的轉換
14.DHCP
R(config)# [no] service dhcp 啓用/禁用DHCP(默認啓用)
R(config)# ip dhcp pool pool_name 創建地址池
R(config-dhcp)# network network_number [subnet_mask|/prefix_length] 指定分配給客戶的IP地址範圍
R(config-dhcp)# domain-name domain_name 向客戶分配域名
R(config-dhcp)# dns-server IP_address […] 指定最多8臺DNS服務器分配給客戶
R(config-dhcp)# netbios-name-server IP_address […] 指定最多8臺WINS服務器分配給客戶
R(config-dhcp)# netbios-node-type node_type 向微軟客戶分配節點類型
R(config-dhcp)# default-router IP_address […] 指定最多8條默認路由給客戶用於該地址範圍
R(config-dhcp)# lease days [hours] [minutes] |infinite 指定租約的期限(默認一天)
R(config)# ip dhcp ping timeout milliseconds 指定測試服務器地址池中的可用地址是否正在使用時服務器應等待時間
R(config)# ip dhcp excluded-address beginning_IP_address [ending_IP_address] 排除一些地址
R(config-if)# ip address dhcp 在路由器上建立DHCP客戶
R# show ip dhcp binding [client_address] 查看分配給客戶的地址
R# clear ip dhcp binding client_address|* 清除分配給客戶的指定/所有地址
R# debug ip dhcp server events|packet|linkage 查看DHCP服務器相關信息
15.HDLC
R(config-if)# encapsulation hdlc 封裝同步串行接口爲HDLC(默認)
16.PPP
R(config-if)# encapsulation ppp 在WAN接口上使用PPP
R(config-if)# ppp pap sent-username your_hostname password password 指定PAP用於認證並且提供在服務端用於執行認證的用戶名和口令(此爲客戶端配置)
R(config)# hostname your_router's_hostname 爲路由器指定惟一主機名(以下三個爲服務端配置)
R(config)# username remote_hostname password matching_password 指定認證路由器時所使用的遠端主機名稱和口令
R(config-if)# ppp authentication pap 指定PAP認證
R(config-if)# ppp authentication chap|pap|chap pap|pap chap 批定PPP認證類型
R# debug ppp negotiation 查看LCP協商時的信息
R# debug ppp authentication 查看PPP認證情況
17.FR
R(config-if)# encapsulation frame-relay [cisco|ietf] 指定封裝類型爲幀中繼(默認cisco)
R(config-if)# frame-relay lmi-type ansi|cisco|q933a 給該串行接口指定LMI類型
R# show frame-relay lmi 查看詳細的LMI統計信息
R# debug frame-relay lmi 報告路由器正在發送與接收的實際LMI信息
R(config-if)# frame-relay map protocol_name destination_address local_dlci_# [broadcast] [ietf|cisco] 將遠端第3層地址手動映射到本地DLCI號
R(config-if)# [no] frame-relay inverse-arp [protocol_name] [DLCI_#] 啓用/禁用逆向
18.ARP(默認啓用)
R(config-if) clear frame-relay-inarp 清除逆向ARP解析表
R# show frame-relay traffic 查看逆向ARP統計
R# show frame-relay pvc [DLCI_#] 查看終止於路由器的所有(指定)幀中繼PVC及其統計信息
R# show frame-relay map 查看將第3層地址映射成本地DLCI號的虛電路解析表
R(config)# interface type [slot_#/] port_#. subinterface_# [point-to-point|multipoint] 創建子接口
R(config-subif)# frame-relay interface-dlci local_DLCI_# 配置子接口的幀中繼
19.ISDN
R(config[-if])# isdn switch-type ISDN_switch_type 在全局或接口配置模式下配置交換機類型
R(config-if)# isdn spid1 spid_#__for_1st_BRI local_dial_# 爲第一個B信道配置SPID
R(config-if)# isdn spid2 spid_#__for_2st_BRI local_dial_# 爲第二個B信道配置SPID
R(config)# controller t1|e1 [slot_#/] port_# 以下6個命令爲控制卡配置
R(config-controller)# framing esf|sf|crc4|nocrc4 在T1或E1上使用物理成幀
R(config-controller)# linecode ami|b8zs|hdb3 線路編碼,定義1與0如何在線路上物理表示
R(config-controller)# clock source line primary|secondary|internal 定義路由器如何獲得其時鐘以用於同步數字連接
R(config-controller)# pri-group timeslots [1-24|1-31] 指定路由器哪個或哪些時隙用於ISDN連接
R(config-controller)# [no] shutdown 啓用/禁用控制器
R# show controllers t1|e1 [slot_#/port_#] 驗證控制器卡配置
R(config)# interface serial [slot_#/] port_#:23 設置邏輯串口(T1使用)
R(config)# interface serial [slot_#/] port_#:15 設置邏輯串口(E1使用)
R# show interface bri [slot_#/] port_#[:1|2|1 2] 驗證ISDN連接的狀態(查看B信道)
R# show isdn status 查看ISDN詳細的物理層和數據鏈路層信息
R# debug isdn q921 報告ISDN數據鏈路層詳細信息
R(config)# ip route IP_network_# subnet_mask remote_router's_IP_address|router_interface [administrative_distance] 配置靜態路由。以下7個命令配置傳統DDR
R(config)# dialer-list list_# protocol protocol_name permit|deny [access-list ACL_#] 定義敏感流量
R(config-if)# dialer-group dialer_list_# 激活撥號列表
R(config-if)# dialer map protocol_name address_of_destination_router [name remote_router_name] [speed 56|64] [broadcast] destination_phone_number 表明利用傳統DDR進行電話呼叫
R(config-if)# dialer idle-timeout #_of_seconds 定義空閒超時週期
R(config-if)# dialer fast-idle #_of_seconds 定義快速空閒計時器
R(config-if)# dialer load-threshold load either|inbound|outbound 通過BRI的兩條B信道執行負載均衡(分配帶寬)
R# show dialer 查看哪個DDR接口進行了電話呼叫及其狀態
R# show isdn active 查看激活的ISDN呼叫
R# show isdn history 查看路由器發出的呼叫或以前接收的呼叫
R# debug dialer 顯示建立或拆除一個連接的DDR過程
R# debug isdn q931 顯示ISDN電話連接建立及掛斷的詳細信息
R(config)# interface dialer port_# 創建邏輯撥號接口。以下全爲配置撥號配置文件。以下8個爲撥號接口配置
R(config-if)# encapsulation ppp 指定封裝類型
R(config-if)# ppp authentication pap|chap|chap pap|pap chap 指定認證類型
R(config-if)# ip address IP_address subnet_mask 指定接口IP地址
R(config-if)# dialer remote-name name 指定遠端路由器的名稱
R(config-if)# dialer string phone_# [class map_name] 指定映射類名稱
R(config-if)# dialer pool pool_# 指定撥號接口能使用哪組物理接口
R(config-if)# dialer-group dialer_list_# 激活撥號列表
R(config-if)# dialer pool-member pool_# [priority priority_#] [min-link #_of_B_channels] [max-link #_of_B_channels] 指定哪些撥號接能使用物理接口
R(config)# map-class dialer map_name 進入映射子配置模式。以下4個爲創建映射類
R(config-map)# dialer isdn speed 56 指定ISDN中的B信道的速度(默認64kbps)
R(config-map)# dialer idle-timeout #_of_seconds 定義空閒超時週期
R(config-map)# dialer fast-idle #_of_seconds 定義快速空閒計時器
R# show dialer interface bri|{serial:23|15} [slot_#/]port_# 顯示與撥號接口關聯的物理接口的進入和離開呼叫的DDR統計信息
20.IS-IS
R(config)# router isis 啓動IS-IS
R(config-router)# net areaID.systemID.SEL 配置NET
R(config-router)# is-type level_of_router 配置路由器的層次
R(config-if)# ip router isis 在接口上啓動IS-IS
R(config-if)# isis priority value level-1|level-2 手動配置第一層或第二層路由器的優先級
R(config-if)# clns router isis 爲無連接網絡服務啓動IS-IS
R# show ip route isis 查看通過IS-IS學習到的路由
R# show isis database [detail level_of_router] 查看IS-IS鏈路狀態數據庫中的所有(某層)LSP信息
R# show clns protocol 顯示IS-IS詳細配置信息
R# show clns interface 顯示配置爲IS-IS接口的相關信息
R# show clns is-neighbors 查看路由器的鄰居
R# show isis spf-log 查看SPF計算情況
R# debug isis adj-packets 查看路由器發送和接收Hello PDU的情況
R# debug isis update-packets 提供路由器發送和接收的所有LSP詳細內容及SNP信息
R# debug isis spf-events 查看寫入路由表的IS-IS路由
R# debug isis spf-triggers 查看觸發SPF計算的原因
R# debug isis spf-statistics 查看執行SPF計算所用的時間
21.BGP
R(config)# router bgp AS_# 啓動BGP
R(config-router)# neighbor IP_address_remote_device remote-as AS_#_remote_device 指定遠端路由器作爲對等體
R(config-router)# no synchronization 關閉BGP與IGP同步(默認啓用)
R(config-router)# neighbor IP_address_remote_device update-source loopback # 使用環回接口作爲對等體
R(config-router)# neighbor IP_address_remote_device ebgp-multihop [ttl] 配置eBGP多跳(允許BGP鄰居可以不在直連網絡上)
R(config-router)# neighbor IP_address_remote_device route-reflector-client 配置鄰居爲路由反射器客戶
R(config-router)# network network_address mask subnet_mask 向對等體通告路由(手動向BGP注入路由)
R(config-router)# redistribute protocol process_ID 將路由重新分配到BGP
R(config-router)# redistribute connected 將直連接口地址重新分配到BGP
R(config-router)# bgp cluster-id cluster_ID 分配簇ID
R(config-router)# bgp confederation identifier confederation_ID 配置聯邦ID
R(config-router)# bgp confederation peers AS_# 配置聯邦的對等自治系統成員
R(config-router)# neighbor IP_address_remote_device distribute-list access_list_# [in|out] 過濾到或來自鄰居的更新信息
R(config)# ip prefix-list list_name [seq seq_value] permit|deny network_address/length [ge ge_value] [le le_value] 配置前綴列表
R(config-router)# neighbor IP_address_remote_device prefix-list list_name [in|out] 應用從鄰居輸入的前綴列表
R(config)# route-map route_map_name permit|deny [sequence_number] 創建路由映射序列
R(config-route-map)# match as-path AS_path_accesslist_# 匹配BGP自治系統路徑訪問列表
R(config-route-map)# match community-list community_list_# 匹配BGP團體
R(config-route-map)# match interface type [slot_#/] port_# 發佈任何下一跳是指定接口的路由
R(config-route-map)# match ip address access_list_#|prefix_list_name 匹配任何目的網絡地址被指定的標準訪問列表、擴展訪問列表或前綴列表允許的路由
R(config-route-map)# match ip next-hop access_list_#|prefix_list_name 匹配任何下一跳地址被指定的標準訪問列表、擴展訪問列表或前綴列表允許的路由
R(config-route-map)# match ip route-source access_list_#|prefix_list_name 匹配任何由被指定的標準訪問列表、擴展訪問列表或前綴列表允許的地址通告的路由
R(config-route-map)# match metric value 匹配任何具有指定的度量值的路由
R(config-route-map)# match route-type type_of_route 匹配任何具有指定類型的路由
R(config-route-map)# match tag value 匹配任何具有指定標識的路由
R(config-route-map)# set as-path prepend AS_# 向AS_PATH屬性添加自治系統號
R(config-route-map)# set as-path tag 設置作爲AS_PATH屬性的標記
R(config-route-map)# set automatic-tag 自動計算標記值
R(config-route-map)# set community number|aa:nn|additive|local-as|no-advertise|no-export|none 設置BGP COMMUNITIES屬性
R(config-route-map)# set dampening half_life start_reusing start_suppressing duration_to_suppress 設置BGP路由冷落參數
R(config-route-map)# set default interface type [slot_#/] port_# 設置默認的輸出接口
R(config-route-map)# set interface type [slot_#/] port_# 設置輸出接口
R(config-route-map)# set ip default next-hop IP_address 設置路徑的默認下一跳地址
R(config-route-map)# set ip next-hop IP_address 設置下一跳地址
R(config-route-map)# set ip precedence [precedence] 設置“IP Precedence”字段
R(config-route-map)# set ip tos type_of_service 設置“IP服務類型”字段
R(config-route-map)# set level level 設置導入路由的位置
R(config-route-map)# set local-preference value 設置BGP LOCAL_PREF路徑屬性
R(config-route-map)# set metric value 設置目標路由協議的度量值
R(config-route-map)# set metric-type type_of_route 設置目標路由協議的度量類型
R(config-route-map)# set origin origin_code 設置BGP源代碼
R(config-route-map)# set tag value 設置目標路由協議的標記值
R(config-route-map)# set weight value 設置路由表的BGP權重
R(config-router)# neighbor IP_address_remote_device route-map route_map_name [in|out] 應用從鄰居輸入的路由映射
R(config-router)# neighbor IP_address_remote_device send-community 向該鄰居發送COMMUNITY屬性
R(config)# ip community-list community_list_# [permit|deny] community_list_# 創建團體列表
R(config-router)# neighbor peer_group_name peer-group 創建對等組
R(config-router)# neighbor peer_group_name option_to_use_in_update_policy 給對等組分配選項
R(config-router)# neighbor IP_address_remote_device peer-group peer_group_name 給對等組分配對等體
R(config-router)# no auto-summary 取消BGP的自動路由彙總功能
R(config-router)# aggregate-address IP_address mask [summary-only] 創建匯聚地址(禁止通告其他特定路由)
R(config-router)# aggregate-address IP_address mask as-set 創建匯聚地址,在AS_PATH中添加AS_SET類型
R# clear ip bgp peer_address 重設特定BGP對等會話
R# clear ip bgp AS_# 重設指定自治系統的所有對等體的BGP會話
R# clear ip bgp * 重設路由器上所有BGP會話
R# show ip bgp 查看路由器從BGP學習到的所有路由
R# show ip bgp summary 提供和路由器具有對等關係的所有路由器彙總
R# show ip bgp neighbors 查看對等體連接詳細信息
R# debug ip bgp 查看在本地路由器與試圖和其建立對等關係的路由器之間所發送和接收的OPEN信息
R# debug ip bgp updates 提供路由器發送和接收所有UPDATE消息的信息
R# debug ip bgp peer_address upadtes 提供關於BGP對等體之間發送的UPDATE消息
R# debug ip bgp dampening 顯示關於被冷落路由的信息
R# debug ip bgp events 提供關於嘗試成爲BGP對等體的路由器的狀態轉換信息
R# debug ip bgp keepalives 提供關於路由器發送和接收KEEPALIVE消息的信息
22.路由優化
R(config-router)# distribute-list ACL_#|prefix prefix_list_name in|out [type [slot_#/] port_#] 配置分配列表
R(config-if)# ip policy route-map map_tag 識別一個接口上基於策略的路由選擇使用的路由映射
R# show ip policy 列出所有配置爲基於策略的路由選擇的接口及它們相關的路由映射
R# show route-map 查看所有路由映射
R# debug ip policy 提供在該路由器上執行的路由策略的信息
R(config-router)# default-information originate 重新分配默認路由到OSPF和IS-IS
R(config-router)# default-information originate always 引起一個默認路由到OSPF不管路由表中是否有一個默認路由
R(config-router)# redistribute protocol [process-ID] level-1|level-1-2|level-2 [metric metric_value] [metric-type type_value] [match internal|external 1|external 2] [tag tag_value] [route-map map_tag] [weight weight_value] [subnets] 重新分配路由選擇信息從一個路由選擇域到另一個路由選擇域
R(config-router)# summary-address network_address network_mask [level-1|level-1-2|level-2] 爲起源於和重新分配到IS-IS的路由創建一個彙總地址
23.異步連接
R# line number 進入線路配置模式
R(config-line)# login 允許一個連接
R(config-line)# password password 提供線路上使用的口令
R(config-line)# flowcontrol hardware|software 選擇硬件流控制或軟件流控制
R(config-line)# speed number 指定調制解調器和訪問服務器或路由器之間使用的最大速度(單位:bps)
R(config-line)# transport input lat|mop|nasi|pad|rlogin|telnet|v120|all 定義反向Telnet連接使用的協議
R(config-line)# stopbits 1|1.5|2 定義每個字節的結束
R(config-line)# modem autoconfigure type modem_type 指示路由器使用modemcap數據庫中的命令按照指定的類型對連接到一個端口上的調制解調器進行自動配置
R# show modemcap 顯示modemcap數據庫
R(config-line)# modem edit modem_profile_name 向modemcap數據庫增加條目
R(config-line)# modemcap edit new_profile_name template existing_profile_name 創建名爲new_profile_name的條目並從existing_profile_name中拷貝所有的配置
R(config-line)# modem autoconfigure discovery 發現和自動配置連接到一個端口上的調制解調器
24.QoS
R(config-if)# standby ip IP_address 配置HSRP
R(config-if)# standby preempt 配置佔先操作
R(config-if)# standby track type_of_interface 配置接口跟蹤
R# show standby 查看HSRP組的動態信息
R(config-if)# glbp group_number ip [IP_address [secondary]] 配置GLBP
R(config-if)# glbp group_number priority priority_number 配置優先級