路由器、交換機、防火墻命令表_第1頁
路由器、交換機、防火墻命令表_第2頁
路由器、交換機、防火墻命令表_第3頁
路由器、交換機、防火墻命令表_第4頁
路由器、交換機、防火墻命令表_第5頁
已閱讀5頁,還剩1頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

1、1. 計算機命令:PCA login: root ;使用root用戶password: linux ;口令是linux# shutdown -h now ;同init 0 關(guān)機# logout# login# ifconfig ;顯示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;設(shè)置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ; 刪除IP地址# route add gw <ip># route

2、del gw <ip># route add default gw <ip> ;設(shè)置網(wǎng)關(guān)# route del default gw <ip> ;刪除網(wǎng)關(guān)# route ;顯示網(wǎng)關(guān)# ping <ip># telnet <ip> 2. 交換機支持的命令:交換機基本狀態(tài):switch: ;交換機的ROM狀態(tài)rommon> ;路由器的ROM狀態(tài)hostname> ;用戶模式hostname# ;特權(quán)模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口狀態(tài)交換機口

3、令設(shè)置:switch>enable ;進入特權(quán)模式switch#config terminal ;進入全局配置模式switch(config)#hostname <hostname> ;設(shè)置交換機的主機名switch(config)#enable secret xxx ;設(shè)置特權(quán)加密口令switch(config)#enable password xxa ;設(shè)置特權(quán)非密口令switch(config)#line console 0 ;進入控制臺口switch(config-line)#line vty 0 4 ;進入虛擬終端switch(config-line)#login

4、;允許登錄switch(config-line)#password xx ;設(shè)置登錄口令xxswitch#exit ;返回命令交換機VLAN設(shè)置:switch#vlan database ;進入VLAN設(shè)置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;刪vlan 2switch(config)#int f0/1 ;進入端口1switch(config-if)#switchport access vlan 2 ;當(dāng)前端口加入vlan 2switch(config-if)#switchport mode trunk ;設(shè)置為干線switch

5、(config-if)#switchport trunk allowed vlan 1,2 ;設(shè)置允許的vlanswitch(config-if)#switchport trunk encap dot1q ;設(shè)置vlan 中繼switch(config)#vtp domain <name> ;設(shè)置發(fā)vtp域名switch(config)#vtp password <word> ;設(shè)置發(fā)vtp密碼switch(config)#vtp mode server ;設(shè)置發(fā)vtp模式switch(config)#vtp mode client ;設(shè)置發(fā)vtp模式交換機設(shè)置IP地址

6、:switch(config)#interface vlan 1 ;進入vlan 1switch(config-if)#ip address <IP> <mask> ;設(shè)置IP地址switch(config)#ip default-gateway <IP> ;設(shè)置默認(rèn)網(wǎng)關(guān)switch#dir flash: ;查看閃存交換機顯示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看當(dāng)前配置信息switch#show vlan ;查看vlan配置信息switch#show inte

7、rface ;查看端口信息switch#show int f0/0 ;查看指定端口信息 3. 路由器支持的命令:路由器顯示命令:router#show run ;顯示配置信息router#show interface ;顯示接口信息router#show ip route ;顯示路由信息router#show cdp nei ;顯示鄰居信息router#reload ;重新起動路由器口令設(shè)置:router>enable ;進入特權(quán)模式router#config terminal ;進入全局配置模式router(config)#hostname <hostname> ;設(shè)置交換

8、機的主機名router(config)#enable secret xxx ;設(shè)置特權(quán)加密口令router(config)#enable password xxb ;設(shè)置特權(quán)非密口令router(config)#line console 0 ;進入控制臺口router(config-line)#line vty 0 4 ;進入虛擬終端router(config-line)#login ;要求口令驗證router(config-line)#password xx ;設(shè)置登錄口令xxrouter(config)#(Ctrl+z) ; 返回特權(quán)模式router#exit ;返回命令路由器配置:rou

9、ter(config)#int s0/0 ;進入Serail接口router(config-if)#no shutdown ;激活當(dāng)前接口router(config-if)#clock rate 64000 ;設(shè)置同步時鐘router(config-if)#ip address <ip> <netmask> ;設(shè)置IP地址router(config-if)#ip address <ip> <netmask> second ;設(shè)置第二個IProuter(config-if)#int f0/0.1 ;進入子接口router(config-subif.

10、1)#ip address <ip> <netmask> ;設(shè)置子接口IProuter(config-subif.1)#encapsulation dot1q <n> ;綁定vlan中繼協(xié)議router(config)#config-register 0x2142 ;跳過配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引導(dǎo)路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-c

11、onfig tftp ;保存配置到tftprouter#copy startup-config tftp ;開機配置存到tftprouter#copy tftp flash: ;下傳文件到flashrouter#copy tftp startup-config ;下載配置文件ROM狀態(tài):Ctrl+Break ;進入ROM監(jiān)控狀態(tài)rommon>confreg 0x2142 ;跳過配置文件rommon>confreg 0x2102 ;恢復(fù)配置文件rommon>reset ;重新引導(dǎo)rommon>copy xmodem:<sname> flash:<dnam

12、e> ;從console傳輸文件rommon>IP_ADDRESS= ;設(shè)置路由器IPrommon>IP_SUBNET_MASK= ;設(shè)置路由器掩碼rommon>TFTP_SERVER= ;指定TFTP服務(wù)器IPrommon>TFTP_FILE=c2600.bin ;指定下載的文件rommon>tftpdnld ;從tftp下載rommon>dir flash: ;查看閃存內(nèi)容rommon>boot ;引導(dǎo)IOS靜態(tài)路由:ip route <ip-address> <su

13、bnet-mask> <gateway> ;命令格式router(config)#ip route ;靜態(tài)路由舉例router(config)#ip route ;默認(rèn)路由舉例動態(tài)路由:router(config)#ip routing ;啟動路由轉(zhuǎn)發(fā)router(config)#router rip ;啟動RIP路由協(xié)議。router(config-router)#network <netid> ;設(shè)置發(fā)布路由router(config-router)#negih

14、bor <ip> ;點對點幀中繼用。幀中繼命令:router(config)#frame-relay switching ;使能幀中繼交換router(config-s0)#encapsulation frame-relay ;使能幀中繼router(config-s0)#fram-relay lmi-type cisco ;設(shè)置管理類型router(config-s0)#frame-relay intf-type DCE ;設(shè)置為DCErouter(config-s0)#frame-relay dlci 16 ;router(config-s0)#frame-relay loca

15、l-dlci 20 ;設(shè)置虛電路號router(config-s0)#frame-relay interface-dlci 16 ;router(config)#log-adjacency-changes ;記錄鄰接變化router(config)#int s0/0.1 point-to-point ;設(shè)置子接口點對點router#show frame pvc ;顯示永久虛電路router#show frame map ;顯示映射基本訪問控制列表:router(config)#access-list <number> permit|deny <source_ip> &l

16、t;wild|any>router(config)#interface <interface> ;default:deny anyrouter(config-if)#ip access-group <number> in|out ;defaultut例1:router(config)#access-list 1 deny host router(config)#access-list 1 permit anyrouter(config)#int f0/0router(config-if)#ip access-group 4 in例2:router

17、(config)#access-list 4 permit router(config)#access-list 4 deny 55router(config)#access-list 4 permit 55router(config)#access-list 4 deny 55router(config)#access-list 4 permit anyrouter(config)#int f0/1router(config-if)#ip access-group 4

18、in擴展訪問控制列表:access-list <number> permit|deny icmp <S_IP wild> <D_IP wild>typeaccess-list <number> permit|deny tcp <S_IP wild> <D_IP wild>port例1:router(config)#access-list 101 deny icmp any echorouter(config)#access-list 101 permit ip any anyrouter

19、(config)#int s0/0router(config-if)#ip access-group 101 in例2:router(config)#access-list 102 deny tcp any eq 80router(config)#access-list 102 permit ip any anyrouter(config)#interface s0/1router(config-if)#ip access-group 102 out刪除訪問控制例表:router(config)#no access-list 102router(config

20、-if)#no ip access-group 101 in路由器的nat配置Router(config-if)#ip nat inside ;當(dāng)前接口指定為內(nèi)部接口Router(config-if)#ip nat outside ;當(dāng)前接口指定為外部接口Router(config)#ip nat inside source static p <私有IP><公網(wǎng)IP> portRouter(config)#ip nat inside source static Router(config)#ip nat inside source s

21、tatic tcp 80 80Router(config)#ip nat pool p1 0 Router(config)#ip nat inside source list 1 pool p1Router(config)#ip nat inside destination list 2 pool p2Router(config)#ip nat inside source list 2 interface s0/0 overloadRouter(config)#ip nat pool p2 10.

22、65.1.2 type rotaryRouter#show ip nat translationrotary 參數(shù)是輪流的意思,地址池中的IP輪流與NAT分配的地址匹配。overload參數(shù)用于PAT 將內(nèi)部IP映射到一個公網(wǎng)IP不同的端口上。外部網(wǎng)關(guān)協(xié)議配置routerA(config)#router bgp 100routerA(config-router)#network routerA(config-router)#neighbor remote-as 200配置PPP驗證:RouterA(config)#

23、username <RouterB> password <word>RouterA(config)#int s0RouterA(config-if)#ppp authentication chap|pap 4PIX防火墻命令Pix525(config)#nameif ethernet0 outside security0 ;命名接口和級別Pix525(config)#interface ethernet0 auto ;設(shè)置接口方式Pix525(config)#interface ethernet1 100full ;設(shè)置接口方式Pix525(config)#interface ethernet1 100full shutdownPix525(config)#ip address inside Pix525(config)#ip address outside 52Pix5

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論