中小型企业综合组网及安全配置
一、实验目的
1.了解企业网络建设流程
2.掌握组建中小企业网络的组网技术;
3.掌握组建中小企业网络的安全技术
二、设备与环境
微型计算机、Windows 系列操作系统 、eNSP软件
三、实验内容及要求
XX公司总部位于北京,在深圳设有办事处,通过组建网络将两地连接起来。北京总部有员工100人,一共部门四个,服务器1台;深圳办事处有员工30人,办事处不分部门;路由器ISP表示ISP,LSW2、LSW3为三层交换机,作为汇聚层使用; LSW4、 LSW5、LSW6、LSW7为二层交换机,作为接入层使用;网关配置在汇聚层;
各设备之间运行ospf协议,区域划分如图所示;
VLAN10、VLAN20、VLAN30、VLAN40、VLAN 50网段分别为192.168.10.0/24 192.168.20.0/24 192.168.30.0/24 192.168.40.0/24 192.168.50.0/24
现要求如下:
(1) 防火墙出接口地址为11.11.11.10
(2) 每个网段使用本网段最后一个有效地址作为网关;
(3) 财务部人员流动性较低,使用端口安全技术静态绑定接入用户的MAC与VLAN信息;市场部、人事部和技术部,使用端口安全技术的动态MAC地址学习保证接入用户的合法性;
(4) 技术部和人事部交换机之间使用RSTP技术,终端开启边缘端口和BPDU保护功能防止内部网络攻击;
(5) 禁止市场部网段ping服务器,但是可以访问服务器资源;
(6) 禁止市场部访问财务部;
(7) 实现技术部、人事部和市场部可以访问ISP,财务部不能访问外网;配置源NAT时使用easy-IP技术。
(8) 将内网www服务器进行映射,对外映射端口为80;对应映射地址为11.11.11.11
(9) 总部与分部通过IPSec 味皮恩连接
四、实验命令及结果
1.配置各Client、Server的IP地址,且每个网段使用本网段最后一个有效地址作为网关,以Cilent1和Server1为例
2.配置防火墙FW1、FW2和路由器ISP的端口地址,且防火墙FW1的出接口:G1/0/0的端口地址为11.11.11.10,以FW1为例
[FW1]int g1/0/0
[FW1-GigabitEthernet1/0/0]ip add 11.11.11.10 24
[FW1-GigabitEthernet1/0/0]int g1/0/2
[FW1-GigabitEthernet1/0/2]ip add 192.168.100.254 24
[FW1-GigabitEthernet1/0/2]int g1/0/1
[FW1-GigabitEthernet1/0/1]ip add 192.168.2.2 24
3.创建vlan、配置端口
[LSW1]vlan batch 3 50
[LSW1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type access
[LSW1-GigabitEthernet0/0/2]port default vlan 50
[LSW1-GigabitEthernet0/0/2]int g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type access
[LSW1-GigabitEthernet0/0/1]port default vlan 3
[LSW2]vlan batch 2 10 20 30 40
[LSW2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]port link-type trunk
[LSW2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[LSW2-GigabitEthernet0/0/3]int g0/0/2
[LSW2-GigabitEthernet0/0/2]port link-type trunk
[LSW2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[LSW2-GigabitEthernet0/0/2]int g0/0/4
[LSW2-GigabitEthernet0/0/4]port link-type trunk
[LSW2-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[LSW2-GigabitEthernet0/0/4]int g0/0/5
[LSW2-GigabitEthernet0/0/5]port link-type trunk
[LSW2-GigabitEthernet0/0/5]port trunk allow-pass vlan all
[LSW2-GigabitEthernet0/0/5]int g0/0/1
[LSW2-GigabitEthernet0/0/1]port link-type access
[LSW2-GigabitEthernet0/0/1]port default vlan 2
[LSW3]vlan 40
[LSW3-vlan40]int e0/0/2
[LSW3-Ethernet0/0/2]port link-type access
[LSW3-Ethernet0/0/2]port default vlan 40
[LSW3-Ethernet0/0/2]int e0/0/3
[LSW3-Ethernet0/0/3]port link-type trunk
[LSW3-Ethernet0/0/3]port trunk allow-pass vlan 40
LSW4,LSW5,LSW6与LSW3类似
4.配置三层vlan,将PC机的网关地址加入到交换机的端口中
[LSW1]int vlanif 50
[LSW1-Vlanif50]ip add 192.168.50.254 24
[LSW1-Vlanif50]int vlanif 3
[LSW1-Vlanif3]ip add 192.168.3.2 24
[LSW2]int vlanif 40
[LSW2-Vlanif40]ip add 192.168.40.254 24
[LSW2-Vlanif40]int vlanif 30
[LSW2-Vlanif30]ip add 192.168.30.254 24
[LSW2-Vlanif30]int vlanif 20
[LSW2-Vlanif20]ip add 192.168.20.254 24
[LSW2-Vlanif20]int vlanif 10
[LSW2-Vlanif10]ip add 192.168.10.254 24
[LSW2-Vlanif10]int vlanif 2
[LSW2-Vlanif2]ip add 192.168.2.1 24
5.给ISP、FW1、FW2、LSW1、LSW2配置ospf
[ISP]ospf 1 router-id 1.1.1.1
[ISP-ospf-1]area 0
[ISP-ospf-1-area-0.0.0.0]network 33.33.33.0 0.0.0.255
[ISP-ospf-1-area-0.0.0.0]network 22.22.22.0 0.0.0.25
[ISP-ospf-1-area-0.0.0.0]network 11.11.11.0 0.0.0.255
[FW1]ospf 1 router-id 3.3.3.3
[FW1-ospf-1]area 0
[FW1-ospf-1-area-0.0.0.0]network 11.11.11.0 0.0.0.255
[FW1-ospf-1-area-0.0.0.0]area 1
[FW1-ospf-1-area-0.0.0.1]network 192.168.100.0 0.0.0.255
[FW1-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
[FW2-ospf-1]area 0
[FW2-ospf-1-area-0.0.0.0]network 22.22.22.0 0.0.0.255
[FW2-ospf-1-area-0.0.0.0]area 2
[FW2-ospf-1-area-0.0.0.2]network 192.168.3.0 0.0.0.255
[LSW1]ospf 1 router-id 4.4.4.4
[LSW1-ospf-1]area 2
[LSW1-ospf-1-area-0.0.0.2]network 192.168.3.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.2]network 192.168.50.0 0.0.0.255
[LSW2]ospf 1 router-id 5.5.5.5
[LSW2-ospf-1]area 1
[LSW2-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.1]network 192.168.40.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.1]network 192.168.30.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.1]network 192.168.20.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.1]network 192.168.10.0 0.0.0.255
6.财务部人员流动性较低,使用端口安全技术静态绑定接入用户的MAC与VLAN信息;市场部、人事部和技术部,使用端口安全技术的动态MAC地址学习保证接入用户的合法性;
[LSW5]int e0/0/1
[LSW5-Ethernet0/0/1]port-security enable
[LSW5-Ethernet0/0/1]port-security mac-address sticky
[LSW5-Ethernet0/0/1]port-security mac-address sticky 5489-985B-724C vlan 20
[LSW6]int e0/0/1
[LSW6-Ethernet0/0/1]port-security enable
[LSW4]int e0/0/3
[LSW4-Ethernet0/0/3]port-security enable
[LSW3]int e0/0/2
[LSW3-Ethernet0/0/2]port-security enable
7.技术部和人事部交换机之间使用RSTP技术,终端开启边缘端口和BPDU保护功能防止内部网络攻击;
[LSW2]stp enable
[LSW2]stp mode rstp
[LSW3]stp enable
[LSW3]stp bpdu-protection
[LSW3]int e0/0/2
[LSW3-Ethernet0/0/2]stp edged-port enable
[LSW4]stp enable
[LSW4]stp bpdu-protection
[LSW4]int e0/0/3
[LSW4-Ethernet0/0/3]stp edged-port enable
8.禁止市场部网段ping服务器,但是可以访问服务器资源;
为FW1配置安全区域
[FW1]firewall zone trust
[FW1-zone-trust]add int g1/0/1
[FW1-zone-trust]firewall zone untrust
[FW1-zone-untrust]add int g1/0/0
[FW1-zone-untrust]firewall zone dmz
[FW1-zone-dmz]add int g1/0/2
配置安全策略
[FW1]security-policy
[FW1-policy-security]rule name t_d
[FW1-policy-security-rule-t_d]source-zone trust
[FW1-policy-security-rule-t_d]destination-zone dmz
[FW1-policy-security-rule-t_d]action permit
[FW1]security-policy
[FW1-policy-security]rule name scb_d
[FW1-policy-security-rule-scb_d]source-zone trust
[FW1-policy-security-rule-scb_d]source-address 192.168.10.0 24
[FW1-policy-security-rule-scb_d]destination-zone dmz
[FW1-policy-security-rule-scb_d]service ftp
[FW1-policy-security-rule-scb_d]service http
[FW1-policy-security-rule-scb_d]action permit
市场部ping 服务器:
市场部访问服务器资源:
9.禁止市场部访问财务部
[LSW5]acl 2000
[LSW5-acl-basic-2000]rule deny source 192.168.10.0 0.0.0.255
[LSW5-Ethernet0/0/11]int e0/0/1
[LSW5-Ethernet0/0/1]traffic-filter outbound acl 2000
10.实现技术部、人事部和市场部可以访问ISP,财务部不能访问外网;配置源NAT时使用easy-IP技术
[FW1-policy-security]rule name t_ISP_deny
[FW1-policy-security-rule-t_ISP_deny]source-zone trust
[FW1-policy-security-rule-t_ISP_deny]destination-zone untrust
[FW1-policy-security-rule-t_ISP_deny]source-address 192.168.20.0 24
[FW1-policy-security-rule-t_ISP_deny]action deny
[FW1-policy-security]rule name t_ISP_permit
[FW1-policy-security-rule-t_ISP_permit]source-zone trust
[FW1-policy-security-rule-t_ISP_permit]destination-zone untrust
[FW1-policy-security-rule-t_ISP_permit]action permit
[FW1]nat-policy
[FW1-policy-nat]rule name t_t
[FW1-policy-nat-rule-t_t]source-zone trust
[FW1-policy-nat-rule-t_t]destination-zone untrust
[FW1-policy-nat-rule-t_t]source-address 192.168.40.0 24
[FW1-policy-nat-rule-t_t]source-address 192.168.30.0 24
[FW1-policy-nat-rule-t_t]source-address 192.168.20.0 24
[FW1-policy-nat-rule-t_t]source-address 192.168.10.0 24
[FW1-policy-nat-rule-t_t]destination-address 192.168.50.0 24
[FW1-policy-nat-rule-t_t]action no-nat
[FW1-policy-nat]rule name t_u
[FW1-policy-nat-rule-t_u]source-zone trust
[FW1-policy-nat-rule-t_u]destination-zone untrust
[FW1-policy-nat-rule-t_u]action source-nat easy-ip
财务部访问外网:
其他部门访问外网:
11.将内网www服务器进行映射,对外映射端口为80;对应映射地址为11.11.11.11
[FW1]security-policy
[FW1-policy-security]rule name u_d
[FW1-policy-security-rule-u_d]source-zone untrust
[FW1-policy-security-rule-u_d]destination-zone dmz
[FW1-policy-security-rule-u_d]destination-address 192.168.100.0 24
[FW1-policy-security-rule-u_d]action permit
[FW1]nat server police_nat_web protocol tcp global 11.11.11.11 80 inside 192.168.100.10 www no-reverse
12.总部与分部通过IPSec 味皮恩连接
对FW1进行配置
[FW1]acl 3000
[FW1-acl-adv-3000]rule 5 permit ip source 192.168.10.0 0.0.0.255 destination 192.168.50.0 0.0.0.255
[FW1-acl-adv-3000]rule 10 permit ip source 192.168.20.0 0.0.0.255 destination 192.168.50.0 0.0.0.255
[FW1-acl-adv-3000]rule 15 permit ip source 192.168.30.0 0.0.0.255 destination 192.168.50.0 0.0.0.255
[FW1-acl-adv-3000]rule 20 permit ip source 192.168.40.0 0.0.0.255 destination 192.168.50.0 0.0.0.255
[FW1]ike proposal 10
[FW1-ike-proposal-10]q
[FW1]ike peer FW2
[FW1-ike-peer-FW2]pre-shared-key huawei
[FW1-ike-peer-FW2]ike-proposal 10
[FW1-ike-peer-FW2]remote-address 22.22.22.1
[FW1-ike-peer-FW2]q
[FW1]ipsec proposal FW1
[FW1-ipsec-proposal-FW1]q
[FW1]ipsec policy FW1 10 isakmp
[FW1-ipsec-policy-isakmp-FW1-10]security acl 3000
[FW1-ipsec-policy-isakmp-FW1-10]ike-peer FW2
[FW1-ipsec-policy-isakmp-FW1-10]proposal FW1
[FW1-ipsec-policy-isakmp-FW1-10]q
[FW1]int g1/0/0
[FW1-GigabitEthernet1/0/0]ipsec policy FW1
对FW2进行配置
[FW2]acl 3000
[FW2-acl-adv-3000]rule 5 permit ip source 192.168.50.0 0.0.0.255 destination 192.168.10.0 0.0.0.255
[FW2-acl-adv-3000]rule 10 permit ip source 192.168.50.0 0.0.0.255 destination 192.168.20.0 0.0.0.255
[FW2-acl-adv-3000]rule 15 permit ip source 192.168.50.0 0.0.0.255 destination 192.168.30.0 0.0.0.255
[FW2-acl-adv-3000]rule 20 permit ip source 192.168.50.0 0.0.0.255 destination 192.168.40.0 0.0.0.255
[FW2]ike proposal 10
[FW2-ike-proposal-10]q
[FW2]ike peer FW1
[FW2-ike-peer-FW1]pre-shared-key huawei
[FW2-ike-peer-FW1]ike-proposal 10
[FW2-ike-peer-FW1]remote-address 11.11.11.10
[FW2-ike-peer-FW1]q
[FW2]ipsec proposal FW2
[FW2-ipsec-proposal-FW2]q
[FW2]ipsec policy FW2 10 isakmp
[FW2-ipsec-policy-isakmp-FW2-10]security acl 3000
[FW2-ipsec-policy-isakmp-FW2-10]ike-peer FW1
[FW2-ipsec-policy-isakmp-FW2-10]proposal FW2
[FW2-ipsec-policy-isakmp-FW2-10]q
[FW2]int g1/0/0
[FW2-GigabitEthernet1/0/0]ipsec policy FW2