分公司網絡規劃指導意見
區域網絡地址段:
區域
地址段
南京(不含總部)
10.12.0.0/16
成都
10.13.0.0/16
西安
10.14.0.0/16
武漢
10.15.0.0/16
瀋陽
10.16.0.0/16
廣州
10.17.0.0/16
北京
10.18.0.0/17
規則:
1. 區域下的每個分公司,原則上按23位子網的地址,即:10.1x.y.0/255.255.254.0。
2. 100臺以內的分公司(一般只有一個工廠)VLAN劃分,見下表
3. 100臺以上的分公司(一般由生鮮和深加工兩個公司組成): 前5個VLAN參照100臺以內的分公司進行VLAN劃分,後面的VLAN可參照前5個VLAN劃分
100臺電腦以內分公司的網絡劃分:
VLAN號
VLAN描述
可用地址及子網
子網掩碼
網關
VLAN 1
管理VLAN
10.1x.y.192~255/26
255.255.255.192
VIP:10.1x.y.254
VRRP1-C: 10.1x.y.252
VRRP1-R: 10.1x.y.253
VLAN10
服務器VLAN
10.1x.y.0~31/27
255.255.255.224
VIP: 10.1x.y.2
VRRP10-C: 10.1x.y.3
VRRP10-R: 10.1x.y.6
服務器:10.1x.y.1,5
iLO:10.1x.y.11,15
ROS: 10.1x,y.4
VLAN11
VIP VLAN
10.1x.y.32~63/27
255.255.255. 224
VIP: 10.1x.y.33
VRRP11-C: 10.1x.y.34
VRRP11-R: 10.1x.y.25
VLAN12
用戶VLAN
10.1x.y.64~127/26
255.255.255.192
10.1x.y.65
VRRP12-C: 10.1x.y.66
VRRP12-R: 10.1x.y.67
VLAN13
用戶VLAN
10.1x.y.128~191/26
255.255.255.192
10.1x.y.129
VRRP13-C: 10.1x.y.130
VRRP13-R: 10.1x.y.131
未用
地址
備用地址段,網管可自分,建議按上述規則進行分配
10.1x.y+1.0/24
255.255.255.0
注VRRPx-C為核心交換機的VRRP地址,VRRPx-R為路由器的VRRP地址
設備功能簡介:
路由器:實現與總部PIX或VPN設備站點之間的IPSEC VPN流量; 路由器命名:R-[分公司名],以濱海為例:R-Binghai;內網地址:10.12.8.6 ;定義fa0/0為外網網口,fa0/1為內網網口
三層交換機:實現內部VLAN之間的路由交換;命名:Core-[分公司] ,以濱海為例:Core-Binghai;內網地址:10.12.8.6
二層交換機:實現VLAN的劃分; 命名:SW-[分公司簡寫] -數字-交換機位置,以濱海為例:SW-BH-1;管理地址:10.12.8.200~220
下面我們以《09-分公司網絡拓樸圖及服務器角色範本》作為實例,講述一個分公司網絡的完整配置步驟。
路由器配置前升級: [說明: !!!後的文字為註釋文字 #為特權模式 (config)#為配置模式 ]
(1)設定f0/1的內網地址,並啟用
(config)# interface FastEthernet 0/1 !!! 0/1口,接內網網線
(config-if)# ip address 10.12.8.6 255.255.255.0 !!!配置IP地址
(config-if)# no shutdown !!!啟用網口,cisco默認是關閉端口的
(2)刪除flash裡的IOS文件(用dir命令看IOS文件)
# delete flash:/c1841-ipbase*.bin !!!寫出具體的文件名,注意是在特權模式
(3)配置ftp並下載升級文件到路由器中
# copy ftp flash
!!!按輸入ftp地址和IOS文件名:c1841-advipservicesk9-mz.124-13b.bin
(4)配置boot文件
(config)# boot system flash c1841-advipservicesk9-mz.124-13b.bin
(5)保存並重啟
# write
# reload
路由器配置步驟: [說明: !!!後的文字為註釋文字 #為特權模式 (config)#為配置模式 ]
1. 路由器命名:
(config)# hostname R-Binghai
2. 設定外網、內網VRRP地址:
(config)# interface FastEthernet 0/0
(config)# description Outside !!!描述為Outside
(config-if)# ip address 218.92.172.59 255.255.255.248
(config-if)# no shutdown
(config-if)# interface FastEthernet 0/1
(config-if)# no ip address !!!去掉升級時配置的地址
(config-if)# interface FastEthernet 0/1.1 !!!啟用vlan1的子接口
(config-subif)# encapsulation dot1Q 1 native !!! 封裝802.1q協議,設置vlan 1
(config-subif)# ip address 10.12.8.253 255.255.255.192 !!!配置vlan1的IP
(config-subif)# vrrp 1 ip 10.12.8.254 !!!配置VRRP組1的虛擬IP
(config-subif)# vrrp 1 timers learn !!!配置VRRP組1學習時間
(config-subif)# vrrp 1 authentication binghai !!!配置VRRP組1的認證密碼為binghai,可自定義,但必須與交換相上配置的認證密碼一致,區分大小寫
(config-subif)# no shutdown
!!!其他子接口、地址、VRRP組,詳見標準
3. 設置路由
(config)# ip route 0.0.0.0 0.0.0.0 218.92.172.57 !!!此處218.92.172.57為電信提供的網關,請自己修改相應的網關
(config)# ip route 10.12.8.0 255.255.254.0 10.12.8.2 !!!路由到內網,指向VRRP組10的地址
4. 定義acl 130,用於上網 (到總部內網地址不做地址翻譯,注意這裡使用反掩碼)
(config)# access-list 130 deny ip 10.12.8.0 0.0.1.255 192.168.0.0 0.0.3.255 !!!禁到總部
(config)# access-list 130 deny ip 10.12.8.0 0.0.1.255 10.11.0.0 0.0.0.255 !!!禁到總部
(config)# access-list 130 permit ip 10.12.8.0 0.0.1.255 any !!!允許內網訪問
5. 定義nat的接口
(config)# interface FastEthernet 0/0
(config-if)# ip nat outside !!!設置應用NAT的外網的接口
(config-if)# interface FastEthernet 0/1.10
(config-subif)# ip nat inside !!!設置應用NAT的內網的子接口,其他子接口都加上
6. NAT地址轉換
(config)# ip nat inside source list 130 interface FastEthernet 0/0 overload !!! 啟用inside源地址翻譯成FastEthernet 0/0的外網地址
7. 定義acl 11(只允許內網和總部的地址段訪問,用於應用telnet)
(config)# access-list 11 permit 218.94.97.8 0.0.0.7 !!!總部電信地址段1
(config)# access-list 11 permit 10.12.8.0 0.0.1.255 !!!濱海內網地址段
(config)# access-list 11 permit 192.168.0.0 0.0.3.255 !!!總部內網地址段
(config)# access-list 11 permit 58.240.94.96 0.0.0.15 !!!總部聯通地址段
(config)# access-list 11 permit 221.226.9.32 0.0.0.15 !!!總部電信地址段2
8. 定義acl 120,用於觸發建立ipsec 隧道
(config)# access-list 120 permit ip 10.12.8.0 0.0.1.255 192.168.0.0 0.0.3.255
(config)# access-list 120 permit ip 10.12.8.0 0.0.1.255 10.11.0.0 0.0.0.255
9. 配置IKE策略
(config)# crypto isakmp policy 11 !!!設置編號為11的isakmp策略
(config-isakmp)# encryption des !!!指定採用DES加密
(config-isakmp)# hash md5 !!!指定採用MD5算法
(config-isakmp)# authentication pre-share !!!指定採用pre-share方式
(config-isakmp)# group 2 !!!指定為Diffie-Hellman組2
10. 定義ipsec交換密鑰
(config)# crypto isakmp key yr1234 address 218.94.97.10 !!!對端地址為總部電信218.94.97.10(網通為58.240.94.102,移動為221.181.147.15)密鑰為yr1234
11. IPSEC配置
(config)# crypto ipsec transform-set myset esp-des esp-sha-hmac !!! 定義一個轉換集myset,採用des-sha方式
(config)# crypto map mymap 11 ipsec-isakmp !!! 創建序號為11的isakmp加密圖
(config-crypto-map) # set peer 218.94.97.10 !!! 設定目標地址為218.94.97.10-總部電信地址,網通為58.240.94.102,移動為221.181.147.15
(config-crypto-map) # set transform-set myset !!! 指定使用myset轉換集
(config-crypto-map) # match address 120 !!! 指定加密access-list 120中的地址
12. 在外網接口應用加密視圖:
(config)# interface FastEthernet 0/0
(config)# crypto map mymap !!! 應用於mymap加密圖
13. 驗證VPN的連接性
# show crypto isakmp sa !!! 查看雙方isakmp協商的情況
# show crypto ipsec sa !!! 查看ipsec連接的情況
# ping 192.168.0.15 source f0/1.10 !!! ping 192.168.0.15看看連通性
14. 配置ntp
# clock timezone CST 8 !!!時區為東8區
(config)# ntp server 192.168.0.15 source FastEthernet0/1.10 !!! 指定ntp服務為192.168.0.15,集團的時間服務器
15. 配置snmp
(config)# snmp-server community cisco45 RO !!!設置只讀密碼為cisco45
(config)# snmp-server location Binghai-Jiangsu !!!設置位置為Binghai-Jiangsu,即分公司地址
(config)# snmp-server contact Binghai !!!設置聯繫人
16. 配置telnet、enable、相關用戶及密碼
(config)# line vty 0 4 !!!配置telnet連接的五條虛擬線路
(config-line)# access-class 11 in !!! 允許access-list 11進入
(config-line)# privilege level 15 !!!設置權限為15級
(config-line)# password ciscoo !!!設置密碼為ciscoo,密碼記住
(config-line)# login local !!!登錄驗證方式為local
(config)# username yurun password cisc1o !!!設置yurun的密碼為cisc1o
(config)# enable password cisco1 !!!設置enable密碼為cisco1
17. 去除DNS解析和http訪問
(config)# no ip domain lookup !!!去掉DNS解析,防止錯誤輸入等解析
(config)# no ip http server !!!去掉通過http訪問路由器
18. IPSEC部分
(config)#crypto isakmp policy 1 !!!定義IKE Policy策略
(config-isakmp)# authentication pre-share !!!設置採用pre-share進行驗證
(config)#crypto isakmp key cisc045 address 0.0.0.0 0.0.0.0 !!!設置共享密鑰和對端地址
(config)# crypto ipsec transform-set myset esp-des esp-md5-hmac
(cfg-crypto-trans)# #mode transport !!!設置轉化集
(config)# crypto ipsec transform-set cncset esp-aes esp-sha-hmac
(cfg-crypto-trans)##mode transport
(config)# crypto ipsec transform-set ctc13set esp-des esp-sha-hmac
(cfg-crypto-trans)# mode transport
(config)# crypto ipsec profile cnc !!!設置ipsec profile
(config)# set transform-set cncset !!!引用加密集cncset
(config)# crypto ipsec profile ctc13 !!!設置ipsec profile
(config)# set transform-set ctc13set !!!引用加密集ctc13set
(config)# crypto ipsec profile yurun !!!設置ipsec profile
(config)# set transform-set myset !!!引用加密集myset
19. GRE通道
(config)# interface Tunnel2 !!!創建GRE通道
(config-if)# ip address 172.22.12.8 255.255.0.0 !!!設置通道虛擬地址[分公司內網地址,中間兩位,例:10.12.8.0/23,此處是172.22.12.8]
(config-if)# ip mtu 1400 !!!定義mtu
(config-if)# ip nhrp authentication yurunc !!!啟動認證
(config-if)# ip nhrp map 172.22.0.1 221.226.9.39 !!!地址綁定
(config-if)# ip nhrp map multicast 221.226.9.39 !!!映射多播地址到物理接口地址
(config-if)# ip nhrp network-id 100000 !!!指定網絡域,同一TUNNEL在同區域同子網
(config-if)# ip nhrp nhs 172.22.0.1 !!!TUNNEL地址作為下一跳地址
(config-if)# ip ospf network broadcast !!!定義OSPF類型為廣播
(config-if)# ip ospf priority 0 !!!不參與ospf優先級
(config-if)# bandwidth 2040 !!!設置GRE的帶寬
(config-if)# tunnel source FastEthernet0/0 !!!定義源地址
(config-if)# tunnel destination 221.226.9.39 !!!定義目標地址
(config-if)#tunnel key 100000 !!! TUNNEL認證密鑰
(config-if)#tunnel protection ipsec profile yurun !!!對數據流進行加密
第二條GRE通道:
(config)#interface Tunnel1208 !!!創建GRE通道1208(1208來自於10.12.8.0)
(config-if)#bandwidth 1600 !!!設置GRE的帶寬
(config-if)#ip address 172.12.8.2 255.255.255.0 !!!設置通道虛擬地址[分公司內網地址,中間兩位,例:10.12.8.0/23,此處是172.12.12.8]
(config-if)#ip mtu 1410 !!!定義mtu
(config-if)#ip ospf network point-to-point !!!定義OSPF類型為廣播
(config-if)#tunnel source FastEthernet0/0 !!!定義源地址
(config-if)#tunnel destination 58.240.94.98 !!!定義目標地址
(config-if)#tunnel protection ipsec profile cnc !!!對數據流進行加密
20. OSPF
(config)# router ospf 1
(config-router)# router-id 1.1.12.8 !!! 配置運行OSPF 協議三層交換機的id 號,[分公司內網地址,中間兩位,例:10.12.8.0/23,此處是1.1.12.8]
(config-router)# area 1208 range 10.12.8.0 255.255.254.0 !!!內網路由彙總
(config-router)# network 10.12.8.0 0.0.1.255 area 1208 !!!路由發佈
(config-router)# network 172.12.0.0 0.0.255.255 area 0 !!!路由發佈
(config-router)# network 172.22.0.0 0.0.255.255 area 0 !!!路由發佈
21. NULL 0
(config)#ip route 10.12.8.0 255.255.254.0 Null0 !!! NULL0是路由器上的一個虛擬端口,也被稱為丟棄端口。所有到達該端口的數據被直接丟棄。使沒有使用的子網地址,不會傳播到骨幹區域
---------------------------------------------------------------------------------------------------------------------------------
22. 保存配置
# write !!!保存配置
路由器詳細配置:
R-Binghai#show run
Building configuration...
Current configuration : 3387 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R-Binghai
!
boot-start-marker
boot system flash c1841-advipservicesk9-mz.124-13b.bin
boot-end-marker
!
logging buffered 51200 warnings
enable password 7 010A140752180500
!
no aaa new-model
clock timezone CST 8
ip cef
!
!
!
!
no ip domain lookup
!
!
!
username yurun password 7 0716334F471A1A0A
archive
log config
hidekeys
!
!
!
!
crypto isakmp policy 11
hash md5
authentication pre-share
group 2
crypto isakmp key yr1234 address 218.94.97.10
!
!
crypto ipsec transform-set myset esp-des esp-sha-hmac
!
crypto map mymap 11 ipsec-isakmp
set peer 218.94.97.10
set transform-set myset
match address 120
!
interface Tunnel2
bandwidth 2040
ip address 172.22.12.8 255.255.0.0
ip mtu 1400
ip nhrp authentication yurunc
ip nhrp map multicast 221.226.9.39
ip nhrp map 172.22.0.1 221.226.9.39
ip nhrp network-id 100000
ip nhrp holdtime 300
ip nhrp nhs 172.22.0.1
ip ospf network broadcast
ip ospf priority 0
tunnel source FastEthernet0/0
tunnel destination 221.226.9.39
tunnel key 100000
tunnel protection ipsec profile yurun
!
interface Tunnel1208
bandwidth 1600
ip address 172.12.8.2 255.255.255.0
ip mtu 1410
ip ospf network point-to-point
tunnel source FastEthernet0/0
tunnel destination 58.240.94.98
tunnel protection ipsec profile cnc
!
interface FastEthernet0/0
description Outside
ip address 218.92.172.59 255.255.255.248
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
crypto map mymap
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.1
encapsulation dot1Q 1 native
ip address 10.12.8.253 255.255.255.192
vrrp 1 ip 10.12.8.254
vrrp 1 timers learn
vrrp 1 authentication binghai
!
interface FastEthernet0/1.10
encapsulation dot1Q 10
ip address 10.12.8.6 255.255.255.224
ip nat inside
ip virtual-reassembly
vrrp 10 ip 10.12.8.2
vrrp 10 timers learn
vrrp 10 authentication binghai
!
interface FastEthernet0/1.11
encapsulation dot1Q 11
ip address 10.12.8.35 255.255.255.224
ip nat inside
ip virtual-reassembly
vrrp 11 ip 10.12.8.33
vrrp 11 timers learn
vrrp 11 authentication binghai
!
interface FastEthernet0/1.12
encapsulation dot1Q 12
ip address 10.12.8.67 255.255.255.192
ip nat inside
ip virtual-reassembly
vrrp 12 ip 10.12.8.65
vrrp 12 timers learn
vrrp 12 authentication binghai
!
interface FastEthernet0/1.13
encapsulation dot1Q 13
ip address 10.12.8.131 255.255.255.192
ip nat inside
ip virtual-reassembly
vrrp 13 ip 10.12.8.129
vrrp 13 timers learn
vrrp 13 authentication binghai
!
router ospf 1
router-id 1.1.12.8
log-adjacency-changes
area 1208 range 10.12.8.0 255.255.254.0
network 10.12.8.0 0.0.1.255 area 1208
network 172.12.0.0 0.0.255.255 area 0
network 172.22.0.0 0.0.255.255 area 0
!
ip route 0.0.0.0 0.0.0.0 218.92.172.57
ip route 10.13.8.0 255.255.254.0 Null0
!
no ip http server
ip http access-class 23
ip http authentication local
no ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip nat inside source list 130 interface FastEthernet0/0 overload
!
access-list 11 permit 218.94.97.8 0.0.0.7
access-list 11 permit 10.12.8.0 0.0.1.255
access-list 11 permit 192.168.0.0 0.0.3.255
access-list 11 permit 58.240.94.96 0.0.0.15
access-list 11 permit 221.226.9.32 0.0.0.15
access-list 23 permit 10.10.10.0 0.0.0.7
access-list 120 permit ip 10.12.8.0 0.0.1.255 192.168.0.0 0.0.3.255
access-list 120 permit ip 10.12.8.0 0.0.1.255 10.11.0.0 0.0.0.255
access-list 130 deny ip 10.12.8.0 0.0.1.255 192.168.0.0 0.0.3.255
access-list 130 deny ip 10.12.8.0 0.0.1.255 10.11.0.0 0.0.0.255
access-list 130 permit ip 10.12.8.0 0.0.1.255 any
snmp-server community cisco45 RO
snmp-server location Binghai-Jiangsu
snmp-server contact Binghai
!
!
!
!
control-plane
!
!
!
line con 0
login local
line aux 0
line vty 0 4
access-class 11 in
privilege level 15
password 7 120017141B180F0B
login local
transport input telnet
line vty 5 15
access-class 23 in
privilege level 15
login local
transport input telnet
!
scheduler allocate 20000 1000
ntp clock-period 17178347
ntp server 192.168.0.15 source FastEthernet0/1.10
end
交換機配置前升級:[說明: !!!後的文字為註釋文字 <h3c>為用戶視圖 [hc3]#為系統視圖 ]
(1)設定vlan 1的內網地址,並啟用
[h3c] interface Vlan-interface1 !!!vlan 1,接內網網線
[Core-Binghai-Vlan-interface1] ip address 10.12.8.254 255.255.255.192 !!!配置IP地址
(2)刪除flash裡的bin文件(用dir命令看系統文件)
<h3c> delete unit1>flash:/ s36si_e-cmw310-*.bin !!!寫出具體的文件名,注意是在用戶視圖
<h3c> reset recycle-bin !!!清空回收站
(3)配置tftp並下載升級文件到交換機中
<h3c> tftp 10.12.8.250 get s36si_e-cmw310-r1702p07.bin
!!! 從tftp 10.12.8.250下載文件s36si_e-cmw310-r1702p07.bin
<h3c> tftp 10.12.8.250 get s3600_v602.btm
!!! 從tftp 10.12.8.250下載bootrom文件s3600_v602.btm
(4)配置boot文件
<h3c> boot boot-loader unit1>flash:/s36si_e-cmw310-r1702p07.bin!!! 升級bin
<h3c> boot bootrom unit1>flash:/ s3600_v602.btm !!! 升級bootrom
(5)保存並重啟
<h3c> save
<h3c> reboot
核心交換機配置步驟: [說明: !!!後的文字為註釋文字 <h3c>為用戶視圖 [hc3]#為系統視圖 ]
1. 核心交換機命名:
[h3c] sysname Core-Binghai
2. 配置VLAN並加入相關的端口:
[Core-Binghai] vlan 10 !!!配置vlan 10
[Core-Binghai-vlan10] description server_vlan !!!描述為server_vlan,其他VLAN見詳細配置
[Core-Binghai-vlan10] port Ethernet 1/0/2 to Ethernet 1/0/3 !!!將2、3號口加入vlan 10,注意這是連續的口
3. 啟各VLAN虛地址及啟VRRP
[Core-Binghai] vrrp ping-enable !!! 設定虛擬IP地址可以被ping通(缺省情況下,按照協議規定虛擬IP地址不可以被ping通,本配置必須在VRRP組建立之前就進行設定)
[Core-Binghai] interface vlan 1
[Core-Binghai-Vlan-interface1] ip address 10.12.8.252 255.255.255.192 !!!配置IP地址
[Core-Binghai-Vlan-interface1] vrrp vrid 1 virtual-ip 10.12.8.254 !!!配置VRRP組1的IP地址,具體見標準
[Core-Binghai-Vlan-interface1] vrrp vrid 1 priority 105 !!!配置VRRP組1的優先級為105,默認是100,值越大的優先級越高,就是VRRP組的主
[Core-Binghai-Vlan-interface1] vrrp vrid 1 authentication-mode simple binghai !!!配置VRRP組1的認證密碼為binghai,同路由器一致,區分大小寫
!!!其他的VLAN及相應的VRRP組,詳見標準
4. 定義路由:
[Core-Binghai] ip route 0.0.0.0 0.0.0.0 10.12.8.1 !!!默認路由指向ISA內網地址10.12.8.1
[Core-Binghai] ip route 0.0.0.0 0.0.0.0 10.12.8.6 pr 90 !!!次級默認路由指向路由器內網地址10.12.8.6
[Core-Binghai] ip route 192.168.0.0 255.255.252.0 10.12.8.6 !!!到總部192.168.0.0/22的路由指向路由器內網地址10.12.8.6
[Core-Binghai] ip route 10.11.0.0 255.255.255.0 10.12.8.6 !!!到總部10.11.0.0/24的路由指向路由器內網地址10.12.8.6
5. 配置telnet, super 密碼
[Core-Binghai] user-interface vty 0 4 !!!配置用戶telnet接口
[Core-Binghai-ui-vty0-4] authentication-mode password !!!採用密碼認證
[Core-Binghai-ui-vty0-4] user privilege level 1 !!!設置用戶1級權限
[Core-Binghai-ui-vty0-4] set authentication password cipher ciscoo !!!設置認證密碼為ciscoo
[Core-Binghai] super password level 3 cipher cisco1 !!!設置super密碼為cisco1
6. 接二層交換機、路由器內網口設置中繼,封裝802.1q,並描述
[Core-Binghai] int e1/0/1
[Core-Binghai-Ethernet1/0/1] port link-type trunk !!!設置端口類型為中繼
[Core-Binghai-Ethernet1/0/1] port trunk permit vlan all !!!允許所有VLAN通過
[Core-Binghai-Ethernet1/0/1] description R-Bing-f0/1 !!!描述為R-Binghai-f0/1
7. 端口加入VLAN,並描述的劃分
[Core-Binghai] int e1/0/2
[Core-Binghai-Ethernet1/0/2] port link-type access !!!設置端口類型為access
[Core-Binghai-Ethernet1/0/2] port access vlan 10 !!!加入VLAN10
[Core-Binghai-Ethernet1/0/2] description bhdc1 !!!描述為bhdc1
!!!其他端口的加入,參照上面的步驟7
8. 配置SNMP
[Core-Binghai] snmp-agent community read cisco45 !!!設置只讀團體為cisco45,集團統一,不要改
[Core-Binghai] snmp-agent sys-info contact Binghai !!!設置聯繫人為Binghai
[Core-Binghai] snmp-agent sys-info location Binghai-Jiangsu !!!設置地址Binghai-Jiangsu
[Core-Binghai] snmp-agent sys-info version all !!!設置版本
9. 配置NTP
<Core-Binghai> clock timezone CST add 8:00:00 !!!設置時區為東8區
[Core-Binghai] ntp-service unicast-server 192.168.0.15 !!!時間服務器為192.168.0.15,集團的時間服務器
10. 保存配置
<Core-Binghai> save
核心交換機詳細配置
<Core-Binghai>disp cu
#
sysname Core-Binghai
#
super password level 3 cipher cisco1
#
vrrp ping-enable
#
radius scheme system
#
domain system
#
vlan 1
description default_vlan
#
vlan 10
description server_vlan
#
vlan 11
description VIP_vlan
#
vlan 12
description office_vlan
#
vlan 13
description shengchan_vlan
#
vlan 1000
description Telecom
#
interface Vlan-interface1
ip address 10.12.8.252 255.255.255.192
vrrp vrid 1 virtual-ip 10.12.8.254
vrrp vrid 1 priority 105
vrrp vrid 1 authentication-mode simple binghai
#
interface Vlan-interface10
ip address 10.12.8.3 255.255.255.224
vrrp vrid 10 virtual-ip 10.12.8.2
vrrp vrid 10 priority 105
vrrp vrid 10 authentication-mode simple binghai
#
interface Vlan-interface11
ip address 10.12.8.34 255.255.255.224
vrrp vrid 11 virtual-ip 10.12.8.33
vrrp vrid 11 priority 105
vrrp vrid 11 authentication-mode simple binghai
#
interface Vlan-interface12
ip address 10.12.8.66 255.255.255.192
vrrp vrid 12 virtual-ip 10.12.8.65
vrrp vrid 12 priority 105
vrrp vrid 12 authentication-mode simple binghai
#
interface Vlan-interface13
ip address 10.12.8.130 255.255.255.192
vrrp vrid 13 virtual-ip 10.12.8.129
vrrp vrid 13 priority 105
vrrp vrid 13 authentication-mode simple binghai
#
ntp-service unicast-server 192.168.0.15
#
interface Aux1/0/0
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan all
description R-Binghai-F0/1
#
interface Ethernet1/0/2
port access vlan 10
description bhdc1
#
interface Ethernet1/0/3
port access vlan 10
description bhdb1
#
interface Ethernet1/0/4
#
interface Ethernet1/0/5
#
interface Ethernet1/0/6
#
interface Ethernet1/0/7
#
interface Ethernet1/0/8
#
interface Ethernet1/0/9
#
interface Ethernet1/0/10
#
interface Ethernet1/0/11
#
interface Ethernet1/0/12
#
interface Ethernet1/0/13
#
interface Ethernet1/0/14
#
interface Ethernet1/0/15
#
interface Ethernet1/0/16
#
interface Ethernet1/0/17
#
interface Ethernet1/0/18
#
interface Ethernet1/0/19
#
interface Ethernet1/0/20
#
interface Ethernet1/0/21
#
interface Ethernet1/0/22
#
interface Ethernet1/0/23
port link-type trunk
port trunk permit vlan all
description SW-BH-1-Center
#
interface Ethernet1/0/24
port link-type trunk
port trunk permit vlan all
description SW-BH-2-Office
#
interface GigabitEthernet1/1/1
#
interface GigabitEthernet1/1/2
#
interface GigabitEthernet1/1/3
#
interface GigabitEthernet1/1/4
#
undo irf-fabric authentication-mode
#
interface NULL0
#
voice vlan mac-address 0001-e300-0000 mask ffff-ff00-0000
#
ip route-static 0.0.0.0 0.0.0.0 10.12.8.1 preference 60
ip route-static 0.0.0.0 0.0.0.0 10.12.8.6 preference 90
ip route-static 10.11.0.0 255.255.255.0 10.12.8.6 preference 60 description YURUN_HQ14
ip route-static 192.168.0.0 255.255.252.0 10.12.8.6 preference 60 description YURUN_HQ10
#
snmp-agent
snmp-agent local-engineid 800063A2002389D80C086877
snmp-agent community read cisco45
snmp-agent sys-info contact Binghai
snmp-agent sys-info location Binghai-Jiangsu
snmp-agent sys-info version all
#
user-interface aux 0 7
user-interface vty 0 4
user privilege level 1
set authentication password simple ciscoo
#
return
二層交換機S2126配置:
1. 交換機命名
[h3c] sysname SW-BH-1-Center
2. 創建VLAN
[SW-BH-1-Center] vlan 10 !!!創建VLAN10,其他VLAN參見具體配置
3. 配置VLAN1的IP地址及默認路由
[SW-BH-1-Center] interface vlan-interface1
[SW-BH-1-Center -Vlan-interface1] ip address 10.12.8.202 255.255.255.192 !!!配置IP地址
[SW-BH-1-Center -Vlan-interface1] ip gateway 10.12.8.254 !!!配置網關,指向核心交換機的VRRP組1虛地址
4. 接三層交換機網口25口設置中繼,封裝802.1q
[SW-BH-1-Center] interface Ethernet0/25
[SW-BH-1-Center-Ethernet0/25] port link-type trunk !!!設置trunk類型
[SW-BH-1-Center-Ethernet0/25] port trunk permit vlan all !!!允許所有VLAN通過
5. 2號口加入VLAN 11
[SW-BH-1-Center] interface Ethernet0/2
[SW-BH-1-Center-Ethernet0/2]] port access vlan 11 !!!加入VLAN 11
6. 配置SNMP
[SW-BH-1-Center] snmp-agent community read cisco45 !!!配置只讀團體cisco45
[SW-BH-1-Center] snmp-agent sys-info contact Binghai !!!配置聯繫人
[SW-BH-1-Center] snmp-agent sys-info location Binghai-Jiangsu !!!配置地理位置
[SW-BH-1-Center] snmp-agent sys-info version all !!!配置版本
7. 配置telnet, super 密碼
[SW-BH-1-Center] user-interface vty 0 !!!配置用戶telnet接口
[SW-BH-1-Center-vty] set authentication password ciscoo !!!密碼ciscoo
[SW-BH-1-Center] super password cisco1 !!!配置super密碼為cisco1
8. 保存配置
<SW-BH-1-Center> save
<SW-BH-1-Center>disp cu
#
sysname SW-BH-1-Center
super password cisco1
undo info-center enable
The monitor port has not been configured!
#
vlan 1
#
vlan 11
#
vlan 12
#
vlan 13
#
interface vlan-interface1
ip address 10.12.8.253 255.255.255.192
ip gateway 10.12.8.254
#
interface Ethernet0/1
port access vlan 10
#
interface Ethernet0/2
port access vlan 11
#
interface Ethernet0/3
port access vlan 11
#
interface Ethernet0/4
port access vlan 11
#
interface Ethernet0/5
port access vlan 11
#
interface Ethernet0/6
port access vlan 11
#
interface Ethernet0/7
port access vlan 11
#
interface Ethernet0/8
port access vlan 11
#
interface Ethernet0/9
port access vlan 12
#
interface Ethernet0/10
port access vlan 12
#
interface Ethernet0/11
port access vlan 12
#
interface Ethernet0/12
port access vlan 12
#
interface Ethernet0/13
port access vlan 12
#
interface Ethernet0/14
port access vlan 12
#
interface Ethernet0/15
port access vlan 12
#
interface Ethernet0/16
port access vlan 12
#
interface Ethernet0/17
port access vlan 12
#
interface Ethernet0/18
port access vlan 12
#
interface Ethernet0/19
port access vlan 12
#
interface Ethernet0/20
port access vlan 12
#
interface Ethernet0/21
#
interface Ethernet0/22
#
interface Ethernet0/23
#
interface Ethernet0/24
#
interface Ethernet0/25
port link-type trunk
port trunk permit vlan all
#
interface Ethernet0/26
#
user-interface aux 0
user-interface vty 0
set authentication password ciscoo
#
snmp-agent
snmp-agent community read cisco45
snmp-agent sys-info contact Binghai
snmp-agent sys-info location Binghai-Jiangsu
snmp-agent sys-info version all
二層交換機S1526配置:
(S1526交換機,默認IP:192.168.0.234/24,用戶名:admin;密碼admin)
1. 登錄交換機後,在系統管理-系統信息中,更改管理地址為:10.12.8.252/26,網關:10.12.8.254
2. 在系統管理-修改密碼中更改口令
3. 在VLAN-802.1Q VLAN中新建
新建VLAN11,並將2口加入VLAN11,1口設置中繼口
4. PVID設置,將2口劃入VLAN12
點02 ,進入下圖,將PVID改成12
5. 保存配置