| 提示項 | 標準回答 | 備註 |
| Hostname | 按命名規範 (如 BJ-CORE-R1) | 無空格、特殊字符 |
| Enable Secret | 強密碼 (16+ 位複雜度) | MD5/SHA256 加密 |
| Enable Password | 不設置 (直接回車) | 避免弱加密干擾 |
| VTY Password | 強密碼,異於 Enable Secret | 配合 ACL 限制來源 |
| Routing Protocol | OSPF / EIGRP / BGP / Static | 按網絡設計選擇 |
| Interface Config | 逐個接口配 IP/掩碼/封裝/描述 | WAN側按運營商要求 |
| Save Config | Yes | 寫入 NVRAM |
Setup 完成後必執行的安全加固命令:
Router# configure terminal
Router(config)# no service config ! 禁用自動從網絡加載配置
Router(config)# no ip domain-lookup ! 禁用域名解析 (防輸入錯誤卡頓)
Router(config)# service password-encryption ! 啟用密碼加密
Router(config)# service timestamps log datetime msec localtime show-timezone year
Router(config)# logging buffered 65536
Router(config)# logging host 10.0.0.10
Router(config)# logging trap informational
Router(config)# logging facility local0
Router(config)# service sequence-numbers
Router(config)# ip ssh version 2
Router(config)# crypto key generate rsa modulus 2048
Router(config)# line vty 0 15
Router(config-line)# transport input ssh
Router(config-line)# login local
Router(config-line)# exec-timeout 5 0
Router(config-line)# logging synchronous
Router(config)# end
Router# write memory
四、 典型 WAN 接口封裝配置模板
1. 專線/帧中繼/HDLC (點對點串行)
! 側 A
interface Serial0/0
ip address 1.1.1.1 255.255.255.252
encapsulation hdlc ! 默認,思科私有
clock rate 2000000 ! DCE 端必須設置時鐘速率
no shutdown
! 側 B
interface Serial0/0
ip address 1.1.1.2 255.255.255.252
encapsulation hdlc
no shutdown
2. X.25 封裝 (早期封包交換網)
interface Serial0/0
ip address 1.1.1.1 255.255.255.252
encapsulation x25
x25 address 32699 ! 本端 X.121 地址
x25 htc 16 ! 高流量類別
x25 idle 6 ! 空閒定時器
x25 map ip 1.1.1.2 32688 broadcast ! 映射對端 IP 到 X.121 地址,支持廣播
no shutdown
3. 乙太網接口 (LAN/WAN)
interface FastEthernet0/0
description To_ISP_PE_Circuit_ID_12345
ip address 203.0.113.2 255.255.255.252
no shutdown
! 子接口 (VLAN/子網)
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip address 192.168.100.1 255.255.255.0
ip helper-address 10.0.0.5 ! DHCP Relay
no shutdown
五、 路由協議部署模板
IGRP (舊版,僅教學參考) → 現代替代:EIGRP/OSPF
! EIGRP (思科專有,企業內網首選)
router eigrp 100
network 10.0.0.0 0.255.255.255
network 192.168.0.0 0.0.255.255
no auto-summary
eigrp router-id 1.1.1.1
passive-interface default
no passive-interface GigabitEthernet0/1
! OSPF (開放標準、多廠商互通)
router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.255.255.255 area 0
network 192.168.0.0 0.0.255.255 area 1
passive-interface default
no passive-interface GigabitEthernet0/1
default-information originate always ! 發布默認路由
六、 交換機管理 IP 與默認網關
! L2 交換機 (2960/3560/3750 L2 模式)
switch(config)# interface vlan 1
switch(config-if)# ip address 192.168.1.100 255.255.255.0
switch(config-if)# no shutdown
switch(config)# ip default-gateway 192.168.1.254 ! 必須配置,否則無法跨網段管理
! L3 交換機 (3560/3750/3850/9000)
switch(config)# interface vlan 10
switch(config-if)# ip address 192.168.10.1 255.255.255.0
switch(config-if)# no shutdown
! 無需 default-gateway,直接配置 ip routing + 靜態/動態路由
七、 配置驗證與上線簽收
show running-config 核對關鍵配置
show ip interface brief 確認接口 Up/Up
show ip route 驗證路由表完整性
ping / traceroute 驗證鏈路通斷
show logging 檢查告警日志
copy running-config startup-config 確認保存
- 填寫《設備上線簽收單》:序列號、軟件版本、配置版本、測試結果、負責人簽名
遵循工程級規範,不僅是「配通」,更是「配穩、配安、可維、可查」。將 SOP 固化為自動化腳本/Ansible Playbook,是網絡自動化邁出的關鍵一步。
copyright ©
萬盛學電腦網 all rights reserved