軟考網絡工程師級配置題總結(上)

一、             交換機配置
1.       交換機的基本配置
Enable                                        進入特權模式
Config terminal                                 進入配置模式
Enable password cisco                           設置enable password cisco
Enable secret cisco1                             設置enable secret cisco1
Hostname host1                                設置主機名爲host1
End                                          回到特權模式
Ip address 192.168.1.1 255.255.255.0               設置交換機的ip地址
Ip default-gateway 192.168.1.254                  設置默認網關
Ip domain-name cisco.com                       設置域名
Ip name-server 200.0.0.1                         設置域名服務器
Interface f0/1                                  進入接口f0/1的配置模式
Speed 100                                    設置該端口速率爲100Mb/s
Duplex full                                    設置該端口爲全雙工
Description to-pc1                             設置該端口描述爲to-pc1
Show interface fastethernet0/1                    查看端口f0/1的配置結果
Show interface fastethernet0/1 status                查看端口f0/1的狀態
Mac-address-table aging-time 100                  設置超時時間爲100s
Mac-address-table permanent 0000.0c01.bbcc f0/3            加入永久地址
Mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7     加入靜態地址
Clear mac-address-table restricted static             清除限制地址
2.       VLAN配置
Vlan database                                  進入vlan配置子模式
Vtp server                                    設置本交換機爲server模式
Vtp domain vtpserver                            設置域名爲vtpserver
Vtp pruning                                    啓動修剪功能
Show vtp status                                 查看vtp設置信息
Vtp client                                      設置本交換機爲client模式
Switchport mode trunk                           設置當前端口爲trunk模式
Switchport trunk allowed vlan all                   設置允許從該端口交換數據的vlan
Switchport trunk allowed vlan remove vlan 1          去掉vlan 1
Vlan 3 name v3                                 創建一個vlan3,命名爲v3
Switchport mode access                           設置端口爲靜態vlan訪問模式
Switchport access vlan 2                          把端口xx分配給vlan2
Show vlan                                     查看vlan配置信息
3.       STP配置
Spanning-tree vlan 1 port-priority 10                       vlan 1 的端口權值設爲10
Spanning-tree vlan 2 cost 30                             設置vlan 2生成樹路徑值爲30
二、             路由器配置
1.       路由器的基本配置
Ip address 192.168.1.11 255.255.255.0                      設置接口地址
No shutdown                                           激活接口
Show running-config                                    檢查配置結果
Ip host router                                          主機表
Line 1 8
   No exec       禁止在line188條異步線路上產生exec進程,而只允許線路出境
   Transport input all   所有協議可用於連接到指定的路由器線路
Show session                                      查看終端服務器的會話
Disconnect 2                                        斷開會話2
Show line 1                                         查看線路1的狀態
Clear line 2                                         清除線路2
Ip route 192.168.1.0 255.255.255.0 10.1.1.1                加入靜態路由
Ip routing                        啓動路由功能
2.       路由協議的配置
RIP:
No logging console          停止向console 口發送log 信息,以免干擾你在控制檯的操作
Ip routing                                允許路由選擇協議
Router rip                                進入rip協議配置子模式
Network 192.168.5.0                       聲明網絡192.68.1.0/24
IGRP:
No keeplive                              此接口不檢測keeplive(存活)信號
Clockrate 500000                          該接口時鐘頻率爲500khz
Bandwith 500                             接口帶寬爲500Mb/s
Router igrp 100                            創建igrp路由進程,自治系統號爲100
Nerwork 192.168.3.0                        聲明網絡段192.168.3.0/24
OSPF:
Router ospf 120                            啓用ospf協議,自治系統號爲120
Network 192.200.10.4 0.0.03 area 0            指定與該路由器相連的網絡192.200.10.4,它連接的是主幹網
EIGRP
Router eigrp 90                          啓用eigrp路由協議,它的進程號爲90
Network 192.200.10.0 0.0.0.3               指定與該路由器相連的網絡爲192.200.10.0
No auto-summary                         關閉路由自動彙總功能
 
三、             廣域網接入配置
1.ISDN配置
Isda switch-type basic.net3               設置交換機類型爲 basic.net
Interface bri 0                           進入bri接口配置模式
Encapsulation ppp                        設置封裝協議爲ppp
Dialer string 80000002                    設置撥號串,R2isdn號碼
Dialer-group 1                     設置撥號組號爲1,把bri0接口與撥號列表1相關聯
Dialer-list 1 protocol ip permit        設置撥號列表1
2.PPPDDR配置
Username R2 password 0 cisco                           設置用戶名和密碼
Dialer idle-timeout 300                                 設置撥號空閒時間爲300s
Dialer map ip 192.168.1.2 name R2 broadcast 80000002      設置撥號映射,R1的映射爲ip地址192.168.1.2,主機名R2ISDN號爲80000002.
Dialer load-threshold 128    PPP multilink
                設置多鏈路,當設置爲1時,表示不論負載多大同時啓動2B信道
No cdp enable                      禁用CDP協議
PPP authentication chap             設置PPP認證方式爲CHAP
3.幀中繼配置
No ip address                        
Encapsulation frame-relay                            設置frame-relay封裝
Frame-relay lmi-type cisco                            設置frame-relay LMI類型爲cisco
Frame-relay lmi-type dce                             設置frame-relay LMI 類型爲 dce
Frame-relay route 102 interface serial2 201              
Frame-relay route 103 interface serial3 301              
No frame-relay inverse-arp                          關閉幀中繼逆向ARP
Frame map ip 192.168.1.2 cisco                     映射協議地址與DLCI
四、             L2TP配置
***d-group 1                           創建vpdn1,並進入vpdn1的配置模式                          
Accept-dialin protocol l2tp virtual-template 1 terminate-from hostname host1         接受l2tp通道連接請求,並根據virtual-template1創建virtual-access接口,遠端的主機名爲host1
Local name mm                             設置tunnel本端名稱爲mm
Lcp renegotiation always                      LCP再次協商
No l2tp authentication                         設置不驗證通道對端
五、             IPSec配置
Crypto isakmp policy 100                    創建標識爲“100IKE策略
Hash md5                                採用MD5 散列算法
Authentication pre-share                     採用預共享密鑰認證
Crypto isakmp key mcns address 172.16.2.1      與遠端ip172.16.2.1的對等體的共享密鑰爲“mcns
Crypto ipsec transform-set 1&2 esp-des eap-md5-hmac         配置名爲1&2的交換集,指定esp-desesp-md5-hmac這兩種變換
Crypto map sharef 10 ipsec-isakmp              配置加密圖,名稱:sharef,序號:10;指定用IKE來建立IPsec安全關聯,以保護由該加密圖條目所指定的數據流
Set peer 172.6.2.1                      指定允許的IPsec對等體IP地址爲172.16.2.1
Set transform-set 1&2                   此交換圖應用交換集1&2
Match address 162
Interface serial 0                        配置接口
Ip address 172.16.1.1 255.255.255.252
Ip access-group 101 in
Crypto map sharef                      此接口應用名爲sharef的加密圖進行加密
end
六、             PIX防火牆配置
配置防火牆的網卡參數:
Interface Ethernet0 auto
配置防火牆內外網卡的IP地址
Ip address inside
Ip address outside
指定外部網卡的ip地址範圍
Global 1
指定要進行轉換的內部地址
Nat 1
配置某些控制選項
Conduit
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章