前景需求分析
某高等学校要求将网络分为四个区域,分别是宿舍区、教学区、服务器区和机房区,并合理规划IP地址和VLAN,实现校园网络内部能够互联互通,同时要求宿舍区、教学区能够访问外网环境,服务器部不能访问外网环境,但在范围内的服务器需要提供对应web服务。为了保证网络的可靠性,要求配置实现负载均衡,解决单点故障问题。同时要求通过内部主机使用ISP提供的内部全局地址访问外网环境,提高网络整体的安全性和可靠性
拟定校园拓扑
依照前景设计mstp+mstp模式搭建核心,并将汇聚层双归接入,核心交换机采用链路聚合,通过AC+AP并且将AC旁挂模式部署,同样将服务器区旁挂在核心交换机上
并分析用户连接需求较大,划分vlan pool扩充其连接数量,并为方便管理将宿舍区网络独立于教学区和机房区网络,采用独立ssid和vap模版,便于后续管理和对校园网的审计认证授权
要求分析
1.sw1和sw2链路聚合(sw1为主动端)
2.创建vlan将pc1划到vlan11,pc2划到vlan12,pc3划到vlan13,pc4划到vlan14,pc5划到vlan120,AC管理vlan为100
3.配置IP,DHCP获取
4.两台AC间做vrrp+HSB热备
5.ar1,sw1,sw2间做ospf
6.服务器端口映射至公网
7.AR上做easy-ip
8.AR为vlan11,vlan12,vlan13,vlan14,dhcp服务器;LSW7为vlan120的dhcp服务器,AC为vlan100,以及所有无线业务vlan的DHCP服务器
9.无线上线业务流量vlan30
配置流程
经过以上分析,将步骤具体分为如下
1.划分接口vlan
隔离广播域优化网络
2.链路聚合
加强链路利用,在核心交换机上采用链路聚合,拓展带宽,提高其传输速度
3.mstp部署
将模式改为mstp,创建stp域,域名xiaoyuanwang,修订号1,映射关系域vrrp组相对应,目的是将流量引向相关主设备,值得注意的是将vlan100流量划入实例2以防dhcp发现报文被传到至服务器区域
4.vrrp部署
采用双机热备,将不同流量分配于两台不同交换机上,实现一定的分担压力,保证网络的稳定

5.OSPF部署
6.DHCP部署以及中继开启
注意排除已使用与vrrp的地址,否则中继操作后,ARP冲突会导致PC无IP地址无法上网
7.无线搭建
将AC与AP用CAPWAP隧道连接并下发相关配置,将宿舍区接入vlan,必要可加入802.1x认证对接入用户进行认证审计以及授权
采用双机热备对AP进行管理,配置相关AP上线并进行连接测试
8.连接公网
采用easy_ip将私网地址转换为公网接口网段已达成用户正常上网需求
9.服务器映射
对服务器进行映射,保障社会各界能通过外网访问学校官网等资源,目前状态下能够看到服务器下pc5与外网不通
全局配置
AR1
[AR1]DIS current-configuration
[V200R003C00]
#
sysname AR1
#
board add 0/2 1GEC
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
dhcp enable
#
acl number 2000
rule 5 permit source 192.168.0.0 0.0.3.255
rule 6 permit source 192.168.4.0 0.0.0.255
rule 7 permit source 192.168.30.0 0.0.0.255
rule 8 permit source 192.168.40.0 0.0.0.255
rule 9 permit source 192.168.50.0 0.0.0.255
rule 10 permit source 192.168.60.0 0.0.0.255
#
ip pool vlan11
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0
excluded-ip-address 192.168.1.252 192.168.1.253
dns-list 192.168.120.20
#
ip pool vlan12
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0
excluded-ip-address 192.168.2.252 192.168.2.253
dns-list 192.168.120.20
#
ip pool vlan13
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0
excluded-ip-address 192.168.3.252 192.168.3.253
dns-list 192.168.120.20
#
ip pool vlan14
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0
excluded-ip-address 192.168.4.252 192.168.4.253
dns-list 192.168.120.20
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user cwy password cipher %$%$~0[9O@t$:>vGS*(S|%G.Tw==%$%$
local-user cwy privilege level 15
local-user cwy service-type ssh
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface Ethernet0/0/0
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface GigabitEthernet0/0/0
ip address 10.0.11.2 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/1
ip address 10.0.12.2 255.255.255.0
dhcp select global
#
interface GigabitEthernet2/0/0
ip address 20.1.1.1 255.255.255.252
nat server protocol tcp global current-interface www inside 192.168.120.20 www
nat outbound 2000
#
interface NULL0
#
ospf 1
default-route-advertise
area 0.0.0.0
network 10.0.11.2 0.0.0.0
network 10.0.12.2 0.0.0.0
#
ip route-static 0.0.0.0 0.0.0.0 20.1.1.1
ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
user-interface vty 16 20
#
wlan ac
#
return
AR2
[AR2]DIS current-configuration
[V200R003C00]
#
sysname AR2
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load flash:/portalpage.zip
#
drop illegal-mac alarm
#
wlan ac-global carrier id other ac id 0
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 20.1.1.2 255.255.255.252
#
interface GigabitEthernet0/0/1
ip address 20.1.2.2 255.255.255.252
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
SW1
[SW1]DIS CU
[SW1]DIS current-configuration
#
sysname SW1
#
vlan batch 10 to 14 30 40 50 60 100 120
#
stp instance 1 root primary
stp instance 2 root secondary
#
lacp priority 2000
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
dhcp enable
#
diffserv domain default
#
stp region-configuration
region-name xiaoyuanwang
revision-level 1
instance 1 vlan 13 to 14 30 40
instance 2 vlan 11 to 12 50 60 100
active region-configuration
#
drop-profile default
#
dhcp server group 1
dhcp-server 192.168.100.1 0
dhcp-server 192.168.100.2 1
#
ip pool b
gateway-list 192.168.30.254
network 192.168.30.0 mask 255.255.255.0
excluded-ip-address 192.168.30.252 192.168.30.253
dns-list 8.8.8.8
#
ip pool c
gateway-list 192.168.40.254
network 192.168.40.0 mask 255.255.255.0
excluded-ip-address 192.168.40.252 192.168.40.253
dns-list 8.8.8.8
#
ip pool d
gateway-list 192.168.50.254
network 192.168.50.0 mask 255.255.255.0
excluded-ip-address 192.168.50.252 192.168.50.253
dns-list 8.8.8.8
#
ip pool e
gateway-list 192.168.60.254
network 192.168.60.0 mask 255.255.255.0
excluded-ip-address 192.168.60.252 192.168.60.253
dns-list 8.8.8.8
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
ip address 10.0.11.1 255.255.255.0
#
interface Vlanif10
#
interface Vlanif11
ip address 192.168.1.252 255.255.255.0
vrrp vrid 11 virtual-ip 192.168.1.254
dhcp select relay
dhcp relay server-ip 10.0.12.2
#
interface Vlanif12
ip address 192.168.2.252 255.255.255.0
vrrp vrid 12 virtual-ip 192.168.2.254
dhcp select relay
dhcp relay server-ip 10.0.12.2
#
interface Vlanif13
ip address 192.168.3.253 255.255.255.0
vrrp vrid 13 virtual-ip 192.168.3.254
vrrp vrid 13 priority 120
vrrp vrid 13 track interface GigabitEthernet0/0/1 reduced 30
dhcp select relay
dhcp relay server-ip 10.0.11.2
#
interface Vlanif14
ip address 192.168.4.253 255.255.255.0
vrrp vrid 14 virtual-ip 192.168.4.254
vrrp vrid 14 priority 120
vrrp vrid 14 track interface GigabitEthernet0/0/1 reduced 30
dhcp select relay
dhcp relay server-ip 10.0.11.2
#
interface Vlanif30
ip address 192.168.30.253 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.30.254
vrrp vrid 30 priority 120
vrrp vrid 30 track interface GigabitEthernet0/0/1 reduced 30
dhcp select global
#
interface Vlanif40
ip address 192.168.40.253 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.40.254
vrrp vrid 40 priority 120
vrrp vrid 40 track interface GigabitEthernet0/0/1 reduced 30
dhcp select global
#
interface Vlanif50
ip address 192.168.50.252 255.255.255.0
vrrp vrid 50 virtual-ip 192.168.50.254
dhcp select global
#
interface Vlanif60
ip address 192.168.60.252 255.255.255.0
vrrp vrid 60 virtual-ip 192.168.60.254
dhcp select global
#
interface Vlanif100
#
interface Vlanif120
ip address 192.168.120.2 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
mode lacp-static
#
interface GigabitEthernet0/0/1
port link-type access
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/5
eth-trunk 1
#
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/7
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/8
eth-trunk 1
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.11.1 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 0.0.0.0 255.255.255.255
#
user-interface con 0
user-interface vty 0 4
#
port-group 1
group-member GigabitEthernet0/0/2
group-member GigabitEthernet0/0/3
group-member GigabitEthernet0/0/4
group-member GigabitEthernet0/0/5
group-member GigabitEthernet0/0/6
group-member GigabitEthernet0/0/7
group-member GigabitEthernet0/0/8
#
return
SW2
省略,相较SW1镜像配置,大差不差
SW3
SW4
SW5
SW6
以上作为汇聚层设备正常划分接口即可,不贴配置
SW7
[SW7]dis cu
[SW7]dis current-configuration
#
sysname SW7
#
vlan batch 11 to 14 30 40 50 60 100 120
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
dhcp enable
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif120
ip address 192.168.120.254 255.255.255.0
dhcp select interface
dhcp server excluded-ip-address 192.168.120.2
dhcp server excluded-ip-address 192.168.120.20
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 120
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 120
#
AC1
#
aaa
authentication-scheme default
authentication-scheme radius
authentication-mode radius
authorization-scheme default
accounting-scheme default
domain default
authentication-scheme radius
radius-server default
domain default_admin
authentication-scheme default
local-user admin password irreversible-cipher $1a$DH,gPh*r[H$j*hi5j>lG!S7X[Tw%}
z5c{1(Y4pjF,|Qlr0kVa}$$
local-user admin privilege level 15
local-user admin service-type http
#
interface Vlanif30
#
interface Vlanif40
#
interface Vlanif50
#
interface Vlanif60
#
interface Vlanif100
ip address 192.168.100.1 255.255.255.0
vrrp vrid 100 virtual-ip 192.168.100.254
vrrp vrid 100 priority 120
dhcp select global
#
interface MEth0/0/1
undo negotiation auto
duplex half
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 11 to 14 30 40 50 60 100 120
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
undo negotiation auto
duplex half
#
interface GigabitEthernet0/0/22
undo negotiation auto
duplex half
#
interface GigabitEthernet0/0/23
undo negotiation auto
duplex half
#
interface GigabitEthernet0/0/24
undo negotiation auto
duplex half
#
interface XGigabitEthernet0/0/1
#
interface XGigabitEthernet0/0/2
#
interface NULL0
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
ssh server secure-algorithms cipher aes256_ctr aes128_ctr
ssh server key-exchange dh_group14_sha1
ssh client secure-algorithms cipher aes256_ctr aes128_ctr
ssh client secure-algorithms hmac sha2_256
ssh client key-exchange dh_group14_sha1
#
capwap source ip-address 192.168.100.254
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
protocol inbound all
user-interface vty 16 20
protocol inbound all
#
hsb-service 0
service-ip-port local-ip 192.168.100.1 peer-ip 192.168.100.2 local-data-port 10
244 peer-data-port 10244
#
hsb-group 0
track vrrp vrid 100 interface Vlanif100
bind-service 0
hsb enable
#
hsb-service-type access-user hsb-group 0
#
hsb-service-type dhcp hsb-group 0
#
hsb-service-type ap hsb-group 0
#
wlan
ac protect protect-ac 192.168.100.2 priority 1
traffic-profile name default
security-profile name ss
security wpa-wpa2 psk pass-phrase %^%#vjQ<1z)&BR,DvuF\MZ0%hNSUHt~L|;n[h]SwYtV:
%^%# aes
security-profile name xy
security wpa-wpa2 psk pass-phrase %^%#sJa:Pm|3@'!5s5#R'i;*:-[79&c<f<`4jf2ZqR7(
%^%# aes
security-profile name default
security-profile name default-wds
security-profile name default-mesh
ssid-profile name ss
ssid XYW
ssid-profile name xy
ssid xy
ssid-profile name default
vap-profile name ss
service-vlan vlan-pool 1
ssid-profile ss
security-profile ss
vap-profile name xy
service-vlan vlan-pool 2
ssid-profile xy
security-profile xy
vap-profile name default
wds-profile name default
mesh-handover-profile name default
mesh-profile name default
regulatory-domain-profile name default
air-scan-profile name default
rrm-profile name default
radio-2g-profile name default
radio-5g-profile name default
wids-spoof-profile name default
wids-profile name default
wireless-access-specification
ap-system-profile name default
port-link-profile name default
wired-port-profile name default
serial-profile name preset-enjoyor-toeap
ap-group name sushe
radio 0
vap-profile ss wlan 1
ap-group name default
ap-group name xiaoyuan
radio 0
vap-profile xy wlan 1
ap-id 1 type-id 61 ap-mac 00e0-fcb0-2cf0 ap-sn 21023544831069399503
ap-name jiaoxueluo1
ap-group xiaoyuan
ap-id 2 type-id 61 ap-mac 00e0-fc0f-02a0 ap-sn 2102354483103B3D6A78
ap-name jiaoxueluo2
ap-group xiaoyuan
radio 0
channel 20mhz 5
ap-id 3 type-id 61 ap-mac 00e0-fc04-6450 ap-sn 210235448310EE24A52A
ap-name sushe
ap-group sushe
ap-id 4 type-id 61 ap-mac 00e0-fcca-0640 ap-sn 210235448310E066C939
ap-name jifang
ap-group xiaoyuan
provision-ap
#
dot1x-access-profile name dot1x_access_profile
#
mac-access-profile name mac_access_profile
#
return
AC2
与AC1差不多,做了HSB将重要数据传入AC2进行备份,与AC1构成双机热备
改进
该网络对于安全性仍然有很大的提升空间,出口风险,出口为路由器可换作防火墙;DHCP服务风险,开启DHCP Snooping防止私接小路由导致全网崩溃,开启边缘端口防护,根保护等措施;OSPF风险,开启OSPF认证;可配置ssh便于日后管理与维护;服务器未启用sll,安全性低