第二章路由器管理
2.1 創(chuàng)建命令別名
提問 為常用的命令創(chuàng)建簡潔的別名
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#alias exec rt show ip route
Router1(config)#alias exec on show ip ospf neighbor
Router1(config)#end
Router1#
注釋 show aliases 命令可以輸出當前配置的別名
2.2 管理路由器ARP緩存
提問 修改ARP表條目超時時長
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#interface Ethernet0
Router1(config-if)#arp timeout 600
Router1(config-if)#end
Router1#
注釋 缺省情況為4個小時,同時思科沒有提供命令能單獨的清除某個ARP緩存,只能通過clear arp命令來清除整個ARP表
2.3 路由器Buffer調(diào)整
提問 手動調(diào)整路由器Buffer分配來使其工作的更高效
回答 路由器維護兩個Buffer池,public buffers和interface buffers
調(diào)整public buffers
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#buffers big initial 100
Router1(config)#buffers big max-free 200
Router1(config)#buffers big min-free 50
Router1(config)#buffers big permanent 50
Router1(config)#end
Router1#
調(diào)整interface buffers
Router1#configure terminal
Enter configuration commands.one per line.End with CNTL/Z.
Router1(config)#buffers Ethernet0 initial 200
Router1(config)#buffers Ethernet0 max-free 300
Router1(config)#buffers Ethernet0 min-free 50
Router1(config)#buffers Ethernet0 permanent 50
Router1(config)#buffers Ethernet0 permanent 50
Router1(config)#end
Router1#
注釋 一般不建議修改,如果修改,建議首先使用show buffers命令來查看當前buffer使用情況,調(diào)整完以后建議使用show memory來查看內(nèi)存使用情況
2.4 自動調(diào)整路由器Buffer
提問 希望路由器根據(jù)自己的情況自動進行buffer分配調(diào)整
回答
Router#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router(config)#buffers tune automatic
Router(config)#end
Router#
注釋 詞命令引自IOS 12.3(14)T,使用show buffers tune命令來查看自動調(diào)整情況
2.5 使用CDP協(xié)議
提問 希望獲得相連網(wǎng)絡(luò)設(shè)備的信息
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#cdp run
Router1(config)#interface Seria10/0
Router1(config-if)#cdp enable
Router1(config-if)#exit
Router1(config-if)#interface FastEthernet0/0
Router1(config-if)#no cdp enable
Router1(config-if)#exit
Router1(config)#interface FastEthernet1/0
Router1(config-if)#cdp enable
Router1(config-if)#end
Router1#
注釋 CDP(Cisco Discovery Protocol)是思科專有的協(xié)議,用于發(fā)現(xiàn)相連的思科設(shè)備,幫助了解網(wǎng)絡(luò)拓撲,缺省是啟動的,使用show cdp neighbor detail 命令可以產(chǎn)看相連設(shè)備的詳細信息
2.6 禁止CDP協(xié)議
提問 為了安全期間不想讓臨近設(shè)備發(fā)現(xiàn)自己設(shè)備的信息
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#cdp run
Router1(config)#interface FastEthernet0/0
Router1(config-if)#no cdp enable
Router1(config-if)#end
Router1#
注釋 為了安全期間可以在邊界設(shè)備上禁止CDP
2.7 小服務(wù)的開啟
提問 開啟或者禁用一些類似finger的小服務(wù)
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#service tcp-small-servers (no service tcp-small-servers)
Router1(config)#service udp-small-servers (no service udp-small-servers)
Router1(config)#end
Router1#
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#ip finger (no ip finger)
Router1#
注釋 tcp和udp的小服務(wù)指開啟路由器的echo,discard,daytime和chargen服務(wù),為了安全期間都建議將其關(guān)閉
2.8 啟用路由器HTTP訪問
提問 通過瀏覽器來配置和管理路由器
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#access-list 75 permit 172.25.1.1
Router1(config)#access-list 75 deny any
Router1(config)#ip http server
Router1(config)#ip http access-class 75
Router1(config)#end
Router1#
注釋 由于IOS 12.1(5)之前存在HTTP訪問的高危漏洞,所以如果你的IOS版本小于此版本建議不要開啟此服務(wù)
2.9 啟用路由器安全HTTPS訪問
提問 通過加密的訪問HTTP訪問路由器
回答
Core#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Core(config)#ip http secure-server
Core(config)#end
Core#
注釋 IOS 12.2(14)S 之后引入此特性,建議先用no ip http server命令關(guān)閉非加密的HTTP訪問,然后開啟安全的訪問,同時可以使用ip http secure-port 8080
命令來更改訪問端口
2.10 使用靜態(tài)主機名映射
提問 在路由器上配置靜態(tài)的主機映射表,從而使用主機名而不是IP地址來訪問設(shè)備
回答
Router1#configure terminal
Enter configuration commands,one per line.End with CNTL/Z.
Router1(config)#ip host freebsd 172.25.1.1
Router1(config)#ip host router2 10.1.1.1 172.22.1.4
Router1(config)#end
Router1#
注釋 可以對一個主機名映射很多IP地址來提供冗余訪問,show hosts命令來驗證
- 北京炫億時代專業(yè)服務(wù)器運輸,機房搬遷包裝以及倉儲托
- 思科CISCO無線AP 啟動加載不了ios
- 【云爍俱樂部分享會】第十二期 某游戲開發(fā)公司內(nèi)部網(wǎng)
- 【云爍俱樂部分享會】第十一期 某政府網(wǎng)絡(luò)安全架構(gòu)方
- 【云爍俱樂部分享會】第九期 中小企業(yè)網(wǎng)絡(luò)搭建思路分
- 【云爍俱樂部分享會】第八期 某倉庫無線覆蓋項目分享
- 【云爍俱樂部分享會】第七期 工程師網(wǎng)絡(luò)設(shè)備實操理論
- 【云爍俱樂部分享會】第六期 工程師百度無線覆蓋項目
- 【云爍俱樂部分享會】第五期 工程師項目分享會
- 【云爍俱樂部分享會】第四期 工程師項目分享會
熱門文章
- 北京機房搬遷改造公司,系統(tǒng)集成有哪些公司?-2019-11-04
- 如何打造一個安全的網(wǎng)絡(luò)環(huán)境?政府要做到這四點-2019-11-04
- 北京辦公室網(wǎng)絡(luò)布線,綜合布線施工價格-2019-11-04
- 深信服產(chǎn)品專業(yè)上網(wǎng)行為管理,安全設(shè)備有保障-2019-11-04
- 兩年內(nèi)網(wǎng)絡(luò)安全市場規(guī)模將達千億級別?來看看詳細分析-2019-11-04
- 北京炫億時代專業(yè)機房設(shè)備除塵,機房網(wǎng)絡(luò)改造-2019-11-04
- 企業(yè)如何保障移動辦公的安全性?移動辦公存在的七大安-2019-11-01
- 北京深信服AC-1000-A400產(chǎn)品租賃購買,專業(yè)IT上網(wǎng)行為管理-2019-11-01
- 互聯(lián)網(wǎng)企業(yè)軟件開發(fā)如何才能沒有漏洞?專業(yè)工程師給出-2019-11-01
- 如何避免APP的“越權(quán)”行為?要靠制定相關(guān)法律法規(guī)-2019-11-01