日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

思科网络设备命令大全

發布時間:2023/12/10 编程问答 48 豆豆
生活随笔 收集整理的這篇文章主要介紹了 思科网络设备命令大全 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

用戶模式----特權模式,使用命令"enable"
特權模式----全局配置模式,使用命令"config t"
全局配置模式----接口模式,使用命令"interface+接口類型+接口號"
全局配置模式----線控模式,使用命令"line+接口類型+接口號"
注:
用戶模式:查看初始化的信息.
特權模式:查看所有信息、調試、保存配置信息
全局模式:配置所有信息、針對整個路由器或交換機的所有接口
接口模式:針對某一個接口的配置
線控模式:對路由器進行控制的接口配置

基本配置命令

命令描述
enable從用戶模式進入特權模式
configure terminal進入配置模式
interface g0/0進入千兆以太網接口模式
ip address 172.16.0.1 255.255.0.0配置接口的ip 地址
no shutdown打開接口
line vty 0 4進入虛擬終端vty 0 - vty 4
password CISCO配置密碼
login用戶要進入路由器,需要先進行登錄
exit退回到上一級模式
enable password CISCO配置進入特權模式的密碼,密碼不加密
end直接回到特權模式
show int g0/0顯示g0/0 接口的信息
hostname Terminal-Server配置路由器的主機名
enable secret ccielab配置進入特權模式的密碼,密碼加密
no ip domain-lookup路由器不使用DNS 服務器解析主機的IP 地址
logging synchronous路由器上的提示信息進行同步,防止信息干擾我們輸入命令
no ip routing關閉路由器的路由功能
ip default-gateway 10.1.14.254配置路由器訪問其他網段時所需的網關
show line顯示各線路的狀態
line 33 48進入33-48 線路模式
transport input all允許所有協議進入線路
int loopback0進入loopback0 接口
ip host R1 2033 1.1.1.1為1.1.1.1 主機起一個主機名
alias exec cr1 clear line 33為命令起一個別名
privilege exec level 0 clear line把命令clear line 的等級改為0,在用戶模式下也可以執行它
banner motd設置用戶登錄路由器時的提示信
clock set設置路由器的時間
show clock顯示路由器的時間
show history顯示歷史命令
terminal no editing關閉CLI 的編輯功能
terminal editing打開CLI 的編輯功能
terminal history size 50修改歷史命令緩沖區的大小
copy running-config startup-config把內存中的配置文件保存到NVRAM 中
clock rate 128000配置串口上的時鐘(DCE 端)
show version顯示路由器的IOS 版本等信息
show running-config顯示內存中的配置文件
show startup-config顯示NVRAM 中的配置文件
show interface s0/0/0顯示接口的信息
show flash顯示flash 的有關信息
show controllers s0/0/0顯示s0/0/0 的控制器信息
show ip arp顯示路由器中的arp 表
copy running-config tftp把內存中的配置文件拷貝到tftp 服務器上
copy tftp running-config把tftp 服務器上的配置文件拷貝到內存中
copy flash:c2800nm-adventerprisek9-mz.124-11.T1.bin tftp把flash 中的IOS 拷貝到tftp 服務器上
confreg 0x2142在rommon 模式下修改配置寄存器值
i在rommon 模式下重啟路由器
copy startup-config running-config把NVRAM 中的配置文件拷貝到內存中
config-register 0x2102修改配置寄存器值
reload重啟路由器
delete flash:c2800nm-adventerprisek9-mz.124-11.T1.bin刪除flash 中的IOS
copy tftp flash從tftp 服務器上拷貝IOS 到flash 中
tftpdnldrommon 模式下,從tftp 服務器下載IOS
show cdp顯示CDP 運行信息
show cdp interface顯示CDP 在各接口的運行情況
show cdp neighbors顯示CDP 鄰居信息
show cdp entry R2顯示CDP 鄰居R2 的詳細信息
clear cdp table清除CDP 鄰居表
no cdp enable接口下關閉CDP
no cdp run/ cdp run關閉/打開整個路由器的CDP
cdp timer 30 CDP每30 秒發送一次
cdp holdtime 120讓鄰居為本設備發送的CDP 消息保持120 秒

靜態路由相關配置

命令描述
ip route X.X.X.X 掩碼 接口或者下一條ip地址配置靜態路由
show ip route查看路由表
ip classless/ no ip classless打開/關閉有類路由功能
ping 2.2.2.2 source loopback 0指定源端口進行ping 測試

RIP命令匯總

命令描述
show ip route查看路由表
show ip protocols查看IP 路由協議配置和統計信息
show ip rip database查看RIP 數據庫
debug ip rip動態查看RIP 的更新過程
clear ip route *清除路由表
router rip啟動RIP 進程
network通告網絡
version定義RIP 的版本
no auto-summary關閉自動匯總
ip rip send version配置RIP 發送的版本
ip rip receive version配置RIP 接收的版本
passive-interface配置被動接口
neighbor配置單播更新的目標
ip summary-address rip配置RIP 手工匯總
key chain定義鑰匙鏈
key key-id配置Key ID
key-string配置Key ID 的密匙
ip rip triggered配置觸發更新
ip rip authentication mode配置認證模式
ip rip authentication key-chain配置認證使用的鑰匙鏈
timers basic配置更新的計時器
maximum-paths配置等價路徑的最大值
ip default-network向網絡中注入默認路由

EIGRP相關配置命令

命令描述
show ip eigrp neighbors查看EIGRP 鄰居表
show ip eigrp topology查看EIGRP 拓撲結構數據庫
show ip eigrp interface查看運行EIGRP 路由協議的接口的狀況
show ip eigrp traffic查看EIGRP 發送和接收到的數據包的統計情況
debug eigrp neighbors查看EIGRP 動態建立鄰居關系的情況
debug eigrp packets顯示發送和接收的EIGRP 數據包
ip hello-interval eigrp配置EIGRP 的HELLO 發送周期
ip hold-time eigrp配置EIGRP 的HELLO hold 時間
router eigrp XX啟動EIGRP 路由進程
no auto-summary關閉自動匯總
ip authentication mode eigrp配置EIGRP 的認證模式
ip authentication key-chain eigrp在接口上調用鑰匙鏈
variance配置非等價負載均衡
delay配置接口下的延遲
bandwidth配置接口下的帶寬
ip summary-address eigrp手工路由匯總
OSPF相關配置命令
命令描述
-------------
show ip route查看路由表
show ip ospf neighbor查看OSPF 鄰居的基本信息
show ip ospf database查看OSPF 拓撲結構數據庫
show ip ospf interface查看OSPF 路由器接口的信息
show ip ospf查看OSPF 進程及其細節
debug ip ospf adj顯示OSPF 鄰接關系創建或中斷的過程
debug ip ospf events顯示OSPF 發生的事件
debug ip ospf packet顯示路由器收到的所有的OSPF 數據包
router ospf啟動OSPF路由進程
router-id配置路由器ID
network通告網絡及網絡所在的區域
ip ospf network配置接口網絡類型
ip ospf cost配置接口cost 值
ip ospf hello-interval配置hello 間隔
ip ospf dead-interval配置OSPF 鄰居的死亡時間
ip ospf priority配置接口優先級
auto-cost reference-bandwidth配置參考帶寬
clear ip ospf process清除OSPF 進程
area area-id authentication啟動區域簡單口令認證
ip ospf authentication-key cisco配置認證密碼
area area-id authentication message-digest啟動區域MD5 認證
area area-id range區域間路由匯總
area area-id stub把某區域配置成末節區域
area area-id stub no-summary把某區域配置成完全末節區域
area area-id nssa把某區域配置成NSSA 區域
area area-id virtual-link配置虛鏈路
ip ospf message-digest-key key-id md5 key配置key ID 及密匙
ip ospf authentication啟用鏈路簡單口令認證
ip ospf authentication message-digest啟用鏈路MD5 認證
default-information originate 向OSPF區域注入默認路由
show ip route查看路由表
show ip ospf neighbor查看OSPF 鄰居的基本信息
show ip ospf database查看OSPF 拓撲結構數據庫
show ip ospf interface查看OSPF 路由器接口的信息
show ip ospf查看OSPF 進程及其細節
show ip ospf database router查看類型1 的LSA 的全部信息
redistribute路由協議重分布
summary-address外部路由匯總
encapsulation frame-relay接口封裝幀中繼
no frame-relay inverse-arp關閉幀中繼逆向ARP 解析
frame-relay interface-dlci幀中繼映射
frame-relay map ip幀中繼映射
IS-IS基本配置命令
命令描述
-------------
show clns neighbors查看CLNS 鄰居
show clns protocols查看CLNS 路由協議相關的信息
show clns interface查看CLNS 接口狀態的信息
show clns route查看CLNS L2 路由
clear clns route清除CLNS 路由表
clear isis *清除IS-IS 鏈路狀態數據庫
show clns traffic查看CLNS 協議的統計信息
show isis hostname查看主機名和系統ID 的動態對應關系
show isis database查看IS-IS 鏈路狀態數據庫
show isis topology查看IS-IS 拓撲結構信息
show isis route查看CLNS L1 的路由表
show frame-relay map查看幀中繼映射
show ip protocols查看和IP 路由協議相關的信息
router isis啟動IS-IS 路由進程
net配置NET 地址
ip router isis接口下啟用IS-IS
is-type配置IS-IS 路由器類型
area-password配置區域認證
isis password配置鄰居認證
domain-password domain配置域認證
default-information originate向IS-IS 網絡注入默認路由
summary-address配置區域間路由匯總
isis circuit-type配置接口電路類型
frame-relay map clns配置CLNS 映射
BGP基本配置命令
命令描述
show tcp brief查看TCP 連接信息摘要
show ip bgp neighbors查看鄰居的TCP 和BGP 連接的詳細信息
show ip bgp summary查看BGP 連接的摘要信
show ip bgp查看BGP 表的信息
show ip bgp community查看BGP 團體屬性
clear ip bgp *重置BGP 連接
router bgp啟動BGP 進程
no synchronization關閉同步
synchronization打開同步
bgp router-id配置BGP 路由器ID
neighbor ip-address remote-as配置鄰居路由器及所在的AS
neighbor ip-address update-source指定更新源
neighbor ip-address next-hop-self配置下一跳自我
route-reflector-client配置RR 客戶端
network通告網絡
aggregate-address配置地址聚合
ip prefix-list配置前綴列表
set origin egp設置起源代碼為EGP
set as-path prepend配置追加AS-PATH
set local-preference設置本地優先級屬性值
bgp default local-preference設置默認本地優先級屬性值
bgp confederation identifier配置聯邦ID
bgp confederation peers配置聯邦EBGP 對等的成員
set community local-AS設置團體屬性
neighbor ip-address send-community開啟發送團體屬性的能力
encapsulation hdlc把接口的封裝改為hdlc
encapsulation ppp把接口的封裝改為ppp
ppp pap sent-username R1 password 123456 pap認證時,向對方發送用戶名R1 和密碼123456
ppp authentication papPPP 的認證方式為pap
username R1 password 123456為對方創建用戶R1,密碼為123456
debug ppp authentication打開ppp 的認證調試過程
ppp authentication chapPPP 的認證方式為chap
二層鏈路封裝
命令描述
encapsulation hdlc把接口的封裝改為hdlc
encapsulation ppp把接口的封裝改為ppp
ppp pap sent-username R1 password 123456 pap認證時,向對方發送用戶名R1 和密碼123456
ppp authentication papPPP 的認證方式為pap
username R1 password 123456為對方創建用戶R1,密碼為123456
debug ppp authentication打開ppp 的認證調試過程
ppp authentication chapPPP 的認證方式為chap
幀中繼相關配置命令
命令描述
frame-relay switching把路由器當成幀中繼交換機
encapsulation frame-relay接口封裝成幀中繼
frame-relay lmi-type cisco配置LMI 的類型
frame-relay intf-type dce配置接口是幀中繼的DCE 還是DTE
frame-relay route配置幀中繼交換表
show frame-relay route顯示幀中繼交換表
show frame pvc顯示幀中繼PVC 狀態
show frame lmi顯示幀中繼LMI 信息
show frame-relay map查看幀中繼映射
no frame-relay inverse-arp關閉幀中繼自動映射
ip split-horizon打開水平分割
int s0/0/0.1 multipoint創建點到多點子接口
int s0/0/0.3 point-to-point創建點到點子接口
frame-relay interface-dlci 104在點到點子接口上配置DLCI
ACL 相關配置命令
命令描述
show ip access-lists查看所定義的IP 訪問控制列表
clear access-list counters將訪問控制列表計數器清零
access-list定義ACL
ip access-group在接口下應用ACL
access-class在vty 下應用ACL
ip access-list定義命名的ACL
time-range time定義時間范圍
username username password password建立本地數據庫
autocommand定義自動執行的命令
DHCP 相關配置命令
命令描述
show ip dhcp pool查看DHCP 地址池的信息
show ip dhcp binding查看DHCP 的地址綁定情況
show ip dhcp database查看DHCP 數據庫
show ip interface查看接口信息
debug ip dhcp server events動態查看DHCP 服務器的事件
service dhcp開啟DHCP 服務
no ip dhcp conflict logging關閉DHCP 沖突日志
ip dhcp pool配置DHCP 分配的地址池
network DHCP服務器要分配的網絡和掩碼
default-router默認網關
domain-name域名
netbios-name-serverWINS 服務器
dns-server域名服務器
option 150 ipFTP 服務器
lease配置租期
ip dhcp excluded-address排除地址段
ip helper-address 配置DHCP中繼的地址
NAT 相關配置命令
命令描述
clear ip nat translation *清除動態NAT 表
show ip nat translation查看NAT 表
show ip nat statistics查看NAT 轉換的統計信息
debug ip nat動態查看NAT 轉換過程
ip nat inside source static配置靜態NAT
ip nat inside配置NAT 內部接口
ip nat outside配置NAT 外部接口
ip nat pool配置動態NAT 地址池
ip nat inside source list access-list-number pool name配置動態NAT
ip nat inside source list access-list-number pool name overload配置PAT
交換機基本配置命令
命令描述
duplex { fullhalf
speed { 10100
ip default-gateway 172.16.0.254配置缺省網關
switch mode access把端口改為訪問模式
switch port-securitiy打開交換機的端口安全功能
switch port-securitiy maximum 1允許該端口下的MAC 條目最大數量為1
switch port-securitiy violation{ protectshutdown
switchport port-security mac-address ?0019.5535.b828允許MAC 為0019.5535.b828 的設備接入本接口show mac-address-table 顯示MAC 地址表
mac-address 12.12.12改變接口的MAC 地址
rename flash:config.text flash:config.old把flash 中的文件改名
copy xmodem:flash:c2950-i6q4l2-mz.121-22.EA5a.bin通過Xmodem 模式把文件拷貝到flash 中
boot重啟交換機
VLAN與VTP配置命令
命令描述
vlan database進入到vlan database 配置模式
vlan 2 name VLAN2創建vlan 2
switch access vlan 2把端口劃分到VLAN 2 中
interface range f0/2 - 3批量配置接口的屬性
show vlan查看VLAN 的信息
switchport trunk encanpsulation配置trunk 鏈路的封裝類型
switch mode trunk把接口配置為trunk
show interface f0/13 trunk查看交換機端口的trunk 狀態
switchport nonegotiate Trunk鏈路上不發送trunk 協商包
vtp mode server配置交換機為VTP server
vtp domain VTP-TEST配置VTP 域名
vtp password cisco配置VTP 的密碼
vtp mode client配置交換機為VTP client
vtp transparent配置交換機為VTP transparent
show vtp status顯示vtp 的狀態
vtp pruning啟用VTP 修剪
vtp version 2VTP 版本為2
interface port-channel 1創建以太通道
channel-group 1 mode on把接口加入到以太網通道中,并指明以太通道模式
port-channel load-balance dst-mac配置etherChannel 的負載平衡方式
show etherchannel summary查看etherchannel 的簡要信息
生成樹STP配置命令
命令描述
show spanning-tree查看STP 樹信息
spanning-tree vlan 1 priority 4096配置VLAN1 的橋優先級
spanning-tree portfast配置接口為portfast,當有設備接入時立即進入轉發狀態
spanning-tree uplinkfast配置uplinkfast 特性
spanning-tree backbonefast配置backbonefast 特性
spanning-tree mode rapid-pvst把STP 的運行模式設為RSTP+PVST
spanning-tree link-type point-to-point把接口的鏈路類型改為點對點
spanning-tree mode mst把生成樹的模式改為MST
spanning-tree mst configuration進入MST 的配置模式
name TEST-MST命名MST 的名字
revision 1配置MST 的revision 號
instance 1 vlan 1-2把VLAN 1 和VLAN 2 的生成樹映射到實例1
spanning-tree guard root在接口上配置root guard 特性
spanning-tree bpduguard enable在接口上配置bpduguard 特性
trunk基本配置
命令描述
int g0/0.1創建子接口
encapture dot1q 1 native指明子接口承載哪個VLAN 的流量以及封裝類型,同時該VLAN 是native vlan
ip routing打開路由功能
no switchport接口不作為交換機接口
ip cef開啟CEF 功能
HSRP 基本配置命令
命令描述
standby 1 ip 192.168.13.254啟用 HSRP 功能,并設置虛擬IP 地址
standby 1 priority 120配置本路由器的HSRP 優先級
standby 1 preempt配置HSRP 搶占
standby 1 timers 3 10設置HSRP 的HELLO time 和HOLD time
standby 1 authentication md5 key-string ?cisco配置HSRP 認證密碼,認證方式為MD5
show standby brief查看HSRP 的簡要情況
standby 1 track Serial0/0/0 30跟蹤s0/0/0 接口,當接口故障時,HSRP 優先級降低30
vrrp 1 ip 192.168.13.254啟用 VRRP 功能,并設置虛擬IP 地址
vrrp 1 priority 120配置本路由器的VRRP 優先級
vrrp 1 preempt配置VRRP 搶占
vrrp 1 authentication md5 key-stringcisco 配置VRRP 認證密碼,認證方式為MD5
track 100 interface Serial0/0/0定義一個跟蹤目標號,被跟蹤對象為s0/0/0
line-protocol接口
vrrp 1 track 100 decrement 30跟蹤目標100,當目標故障時,優先級降低30
show vrrp brief查看VRRP 的簡要情況
glbp 1 ip 192.168.1.254啟用 GLBP 功能,并設置虛擬IP 地址
glbp 1 priority 200配置本路由器的GLBP 優先級
glbp 1 preempt配置GLBP 搶占
glbp 1 authentication md5 key-string ?cisco配置GLBP 認證密碼,認證方式為MD5
show glbp查看GLBP 情況
重分布
命令描述
show ip route查看路由表
show ip protocols查看和路由協議相關的信息
redistribute配置路由協議重分布
default-metric配置默認種子度量值 ?ip prefix-list 定義前綴列表
distance eigrp配置EIGRP 默認管理距離
router-map基本配置命令
show ip policy查看策略路由及作用的接口
show route-map查看定義的所有路由策略及路由策略匹配的情況
debug ip policy動態查看策略路由的匹配情況
passive-interface配置被動接口
distribute-list配置分布控制列表
route-map定義路由策略
match定義匹配的條件
set定義對符合匹配條件的語句采取的行為
ip policy route-map應用路由策略
ip local policy route-map本地應用路由策略
IPv6基本配置命令
命令描述
show ipv6 route查看IPv6 路由表
show ipv6 interface查看IPv6 接口信息
show ipv6 protocols查看和IPv6 路由協議相關的信息
show ipv6 rip next-hops查看RIPng 的下一跳地址
show ipv6 rip database查看RIPng 的數據庫
show ipv6 ospf neighbor查看OSPFv3 鄰居的基本信息
show ipv6 ospf interface查看OSPFv3 路由器接口的信息
show ipv6 ospf database查看OSPFv3 拓撲結構數據庫
show ipv6 ospf查看OSPFv3 進程及其細節
show ipv6 route eigrp查看IPv6 EIGRP 的路由
show ipv6 eigrp topology查看IPv6 EIGRP 的拓撲結構信息
show ipv6 eigrp neighbors查看IPv6 EIGRP 的鄰居
debug ipv6 rip動態查看RIPng 的更新
ipv6 unicast-routing啟動IPv6 流量轉發
ipv6 address在接口下配置IPv6 地址
ipv6 route配置IPv6 靜態路由
ipv6 router rip啟動IPv6 RIPng 進程
split-horizon啟用水平分割
poison-reverse啟用毒化反轉
ipv6 rip tag enable在接口上啟用RIPng
ipv6 rip tag default-information originate向IPv6 RIPng 區域注入一條默認路由
ipv6 router ospf啟動OSPFv3 路由進程
router-id配置路由器ID
default-information originate向OSPFv3 網絡注入一條默認路由
ipv6 ospf process-id area area-id接口上啟用OSPFv3,并聲明接口所在區域
ipv6 router eigrp配置IPv6 EIGRP 路由協議
ipv6 eigrp接口下啟用IPv6 EIGRP
maximum-paths配置能支持的等價路徑的條數
組播相關命令
命令描述
ip multicast-routing啟用組播路由功能
ip pim dense在接口上運行pim dense 協議
ip igmp join-group 237.0.0.1該接口加入到237.0.0.1 組中
show ip pim neighbor顯示了pim 鄰居
show ip mroute顯示組播路由表
show ip igmp groups顯示組成員
ip igmp snooping在交換機上配置IGMP Snopping 功能
show ip igmp snooping顯示交換機上的IGMP Snooping 運行情況
show ip igmp snooping groups交換機上顯示各組的成員在什么接口上
ip pim sparse-dense在接口上運行pim sparse-dense 協議
ip pim spt-threshold infinity靜止從基于RP 的樹切換到基于源的樹
ip pim send-rp-discovery loopback 0scope 255把路由器設為映射代理,其Loopback0 為代理地址
ip pim send-rp-announce Loopback0 scope255把路由器設為候選RP,其Loopback0 為RP地址
QOS相關命令
命令描述
priority-list 1 protocol ip high tcp telnet創建優先級隊列,標號為1。把telnet 流量放在高優先級隊列中
priority-list 1 queue-limit 20 30 40 50定義優先級隊列高、中、普通、低隊列中的長度
priority-group 1把定義好的優先級隊列應用接口上
show queueing priority查看優先級隊列情況
debug priority調試優先級隊列
queue-list 1 protocol ip 1 tcp telnet創建自定義隊列,標號為1。把telnet 流量放在隊列1 中
queue-list 1 queue 1 limit 40定義隊列1 的深度為40,
custom-queue-list 1把定義好的自定義隊列應用接口上
fair-queue 512 1024 10在接口上啟用WFQ,512 是丟棄值,1024 是最大的會話數,10 是RSVP 可預留隊列
class-map match-any CLASS-MAP1定義class-map,名為CLASS-MAP1
match protocol http匹配http 協議
bandwidth 10配置CLASS-MAP 流量的帶寬為60K
service-policy output MY-POLICY把定義好的策略應用在接口的output 方向上
show class-map顯示class-map 信息
show policy-map顯示policy-map 信息
show policy-map interface s0/0/0顯示接口s0/0/0 上的policy-map 配置
priority 15配置LLQ,帶寬為15k
random-detect在接口上啟用WRED
random-detect precedence 0 18 42 12配置WRED,對于IP 優先級為0 的隊列,最低閥值為18,最大閥值為42,按照1/12 的最大比例丟棄數據包
show queueing random-detect顯示WRED 的配置情況
show interfaces rate-limit顯示各接口上CAR 的情況
drop丟棄數據包
variance配置IPv6 EIGRP 非等價負載均衡

總結

以上是生活随笔為你收集整理的思科网络设备命令大全的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。