分公司网络规划指导意见
区域网络地址段:
区域
地址段
南京(不含总部)
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。
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-advi
(4)配置boot文件
(config)# boot system flash c1841-advi
(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 !!!启用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 00
(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 f00 !!! ping 192.168.0.15看看连通性
14. 配置ntp
# clock timezone CST 8 !!!时区为东8区
(config)# ntp server 192.168.0.15 source FastEthernet00 !!! 指定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-advi
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
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 FastEthernet00
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 FastEthernet01
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 FastEthernet02
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 FastEthernet03
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 FastEthernet00
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
!!! 从tftp 10.12.8.250下载文件
<h3c> tftp 10.12.8.250 get
!!! 从tftp 10.12.8.250下载bootrom文件
(4)配置boot文件
<h3c> boot boot-loader unit1>flash:/!!! 升级bin
<h3c> boot bootrom unit1>flash:/ !!! 升级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. 保存配置