久久99精品久久久久久琪琪,久久人人爽人人爽人人片亞洲,熟妇人妻无码中文字幕,亚洲精品无码久久久久久久

思科交換機(jī)配置命令總結(jié)

時(shí)間:2019-05-12 03:15:12下載本文作者:會(huì)員上傳
簡(jiǎn)介:寫(xiě)寫(xiě)幫文庫(kù)小編為你整理了多篇相關(guān)的《思科交換機(jī)配置命令總結(jié)》,但愿對(duì)你工作學(xué)習(xí)有幫助,當(dāng)然你在寫(xiě)寫(xiě)幫文庫(kù)還可以找到更多《思科交換機(jī)配置命令總結(jié)》。

第一篇:思科交換機(jī)配置命令總結(jié)

思科交換機(jī)配置命令總結(jié)

1.switch(config)# hostname hostname 在基于CLI的交換機(jī)上設(shè)置主機(jī)名/系統(tǒng)名: switch(enable)set system name name-string 2.在基于IOS的交換機(jī)上設(shè)置登錄口令: switch(config)# enable password level 1 password 在基于CLI的交換機(jī)上設(shè)置登錄口令: switch(enable)set password switch(enable)set enalbepass 3.在基于IOS的交換機(jī)上設(shè)置遠(yuǎn)程訪(fǎng)問(wèn): switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交換機(jī)上設(shè)置遠(yuǎn)程訪(fǎng)問(wèn): switch(enable)set interface sc0 ip-address netmask broadcast-address switch(enable)set interface sc0 vlan switch(enable)set ip route default gateway 4.在基于IOS的交換機(jī)上啟用和瀏覽CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable 為了查看Cisco鄰接設(shè)備的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交換機(jī)上啟用和瀏覽CDP信息: switch(enable)set cdp {enable|disable} module/port 為了查看Cisco鄰接設(shè)備的CDP通告信息: switch(enable)show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交換機(jī)的端口描述: switch(config-if)# description description-string 基于CLI的交換機(jī)的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交換機(jī)上設(shè)置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交換機(jī)上設(shè)置端口速度: switch(enable)set port speed moudle/number {10|100|auto} switch(enable)set port speed moudle/number {4|16|auto} 7.在基于IOS的交換機(jī)上設(shè)置以太網(wǎng)的鏈路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交換機(jī)上設(shè)置以太網(wǎng)的鏈路模式: switch(enable)set port duplex module/number {full|half} 8.在基于IOS的交換機(jī)上配置靜態(tài)VLAN: switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# switchport mode access switch(config-if)# switchport access vlan vlan-num switch(config-if)# end 在基于CLI的交換機(jī)上配置靜態(tài)VLAN: switch(enable)set vlan vlan-num [name name] switch(enable)set vlan vlan-num mod-num/port-list 9.在基于IOS的交換機(jī)上配置VLAN中繼線(xiàn): switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk switch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交換機(jī)上配置VLAN中繼線(xiàn): switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交換機(jī)上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交換機(jī)上配置VTP管理域: switch(enable)set vtp [domain domain-name] 11.在基于IOS的交換機(jī)上配置VTP 模式: switch# vlan database switch(vlan)# vtp domain domain-name switch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交換機(jī)上配置VTP 模式: switch(enable)set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12.在基于IOS的交換機(jī)上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode 在基于CLI的交換機(jī)上配置VTP版本: switch(enable)set vtp v2 enable 13.在基于IOS的交換機(jī)上啟動(dòng)VTP剪裁: switch# vlan database switch(vlan)# vtp pruning 在基于CL I 的交換機(jī)上啟動(dòng)VTP剪裁: switch(enable)set vtp pruning enable 14.在基于IOS的交換機(jī)上配置以太信道: switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交換機(jī)上配置以太信道: switch(enable)set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交換機(jī)上調(diào)整根路徑成本: switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交換機(jī)上調(diào)整根路徑成本: switch(enable)set spantree portcost moudle/port cost switch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交換機(jī)上調(diào)整端口ID: switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交換機(jī)上調(diào)整端口ID: switch(enable)set spantree portpri {mldule/port}priority switch(enable)set spantree portvlanpri {module/port}priority [vlans] 17.在基于IOS的交換機(jī)上修改STP時(shí)鐘: switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交換機(jī)上修改STP時(shí)鐘: switch(enable)set spantree hello interval[vlan] switch(enable)set spantree fwddelay delay [vlan] switch(enable)set spantree maxage agingtiame[vlan] 18.在基于IOS的交換機(jī)端口上啟用或禁用Port Fast 特征: switch(config-if)#spanning-tree portfast 在基于CLI的交換機(jī)端口上啟用或禁用Port Fast 特征: switch(enable)set spantree portfast {module/port}{enable|disable} 19.在基于IOS的交換機(jī)端口上啟用或禁用UplinkFast 特征: switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交換機(jī)端口上啟用或禁用UplinkFast 特征: switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on] 20.為了將交換機(jī)配置成一個(gè)集群的命令交換機(jī),首先要給管理接口分配一個(gè)IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name 21.為了從一條中繼鏈路上刪除VLAN,可使用下列命令: switch(enable)clear trunk module/port vlan-range 22.用show vtp domain 顯示管理域的VTP參數(shù).23.用show vtp statistics顯示管理域的VTP參數(shù).24.在Catalyst交換機(jī)上定義TrBRF的命令如下: switch(enable)set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25.在Catalyst交換機(jī)上定義TrCRF的命令如下: switch(enable)set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num 26.在創(chuàng)建好TrBRF VLAN之后,就可以給它分配交換機(jī)端口.對(duì)于以太網(wǎng)交換,可以采用如下命令給VLAN分配端口: switch(enable)set vlan vlan-num mod-num/port-num 27.命令show spantree顯示一個(gè)交換機(jī)端口的STP狀態(tài).28.配置一個(gè)ELAN的LES和BUS,可以使用下列命令: ATM(config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29.配置LECS: ATM(config)# lane database database-name ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name …

30.創(chuàng)建完數(shù)據(jù)庫(kù)后,必須在主接口上啟動(dòng)LECS.命令如下: ATM(config)# interface atm number ATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address 31.將每個(gè)LEC配置到一個(gè)不同的ATM子接口上.命令如下: ATM(config)# interface atm number.subint multipoint ATM(config)# lane client ethernet vlan-num elan-num 32.用show lane server 顯示LES的狀態(tài).33.用show lane bus顯示bus的狀態(tài).34.用show lane database顯示LECS數(shù)據(jù)庫(kù)可內(nèi)容.35.用show lane client顯示LEC的狀態(tài).36.用show module顯示已安裝的模塊列表.37.用物理接口建立與VLAN的連接: router# configure terminal router(config)# interface media module/port router(config-if)# description description-string router(config-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown 38.用中繼鏈路來(lái)建立與VLAN的連接: router(config)# interface module/port.subinterface router(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask 39.用LANE 來(lái)建立與VLAN的連接: router(config)# interface atm module/port router(config-if)# no ip address router(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilni router(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-num router(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(config-if)# …

40.為了在路由處理器上進(jìn)行動(dòng)態(tài)路由配置,可以用下列IOS命令來(lái)進(jìn)行: router(config)# ip routing router(config)# router ip-routing-protocol router(config-router)# network ip-network-number router(config-router)# network ip-network-number 41.配置默認(rèn)路由: switch(enable)set ip route default gateway 42.為一個(gè)路由處理器分配VLANID,可在接口模式下使用下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43.在路由處理器啟用MLSP: router(config)# mls rp ip 44.為了把一個(gè)外置的路由處理器接口和交換機(jī)安置在同一個(gè)VTP域中: router(config)# interface interface number router(config-if)# mls rp vtp-domain domain-name 45.查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name 46.要確定RSM或路由器上的管理接口,可以在接口模式下輸入下列命令: router(config-if)#mls rp management-interface 47.要檢驗(yàn)MLS-RP的配置情況: router# show mls rp 48.檢驗(yàn)特定接口上的MLS配置:

router# show mls rp interface interface number 49.為了在MLS-SE上設(shè)置流掩碼而又不想在任一個(gè)路由處理器接口上設(shè)置訪(fǎng)問(wèn)列表: set mls flow [destination|destination-source|full] 50.為使MLS和輸入訪(fǎng)問(wèn)列表可以兼容,可以在全局模式下使用下列命令: router(config)# mls rp ip input-acl [page] 51.當(dāng)某個(gè)交換機(jī)的第3層交換失效時(shí),可在交換機(jī)的特權(quán)模式下輸入下列命令: switch(enable)set mls enable 52.若想改變老化時(shí)間的值,可在特權(quán)模式下輸入以下命令: switch(enable)set mls agingtime agingtime 53.設(shè)置快速老化:

switch(enable)set mls agingtime fast fastagingtime pkt_threshold 54.確定那些MLS-RP和MLS-SE參與了MLS,可先顯示交換機(jī)引用列表中的內(nèi)容再確定: switch(enable)show mls include 55.顯示MLS高速緩存記錄: switch(enable)show mls entry 56.用命令show in arp顯示ARP高速緩存區(qū)的內(nèi)容。

57.要把路由器配置為HSRP備份組的成員,可以在接口配置模式下使用下面的命令: router(config-if)# standby group-number ip ip-address 58.為了使一個(gè)路由器重新恢復(fù)轉(zhuǎn)發(fā)路由器的角色,在接口配置模式下: router(config-if)# standy group-number preempt 59.訪(fǎng)問(wèn)時(shí)間和保持時(shí)間參數(shù)是可配置的:

router(config-if)# standy group-number timers hellotime holdtime 60.配置HSRP跟蹤:

router(config-if)# standy group-number track type-number interface-priority 61.要顯示HSRP路由器的狀態(tài):

router# show standby type-number group brief 62.用命令show ip igmp確定當(dāng)選的查詢(xún)器。63.啟動(dòng)IP組播路由選擇:

router(config)# ip muticast-routing 64.啟動(dòng)接口上的PIM:

dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode} 65.啟動(dòng)稀疏-稠密模式下的PIM: router# ip multicast-routing router# interface type number router# ip pim sparse-dense-mode 66.核實(shí)PIM的配置:

dallasr1># show ip pim interface[type number] [count] 67.顯示PIM鄰居:

dallasr1># show ip neighbor type number 68.為了配置RP的地址,命令如下:

dallasr1># ip pim rp-address ip-address [group-access-list-number][override] 69.選擇一個(gè)默認(rèn)的RP: dallasr1># ip pim rp-address 通告RP和它所服務(wù)的組范圍:

dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number 為管理范圍組通告RP的地址:

dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1 dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255 設(shè)定一個(gè)RP映像代理:

dallasr1># ip pim send-rp-discovery scope ttl 核實(shí)組到RP的映像:

dallasr1># show ip pim rp mapping dallasr1># show ip pim rp [group-name|group-address] [mapping] 70.在路由器接口上用命令ip multicast ttl-threshold ttl-value設(shè)定TTL閥值: dallasr1>(config-if)# ip multicast ttl-threshold ttl-value 71.用show ip pim neighbor顯示PIM鄰居表。72.顯示組播通信路由表中的各條記錄:

dallasr1>show ip mroute [group-name|group-address][scoure][summary][count][active kbps] 73.要記錄一個(gè)路由器接受和發(fā)送的全部IP組播包:

dallasr1> #debug ip mpacket [detail] [access-list][group] 74.要在CISCO路由器上配置CGMP: dallasr1>(config-if)# ip cgmp 75.配置一個(gè)組播路由器,使之加入某一個(gè)特定的組播組: dallasr1>(config-if)# ip igmp join-group group-address 76.關(guān)閉 CGMP:

dallasr1>(config-if)# no ip cgmp 77.啟動(dòng)交換機(jī)上的CGMP:

dallasr1>(enable)set cgmp enable 78.核實(shí)Catalyst交換機(jī)上CGMP的配置情況: catalystla1>(enable)show config set prompt catalystla1> set interface sc0 192.168.1.1 255.255.255.0 set cgmp enable 79.CGMP離開(kāi)的設(shè)置:

Dallas_SW(enable)set cgmp leave 80.在Cisco設(shè)備上修改控制端口密碼: R1(config)# line console 0 R1(config-line)# login R1(config-line)# password Lisbon R1(config)# enable password Lilbao R1(config)# login local R1(config)# username student password cisco 81.在Cisco設(shè)備上設(shè)置控制臺(tái)及vty端口的會(huì)話(huà)超時(shí): R1(config)# line console 0 R1(config-line)# exec-timeout 5 10 R1(config)# line vty 0 4 R1(config-line)# exec-timeout 5 2 82.在Cisco設(shè)備上設(shè)定特權(quán)級(jí):

R1(config)# privilege configure level 3 username R1(config)# privilege configure level 3 copy run start R1(config)# privilege configure level 3 ping R1(config)# privilege configure level 3 show run R1(config)# enable secret level 3 cisco 83.使用命令privilege 可定義在該特權(quán)級(jí)下使用的命令: router(config)# privilege mode level level command 84.設(shè)定用戶(hù)特權(quán)級(jí):

router(config)# enable secret level 3 dallas router(config)# enable secret san-fran router(config)# username student password cisco 85.標(biāo)志設(shè)置與顯示:

R1(config)# banner motd ‘unauthorized access will be prosecuted!’ 86.設(shè)置vty訪(fǎng)問(wèn):

R1(config)# access-list 1 permit 192.168.2.5 R1(config)# line vty 0 4 R1(config)# access-class 1 in 87.配置HTTP訪(fǎng)問(wèn):

Router3(config)# access-list 1 permit 192.168.10.7 Router3(config)# ip http sever Router3(config)# ip http access-class 1 Router3(config)# ip http authentication local Router3(config)# username student password cisco 88.要啟用HTTP訪(fǎng)問(wèn),請(qǐng)鍵入以下命令: switch(config)# ip http sever 89.在基于set命令的交換機(jī)上用setCL1啟動(dòng)和核實(shí)端口安全:

switch(enable)set port security mod_num/port_num…enable mac address switch(enable)show port mod_num/port_num 在基于CiscoIOS命令的交換機(jī)上啟動(dòng)和核實(shí)端口安全:

switch(config-if)# port secure [mac-mac-count maximum-MAC-count] switch# show mac-address-table security [type module/port] 90.用命令access-list在標(biāo)準(zhǔn)通信量過(guò)濾表中創(chuàng)建一條記錄:

Router(config)# access-list access-list-number {permit|deny} source-address [source-address] 91.用命令access-list在擴(kuò)展通信量過(guò)濾表中創(chuàng)建一條記錄: Router(config)# access-list access-list-number {permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log] 92.對(duì)于帶內(nèi)路由更新,配置路由更新的最基本的命令格式是:

R1(config-router)#distribute-list access-list-number|name in [type number] 93.對(duì)于帶外路由更新,配置路由更新的最基本的命令格式是:

R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process| autonomous-system-number 94.set snmp命令選項(xiàng):

set snmp community {read-only|ready-write|read-write-all}[community_string] 95.set snmp trap 命令格式如下: set snmp trap {enable|disable} [all|moudle|classis|bridge|repeater| auth|vtp|ippermit|vmps|config|entity|stpx] set snmp trap rvcr_addr rcvr_community 96.啟用SNMP chassis 陷阱: Console>(enable)set snmp trap enable chassis 97.啟用所有SNMP chassis 陷阱: Console>(enable)set snmp trap enable 98.禁用SNMP chassis 陷阱: Console>(enable)set snmp trap disable chassis 99.給SNMP陷阱接收表加一條記錄:

Console>(enable)set snmp trap 192.122.173.42 public 100.show snmp 輸出結(jié)果。

101.命令set snmp rmon enable 的輸出結(jié)果。102.顯示SPAN信息: Consile> show span

第二篇:思科三層交換機(jī)配置總結(jié)

思科交換機(jī)的基本配置命令學(xué)習(xí)

CISCO交換機(jī)基本配置:Console端口連接 用戶(hù)模式hostname# ;

特權(quán)模式hostname(config)# ;

全局配置模式hostname(config-if)# ; 交換機(jī)口令設(shè)置:

switch>enable ;進(jìn)入特權(quán)模式

switch#config terminal ;進(jìn)入全局配置模式

switch(config)#hostname csico ;設(shè)置交換機(jī)的主機(jī)名 switch(config)#enable secret csico1 ;設(shè)置特權(quán)加密口令 switch(config)#enable password csico8 ;設(shè)置特權(quán)非密口令 switch(config)#line console 0 ;進(jìn)入控制臺(tái)口 switch(config-line)#line vty 0 4 ;進(jìn)入虛擬終端 switch(config-line)#login ;虛擬終端允許登錄

switch(config-line)#password csico6 ;設(shè)置虛擬終端登錄口令csico6 switch#exit ;返回命令

交換機(jī)VLAN創(chuàng)建,刪除,端口屬性的設(shè)置,配置trunk端口,將某端口加入vlan中,配置VTP: switch#vlan database ;進(jìn)入VLAN設(shè)置 switch(vlan)#vlan 2 ;建VLAN 2

switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名為vlan3 switch(vlan)#no vlan 2 ;刪vlan 2 switch(config)#int f0/1 ;進(jìn)入端口1

switch(config)#speed ? 查看speed命令的子命令

switch(config)#speed 100 設(shè)置該端口速率為100mb/s(10/auto)switch(config)#duplex ? 查看duplex的子命令

switch(config)#duplex full 設(shè)置該端口為全雙工(auto/half)

switch(config)#description TO_PC1 這是該端口描述為T(mén)O_PC1 switch(config-if)#switchport access vlan 2 ;當(dāng)前端口加入vlan 2

switch(config-if)#switchport mode trunk ;設(shè)置為trunk模式(access模式)switch(config-if)#switchport trunk allowed vlan 1,2 ;設(shè)置允許的vlan switch(config-if)#switchport trunk encap dot1q ;設(shè)置vlan 中繼 switch(config)#vtp domain vtpserver ;設(shè)置vtp域名相同 switch(config)#vtp password ;設(shè)置發(fā)vtp密碼 switch(config)#vtp server ;設(shè)置vtp服務(wù)器模式 switch(config)#vtp client ;設(shè)置vtp客戶(hù)機(jī)模式

交換機(jī)設(shè)置IP地址,默認(rèn)網(wǎng)關(guān),域名,域名服務(wù)器,配置和查看MAC地址表: switch(config)#interface vlan 1 ;進(jìn)入vlan 1

switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;設(shè)置IP地址 switch(config)#ip default-gateway 192.168.1.6 ;設(shè)置默認(rèn)網(wǎng)關(guān) switch(config)#ip domain-name cisco.com 設(shè)置域名

switch(config)#ip name-server 192.168.1.18 設(shè)置域名服務(wù)器

switch(config)#mac-address-table? 查看mac-address-table的子命令

switch(config)#mac-address-table aging-time 100 設(shè)置超時(shí)時(shí)間為100ms

switch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口

switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入靜態(tài)地址目標(biāo)端口f0/6源端口f0/7

switch(config)#end switch#show mac-address-table 查看整個(gè)MAC地址表

switch#clear mac-address-table restricted static 清除限制性靜態(tài)地址 交換機(jī)顯示命令:

switch#write ;保存配置信息

switch#show vtp ;查看vtp配置信息 switch#show run ;查看當(dāng)前配置信息 switch#show vlan ;查看vlan配置信息 switch#show interface ;查看端口信息 switch#show int f0/0 ;查看指定端口信息

switch#show int f0/0 status;查看指定端口狀態(tài) switch#dir flash: ;查看閃存

Cisco路由器配置命令大全網(wǎng)絡(luò) 2010-06-26 06:43:44 閱讀657 評(píng)論0 字號(hào):大中小 訂閱.(1)模式轉(zhuǎn)換命令

用戶(hù)模式----特權(quán)模式,使用命令“enable”

特權(quán)模式----全局配置模式,使用命令“config t”

全局配置模式----接口模式,使用命令“interface+接口類(lèi)型+接口號(hào)” 全局配置模式----線(xiàn)控模式,使用命令“l(fā)ine+接口類(lèi)型+接口號(hào)” 注:

用戶(hù)模式:查看初始化的信息.特權(quán)模式:查看所有信息、調(diào)試、保存配置信息

全局模式:配置所有信息、針對(duì)整個(gè)路由器或交換機(jī)的所有接口 接口模式:針對(duì)某一個(gè)接口的配置

線(xiàn)控模式:對(duì)路由器進(jìn)行控制的接口配置(2)配置命令

show running config 顯示所有的配置 show versin 顯示版本號(hào)和寄存器值 shut down 關(guān)閉接口 no shutdown 打開(kāi)接口

ip add +ip地址 配置IP地址

secondary+IP地址 為接口配置第二個(gè)IP地址 show interface+接口類(lèi)型+接口號(hào) 查看接口管理性 show controllers interface 查看接口是否有DCE電纜 show history 查看歷史記錄

show terminal 查看終端記錄大小

hostname+主機(jī)名 配置路由器或交換機(jī)的標(biāo)識(shí) config memory 修改保存在NVRAM中的啟動(dòng)配置 exec timeout 0 0 設(shè)置控制臺(tái)會(huì)話(huà)超時(shí)為0 service password-encryptin 手工加密所有密碼 enable password +密碼 配置明文密碼 ena sec +密碼 配置密文密碼 line vty 0 4/15 進(jìn)入telnet接口 password +密碼 配置telnet密碼 line aux 0 進(jìn)入AUX接口 password +密碼 配置密碼 line con 0 進(jìn)入CON接口 password +密碼 配置密碼 bandwidth+數(shù)字 配置帶寬 no ip address 刪除已配置的IP地址

show startup config 查看NVRAM中的配置信息 copy run-config atartup config 保存信息到NVRAM write 保存信息到NVRAM

erase startup-config 清除NVRAM中的配置信息 show ip interface brief 查看接口的謫要信息

banner motd # +信息 + # 配置路由器或交換機(jī)的描素信息 description+信息 配置接口聽(tīng)描素信息 vlan database 進(jìn)入VLAN數(shù)據(jù)庫(kù)模式 vlan +vlan號(hào)+ 名稱(chēng) 創(chuàng)建VLAN

switchport access vlan +vlan號(hào) 為VLAN為配接口 interface vlan +vlan號(hào) 進(jìn)入VLAN接口模式 ip add +ip地址 為VLAN配置管理IP地址

vtp+service/tracsparent/client 配置SW的VTP工作模式 vtp +domain+域名 配置SW的VTP域名 vtp +password +密碼 配置SW的密碼 switchport mode trunk 啟用中繼 no vlan +vlan號(hào) 刪除VLAN

show spamming-tree vlan +vlan號(hào) 查看VLA怕生成樹(shù)議 2.路由器配置命令

ip route+非直連網(wǎng)段+子網(wǎng)掩碼+下一跳地址 配置靜態(tài)/默認(rèn)路由 show ip route 查看路由表

show protocols 顯示出所有的被動(dòng)路由協(xié)議和接口上哪些協(xié)議被設(shè)置

show ip protocols 顯示了被配置在路由器上的路由選擇協(xié)議,同時(shí)給出了在路由選擇協(xié)議中使用 的定時(shí)器 等信息

router rip 激活RIP協(xié)議

network +直連網(wǎng)段 發(fā)布直連網(wǎng)段 interface lookback 0 激活邏輯接口

passive-interface +接口類(lèi)型+接口號(hào) 配置接口為被動(dòng)模式 debug ip +協(xié)議 動(dòng)態(tài)查看路由更新信息 undebug all 關(guān)閉所有DEBUG信息

router eigrp +as號(hào) 激活EIGRP路由協(xié)議 network +網(wǎng)段+子網(wǎng)掩碼 發(fā)布直連網(wǎng)段 show ip eigrp neighbors 查看鄰居表 show ip eigrp topology 查看拓?fù)浔?show ip eigrp traffic 查看發(fā)送包數(shù)量 router ospf +process-ID 激活OSPF協(xié)議

network+直連網(wǎng)段+area+區(qū)域號(hào) 發(fā)布直連網(wǎng)段 show ip ospf 顯示OSPF的進(jìn)程號(hào)和ROUTER-ID encapsulation+封裝格式 更改封裝格式

no ip admain-lookup 關(guān)閉路由器的域名查找 ip routing 在三層交換機(jī)上啟用路由功能 show user 查看SW的在線(xiàn)用戶(hù) clear line +線(xiàn)路號(hào) 清除線(xiàn)路 3.三層交換機(jī)配置命令 配置一組二層端口 configure terminal 進(jìn)入配置狀態(tài)

nterface range {port-range} 進(jìn)入組配置狀態(tài) 配置三層端口

configure terminal 進(jìn)入配置狀態(tài)

interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 進(jìn)入端口配置狀態(tài) no switchport 把物理端口變成三層口

ip address ip_address subnet_mask 配置IP地址和掩碼 no shutdown 激活端口 例:

Switch(config)# interface gigabitethernet0/2 Switch(config-if)# no switchport

Switch(config-if)# ip address 192.20.135.21 255.255.255.0 Switch(config-if)# no shutdown 配置VLAN

configure terminal 進(jìn)入配置狀態(tài)

vlan vlan-id 輸入一個(gè)VLAN號(hào), 然后進(jìn)入vlan配態(tài),可以輸入一個(gè)新的VLAN號(hào)或舊的來(lái)進(jìn)行修改。

name vlan-name 可選)輸入一個(gè)VLAN名,如果沒(méi)有配置VLAN名,缺省的名字是VLAN號(hào)前面用0填滿(mǎn) 的4位數(shù),如VLAN0004是VLAN4的缺省名字 mtu mtu-size(可選)改變MTU大小 例

Switch# configure terminal Switch(config)# vlan 20

Switch(config-vlan)# name test20 Switch(config-vlan)# end 或

Switch# vlan database

Switch(vlan)# vlan 20 name test20 Switch(vlan)# exit

將端口分配給一個(gè)VLAN

configure terminal 進(jìn)入配置狀態(tài)

interface interface-id 進(jìn)入要分配的端口 switchport mode access 定義二層口

switchport access vlan vlan-id 把端口分配給某一VLAN 例

Switch# configure terminal

Enter configuration commands, one per line.End with CNTL/Z.Switch(config)# interface fastethernet0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config-if)# end Switch#

配置VLAN trunk

configure terminal 進(jìn)入配置狀態(tài)

interface interface-Id 進(jìn)入端口配置狀態(tài)

switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封裝ISL 或 802.1Q 或 自動(dòng)協(xié)商 switchport mode {dynamic {auto | desirable} | trunk} 配置二層trunk模式。dynamic auto—自動(dòng)協(xié)商是否成為trunk

dynamic desirable—把端口設(shè)置為trunk如果對(duì)方端口是trunk, desirable, 配置Native VLAN(802.1q)

或自動(dòng)模式,trunk—設(shè)置端口為強(qiáng)制的trunk方式,而不理會(huì)對(duì)方端口是否為trunk switchport access vlan vlan-id 可選)指定一個(gè)缺省VLAN, 如果此端口不再是trunk switchport trunk native vlan vlan-id 指定802.1Q native VLAN號(hào) 例:

Switch# configure terminal

Enter configuration commands, one per line.End with CNTL/Z.Switch(config)# interface fastethernet0/4 Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# end

定義TRUNK允許的VLAN

configure terminal子 進(jìn)入配置狀態(tài) interface interface-id 進(jìn)入端口配置

switchport mode trunk 配置二層口為trunk

switchport trunk allowed vlan {add | all | except | remove} vlan-list可選)配置trunk允 許的VLAN.使用add, all, except, remove關(guān)健字

no switchport trunk allowed vlan 允許所有VLAN通過(guò) 例

Switch(config)# interface fastethernet0/1

Switch(config-if)# switchport trunk allowed vlan remove 2 Switch(config-if)# end

配置Native VLAN(802.1q)configure terminal 進(jìn)入配置狀態(tài)

interface interface-id 進(jìn)入配置成802.1qtrunk的端口 switchport trunk native vlan vlan-Id 配置native VLAN號(hào)

no switchport trunk native vlan 端口配置命令回到缺省的狀態(tài) 配置基于端口權(quán)值的負(fù)載均衡

configure terminal 進(jìn)入Switch 1配置狀態(tài) vtp domain domain-name 配置VTP域

vtp mode server 將Switch 1配置成VTP server.show vtp status 驗(yàn)證VTP的配置 show vlan 驗(yàn)證VLAN

configure terminal 進(jìn)入配置狀態(tài)

interface fastethernet 0/1 進(jìn)入F0/1端口

switchport trunk encapsulation {isl | dot1q | negotiate}配置trunk封裝 switchport mode trunk 配置成trunk

show interfaces fastethernet0/1 switchport 驗(yàn)證VLAN配置 按以上步驟對(duì)想要負(fù)載均衡的接口進(jìn)行配置 在另一個(gè)交換機(jī)上進(jìn)行此配置

show vlan 當(dāng)trunk已經(jīng)起來(lái),在switch2上驗(yàn)證已經(jīng)學(xué)到相的vlan配置 configure terminal 在Switch 1上進(jìn)入配置狀態(tài) interface fastethernet0/1 進(jìn)入要配置的端口

spanning-tree vlan 8 port-priority 10 將端口權(quán)值10賦與VLAN 8.spanning-tree vlan 9 port-priority 10 將端口權(quán)值10賦與VLAN 9.spanning-tree vlan 10 port-priority 10 將端口權(quán)值10賦與VLAN 10.interface fastethernet0/2 進(jìn)入F0/2

spanning-tree vlan 3 port-priority 10 將端口權(quán)值10賦與VLAN 3.spanning-tree vlan 4 port-priority 10 將端口權(quán)值10賦與VLAN 4 spanning-tree vlan 5 port-priority 10 將端口權(quán)值10賦與VLAN 5 spanning-tree vlan 6 port-priority 10 將端口權(quán)值10賦與VLAN 10 end 退出

show running-config 驗(yàn)證配置

copy running-config startup-config 保存配置 配置STP路徑值的負(fù)載均衡

Trunk1走VLAN8-10,Trunk2走VLAN2-4 configure terminal 進(jìn)入 Switch 1配置狀態(tài) interface fastethernet 0/1 進(jìn)入F0/1

switchport trunk encapsulation {isl | dot1q | negotiate}配置封裝 switchport mode trunk 配置Trunk,缺省是ISL封裝 exit 退回

在F0/2口上重復(fù)2-4步驟 exit 退回

show running-config 驗(yàn)證配置

show vlan驗(yàn)證switch1 已經(jīng)學(xué)到Vlan configure terminal 進(jìn)入配置狀態(tài) interface fastethernet 0/1 進(jìn)入F0/1

spanning-tree vlan 2 cost 30 設(shè)置Vlan2生成樹(shù)路徑值為30 spanning-tree vlan 3 cost 30 設(shè)置Vlan3生成樹(shù)路徑值為30 spanning-tree vlan 4 cost 30 設(shè)置Vlan4生成樹(shù)路徑值為30 end 退出

在switch1的F0/2上重復(fù)9-11步驟設(shè)置VLAN8,9,10生成樹(shù)路徑值為30 end 退出

show running-config 驗(yàn)證配置

copy running-config startup-config 保存配置 補(bǔ)充:CISCO命令集——路由選擇協(xié)議及排障 *ip route命令

Router(config)# ip route <目錄網(wǎng)絡(luò)或子網(wǎng)號(hào)> [子網(wǎng)掩碼] <下一路由器IP地址 | 從本地出口 的地址> [管理距離0~255,默認(rèn)為1](注:靜態(tài)地址配置)*ip default-network命令

Router(config)# ip default-network <目標(biāo)網(wǎng)絡(luò)號(hào)>

(注:配合路由協(xié)使用,用其中的一個(gè)動(dòng)態(tài)路由號(hào)作默認(rèn)路由配置)

Router(config)# ip route 0.0.0.0 0.0.0.0 <下一路由器IP地址 | 從本地出口的地址>(注:只有一個(gè)公網(wǎng)地址時(shí),在出口路由器上的配置)*內(nèi)部路由選擇協(xié)議

*使用router和network命令

Router(config)# router <路由協(xié)議rip | igrp | eigrp | ospf | is-is等> [自主系統(tǒng)號(hào)] Router(config-router)# network <直接相連的要用此路由協(xié)議的網(wǎng)絡(luò)號(hào)> Router(config-router)# network <直接相連的要用此路由協(xié)議的網(wǎng)絡(luò)號(hào)> *路由信息協(xié)議RIP

Router(config)# router rip Router(config-router)# network <直接相連的要用rip協(xié)議的有類(lèi)別網(wǎng)絡(luò)號(hào)> Router# show ip protocols Router# show ip route Router# debug ip rip

*內(nèi)部網(wǎng)關(guān)路由協(xié)議IGRP

Router(config)# router igrp <自主系統(tǒng)號(hào)>

Router(config-router)# network <直接相連的要用igrp協(xié)議的有類(lèi)別網(wǎng)絡(luò)號(hào)> Router# show ip interface Router# show ip protocols Router# show ip route Router# debug ip rip *排除網(wǎng)絡(luò)故障

排除網(wǎng)絡(luò)故障的一個(gè)總體模型

Router# ping <有故障的主機(jī) | 有故障的IP地址> Router# show ip route

Router# show interface <有故障的接口> Router# show run *IP的故故障排除 檢查可用的路由

Router# show ip route <有故障的IP地址> 27.4.4 跟蹤路由(Tracing the Route)

SUN-A> traceroute <有故障的主機(jī) | 有故障的IP地址> C:/windows/> winipcfg C:/windows/> ipconfig C:/windows/> ipconfig / all

C:/windows/> tracert <有故障的主機(jī) | 有故障的IP地址> 使用擴(kuò)展的ping來(lái)跟蹤連接性 Router# ping

*其它可能的故障

一個(gè)地址解析(ARP)的故障 Router# show arp

Router# show interface <有故障的接口> C:/windows/> arp-a SUN-A> arp –a

驗(yàn)證終端系統(tǒng)的路由表 C:/windows/> netstat –rn

C:/windows/> route –f add 0.0.0.0 mask 0.0.0.0 <需要添加入的網(wǎng)關(guān)地址> C:/windows/> route [–f ] [[print | add | delete | change] [destination] [mask netmask] [gateway]]

C:/windows/> route add mask <網(wǎng)絡(luò)掩碼> <網(wǎng)關(guān)ip地址> C:/windows/> route delete mask <網(wǎng)絡(luò)掩碼> <網(wǎng)關(guān)ip地址> C:/windows/> nbtstat <相應(yīng)的參數(shù)> SUN-A> netstat-rn路由器

CISCO交換機(jī)配置命令大全2009-08-13 21:131.在基于IOS的交換機(jī)上設(shè)置主機(jī)名/系統(tǒng)名: switch(config)# hostname hostname

在基于CLI的交換機(jī)上設(shè)置主機(jī)名/系統(tǒng)名: switch(enable)set system name name-string 2.在基于IOS的交換機(jī)上設(shè)置登錄口令:

switch(config)# enable password level 1 password 在基于CLI的交換機(jī)上設(shè)置登錄口令: switch(enable)set password switch(enable)set enalbepass

3.在基于IOS的交換機(jī)上設(shè)置遠(yuǎn)程訪(fǎng)問(wèn): switch(config)# interface vlan 1

switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交換機(jī)上設(shè)置遠(yuǎn)程訪(fǎng)問(wèn):

switch(enable)set interface sc0 ip-address netmask broadcast-address switch(enable)set interface sc0 vlan

switch(enable)set ip route default gateway

4.在基于IOS的交換機(jī)上啟用和瀏覽CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable

為了查看Cisco鄰接設(shè)備的CDP通告信息: switch# show cdp interface [type modle/port]

switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交換機(jī)上啟用和瀏覽CDP信息: switch(enable)set cdp {enable|disable} module/port 為了查看Cisco鄰接設(shè)備的CDP通告信息:

switch(enable)show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交換機(jī)的端口描述:

switch(config-if)# description description-string 基于CLI的交換機(jī)的端口描述:

switch(enable)set port name module/number description-string 6.在基于IOS的交換機(jī)上設(shè)置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交換機(jī)上設(shè)置端口速度:

switch(enable)set port speed moudle/number {10|100|auto} switch(enable)set port speed moudle/number {4|16|auto} 7.在基于IOS的交換機(jī)上設(shè)置以太網(wǎng)的鏈路模式: switch(config-if)# duplex {auto|full|half}

在基于CLI的交換機(jī)上設(shè)置以太網(wǎng)的鏈路模式:

switch(enable)set port duplex module/number {full|half} 8.在基于IOS的交換機(jī)上配置靜態(tài)VLAN: switch# vlan database

switch(vlan)# vlan vlan-num name vla switch(vlan)# exit

switch# configure teriminal

switch(config)# interface interface module/number switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num switch(config-if)# end

在基于CLI的交換機(jī)上配置靜態(tài)VLAN: switch(enable)set vlan vlan-num [name name]

switch(enable)set vlan vlan-num mod-num/port-list 9.在基于IOS的交換機(jī)上配置VLAN中繼線(xiàn): switch(config)# interface interface mod/port switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交換機(jī)上配置VLAN中繼線(xiàn):

switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]

10.在基于IOS的交換機(jī)上配置VTP管理域: switch# vlan database

switch(vlan)# vtp domain domain-name 在基于CLI的交換機(jī)上配置VTP管理域: switch(enable)set vtp [domain domain-name] 11.在基于IOS的交換機(jī)上配置VTP 模式: switch# vlan database

switch(vlan)# vtp domain domain-name switch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交換機(jī)上配置VTP 模式:

switch(enable)set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12.在基于IOS的交換機(jī)上配置VTP版本: switch# vlan database

switch(vlan)# vtp v2-mode

在基于CLI的交換機(jī)上配置VTP版本: switch(enable)set vtp v2 enable

13.在基于IOS的交換機(jī)上啟動(dòng)VTP剪裁: switch# vlan database switch(vlan)# vtp pruning

在基于CL I 的交換機(jī)上啟動(dòng)VTP剪裁: switch(enable)set vtp pruning enable

14.在基于IOS的交換機(jī)上配置以太信道:

switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交換機(jī)上配置以太信道:

switch(enable)set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交換機(jī)上調(diào)整根路徑成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交換機(jī)上調(diào)整根路徑成本:

switch(enable)set spantree portcost moudle/port cost

switch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交換機(jī)上調(diào)整端口ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交換機(jī)上調(diào)整端口ID:

switch(enable)set spantree portpri {mldule/port}priority

switch(enable)set spantree portvlanpri {module/port}priority [vlans] 17.在基于IOS的交換機(jī)上修改STP時(shí)鐘:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交換機(jī)上修改STP時(shí)鐘:

switch(enable)set spantree hello interval[vlan] switch(enable)set spantree fwddelay delay [vlan] switch(enable)set spantree maxage agingtiame[vlan]

18.在基于IOS的交換機(jī)端口上啟用或禁用Port Fast 特征: switch(config-if)#spanning-tree portfast

在基于CLI的交換機(jī)端口上啟用或禁用Port Fast 特征:

switch(enable)set spantree portfast {module/port}{enable|disable} 19.在基于IOS的交換機(jī)端口上啟用或禁用UplinkFast 特征:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交換機(jī)端口上啟用或禁用UplinkFast 特征:

switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

20.為了將交換機(jī)配置成一個(gè)集群的命令交換機(jī),首先要給管理接口分配一個(gè)IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name

21.為了從一條中繼鏈路上刪除VLAN,可使用下列命令: switch(enable)clear trunk module/port vlan-range 22.用show vtp domain 顯示管理域的VTP參數(shù).23.用show vtp statistics顯示管理域的VTP參數(shù).24.在Catalyst交換機(jī)上定義TrBRF的命令如下:

switch(enable)set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25.在Catalyst交換機(jī)上定義TrCRF的命令如下:

switch(enable)set vlan vlan-num [name name] type trcrf

{ring hex-ring-num|decring decimal-ring-num} parent vlan-num

26.在創(chuàng)建好TrBRF VLAN之后,就可以給它分配交換機(jī)端口.對(duì)于以太網(wǎng)交換,可以采用如下命令給VLAN分配端口:

switch(enable)set vlan vlan-num mod-num/port-num

27.命令show spantree顯示一個(gè)交換機(jī)端口的STP狀態(tài).28.配置一個(gè)ELAN的LES和BUS,可以使用下列命令: ATM(config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29.配置LECS:

ATM(config)# lane database database-name

ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name …

30.創(chuàng)建完數(shù)據(jù)庫(kù)后,必須在主接口上啟動(dòng)LECS.命令如下: ATM(config)# interface atm number

ATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address

31.將每個(gè)LEC配置到一個(gè)不同的ATM子接口上.命令如下: ATM(config)# interface atm number.subint multipoint ATM(config)# lane client ethernet vlan-num elan-num 32.用show lane server 顯示LES的狀態(tài).33.用show lane bus顯示bus的狀態(tài).34.用show lane database顯示LECS數(shù)據(jù)庫(kù)可內(nèi)容.35.用show lane client顯示LEC的狀態(tài).36.用show module顯示已安裝的模塊列表.37.用物理接口建立與VLAN的連接: router# configure terminal

router(config)# interface media module/port router(config-if)# description description-string router(config-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown

38.用中繼鏈路來(lái)建立與VLAN的連接:

router(config)# interface module/port.subinterface

router(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask 39.用LANE 來(lái)建立與VLAN的連接: router(config)# interface atm module/port router(config-if)# no ip address

router(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilni

router(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-num

router(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(config-if)# …

40.為了在路由處理器上進(jìn)行動(dòng)態(tài)路由配置,可以用下列IOS命令來(lái)進(jìn)行: router(config)# ip routing

router(config)# router ip-routing-protocol

router(config-router)# network ip-network-number router(config-router)# network ip-network-number 41.配置默認(rèn)路由:

switch(enable)set ip route default gateway

42.為一個(gè)路由處理器分配VLANID,可在接口模式下使用下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43.在路由處理器啟用MLSP: router(config)# mls rp ip

44.為了把一個(gè)外置的路由處理器接口和交換機(jī)安置在同一個(gè)VTP域中: router(config)# interface interface number

router(config-if)# mls rp vtp-domain domain-name 45.查看指定的VTP域的信息:

router# show mls rp vtp-domain vtp domain name

46.要確定RSM或路由器上的管理接口,可以在接口模式下輸入下列命令: router(config-if)#mls rp management-interface 47.要檢驗(yàn)MLS-RP的配置情況: router# show mls rp

48.檢驗(yàn)特定接口上的MLS配置:

router# show mls rp interface interface number

49.為了在MLS-SE上設(shè)置流掩碼而又不想在任一個(gè)路由處理器接口上設(shè)置訪(fǎng)問(wèn)列表: set mls flow [destination|destination-source|full]

50.為使MLS和輸入訪(fǎng)問(wèn)列表可以兼容,可以在全局模式下使用下列命令: router(config)# mls rp ip input-acl

51.當(dāng)某個(gè)交換機(jī)的第3層交換失效時(shí),可在交換機(jī)的特權(quán)模式下輸入下列命令: switch(enable)set mls enable

52.若想改變老化時(shí)間的值,可在特權(quán)模式下輸入以下命令: switch(enable)set mls agingtime agingtime 53.設(shè)置快速老化:

switch(enable)set mls agingtime fast fastagingtime pkt_threshold

54.確定那些MLS-RP和MLS-SE參與了MLS,可先顯示交換機(jī)引用列表中的內(nèi)容再確定: switch(enable)show mls include 55.顯示MLS高速緩存記錄: switch(enable)show mls entry

56.用命令show in arp顯示ARP高速緩存區(qū)的內(nèi)容。

57.要把路由器配置為HSRP備份組的成員,可以在接口配置模式下使用下面的命令: router(config-if)# standby group-number ip ip-address 58.為了使一個(gè)路由器重新恢復(fù)轉(zhuǎn)發(fā)路由器的角色,在接口配置模式下: router(config-if)# standy group-number preempt 59.訪(fǎng)問(wèn)時(shí)間和保持時(shí)間參數(shù)是可配置的:

router(config-if)# standy group-number timers hellotime holdtime 60.配置HSRP跟蹤:

router(config-if)# standy group-number track type-number interface-priority 61.要顯示HSRP路由器的狀態(tài):

router# show standby type-number group brief 62.用命令show ip igmp確定當(dāng)選的查詢(xún)器。63.啟動(dòng)IP組播路由選擇:

router(config)# ip muticast-routing 64.啟動(dòng)接口上的PIM:

dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode} 65.啟動(dòng)稀疏-稠密模式下的PIM: router# ip multicast-routing router# interface type number router# ip pim sparse-dense-mode 66.核實(shí)PIM的配置:

dallasr1># show ip pim interface[type number] [count] 67.顯示PIM鄰居:

dallasr1># show ip neighbor type number 68.為了配置RP的地址,命令如下:

dallasr1># ip pim rp-address ip-address [group-access-list-number][override] 69.選擇一個(gè)默認(rèn)的RP: dallasr1># ip pim rp-address

通告RP和它所服務(wù)的組范圍:

dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number 為管理范圍組通告RP的地址:

dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1 dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255 設(shè)定一個(gè)RP映像代理:

dallasr1># ip pim send-rp-discovery scope ttl 核實(shí)組到RP的映像:

dallasr1># show ip pim rp mapping

dallasr1># show ip pim rp [group-name|group-address] [mapping]

70.在路由器接口上用命令ip multicast ttl-threshold ttl-value設(shè)定TTL閥值: dallasr1>(config-if)# ip multicast ttl-threshold ttl-value 71.用show ip pim neighbor顯示PIM鄰居表。72.顯示組播通信路由表中的各條記錄:

dallasr1>show ip mroute [group-name|group-address][scoure][summary][count][active kbps] 73.要記錄一個(gè)路由器接受和發(fā)送的全部IP組播包: dallasr1> #debug ip mpacket [detail] [access-list][group] 74.要在CISCO路由器上配置CGMP: dallasr1>(config-if)# ip cgmp

75.配置一個(gè)組播路由器,使之加入某一個(gè)特定的組播組: dallasr1>(config-if)# ip igmp join-group group-address 76.關(guān)閉 CGMP:

dallasr1>(config-if)# no ip cgmp 77.啟動(dòng)交換機(jī)上的CGMP: dallasr1>(enable)set cgmp enable 78.核實(shí)Catalyst交換機(jī)上CGMP的配置情況: catalystla1>(enable)show config set prompt catalystla1>

set interface sc0 192.168.1.1 255.255.255.0 set cgmp enable

79.CGMP離開(kāi)的設(shè)置:

Dallas_SW(enable)set cgmp leave

80.在Cisco設(shè)備上修改控制端口密碼: R1(config)# line console 0 R1(config-line)# login

R1(config-line)# password Lisbon R1(config)# enable password Lilbao R1(config)# login local

R1(config)# username student password cisco

81.在Cisco設(shè)備上設(shè)置控制臺(tái)及vty端口的會(huì)話(huà)超時(shí): R1(config)# line console 0

R1(config-line)# exec-timeout 5 10 R1(config)# line vty 0 4

R1(config-line)# exec-timeout 5 2 82.在Cisco設(shè)備上設(shè)定特權(quán)級(jí):

R1(config)# privilege configure level 3 username R1(config)# privilege configure level 3 copy run start R1(config)# privilege configure level 3 ping R1(config)# privilege configure level 3 show run R1(config)# enable secret level 3 cisco

83.使用命令privilege 可定義在該特權(quán)級(jí)下使用的命令: router(config)# privilege mode level level command 84.設(shè)定用戶(hù)特權(quán)級(jí):

router(config)# enable secret level 3 dallas router(config)# enable secret san-fran

router(config)# username student password cisco 85.標(biāo)志設(shè)置與顯示:

R1(config)# banner motd ‘unauthorized access will be prosecuted!’ 86.設(shè)置vty訪(fǎng)問(wèn):

R1(config)# access-list 1 permit 192.168.2.5 R1(config)# line vty 0 4

R1(config)# access-class 1 in 87.配置HTTP訪(fǎng)問(wèn):

Router3(config)# access-list 1 permit 192.168.10.7 Router3(config)# ip http sever

Router3(config)# ip http access-class 1

Router3(config)# ip http authentication local

Router3(config)# username student password cisco 88.要啟用HTTP訪(fǎng)問(wèn),請(qǐng)鍵入以下命令: switch(config)# ip http sever

89.在基于set命令的交換機(jī)上用setCL1啟動(dòng)和核實(shí)端口安全:

switch(enable)set port security mod_num/port_num…enable mac address switch(enable)show port mod_num/port_num

在基于CiscoIOS命令的交換機(jī)上啟動(dòng)和核實(shí)端口安全:

switch(config-if)# port secure [mac-mac-count maximum-MAC-count] switch# show mac-address-table security [type module/port] 90.用命令access-list在標(biāo)準(zhǔn)通信量過(guò)濾表中創(chuàng)建一條記錄:

Router(config)# access-list access-list-number {permit|deny} source-address [source-address] 91.用命令access-list在擴(kuò)展通信量過(guò)濾表中創(chuàng)建一條記錄:

Router(config)# access-list access-list-number {permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log] 92.對(duì)于帶內(nèi)路由更新,配置路由更新的最基本的命令格式是:

R1(config-router)#distribute-list access-list-number|name in [type number] 93.對(duì)于帶外路由更新,配置路由更新的最基本的命令格式是:

R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process| autonomous-system-number

94.set snmp命令選項(xiàng):

set snmp community {read-only|ready-write|read-write-all}[community_string] 95.set snmp trap 命令格式如下: set snmp trap {enable|disable}

[all|moudle|classis|bridge|repeater| auth|vtp|ippermit|vmps|config|entity|stpx] set snmp trap rvcr_addr rcvr_community 96.啟用SNMP chassis 陷阱:

Console>(enable)set snmp trap enable chassis 97.啟用所有SNMP chassis 陷阱: Console>(enable)set snmp trap enable 98.禁用SNMP chassis 陷阱:

Console>(enable)set snmp trap disable chassis 99.給SNMP陷阱接收表加一條記錄:

Console>(enable)set snmp trap 192.122.173.42 public 100.show snmp 輸出結(jié)果。

101.命令set snmp rmon enable 的輸出結(jié)果。102.顯示SPAN信息: Consile> show span 一些華為路由器命令: 刪除設(shè)備配置

reset saved-configuration 重啟 reboot

看當(dāng)前配置文件

display current-configuration 改設(shè)備名 sysname 保存配置 save

進(jìn)入特權(quán)模式 sysview

華為只有2層模式 不像cisco enale之后還要conf t 定義acl

acl nubmere XXXX(3000以上)進(jìn)入以后

rule permit/deny IP/TCP/UDP等 source XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX(反向)destination XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX(反向)eq 注意 華為默認(rèn)沒(méi)有deny any any 防火墻上端口加載ACL

[Quidway-Ethernet0/0]firewall packet-filter 3000 inbound 防火墻上新增加用戶(hù) local-user XXX(用戶(hù)名)password simple XXX(密碼)local-user XXX service-type ppp 刪除某條命令

undo(類(lèi)似與cisco的no)靜態(tài)路由

ip route-static 0.0.0.0 0.0.0.0 XXX.XXX.XXX.XXX 對(duì)vpdn用戶(hù)設(shè)置acl的接口 inte***ce Virtual-Template1 查看路由表

display ip routing-table 設(shè)定telnet密碼

user-inte***ce vty 0 4 user privilege level 3

set authentication password simple XXX 啟動(dòng)/關(guān)閉 啟動(dòng) un shut 關(guān)閉 shut 動(dòng)態(tài)nat設(shè)置 acl number 3000

rule 0 permit ip source XXX.XXX.XXX.XXX rule 1 permit ip source XXX.XXX.XXX.XXX rule 2 permit ip source XXX.XXX.XXX.XXX inte***ce Ethernet1/0

des cription ====To-Internet(WAN)====

ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX nat outbound 3000 ipsec policy policy1

利用acl來(lái)做 符合acl的IP地址可以出去(注意 此處的ACL隱含了deny any any)不符合的IP地址不可以出去 創(chuàng)建vlan

[shzb-crsw-s6506-1]vlan 100 華為vlan不支持name 將port放入vlan

創(chuàng)建了vlan后 進(jìn)入vlan模式

[shzb-crsw-s6506-1-vlan100]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/8 表示從G1/0/1 到1/0/8放入VLAN 100 創(chuàng)建trunk

inte***ce GigabitEthernet1/0/1 duplex full speed 1000

* port link-type trunk

* port trunk permit vlan all port link-aggregation group 1

帶*號(hào)的是創(chuàng)建trunk鏈路的語(yǔ)句 vlan地址指定

inte***ce Vlan-inte***ce2 des cription server

ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX vrrp vrid 2 virtual-ip XXX.XXX.XXX.XXX vrrp vrid 2 priority 120 vrrp vrid 2 preempt-mode timer delay 10 其中vrrp語(yǔ)句指定vrrp 類(lèi)似與hsrp 使用vrrp要注意的是華為不支持pvst 只能一臺(tái)完全是主,一臺(tái)完全是備份 在主vrrp設(shè)備上要指定 stp instance 0 root primary stp TC-protection enable stp enable

在從vrrp設(shè)備上要指定 stp instance 0 root secondary stp TC-protection enable stp enable

交換機(jī)下面綁acl

首先進(jìn)入接口模式,輸入qos命令

[shzb-crsw-s6506-1-GigabitEthernet1/0/1]qos 在輸入如下命令

[shzb-crsw-s6506-1-qoss-GigabitEthernet1/0/1]packet-filter inbound ip-group 3000 華為交換機(jī)只能指定inbound方向 啟用ospf

[shzb-crsw-s6506-1]ospf 100

[shzb-crsw-s6506-1-ospf-100]area 0

[shzb-crsw-s6506-1-ospf-100-area-0.0.0.0]network XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX 配置ospf重發(fā)布

[shzb-crsw-s6506-1-ospf-100-area-0.0.0.0]quit [shzb-crsw-s6506-1-ospf-100]import-route static

建立link-group(類(lèi)似與cisco的channel-group)link-aggregation group 1 mode manual 然后進(jìn)入接口

port link-aggregation group 1 啟用VRRP之前必須輸入 vrrp ping-enable

使得客戶(hù)能ping網(wǎng)關(guān)

第三篇:成都大學(xué)教學(xué)用思科交換機(jī)路由器配置命令

成都大學(xué)思科路由器教學(xué)資料 思科Cisco交換機(jī)、路由器設(shè)置命令 Lzshihj_tz2f_3550

交換機(jī)口令設(shè)置:

switch>enable ;進(jìn)入特權(quán)模式 switch#config terminal ;進(jìn)入全局配置模式 switch(config)#hostname ;設(shè)置交換機(jī)的主機(jī)名

switch(config)#enable secret xxx ;設(shè)置特權(quán)加密口令為 xxx

switch(config)#enable password xxx ;設(shè)置特權(quán)非密口令為 xxx

switch(config)#line console 0 ;進(jìn)控制臺(tái)口(Rs232)初始化

switch(config-line)#line vty 0 4 ;進(jìn)入虛擬終端virtual tty

switch(config-line)#login ;允許登錄

switch(config-line)#password xx ;設(shè)置登錄口令xx switch#exit ;返回命令

交換機(jī)VLAN設(shè)置:

switch#vlan database ;進(jìn)入VLAN設(shè)置 switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;刪vlan 2 switch(config)#int f0/1 ;進(jìn)入端口1 switch(config-if)#switchport access vlan 2 ;當(dāng)前端口1加入VLAN 2

switch(config-if)#switchport mode trunk ;設(shè)置為干線(xiàn) switch(config-if)#switchport trunk allowed vlan 1,2;設(shè)置允許的vlan switch(config-if)#switchport trunk encap dot1q ;設(shè)置vlan中繼 switch(config)#vtp domain ;設(shè)置發(fā)vtp域名 switch(config)#vtp password switch(config)#vtp mode server switch(config)#vtp mode client

交換機(jī)設(shè)置IP地址:

switch(config)#interface vlan 1 ;進(jìn)入vlan 1

switch(config-if)#ip address ;添加遠(yuǎn)程登錄IP switch(config)#ip default-gateway ;添加默認(rèn)網(wǎng)關(guān)

switch#dir flash: ;查看內(nèi)存

交換機(jī)顯示命令:

switch#write ;寫(xiě)入保存 switch#show vtp switch#show run ;查看當(dāng)前配置信息 switch#show vlan ;看VLAN switch#show interface ;顯示所有端口信息

switch#show int f0/0 ;顯示端口0的信息 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 路由器顯示命令:

router#show run ;顯示接口 router#show interface ;顯示接口 router#show ip route ;顯示路由 router#show cdp nei ;看鄰居 router#reload

;重新起動(dòng)

設(shè)置口令:

router>enable ;進(jìn)入特權(quán)模式 router#config terminal ;進(jìn)入全局配置模式 router(config)#hostname ;設(shè)置交換機(jī)的主機(jī)名

router(config)#enable secret xxx ;設(shè)置特權(quán)加密口令為 xxx

router(config)#enable password xxx ;設(shè)置特權(quán)非密口令為 xxx

router(config)#line console 0 ;進(jìn)控制臺(tái)口(Rs232)初始化

router(config-line)#line vty 0 4 ;進(jìn)入虛擬終端virtual tty

router(config-line)#login ;允許登錄

router(config-line)#password xx ;設(shè)置登錄口令xx router(config)#(Ctrl+z);返回特權(quán)模式 router#exit ;返回命令

配置IP地址:

router(config)#int s0/0 ;進(jìn)行串Serail接口

router(config-if)#no shutdown ;起動(dòng)接口 router(config-if)#clock rate 64000 ;設(shè)置時(shí)鐘

router(config-if)#ip address 10.1.1.1 255.255.0.0 ;設(shè)置IP地址和子網(wǎng)掩碼

router(config-if)#ip add 10.1.1.2 255.255.0.0 second;

router(config-if)#int f0/0.1;進(jìn)入子接口 router(config-subif.1)#ip address ; router(config-subif.1)#encapsulation dot1q

router(config)#config-register 0x2142 ;跳過(guò)配置文件 router(config)#config-register 0x2102 ;正常使用配置文件 router#reload ;重新引導(dǎo) 復(fù)制操作:

router#copy running-config startup-config ;存配置 router#copy running-config tftp ;上載 router#copy startup-config tftp

router#copy tftp flash: ;特權(quán)模式下升級(jí)IOS

router#copy tftp startup-config

;下載配置文件到nvram

ROM狀態(tài):

Ctrl+Break ;進(jìn)入ROM監(jiān)控狀態(tài)

rommon>confreg 0x2142 ;跳過(guò)配置,26 36 45xx

rommon>confreg 0x2102 ;使用配置,恢復(fù)工作狀態(tài)

rommon>reset

;重新引導(dǎo),等效于重開(kāi)機(jī)

rommon>copy xmodem: flash: ;從console升級(jí)IOS

rommon>IP_ADDRESS=10.65.1.2 ;設(shè)置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;設(shè)置路由器掩碼 rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服務(wù)器IP

rommon>TFTP_FILE=c2600.bin ;所要下載的文件 rommon>tftpdnld ;ROM監(jiān)控狀態(tài)下升級(jí)IOS

rommon>dir flash: ;查看閃存中的內(nèi)容 rommon>boot ;引導(dǎo)IOS

靜態(tài)路由:

ip route 例: router(config)#ip route 10.1.0.0 255.255.0.0 10.2.1.1 router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2

動(dòng)態(tài)路由:

router(config)#ip routing ;啟動(dòng)路由 router(config)#router rip ;啟動(dòng)RIP路由協(xié)議。router(config-router)#network ;配置范圍,有的支持all。

router(config-router)#negihbor ;點(diǎn)對(duì)點(diǎn) 幀中繼用。

幀中繼命令:

router(config)# frame-relay switching ;使能幀中繼交換 router(config-s0)# encapsulation frame-relay ;使能幀中繼

router(config-s0)# frame-relay intf-type DCE ;DCE端(需要配虛電路)

router(config-s0)# frame-relay local-dlci 20 ;配置虛電路號(hào)

基本訪(fǎng)問(wèn)控制列表:

router(config)#access-list permit|deny router(config)#interface ;default: deny any router(config-if)#ip access-group in|out ;default: out

例:

RB(config)#access-list 4 permit 10.8.1.1

RB(config)#access-list 4 deny 10.8.1.0 0.0.0.255

RB(config)#access-list 4 permit 10.8.0.0 0.0.255.255 RB(config)#access-list 4 deny 10.0.0.0 0.255.255.255 RB(config)#access-list 4 permit any RB(config)#int f0/0

RB(config-if)#ip access-group 4 in

擴(kuò)展訪(fǎng)問(wèn)控制列表:

access-list permit|deny icmp [type]

access-list permit|deny tcp [port] 例1:

router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo router(config)#access-list 101 permit ip any any router(config)#int s0/0

router(config-if)#ip access-group 101 in 例2:

router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80 router(config)#access-list 102 permit ip any any router(config)#interface s0/1

router(config-if)#ip access-group 102 out

router(config)#no access-list 102

router(config-if)#no ip access-group 101 in

在路由器上設(shè)置 SNMP Community Strings

router(config)# snmp-server community read-community-string ro

router(config)# snmp-server community write-community-string rw

在交換機(jī)上設(shè)置 SNMP Community Strings

switch(config)# snmp-server community read-community-string ro

switch(config)# snmp-server community write-community-string rw

在路由器上配置日志信息(Syslog Message Logging)

router(config)# logging on

router(config)# logging server-ip-address router(config)# logging trap severity-level 路由器恢復(fù)出廠(chǎng)設(shè)置

erase start-config 或write erase 或erase NVROM

第四篇:H3C交換機(jī)的配置命令(個(gè)人經(jīng)驗(yàn)總結(jié))范文

1、為交換機(jī)分配ip 輸入分配給交換機(jī)的IP地址為*.*.*.*,掩碼為255.255.255.0,類(lèi)型為System 命令:system-view

Interface vlan-interface 1

Undo ip address

Ip address 172.28.1.33 255.255.255.0

2、定義vlan 101(name caiwu),vlan 102(name diaodu),名字,端口

命令:vlan 101

Interface vlan-interface 101

Ip address 192.168.1.1 255.255.255.0

Port e1/0/1 to e1/0/24

Vlan 102

Interface vlan-interface 102

Ip address 192.168.2.1 255.255.255.0

Port e1/0/25 to e1/0/47

3、定義vlan的接口地址。

4、在兩個(gè)vlan之間增加路由。

命令:ip route-static 0.0.0.0 255.255.255.255 192.168.1.254

5、為交換機(jī)添加默認(rèn)網(wǎng)關(guān)。

將以太網(wǎng)端口Ethernet1/0/1設(shè)置為T(mén)runk端口。 system-view System View: return to User View with Ctrl+Z.[H3C] interface ethernet 1/0/1 [H3C-Ethernet1/0/1] port link-type trunk

ip address 172.16.21.1 255.255.255.0

可能這樣配的話(huà)意思是VLAn130的IP就是172.16.21.2—172.16.21.254 而172.16.21.1則是這個(gè)網(wǎng)段的網(wǎng)關(guān)。

將Trunk端口Ethernet1/0/1加入到VLAN2、VLAN4、VLAN50~VLAN 100中。 system-view System View: return to User View with Ctrl+Z.[H3C] interface ethernet 1/0/1 [H3C-Ethernet1/0/1] port link-type trunk [H3C-Ethernet1/0/1] port trunk permit vlan 2 4 50 to 100 Please wait...Done.取消某個(gè)trunk端口的命令 undo port link-type

遠(yuǎn)程登錄方式: 配置web用戶(hù)

[h3c] local-user admin(配置用戶(hù)名admin)---本地用戶(hù)admin [h3c] service-type telnet level 3(設(shè)置級(jí)別為3)----服務(wù)類(lèi)型telnet 級(jí)別3 [h3c] password simple admin(設(shè)置密碼為admin)----密碼簡(jiǎn)單型admin

配置telnet用戶(hù)

[h3c] user-interface vty 0 4(進(jìn)入虛擬終端)----用戶(hù)接口 vty 0 4 [h3c] authentication-mode scheme(配置本地或遠(yuǎn)端用戶(hù)名認(rèn)證方式—鑒定)----鑒定模式scheme(鑒定)[h3c] user privilege level 3(配置登錄用戶(hù)的級(jí)別3<默認(rèn)1>)---用戶(hù)特權(quán)級(jí)別3 [h3c] local-user huawei(配置用戶(hù)名huawei)---本地用戶(hù)huawei [h3c] service-type telnet level 3(設(shè)置級(jí)別為3)----服務(wù)類(lèi)型telnet級(jí)別3 [h3c] password simple admin(設(shè)置密碼admin)----密碼簡(jiǎn)單型admin

User-interface vty 0 4 Authentication-mode scheme User privilege level 3 Local-user huawei Service-type telnet level 3 Password simple admin

華為交換機(jī)配置用戶(hù)名和密碼

2009-09-18 02:16 華為交換機(jī)配置用戶(hù)名和密碼

(1)telnet只需輸入password即可遠(yuǎn)程登陸交換機(jī)。

進(jìn)入用戶(hù)界面視圖

[SwitchA]user-interface vty 0 4 設(shè)置認(rèn)證方式為密碼驗(yàn)證方式 [SwitchA-ui-vty0-4]authentication-mode password

設(shè)置登陸驗(yàn)證的password為明文密碼”huawei”

[SwitchA-ui-vty0-4]set authentication password simple huawei 配置登陸用戶(hù)的級(jí)別為最高級(jí)別3(缺省為級(jí)別1)[SwitchA-ui-vty0-4]user privilege level 3/1 [switchA]super password simple ddddd

(2)telnet需要輸入username和password才可以登陸交換機(jī)。

進(jìn)入用戶(hù)界面視圖

[SwitchA]user-interface vty 0 4

配置本地或遠(yuǎn)端用戶(hù)名和口令認(rèn)證

[SwitchA-ui-vty0-4]authentication-mode scheme

配置本地TELNET用戶(hù),用戶(hù)名為”huawei”,密碼為”huawei”,權(quán)限為最高級(jí)別3(缺省為級(jí)別1)[SwitchA]local-user huawei [SwitchA-user-huawei]password simple huawei [SwitchA-user-huawei]service-type telnet level 3(3)通過(guò)con口只需輸入password即可遠(yuǎn)程登陸交換機(jī)。

進(jìn)入用戶(hù)界面視圖

[Quidway]user-interface aux 0

設(shè)置認(rèn)證方式為密碼驗(yàn)證方式

[Quidway-ui-aux0] authentication-mode password

設(shè)置登陸驗(yàn)證的password為明文密碼”huawei”

[Quidway-ui-aux0] set authentication password simple huawei 配置登陸用戶(hù)的級(jí)別為最高級(jí)別3(缺省為級(jí)別1)[Quidway-ui-aux0] user privilege level 3

(4)通過(guò)con口需要輸入username和password才可以登陸交換機(jī)。[Quidway]user-interface aux 0

配置本地或遠(yuǎn)端用戶(hù)名和口令認(rèn)證

[Quidway-ui-aux0] authentication-mode scheme

配置本地TELNET用戶(hù),用戶(hù)名為”huawei”,密碼為”huawei”,權(quán)限為最高級(jí)別3(缺省為級(jí)別1)[SwitchA]local-user huawei [SwitchA-user-huawei]password simple huawei [SwitchA-user-huawei]service-type telnet level 3

display arp int g6/1/4

Type: S-Static D-Dynamic IP Address

MAC Address VLAN ID Port Name

Aging Type 10.2.209.4

001d-0f80-68f1 200

GigabitEthernet6/1/4

N/A S 192.168.0.7

0050-c21e-f941 900

GigabitEthernet6/1/4

D 192.168.0.6

0050-c21f-1a0b 900

GigabitEthernet6/1/4

D 192.168.0.8

0050-c21f-19fc 900

GigabitEthernet6/1/4

D 10.2.213.107 0025-1185-8bb8 700

GigabitEthernet6/1/4

D 10.2.209.251 0023-cd22-f263 210

GigabitEthernet6/1/4

D 10.2.209.123 001e-e576-9c9f 200

GigabitEthernet6/1/4

D 10.2.209.122 0015-e907-98c7 200

GigabitEthernet6/1/4

D 10.2.208.132 0023-893e-2b94 10

GigabitEthernet6/1/4

[DC-HX-S9508-WW-01]int g6/1/4

[DC-HX-S9508-WW-01-GigabitEthernet6/1/4]display this # interface GigabitEthernet6/1/4 description connect to DC-JR-S3600-WW-0401_g1/1/3

[DC-JR-S3600-WW-0401]display mac-address vlan 200 MAC ADDR

VLAN ID STATE

PORT INDEX

AGING TIME(s)0000-5e00-0114 200

Learned

GigabitEthernet1/1/3 AGING 0015-587f-185c 200

Learned

GigabitEthernet1/1/3 AGING 0015-e907-98c7 200

Learned

Ethernet2/0/44

AGING 0016-177e-b336 200

Learned

GigabitEthernet1/1/3 AGING 0016-d332-81a9 200

Learned

GigabitEthernet1/1/3 AGING 0016-d336-b3ce 200

Learned

GigabitEthernet1/1/3 AGING 0019-21bd-99a3 200

Learned

GigabitEthernet1/1/3 AGING 001a-a039-fa46 200

Learned

GigabitEthernet1/1/3 AGING 001d-0934-4f2f 200

Learned

GigabitEthernet1/1/3 AGING 001d-0f80-68f1 200

Learned

Ethernet2/0/41

AGING 001d-7280-2303 200

Learned

GigabitEthernet1/1/3 AGING 001e-e576-9c9f 200

Learned

Ethernet2/0/43

AGING 0023-8938-c0e8 200

Learned

GigabitEthernet1/1/3 AGING 0023-8938-c178 200

Learned

GigabitEthernet1/1/3 AGING 0023-8948-c220 200

Learned

Ethernet1/0/6

AGING 0026-b981-d498 200

Learned

GigabitEthernet1/1/3 AGING 0027-1962-e5ab 200

Learned

GigabitEthernet1/1/3 AGING

配置舉例及步驟:僅允許來(lái)自10.10.1.66和lO.10.1.78的TELNET用戶(hù)訪(fǎng)問(wèn)交換機(jī):

#定義基本訪(fǎng)問(wèn)控制列表。

[Quidway]acl number 2008 match-order config [Quidway-acl—basic-2008]rule 1 permit source lO.1O.1.66 O [Quidway—acl-basic-2008]rule 2 permit source 1O.1O.1.78 O [Quidway-acl-basic-2008]quit #引用訪(fǎng)問(wèn)控制列表。

[Quidway]user-interface vty 0 4 [Quidway-user-interface-vty0-4]acl 2OO8 inbound

H3C交換機(jī)恢復(fù)出廠(chǎng)設(shè)置

reset saved-configuration The saved configuration will be erased.Are you sure?[Y/N]y /提示是否擦除配置文件/ Configuration in the device is being cleared.Please wait......Configuration in the device is cleared.reboot

This command will reboot the system.Since the current configuration may have b een changed, all changes may be lost if you continue.Continue? [Y/N] Y /提示是否重啟設(shè)備,按Y將重新啟動(dòng)/ 【提示】

1、可以只鍵入reset sa,reset sa是reset saved-configuration的縮寫(xiě)。

2、擦除配置文件后,必須要重啟設(shè)備后才能恢復(fù)到出廠(chǎng)設(shè)置。

修改交換機(jī)的系統(tǒng)時(shí)間

clock datetime hh:mm:ss mm/dd/yy

11、訪(fǎng)問(wèn)控制列表 基于接口的ACL 1000-1999

基本的ACL 2000-2999

acl number acl-num [match-order {config|auto}]

rule [rule-id] {permit|deny} [source sour-add sour-wildcard|any] [time-range time-name] [logging] [fragment] [vpn-instance vpn-instance-name]

高級(jí)的ACL 3000-3999

acl number acl-num [match-order {config|auto}]

rule [rule-id] {permit|deny} protocol [source sour-add sour-wildcard|any] [destination dest-add dest-wildcard|any] [source-port operator port1

[port2]]

[dest-port

operator

port1

[port2]]

[icmp-type

{icmp-type icmp-code|icmp-message}] [precedence pre] [time-range time-name] [logging] [fragment] [vpn-instance vpn-instance-name]

基于MAC地址ACL 4000-4999

ACL訪(fǎng)問(wèn)控制列表

公司企業(yè)網(wǎng)通過(guò)Switch的端口實(shí)現(xiàn)各部門(mén)之間的互連。研發(fā)部門(mén)由GigabitEthernet1/1/1接入交換機(jī),工資查詢(xún)服務(wù)器的地址為192.168.1.2。要求正確配置ACL,禁止研發(fā)部門(mén)在工作日8:00至18:00訪(fǎng)問(wèn)工資服務(wù)器。配置步驟(1)定義時(shí)間段

# 定義8:00至18:00的周期時(shí)間段。 system-view

[H3C] time-range test 8:00 to 18:00 working-day(2)定義到工資服務(wù)器的ACL # 進(jìn)入ACL3000視圖。[H3C] acl number 3000

# 定義其它部門(mén)到工資服務(wù)器的訪(fǎng)問(wèn)規(guī)則。

[H3C-acl-adv-3000] rule 1 deny ip destination 192.168.1.2 0 time-range test [H3C-acl-adv-3000] quit(3)在端口上應(yīng)用ACL # 在端口上應(yīng)用ACL 3000。

[H3C] interface gigabitethernet1/1/1

[H3C-GigabitEthernet1/1/1] packet-filter inbound ip-group 3000

IP-MAC綁定方法:

[switch-Ethernet1/0/24]am user-bind mac-addr AAAA-AAAA-AAAA ip-addr 192.168.x.x IP MAC switch-Ethernet1/0/24]arp static 192.168.1.1 AAAA-AAAA-AAAA 2 [switchA]undo arp 192.168.1.1

解除綁定

第五篇:交換機(jī)路由器配置總結(jié)

交換機(jī)和路由器配置過(guò)程總結(jié)

作為網(wǎng)絡(luò)中重要的硬件設(shè)備,隨著網(wǎng)絡(luò)融入我們的日常生活,交換機(jī)和路由器也逐漸被人們所熟悉。關(guān)于交換機(jī)、路由器的配置,計(jì)算機(jī)和網(wǎng)絡(luò)專(zhuān)業(yè)的學(xué)生理應(yīng)能夠操作熟練。通過(guò)這次網(wǎng)絡(luò)工程師培訓(xùn),借助Packet Tracer 5.0仿真軟件學(xué)習(xí)網(wǎng)絡(luò)配置、拓?fù)鋱D設(shè)計(jì)等,我對(duì)交換機(jī)、路由器配置有了深刻的了解,現(xiàn)將配置過(guò)程小結(jié)如下。

第一部分 交換機(jī)配置

一、概述 一層、二層交換機(jī)工作在數(shù)據(jù)鏈路層,三層交換機(jī)工作在網(wǎng)絡(luò)層,最常見(jiàn)的是以太網(wǎng)交換機(jī)。交換機(jī)一般具有用戶(hù)模式、配置模式、特權(quán)模式、全局配置模式等模式。

二、基本配置命令(CISCO)Switch >enable 進(jìn)入特權(quán)模式

Switch #config terminal 進(jìn)入全局配置模式 Switch(config)#hostname 設(shè)置交換機(jī)的主機(jī)名

Switch(config)#enable password 進(jìn)入特權(quán)模式的密碼(明文形式保存)Switch(config)#enable secret 加密密碼(加密形式保存)(優(yōu)先)Switch(config)#ip default-gateway 配置交換機(jī)網(wǎng)關(guān)

Switch(config)#show mac-address-table 查看MAC地址

Switch(config)logging synchronous 阻止控制臺(tái)信息覆蓋命令行上的輸入 Switch(config)no ip domain-lookup 關(guān)閉DNS查找功能 Switch(config)exec-timeout 0 0 阻止會(huì)話(huà)退出

使用Telnet遠(yuǎn)程式管理

Switch(config)#line vty 0 4 進(jìn)入虛擬終端 Switch(config-line)# password 設(shè)置登錄口令 Switch(config-line)# login 要求口令驗(yàn)證

控制臺(tái)口令

switch(config)#line console 0 進(jìn)入控制臺(tái)口 switch(config-line)# password xx switch(config-line)# 設(shè)置登錄口令login 允許登錄 恢復(fù)出廠(chǎng)配置

Switch(config)#erase startup-config Switch(config)delete vlan.dat Vlan基本配置

Switch#vlan database 進(jìn)去vlan配置模式 Switch(vlan)#vlan 號(hào)碼 name 名稱(chēng) 創(chuàng)建vlan及vlan名 Switch(vlan)#vlan號(hào)碼 mtu數(shù)值 修改MTU大小

Switch(vlan)#exit 更新vlan數(shù)據(jù)并推出 Switch#show vlan 查看驗(yàn)證 Switch#copy running-config startup-config 保存配置 VLAN 中添加 刪除端口

Switch#config terminal 進(jìn)入全局配置 Switch(config)#interface fastethernet0/1 進(jìn)入要分配的端口 Switch(config-if)#Switchport mode access 定義二層端口 Switch(config-if)#Switchport acces vlan 號(hào) 把端口分給一個(gè)vlan Switch(config-if)#switchport mode trunk 設(shè)置為干線(xiàn)

Switch(config-if)#switchport trunk encapsulation dot1q 設(shè)置vlan 中繼協(xié)議 Switch(config-if)#no switchport mode 或(switchport mode access)禁用干線(xiàn) Switch(config-if)#switchport trunk allowed vlan add 1,2 從Trunk中添加vlans Switch(config-if)#switchport trunk allowed vlan remove 1,2 從Trunk中刪除vlan Switch(config-if)#switchport trunk pruning vlan remove 1,2 ;從Trunk中關(guān)閉局部修剪

查看vlan信息 Switch#show vlan brief 所有vlan信息

查看vlan信息 Switch#show vlan id 某個(gè)vlan信息 注:Switch#show int trunk 查看trunk協(xié)議

注:可以使用default interface interface-id 還原接口到默認(rèn)配置狀態(tài) Trunk

開(kāi)啟(no)——將端口設(shè)置為永久中繼模式

關(guān)閉(off)——將端口設(shè)置為永久非中繼模式,并且將鏈路轉(zhuǎn)變?yōu)榉侵欣^鏈路 企望(desirable)——讓端口主動(dòng)試圖將鏈路轉(zhuǎn)換成中繼鏈路 自動(dòng)(auto)——使該端口愿意將鏈路變成中繼鏈路 交換機(jī)顯示命令:

switch#show vtp status 查看vtp配置信息 switch#show running-config 查看當(dāng)前配置信息 switch#show vlan 查看vlan配置信息 switch#show interface 查看端口信息 switch#show int f0/0 查看指定端口信息 switch#dir flash: 查看閃存

switch#show version 查看當(dāng)前版本信息

switch#show cdp cisco設(shè)備發(fā)現(xiàn)協(xié)議(可以查看聆接設(shè)備)switch#show cdp traffic 杳看接收和發(fā)送的cdp包統(tǒng)計(jì)信息 switch#show cdp neighbors 查看與該設(shè)備相鄰的cisco設(shè)備

switch#show interface f0/1 switchport 查看有關(guān)switchport的配置 switch#show cdp neighbors 查看與該設(shè)備相鄰的cisco設(shè)備

三、模擬配置(一個(gè)實(shí)例)

圖一:PC機(jī)IP地址、子網(wǎng)掩碼、默認(rèn)網(wǎng)關(guān)配置截圖

圖二:模擬網(wǎng)絡(luò)拓?fù)浣Y(jié)構(gòu)圖

圖三:全局模式下對(duì)交換機(jī)進(jìn)行配置

圖四:查看VLAN當(dāng)前配置信息

第二部分 路由器配置

一、環(huán)境搭建(借鑒網(wǎng)上的材料,通過(guò)自己配置也實(shí)現(xiàn)了同樣的功能)

添加一個(gè)模塊化的路由器,單擊Packet Tracer 5.0的工作區(qū)中剛添加的路由器,在彈出的配置窗口上添加一些模塊:

圖五

默認(rèn)情況下,路由器的電源是打開(kāi)的,添加模塊時(shí)需要關(guān)閉路由器的電源,單擊圖一箭頭所指的電源開(kāi)關(guān),將其關(guān)閉,路由器的電源關(guān)閉后綠色的電源指示燈也將變暗。

圖六 添加所需要的模塊

在“MODULES”下尋找所需要的模塊,選中某個(gè)模塊時(shí)會(huì)在下方顯示該模塊的信息。然后拖到路由器的空插槽上即可。

圖八 添加一計(jì)算機(jī),其RS-232與路由器的Console端口相連

圖九 用計(jì)算機(jī)的終端連接路由器

圖十 實(shí)驗(yàn)環(huán)境搭建完成

二、配置單個(gè)路由器

路由器的幾種模式:User mode(用戶(hù)模式)、Privileged mode(特權(quán)模式)、Global configuration mode(全局配置模式)、Interface mode(接口配置模式)、Subinterface mode(子接口配置模式)、Line mode、Router configuration mode(路由配置模式)。每種模式對(duì)應(yīng)不同的提示符。

圖十一 幾種配置命令提示符和配置路由器的名字

圖十二 通過(guò)Console端口登錄到路由器需要輸入密碼

圖十三 顯示信息的命令

通過(guò)模擬交換機(jī)和路由器的配置,進(jìn)一步理解了它們的工作原理,對(duì)網(wǎng)絡(luò)拓?fù)浼軜?gòu)有了清晰的認(rèn)識(shí),為以后的網(wǎng)絡(luò)知識(shí)學(xué)習(xí)打下了基礎(chǔ)。謝謝彭老師!

下載思科交換機(jī)配置命令總結(jié)word格式文檔
下載思科交換機(jī)配置命令總結(jié).doc
將本文檔下載到自己電腦,方便修改和收藏,請(qǐng)勿使用迅雷等下載。
點(diǎn)此處下載文檔

文檔為doc格式


聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶(hù)自發(fā)貢獻(xiàn)自行上傳,本網(wǎng)站不擁有所有權(quán),未作人工編輯處理,也不承擔(dān)相關(guān)法律責(zé)任。如果您發(fā)現(xiàn)有涉嫌版權(quán)的內(nèi)容,歡迎發(fā)送郵件至:645879355@qq.com 進(jìn)行舉報(bào),并提供相關(guān)證據(jù),工作人員會(huì)在5個(gè)工作日內(nèi)聯(lián)系你,一經(jīng)查實(shí),本站將立刻刪除涉嫌侵權(quán)內(nèi)容。

相關(guān)范文推薦

    H3C-配置命令總結(jié)

    system view 進(jìn)入系統(tǒng)視圖模式(輸入sys簡(jiǎn)寫(xiě)就行)注:只要是方括弧就可輸入命令。 [DeviceA]sysnamex 將交換機(jī)命名為x [DeviceA]dis cur 顯示當(dāng)前配置情況 [DeviceA]dis vlan......

    交換機(jī)配置教案

    交換機(jī)基本配置、分布層與核心層設(shè)計(jì) 引入: 通過(guò)講解上次課程的練習(xí)、交換機(jī)的發(fā)展史將課堂引入,將思科交換機(jī)模擬軟件PacketTracer的結(jié)構(gòu)和使用進(jìn)行簡(jiǎn)單的說(shuō)明。 新授: 一、......

    H3C交換機(jī)路由器配置總結(jié)

    H3C交換機(jī)路由器配置總結(jié) H3C交換機(jī)配置代碼*中文切換 language-modeChinese|English 1.進(jìn)入特權(quán)用戶(hù) system // 2.命名交換機(jī) sysname [名稱(chēng)] 3.查看配置情況 undo......

    華為交換機(jī)配置總結(jié)(精選五篇)

    交換初始化方法: 1、通過(guò)CONTROL口連接交換機(jī),使用SecureCRTPortable軟件連接,打開(kāi)軟件后選擇“新建會(huì)話(huà)”,在對(duì)話(huà)框中選擇“Serial”選項(xiàng),點(diǎn)擊下一步,波特率9600,端口以實(shí)際使用的......

    思科命令詳解及總結(jié)(共5篇)

    查看當(dāng)前運(yùn)行配置(密碼) 保存配置 Switch# show running-config Switch# write 對(duì)路由設(shè)置密碼(明文) sw1(config)#line console 0 sw1(config-line)#password 密碼sw1(conf......

    華為交換機(jī)基礎(chǔ)命令總結(jié)V1.3

    華為交換機(jī)基礎(chǔ)命令總結(jié)V1.3 目錄 【01基礎(chǔ)常識(shí)篇】 -- 1 一、華為3COM IOS與CISCO IOS的區(qū)別 -------------------------- 1 二、命令行提供的視圖 ---------------------......

    二層交換機(jī)配置實(shí)驗(yàn)報(bào)告

    廣東第二師范學(xué)院 計(jì)算機(jī)科學(xué)系 實(shí)驗(yàn)報(bào)告 計(jì)算機(jī)網(wǎng)絡(luò) 實(shí) 驗(yàn) 報(bào) 告 實(shí)驗(yàn)名稱(chēng): 二層交換機(jī)配置 實(shí)驗(yàn)分組號(hào): 實(shí) 驗(yàn) 人: 鄭微微 班 級(jí): 12級(jí)計(jì)算機(jī)科學(xué)系本四B班 學(xué) 號(hào): 1255110201......

    計(jì)算機(jī)四級(jí)考試_交換機(jī)_路由器命令總結(jié)

    備注:黑體為需要輸入的命令,/表示多項(xiàng)選一。本總結(jié)只是命令的簡(jiǎn)答總結(jié),不包括命令的使用環(huán)境等。在機(jī)器型號(hào)方面3548和3500屬于同一操作系統(tǒng)。一般來(lái)講3500系列的配置要先進(jìn)入......

主站蜘蛛池模板: 高清国产av一区二区三区| 久久中文字幕人妻熟女少妇| www.一区二区三区在线 | 中国| 国产乱子伦视频大全亚瑟影院| 色噜噜亚洲精品中文字幕| 亚洲国产日韩精品一区二区三区| 亚洲人成网站18禁止无码| 免费观看性欧美大片无片| 亚洲娇小与黑人巨大交| 亚洲av日韩av无码污污网站| 少妇午夜啪爽嗷嗷叫视频| 无码成人h免费视频在线观看| 国产精品久久久久久久久久| 国产成人精品一、二区| 久久久久亚洲av无码观看| 国产精品户露av在线户外直播| 国产精品乱子伦xxxx| 国产精品夜间视频香蕉| 十八禁在线观看视频播放免费| 国产无套精品一区二区三区| 大地资源中文在线观看官网第二页| 成人免费看片又大又黄| 国内精品自线一区二区三区| 精品午夜国产福利在线观看| 人妻少妇中文字幕乱码| 伊人色综合视频一区二区三区| 久久人人爽人人爽人人片ⅴ| 中文在线中文a| 国产高清在线精品一区| 少妇厨房愉情理伦片免费| 黄色在线观看| 久草日b视频一二三区| 日韩国产图片区视频一区| 亚洲国产aⅴ综合网| 久久精品a一国产成人免费网站| 国产熟妇按摩3p高潮大叫| 日日噜噜夜夜狠狠久久无码区| 丰满人妻无码∧v区视频| 人妻av无码专区久久| 青青草国产精品日韩欧美| 久久综合九色综合久99|