第一篇:Brocade交換機常用命令專題
Brocade交換機常用命令(下面命令是基于6.x版本的,有些老版本的交換機可能找不到相關(guān)命令)
1、switchshow:可以查看交換機的名稱、型號、狀態(tài)、角色、domain ID、wwn、zone狀態(tài)、zone配置名等。
2、cfgshow:可以查看zone的相關(guān)信息、端口的alias等。
3、新建一個zoning:
alicreate “hostname”,“domainid,port”
zonecreate “hostname_storage”,“aliname;aliname”
cfgadd “CFGNAME”,“hostname_strage”
cfgsave
cfgenable “CFGNAME”
4、licenseshow:查看當前交換機的license5、switchdisable:將當前交換機禁用,一般用于設(shè)置交換機配置時使用
6、switchenable:啟用當前交換機
7、日常交換機檢查命令:
switchshow(交換機、端口狀態(tài))
hashow(CP卡狀態(tài))
slotshow(slot狀態(tài))
psshow(電源狀態(tài))
tempshow(溫度狀態(tài))
fanshow(風扇狀態(tài))
firmwareshow(微碼狀態(tài))
licenseshow(license狀態(tài))
cfgshow(zoning狀態(tài))
uptime(交換機自上次重啟到現(xiàn)在的時間)
porterrshow(查看端口的錯誤信息)
errshow(查看交換機的報錯信息)
8、zone相關(guān)命令:
zonecreate:創(chuàng)建一個zone
zoneobjectcopy:復制一個zone到一個新的zong
zoneobjectrename:重新命名一個zone
zoneobjectexpunge:刪除一個zone
cfgclear:刪除所有zone信息
cfgsize:查看zone數(shù)據(jù)庫大小
cfgtransshow:查看是否有未被保存的zone相關(guān)信息
cfgtransabort:放棄未被保存的zone相關(guān)信息
cfgactvshow:顯示激活中的zone配置
configupload:將交換機的配置信息保存到指定的FTP服務器上
9、fabricshow:查看當前fabric中有哪些交換機
10、nsshow:查看當前交換機中有哪些node(設(shè)備)
11、nsallshow:查看當前fabric中有哪些node(設(shè)備)
(完善中.......)
最新回復
skilljiang at 2009-8-10 11:25:4
5如何初始化一臺brocade san 交換機:
1、一根console線,一般購買交換機都會隨機器有一根。
2、通過console線,使用筆記本的超級終端連接交換機
3、交換機默認IP:10.77.77.77;netmask:255.255.255.0
如果是director:10.77.77.77(logical switch 0),10.77.77.76(logical switch1),*.75(cp0),*.74(cp1)
4、設(shè)置密碼:應該有factory, root, admin, user四種,不設(shè)置的話,可以用ctrl+c取消,一般管理員使用admin賬號
5、設(shè)置IP地址:ipaddrset設(shè)置IP地址,gateway,用ipaddrshow查看設(shè)置是否準確
6、設(shè)置時間:默認情況是北美時間,使用date設(shè)置時間,也可以用tsclockserver命令和NTP 服務器同步
7、設(shè)置時區(qū):如果是北京時,那就是用tstimezone +8進行設(shè)置,注意要下次重啟后才生效。
8、添加license:如果你沒買license,默認情況會自帶web license,zoing license,fabric license。如果你買了其他license,如extend license,那就需要使用licenseadd來添加,licenseshow可以查看當前有哪些許可。
9、設(shè)置timeout:如timeout 10,就是設(shè)置了10分鐘的timeout,設(shè)置完在下次登錄后生效。
10、設(shè)置交換機名:使用switchname來進行設(shè)置,建議switchname不要有重復。
11、設(shè)置交換機Domain ID:先將switch禁用,使用switchdisable,在使用configure命令設(shè)置domain id,設(shè)置完成后使用switchenable啟用交換機,注意domain id在一個fabric中是唯一的,不能有沖突,否則會造成fabric segement。
12、創(chuàng)建zone配置:首先創(chuàng)建alias,建議用主機名+port或者主機名+wwn來設(shè)置,使用alicreate命令
然后創(chuàng)建zones,使用zonecreate來創(chuàng)建,用cfgcreate來創(chuàng)建zone配置文件,使用cfgshow來查看zone信息。
第二篇:思科交換機配置命令總結(jié)
思科交換機配置命令總結(jié)
1.switch(config)# hostname hostname 在基于CLI的交換機上設(shè)置主機名/系統(tǒng)名: switch(enable)set system name name-string 2.在基于IOS的交換機上設(shè)置登錄口令: switch(config)# enable password level 1 password 在基于CLI的交換機上設(shè)置登錄口令: switch(enable)set password switch(enable)set enalbepass 3.在基于IOS的交換機上設(shè)置遠程訪問: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交換機上設(shè)置遠程訪問: 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的交換機上啟用和瀏覽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的交換機上啟用和瀏覽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的交換機的端口描述: switch(config-if)# description description-string 基于CLI的交換機的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交換機上設(shè)置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交換機上設(shè)置端口速度: switch(enable)set port speed moudle/number {10|100|auto} switch(enable)set port speed moudle/number {4|16|auto} 7.在基于IOS的交換機上設(shè)置以太網(wǎng)的鏈路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交換機上設(shè)置以太網(wǎng)的鏈路模式: switch(enable)set port duplex module/number {full|half} 8.在基于IOS的交換機上配置靜態(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的交換機上配置靜態(tài)VLAN: switch(enable)set vlan vlan-num [name name] switch(enable)set vlan vlan-num mod-num/port-list 9.在基于IOS的交換機上配置VLAN中繼線: 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的交換機上配置VLAN中繼線: switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交換機上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交換機上配置VTP管理域: switch(enable)set vtp [domain domain-name] 11.在基于IOS的交換機上配置VTP 模式: switch# vlan database switch(vlan)# vtp domain domain-name switch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交換機上配置VTP 模式: switch(enable)set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12.在基于IOS的交換機上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode 在基于CLI的交換機上配置VTP版本: switch(enable)set vtp v2 enable 13.在基于IOS的交換機上啟動VTP剪裁: switch# vlan database switch(vlan)# vtp pruning 在基于CL I 的交換機上啟動VTP剪裁: switch(enable)set vtp pruning enable 14.在基于IOS的交換機上配置以太信道: switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交換機上配置以太信道: switch(enable)set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交換機上調(diào)整根路徑成本: switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交換機上調(diào)整根路徑成本: switch(enable)set spantree portcost moudle/port cost switch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交換機上調(diào)整端口ID: switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交換機上調(diào)整端口ID: switch(enable)set spantree portpri {mldule/port}priority switch(enable)set spantree portvlanpri {module/port}priority [vlans] 17.在基于IOS的交換機上修改STP時鐘: 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的交換機上修改STP時鐘: switch(enable)set spantree hello interval[vlan] switch(enable)set spantree fwddelay delay [vlan] switch(enable)set spantree maxage agingtiame[vlan] 18.在基于IOS的交換機端口上啟用或禁用Port Fast 特征: switch(config-if)#spanning-tree portfast 在基于CLI的交換機端口上啟用或禁用Port Fast 特征: switch(enable)set spantree portfast {module/port}{enable|disable} 19.在基于IOS的交換機端口上啟用或禁用UplinkFast 特征: switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交換機端口上啟用或禁用UplinkFast 特征: switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on] 20.為了將交換機配置成一個集群的命令交換機,首先要給管理接口分配一個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交換機上定義TrBRF的命令如下: switch(enable)set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 25.在Catalyst交換機上定義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之后,就可以給它分配交換機端口.對于以太網(wǎng)交換,可以采用如下命令給VLAN分配端口: switch(enable)set vlan vlan-num mod-num/port-num 27.命令show spantree顯示一個交換機端口的STP狀態(tài).28.配置一個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ù)庫后,必須在主接口上啟動LECS.命令如下: ATM(config)# interface atm number ATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address 31.將每個LEC配置到一個不同的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ù)庫可內(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.用中繼鏈路來建立與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 來建立與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.為了在路由處理器上進行動態(tài)路由配置,可以用下列IOS命令來進行: 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.配置默認路由: switch(enable)set ip route default gateway 42.為一個路由處理器分配VLANID,可在接口模式下使用下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43.在路由處理器啟用MLSP: router(config)# mls rp ip 44.為了把一個外置的路由處理器接口和交換機安置在同一個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.要檢驗MLS-RP的配置情況: router# show mls rp 48.檢驗特定接口上的MLS配置:
router# show mls rp interface interface number 49.為了在MLS-SE上設(shè)置流掩碼而又不想在任一個路由處理器接口上設(shè)置訪問列表: set mls flow [destination|destination-source|full] 50.為使MLS和輸入訪問列表可以兼容,可以在全局模式下使用下列命令: router(config)# mls rp ip input-acl [page] 51.當某個交換機的第3層交換失效時,可在交換機的特權(quán)模式下輸入下列命令: switch(enable)set mls enable 52.若想改變老化時間的值,可在特權(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,可先顯示交換機引用列表中的內(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.為了使一個路由器重新恢復轉(zhuǎn)發(fā)路由器的角色,在接口配置模式下: router(config-if)# standy group-number preempt 59.訪問時間和保持時間參數(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確定當選的查詢器。63.啟動IP組播路由選擇:
router(config)# ip muticast-routing 64.啟動接口上的PIM:
dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode} 65.啟動稀疏-稠密模式下的PIM: router# ip multicast-routing router# interface type number router# ip pim sparse-dense-mode 66.核實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.選擇一個默認的RP: dallasr1># ip pim rp-address 通告RP和它所服務的組范圍:
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è)定一個RP映像代理:
dallasr1># ip pim send-rp-discovery scope ttl 核實組到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.要記錄一個路由器接受和發(fā)送的全部IP組播包:
dallasr1> #debug ip mpacket [detail] [access-list][group] 74.要在CISCO路由器上配置CGMP: dallasr1>(config-if)# ip cgmp 75.配置一個組播路由器,使之加入某一個特定的組播組: dallasr1>(config-if)# ip igmp join-group group-address 76.關(guān)閉 CGMP:
dallasr1>(config-if)# no ip cgmp 77.啟動交換機上的CGMP:
dallasr1>(enable)set cgmp enable 78.核實Catalyst交換機上CGMP的配置情況: catalystla1>(enable)show config set prompt catalystla1> set interface sc0 192.168.1.1 255.255.255.0 set cgmp enable 79.CGMP離開的設(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è)置控制臺及vty端口的會話超時: 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)級:
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)級下使用的命令: router(config)# privilege mode level level command 84.設(shè)定用戶特權(quán)級:
router(config)# enable secret level 3 dallas router(config)# enable secret san-fran router(config)# username student password cisco 85.標志設(shè)置與顯示:
R1(config)# banner motd ‘unauthorized access will be prosecuted!’ 86.設(shè)置vty訪問:
R1(config)# access-list 1 permit 192.168.2.5 R1(config)# line vty 0 4 R1(config)# access-class 1 in 87.配置HTTP訪問:
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訪問,請鍵入以下命令: switch(config)# ip http sever 89.在基于set命令的交換機上用setCL1啟動和核實端口安全:
switch(enable)set port security mod_num/port_num…enable mac address switch(enable)show port mod_num/port_num 在基于CiscoIOS命令的交換機上啟動和核實端口安全:
switch(config-if)# port secure [mac-mac-count maximum-MAC-count] switch# show mac-address-table security [type module/port] 90.用命令access-list在標準通信量過濾表中創(chuàng)建一條記錄:
Router(config)# access-list access-list-number {permit|deny} source-address [source-address] 91.用命令access-list在擴展通信量過濾表中創(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.對于帶內(nèi)路由更新,配置路由更新的最基本的命令格式是:
R1(config-router)#distribute-list access-list-number|name in [type number] 93.對于帶外路由更新,配置路由更新的最基本的命令格式是:
R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process| autonomous-system-number 94.set snmp命令選項:
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
第三篇:華為交換機基礎(chǔ)命令總結(jié)V1.3
華為交換機基礎(chǔ)命令總結(jié)V1.3
目錄
【01基礎(chǔ)常識篇】--1
一、華為3COM IOS與CISCO IOS的區(qū)別--------------------------1
二、命令行提供的視圖---------------------2 【02常用基礎(chǔ)命令】------------------------------3 【03華為路由器DISPLAY命令大全】--------5 【04設(shè)置交換機的密碼】------------------------5 【05設(shè)置遠程登錄交換機】--------------------5 【06 VLAN基本配置命令(以Quidway S3026為例)】-------------------8
【01基礎(chǔ)常識篇】
#
一、華為3COM IOS與CISCO IOS的區(qū)別
以前華為公司的產(chǎn)品配置指令和CISCO公司的一樣,但由于版權(quán)與官司的問題,華為3COM公司于2002年到2003年期間進行了IOS的升級工作,升級后的IOS與CISCO公司有很大區(qū)別。主要表現(xiàn)在以下三個方面。
1、全新IOS支持中文界面:
在新版IOS中用戶可以選擇英文或中文界面,這樣對于那些英文水平不高或不習慣看英文的用戶來說可以切換到中文界面,各項命令的注解一目了然。對中文的支持顯示了華為3COM公司本土化作戰(zhàn)的目標。
2、安全級別的提高:
我們先來回顧一下CISCO公司的安全級別,CISCO路由器通過模式分配權(quán)限,cisco IOS軟件將EXEC會話分為用戶(USER)模式和特權(quán)(privileged)模式,另外很多配置命令還需要進入到配置模式下進行。通過ENABLE進入特權(quán)模式,通過configure terminal進入配置模式。
華為3COM公司的IOS安全級別是基于用戶的而不是基于模式的。也就是說我們可以為一臺路由器配置很多個用戶,不同的用戶分配不同的權(quán)限,要想進入路由器必須輸入正確的用戶名和密碼才可以。這一點有點類似于WINDOWS操作系統(tǒng),當?shù)卿浵到y(tǒng)后要想進入桌面必須輸入正確的用戶名和密碼。對用戶進行權(quán)限劃分比劃分模式更安全,更方便管理。
3、配置命令的全面變化: 由于涉及到版權(quán)的問題,華為公司在此次升級IOS后對所有的配置命令也進行了很大程度的變動??梢哉f現(xiàn)在的指令和以前的指令有天壤之別,與CISCO公司的配置命令而是相去甚遠,經(jīng)常配置CISCO路由器的用戶初次接觸華為3COM路由器會很不適應。新舊命令變化如圖所示:
思科----華為常用的命令
4.華為3COM的VRP版本與CISCO的IOS
CISCO設(shè)備中是通過升級IOS版本來解決某些問題,而在華為3COM設(shè)備中取消了IOS版本這個定義,取而代之的是VRP版本。其實和IOS版本是一樣的,只是叫法不同而已。
二、命令行提供的視圖
1.用戶視圖 2.系統(tǒng)視圖 3.用戶界面視圖 4.VLAN視圖
5.以太網(wǎng)端口視圖
【用戶視圖】 查看交換機的簡單運行狀態(tài)和統(tǒng)計信息
【系統(tǒng)視圖】
查看交換機的全部運行狀態(tài)和統(tǒng)計信息,進行文件管理和系統(tǒng)管理 配置系統(tǒng)參數(shù) [Quidway] 在用戶視圖下鍵入system-view quit返回用戶視圖 return返回用戶視圖
【以太網(wǎng)端口視圖】 配置以太網(wǎng)端口參數(shù) [Quidway-Ethernet0/1] 固定以太網(wǎng)端口視圖:在系統(tǒng)視圖下鍵入interface ethernet0/1
[Quidway-Ethernet1/1] 擴展百兆以太網(wǎng)端口視圖:在系統(tǒng)視圖下鍵入interface ethernet 1/1
【VLAN視圖】 配置VLAN參數(shù) [Quidway-vlan1] 在系統(tǒng)視圖下鍵入vlan 1
【用戶界面視圖】 配置用戶界面參數(shù) [Sysname-ui-vty0] 在系統(tǒng)視圖下鍵入user-interface vty 0
【02常用基礎(chǔ)命令】
# [Quidway]sysname huawei
//命名交換機(或路由器)
[Quidway]super password yucedu //修改特權(quán)模式口令 【舉例:】
[Quidway]interface ethernet 0/1
//進入接口視圖 [Quidway-Ethernet0/1]shutdown
//關(guān)閉端口 [Quidway-Ethernet0/1]undo shutdown //重啟端口
[Quidway]quit
//退出系統(tǒng)視圖(一層一層退出)[Quidway]return
//直接退到用戶視圖
[Quidway]undo ……
//刪除命令
//切換語言模式
chinese Chinese environment
english English environment
配置本地telnet用戶,用戶名為”lyt”,密碼為”123456”,權(quán)限為最高級別3(缺省為級別1)[huawei]local-user lyt [huawei-luser-lyt]password simple 123456 [huawei-luser-lyt]service-type telnet level 3
查看IOS的命令如下:
下次啟動使用的app文件: flash:/S2403H-0019-140.bin
刪除saved-config文件的命令如下:
acl
清除ACL信息
arp
ARP模塊
counters
接口統(tǒng)計信息
dot1x
指定802.1x配置信息
garp
通用屬性注冊協(xié)議
igmp-snooping
清除IGMP偵聽統(tǒng)計信息
ip
IP模塊
local-server
本地服務器信息
logbuffer
清除日志緩沖區(qū)
ndp
鄰居發(fā)現(xiàn)協(xié)議
radius
指定RADIUS配置信息
recycle-bin
清除回收站文件
saved-configuration
保存的配置
stop-accounting-buffer
查詢備份在本地的無響應的停止計費報文
stp
生成樹協(xié)議
trapbuffer
清除告警緩沖區(qū)
交換機的 flash memory 中的配置將被擦除.你確信嗎?[Y/N]n 【03華為路由器DISPLAY命令大全】
# display current-configuration
//顯示當前配置信息
display saved-configuration
//顯示啟動時的配置文件
display interfaces
//顯示接口狀態(tài)及配置信息
display local-user
//顯示路由器當前所有的用戶信息
display version
//顯示系統(tǒng)的軟件硬件狀態(tài)信息,及當前的IOS版本信息
display clock
//顯示系統(tǒng)時鐘當前時間設(shè)置
display sysname
//顯示系統(tǒng)名稱,主機名
display history-command
//顯示鍵入過的命令歷史列表。
display arp
//顯示路由器的ARP地址映射對應表
display boot-loader
//顯示系統(tǒng)IOS文件
【04設(shè)置交換機的密碼】
[huawei]super password ?
cipher Display password with cipher text
level
Specify the entering password of the specified priority
simple Display password with plain text
[huawei]super password le [huawei]super password level ?
INTEGER<1-3> Priority level
[huawei]super password level 3 ?
cipher Display password with cipher text
simple Display password with plain text
[huawei]super password level 3 si [huawei]super password level 3 simple ?
STRING<1-16> Plain text password string
[huawei]super password level 3 simple yucedu 【05設(shè)置遠程登錄】
【方式1:使用設(shè)置password模式登入交換機】 [huawei]user-interface vty 0 4 [huawei-ui-vty0-4]authentication-mode ?
none
無需認證直接登錄
password 利用用戶終端接口的口令認證
scheme
利用RADIUS方案進行認證
[huawei-ui-vty0-4]authentication-mode password
//設(shè)置驗證方式為密碼驗證
[huawei-ui-vty0-4]set authentication password simple yucedu
//設(shè)置登入驗證的password密碼為yucedu [huawei-ui-vty0-4]user privilege level 1
//配置登入用戶級別(缺省為級別1)
【設(shè)置交換機管理IP地址】 [huawei]interface vlan 1
[huawei-Vlan-interface1]ip add 192.168.1.240 255.255.255.0 [huawei-Vlan-interface1]undo shutdown
【查看vlan 1接口的狀態(tài)】 [huawei]display interface vlan 1 Vlan-interface1 current state : UP
Line protocol current state : UP IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc23-79ae Internet Address is 192.168.1.240/24 Primary Description : HUAWEI, Quidway Series, Vlan-interface1 Interface The Maximum Transmit Unit is 1500
【交換機上提示,用戶的登入和退出】 [huawei] %Jan 4 15:20:12 2002 huawei SHELL/5/LOGIN:Slot=1;VTY login from 192.168.1.239 %Jan 4 15:20:43 2002 huawei SHELL/5/LOGOUT:Slot=1;VTY logout from 192.168.1.239
【客戶端登入操作如下】
【方式2:使用本地用戶名密碼方式登入交換機】 [huawei]user-interface vty 0 4 [huawei-ui-vty0-4]authentication-mode ?
none
無需認證直接登錄
password 利用用戶終端接口的口令認證
scheme
利用RADIUS方案進行認證
[huawei-ui-vty0-4]authentication-mode scheme
注意: 必須添加Exec(Telnet)用戶,否則操作員無法登錄系統(tǒng)!
【配置本地TELNET用戶】 [huawei]local-user lyt [huawei-luser-lyt]password simple 123456 [huawei-luser-lyt]service-type telnet level 3
【交換機上提示,用戶的登入和退出】 [huawei] %2002/1/1 19:54:43 huawei SHELL/5/LOGIN:Slot=1;lyt 從 192.168.1.239 登錄
【06 VLAN基本配置命令(以Quidway S3026為例)】
#
[Quidway]vlan 3 創(chuàng)建并進入VLAN配置模式,缺省時系統(tǒng)將所有端口加入VLAN 1,這個端口既不能被創(chuàng)建也不能被刪除
[Quidway]undo vlan 3 刪除一個VLAN
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 給VLAN增加/刪除以太網(wǎng)接口
[Quidway-Ethernet0/2]port access vlan 3 將本接口加入到指定VLAN id
[Quidway-Ethernet0/2]port link-type {access|trunk|hybrid} 設(shè)置端口工作方式,access(缺省)不支持802.1q幀的傳送,而trunk支持(用于Switch間互連),hybrid和trunk的區(qū)別在于trunk只允許缺省VLAN的報文發(fā)送時不打標簽,而hybrid允許多個VLAN報文發(fā)送時不打標簽。
[Quidway-Ethernet0/2]port trunk permit vlan {id|all} 設(shè)置trunk端口通過指定VLAN的數(shù)據(jù)幀,trunk端口默認僅允許通過VLAN 1的數(shù)據(jù)幀。
[Quidway-Ethernet0/2]port trunk pvid vlan 3 設(shè)置trunk端口的PVID,如果trunk端口上收到了非802.1q幀時,Switch會給該幀加上802.1q標志,該標志字段中的VLAN ID即PVID。
第四篇:計算機四級考試_交換機_路由器命令總結(jié)
備注:黑體為需要輸入的命令,/表示多項選一。本總結(jié)只是命令的簡答總結(jié),不包括命令的使用環(huán)境等。在機器型號方面3548和3500屬于同一操作系統(tǒng)。一般來講3500系列的配置要先進入各個視圖然后在各個視圖下配置,而6500需要在全局模式下配置。注意各種命令的選項和內(nèi)容組成。
交換機命令:
3548命令總結(jié):
基礎(chǔ)命令:
1.進入全局配置模式: config t
2.設(shè)置主機名: hostname(添加主機名字)
3.配置超級用戶命令:enbale secret 5(加密口令)4.配置遠程登錄口令:line vty 0 4
Password 7(加密口令)
Password 0(明碼口令)5.配置管理地址:interface VLAN1
Ip address(ip 地址)(子網(wǎng)掩碼)
端口配置命令:
1、進入端口配置模式:interface(端口號)
2、配置端口配置信息:discription(對端口的描述)
3、端口的開啟和關(guān)閉:shutdown
no shutdown
4、配置端口的通信方式:duplex(auto /full/half)----(自動 全雙
工 半雙工)
5、配置端口的傳輸速率:speed(以Kbps為單位注意換算?。?/p>
若為自動則使用命令 speed auto
VLAN配置模式命令:
1、配置vtp 域名: vtp domain(域名)
2、配置vtp 模式:vtp mode(sever/client/transparent)
3、進入VLAN 模式:vlan data
4、建立VLAN :vlan(vlan ID)name(vlan name)
5、刪除VLAN :no vlan(vlan ID)
6、為端口分配VLAN :先進入 端口模式
然后輸入: switchport access vlan(vlan ID)
7、VLAN trunk 配置:先進入端口模式
然后輸入 switchport mode trunk
8、封裝vlan 協(xié)議:switchport trunk encapsulation
(dot1q/isl/negotiate)
9、設(shè)置允許中繼的VLAN:switchport trunk allowed valn(vlan ID)
STP配置命令:
1、打開或者關(guān)閉STP:spanning-tree vlan(vlan ID)
no spanning-tree vlan(vlan ID)
2、配置根網(wǎng)橋:spanning-tree vlan(vlan ID)root primary 設(shè)置備份root :spanning-tree vlan(vlan ID)root secondary
3、配置生成樹的優(yōu)先級: spanning-tree vlan(vlan ID)priority
(0-61440)
4、配置BackboneFast生成樹可選功能:spanning-tree backbonefast
5、配置UplinkFast生成樹可選功能:spanning-tree uplinkfast spanning-tree uplinkfast max-update-rate(0-32000)
6、配置portfast 功能:spanning-tree portfast default
7、配置BPDU Filter可選功能 :spanning-tree portfast bpdufilter
default 6500命令總結(jié):
基礎(chǔ)命令:
1、進入超級用戶配置模式:enable
2、設(shè)置主機名:set system name(添加主機名字)
3、配置超級用戶命令:set enablepass
(舊密碼)
(新密碼)
(新密碼)
4、配置遠程登錄口令:set password
(舊密碼)
(新密碼)
(新密碼)
5、配置管理地址:set interface sc0(ip 地址)(子網(wǎng)掩碼)(廣播地址)
端口配置命令:
6、配置端口配置信息:set port name’(mod/port)(name)
7、端口的開啟和關(guān)閉:set port enable(mod/port)
set port disable(mod/port)
8、配置端口的通信方式:set port duplex(mod/port)(auto
/full/half)----(自動 全雙工 半雙工)
9、配置端口的傳輸速率:set port speed(mod/port)(port-speed)
---以Kbps為單位
若為自動則使用命令set port speed(mod/port)auto set speed to duto
VLAN配置模式命令:
10、配置vtp 域名:set vtp domain(域名)
11、配置vtp 模式:set
vtp mode(sever/client/transparent)
12、建立VLAN :set vlan(vlan ID)name(vlan name)
13、刪除VLAN :clear vlan(vlan ID)
14、為端口分配VLAN :set vlan(vlan ID)(mod/port)
VLAN trunk 配置:set trunk(mod/port)(mode)(type)
15、設(shè)置允許中繼的VLAN:set trunk(mod/port)vlan(vlan
ID)
STP配置命令:
5、打開或者關(guān)閉STP:set spantree enable(vlan ID)
6、配置根網(wǎng)橋:set spantree root(vlan ID)
設(shè)置備份root :set spantree root secondary(vlan ID)
7、配置生成樹的優(yōu)先級: set spantree priority(0-61440)
8、配置BackboneFast生成樹可選功能:set spantree backbonefast enable
9、配置UplinkFast生成樹可選功能:set spantree uplinkfast enable
set spantree uplinkfast enable(單位是 packet/ms)
10、配置portfast 功能:set spantree portfast(mod/port)(enable/default/disable)
11、配置BPDU Filter可選功能 :set spantree portfast bpdu-filter(enable/disable)
set spantree portfast bpdu-filter(mod/port)(enbale/disable/default)
路由器命令
1、進入全局模式:configure terminal2、幾個公用命令:
退出命令:exit 保存配置:wirte memory(保存到路由器的NVRAM)
write network tftp(保存到TFTP服務器)刪除配置: Write erase 網(wǎng)絡(luò)檢測命令:telnet ping trace show(這幾個命令應該重點了解下他們的作用和使用方法)
3、端口配置:進入:
interface(端口)
4、端口帶寬:bandwidth(單位為Kbps)
5、開關(guān)端口:shutdown no shutdown
6、配置接口地址:ip address(ip地址)(子網(wǎng)掩碼)
7、配置POS接口:先進入接口模式
Crc 32(可選的crc校驗位是16 或
32)
Pos farming sdh(可選的幀格式是 sdh和 sonet)Pos flag s1 s0 2(s1 s0 =00 表示sonet幀的數(shù)據(jù) S1 s0=10(十進制的2)表示是SDH的幀數(shù)據(jù))
8、loopback接口配置:int loopback 0
ip address(ip 地址)(子網(wǎng)掩碼)
no ip route-cache
no ip mroute-cache
9、配置靜態(tài)路由:ip rpute(目的網(wǎng)絡(luò)地址)(子網(wǎng)掩碼)(下一
跳路由器地址)
10、配置RIP動態(tài)協(xié)議:router rip
Network(網(wǎng)絡(luò)地址)--記住只寫上網(wǎng)絡(luò)地址即可。
配置被動接口:passive-interface(端口)
配置路由過濾:access-list 12 deny any
Router rip
Distribute-list 12 in(端口)
配置管理距離:distance 50
定義鄰居路由:neighbor(鄰居路由IP地址)
11、配置ospf動態(tài)協(xié)議:router ospf(進程號)
Network(網(wǎng)絡(luò)地址)(反掩碼)area(區(qū)域號)或者 network area(區(qū)域號)range(網(wǎng)絡(luò)地址)(子
網(wǎng)掩碼)
配置ospf引入外部路由的花費:redistribute metric(metric值0-16777214)
配置引入外部路由時缺省的標記值:redistribute tag(32位的數(shù)值)
配置引入外部路由時的缺省外部路由類型:redistribute 錯哦nnected metric-type(1或 2)subnets
DHCP的配置:
1、配置DHCP pool名字并進入DHCP pool 配置模式:
Ip dhcp pool(地址池名字)
2、配置IP地址池的子網(wǎng)地址和地址掩碼:network(network
號碼)(子網(wǎng)掩碼/掩碼長度)
3、配置不用于動態(tài)分配的ip地址:ip dhcp excluded-address
(低地址
高地址)
4、配置IP地址池的缺省網(wǎng)關(guān):default-router(最多允許8個)
5、配置IP地址池的域名:domain-name(名字)
6、配置IP地址池的域名服務器的IP地址:dns-sever(最多8
個)
7、配置IP地址的租約時間:lease(日 小時 分/infinte)
IP訪問控制列表的配置:
1、配置標準訪問控制列表:access-list(列表號)(permit/deny)
(源IP地址)(子網(wǎng)掩碼)
2、配置擴展訪問列表:access-list(列表號)(permit/deny)(協(xié)
議)(源地址)(子網(wǎng)掩碼)(目的地址)(子網(wǎng)掩碼)(lt/gt/eq/neq)(端口號)
3、使用ip access-list 命令:ip access-lis(extended/standard)
(列表號)(Pemit/deny)(協(xié)議)(源地址+子網(wǎng)掩碼)(目的地址+子網(wǎng)掩碼)(lt/gt/eq/neq)(端口號)
4、用名字表示訪問控制列表的配置方法:與3大體相同,只是
將列表號換成字符與數(shù)字組成的名字。
5、將訪問控制列表應用于端口:interface(端口號)
Ip access-group(控制列號)(in/out)
第五篇:H3C交換機的配置命令(個人經(jīng)驗總結(jié))范文
1、為交換機分配ip 輸入分配給交換機的IP地址為*.*.*.*,掩碼為255.255.255.0,類型為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、在兩個vlan之間增加路由。
命令:ip route-static 0.0.0.0 255.255.255.255 192.168.1.254
5、為交換機添加默認網(wǎng)關(guān)。
將以太網(wǎng)端口Ethernet1/0/1設(shè)置為Trunk端口。
ip address 172.16.21.1 255.255.255.0
可能這樣配的話意思是VLAn130的IP就是172.16.21.2—172.16.21.254 而172.16.21.1則是這個網(wǎng)段的網(wǎng)關(guān)。
將Trunk端口Ethernet1/0/1加入到VLAN2、VLAN4、VLAN50~VLAN 100中。
遠程登錄方式: 配置web用戶
[h3c] local-user admin(配置用戶名admin)---本地用戶admin [h3c] service-type telnet level 3(設(shè)置級別為3)----服務類型telnet 級別3 [h3c] password simple admin(設(shè)置密碼為admin)----密碼簡單型admin
配置telnet用戶
[h3c] user-interface vty 0 4(進入虛擬終端)----用戶接口 vty 0 4 [h3c] authentication-mode scheme(配置本地或遠端用戶名認證方式—鑒定
User-interface vty 0 4 Authentication-mode scheme User privilege level 3 Local-user huawei Service-type telnet level 3 Password simple admin
華為交換機配置用戶名和密碼
2009-09-18 02:16 華為交換機配置用戶名和密碼
(1)telnet只需輸入password即可遠程登陸交換機。
進入用戶界面視圖
[SwitchA]user-interface vty 0 4 設(shè)置認證方式為密碼驗證方式 [SwitchA-ui-vty0-4]authentication-mode password
設(shè)置登陸驗證的password為明文密碼”huawei”
[SwitchA-ui-vty0-4]set authentication password simple huawei 配置登陸用戶的級別為最高級別3(缺省為級別1)[SwitchA-ui-vty0-4]user privilege level 3/1 [switchA]super password simple ddddd
(2)telnet需要輸入username和password才可以登陸交換機。
進入用戶界面視圖
[SwitchA]user-interface vty 0 4
配置本地或遠端用戶名和口令認證
[SwitchA-ui-vty0-4]authentication-mode scheme
配置本地TELNET用戶,用戶名為”huawei”,密碼為”huawei”,權(quán)限為最高級別3(缺省為級別1)[SwitchA]local-user huawei [SwitchA-user-huawei]password simple huawei [SwitchA-user-huawei]service-type telnet level 3(3)通過con口只需輸入password即可遠程登陸交換機。
進入用戶界面視圖
[Quidway]user-interface aux 0
設(shè)置認證方式為密碼驗證方式
[Quidway-ui-aux0] authentication-mode password
設(shè)置登陸驗證的password為明文密碼”huawei”
[Quidway-ui-aux0] set authentication password simple huawei 配置登陸用戶的級別為最高級別3(缺省為級別1)[Quidway-ui-aux0] user privilege level 3
(4)通過con口需要輸入username和password才可以登陸交換機。[Quidway]user-interface aux 0
配置本地或遠端用戶名和口令認證
[Quidway-ui-aux0] authentication-mode scheme
配置本地TELNET用戶,用戶名為”huawei”,密碼為”huawei”,權(quán)限為最高級別3(缺省為級別1)[SwitchA]local-user huawei [SwitchA-user-huawei]password simple huawei [SwitchA-user-huawei]service-type telnet level 3
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
配置舉例及步驟:僅允許來自10.10.1.66和lO.10.1.78的TELNET用戶訪問交換機:
#定義基本訪問控制列表。
[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 #引用訪問控制列表。
[Quidway]user-interface vty 0 4 [Quidway-user-interface-vty0-4]acl 2OO8 inbound
H3C交換機恢復出廠設(shè)置
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將重新啟動/ 【提示】
1、可以只鍵入reset sa,reset sa是reset saved-configuration的縮寫。
2、擦除配置文件后,必須要重啟設(shè)備后才能恢復到出廠設(shè)置。
修改交換機的系統(tǒng)時間
11、訪問控制列表 基于接口的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]
高級的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訪問控制列表
公司企業(yè)網(wǎng)通過Switch的端口實現(xiàn)各部門之間的互連。研發(fā)部門由GigabitEthernet1/1/1接入交換機,工資查詢服務器的地址為192.168.1.2。要求正確配置ACL,禁止研發(fā)部門在工作日8:00至18:00訪問工資服務器。配置步驟(1)定義時間段
# 定義8:00至18:00的周期時間段。
[H3C] time-range test 8:00 to 18:00 working-day(2)定義到工資服務器的ACL # 進入ACL3000視圖。[H3C] acl number 3000
# 定義其它部門到工資服務器的訪問規(guī)則。
[H3C-acl-adv-3000] rule 1 deny ip destination 192.168.1.2 0 time-range test [H3C-acl-adv-3000] quit(3)在端口上應用ACL # 在端口上應用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
解除綁定