本文章仅供学习和参考!
欢迎交流~
目录
5. R6和R7-OSPF配置,RID=255.X.X.X,X为设备编号:
一、实验拓扑图:
二、实验要求:
1. 防火墙基础配置(基于命令行):
(0)启动防火墙出现###五行左右正常显示登录界面后,如果五行###出现完还没有出现登录界面,请关闭eNSP再重新打开eNSP实验图;
(1)设置eNSP的云(udp+GE点增加,本地网卡IP+GE点增加),通道 上1下2点勾双向通道,将防火墙的G0/0/0桥接到本地网卡所在的网络;
(2)基于CLI命令行访问设备,第一次访问设备使用用户名=admin和密码=Admin@123进行登录,并需要修改密码=Admin@123456;
(3)修改防火墙设备系统名=FW5,并设置登录设备后的超时时间=0分和0秒;
(4)FW5-G0/0/0=192.168.100.2xx/24 安全区域属于Trust,其中xx为学号,例如:学号=36,则FW5-G0/0/0=192.168.100.236/24;
(5)FW5-G0/0/0允许所有支持服务管理协议进行访问管理;
(6)从本地PC的cmd下>ping 192.168.100.2xx,结果应该是可以ping通,如果不通请进行故障排错;
(7)从本地PC打开谷歌浏览器或火狐浏览器,输入192.168.100.2xx,在Web中是否有登录界面;
(8)请用命令查看并填写Trust安全区域优先级=( 85 ),untrust安全区域优先级=( 5 ),DMZ安全区域优先级=( 50),local安全区域优先级=( 100 );
2. 防火墙IP地址和安全区域配置(基于Web界面):
(1)FW5-G1/0/0=192.168.5.1/24 安全区域属于Trust,仅允许服务管理ping/SNMP进行访问管理;
(2)FW5-G1/0/1=192.168.45.5/24 安全区域属于Trust,允许除开NETCONF协议外的其他支持协议进行访问管理;
(3)FW5-G1/0/2=192.168.35.5/24 安全区域属于Trust,仅允许服务管理SSH/Telnet/ping进行访问管理;
(4)测试:在Server1上ping 192.168.5.1能通,R3上ping 192.168.35.5能通,R4上ping 192.168.45.5能通;
3. 边界安全设备FW5配置路由可达(基于Web界面):
(1)FW5上配置OSPF进程号=1,Router-ID=123.5.5.5,区域ID=0,把G1/0/0、G1/0/1、G1/0/2三个接口精确通告进OSPF;
(2)R5上配置静态缺省路由通往外部网络,下一跳IP地址=202.103.56.6;
(3)R5上配置OSPF 缺省路由,就算本地路由表没有0.0.0.0/0也能总是下放OSPF默认路由给OSPF邻居设备;
(4)测试:PC1和PC2通过ping 192.168.5.100能通,PC1和PC2通过Tracert 192.168.5.100分别走左边和右边;
(5)测试:R1/R2/R3/R4上通过display ip routing-table 查看R1/R2/R3/R4路由表应存在0.0.0.0/0 的O_ASE路由;
(6)测试:R1/R2/R3/R4上测试ping 200.1.1.200或ping 100.1.1.100结果不通(因为还没有做NAT);
4. 外网设备IP地址配置:
(1)FW5-G0/0/0=192.168.100.2xx/24 安全区域属于Trust,R6-G2/0/0=202.103.56.6/24,其他IP按照图示配置;
(2)测试:在R6上测试ping 202.103.56.5结果是能通;
(3)Client2=100.1.1.100/24,网关=100.1.1.1/24;
5. R6和R7-OSPF配置,RID=255.X.X.X,X为设备编号:
(1)R7上配置OSPF 1 Area 0,把G0/0/0、G0/0/1、G0/0/2精确通告进OSPF;
(2)R6上配置OSPF 1 Area 0,把G0/0/1精确通告进OSPF;
(3)R6上配置OSPF 缺省路由,就算本地路由表没有0.0.0.0/0也能总是下放OSPF默认路由给OSPF邻居设备;
(4)测试:R7上通过display ip routing-table 查看R7路由表应存在0.0.0.0/0 的O_ASE路由;
(5)测试:Server2和Client2测试ping 202.103.56.6能通,Server2和Client2测试ping 202.103.56.5不能通;
6.配置NAT让内网主机可以访问外网:
三、实验步骤:
1. 配置环回适配器(基于安全性原则)![](https://i-blog.csdnimg.cn/blog_migrate/7790be9de9bb8240577ef0ca0bf896bd.png)
2. 配置Cloud1
3.配置客户端
(1)配置PC1
(2)配置PC2
(3)配置Client1
(4)配置Client2
4.配置服务器
(1)配置Server1
(2)配置Server2
5. 配置防火墙
修改设备名称
sysname FW5
配置IP
interface GigabitEthernet0/0/0
ip address 192.168.100.242 255.255.255.0
interface GigabitEthernet1/0/0
ip address 192.168.5.1 255.255.255.0
interface GigabitEthernet1/0/1
ip address 192.168.45.5 255.255.255.0
interface GigabitEthernet1/0/2
ip address 192.168.35.5 255.255.255.0
interface GigabitEthernet1/0/6
ip address 202.103.56.5 255.255.255.0
添加防火墙接口权限
interface GigabitEthernet0/0/0
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage snmp permit
service-manage telnet permit
interface GigabitEthernet1/0/0
service-manage ping permit
service-manage snmp permit
interface GigabitEthernet1/0/1
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
service-manage snmp permit
service-manage telnet permit
interface GigabitEthernet1/0/2
service-manage ping permit
service-manage ssh permit
service-manage telnet permit
interface GigabitEthernet1/0/6
service-manage ping permit
添加信任区域
firewall zone trust
add interface GigabitEthernet0/0/0
add interface GigabitEthernet1/0/0
add interface GigabitEthernet1/0/1
add interface GigabitEthernet1/0/2
添加不信任区域
firewall zone untrust
add interface GigabitEthernet1/0/6
配置OSPF
ospf 1 router-id 123.5.5.5
default-route-advertise always
area 0.0.0.0
network 192.168.5.1 0.0.0.0
network 192.168.35.5 0.0.0.0
network 192.168.45.5 0.0.0.0
network 192.168.100.250 0.0.0.0
在G1/0/6接口配置默认路由(内网出口一定要配置默认路由)
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet1/0/6 202.103.56.6
配置NAT源转换地址池
nat address-group add1 0
mode pat
section 0 202.103.56.1 202.103.56.50
配置安全策略
security-policy
rule name policy1
source-zone trust
destination-zone untrust
action permit
配置NAT策略
nat-policy
rule name nat1
source-zone trust
destination-zone untrust
action source-nat address-group add1
补充:防火墙在Web界面配置NAT(上面是用命令配置NAT,下面用Web配置,两种方法都可以)
配置NAT源转换地址池
配置NAT
6. 配置路由器
(1) 配置R1
修改设备名称
sysname AR1
配置IP
interface GigabitEthernet0/0/0
ip address 192.168.10.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.13.1 255.255.255.0
配置ospf
ospf 1 router-id 123.1.1.1
area 0.0.0.0
network 192.168.10.1 0.0.0.0
network 192.168.13.1 0.0.0.0
配置VRRP
interface GigabitEthernet0/0/0
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 105
vrrp vrid 10 preempt-mode timer delay 120
vrrp vrid 10 track interface GigabitEthernet0/0/1
vrrp vrid 10 track ip route 0.0.0.0 0.0.0.0
vrrp vrid 10 track ip route 192.168.5.0 255.255.255.0 reduced 20
vrrp vrid 20 virtual-ip 192.168.10.253
(2)配置R2
修改设备名称
sysname AR2
配置IP
interface GigabitEthernet0/0/0
ip address 192.168.10.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.24.2 255.255.255.0
配置VRRP
interface GigabitEthernet0/0/0
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 20 virtual-ip 192.168.10.253
vrrp vrid 20 priority 105
vrrp vrid 20 preempt-mode timer delay 120
vrrp vrid 20 track interface GigabitEthernet0/0/1
配置OSPF
ospf 1 router-id 123.2.2.2
area 0.0.0.0
network 192.168.10.2 0.0.0.0
network 192.168.24.2 0.0.0.0
(3)配置R3
修改设备名称
sysname AR3
配置IP
interface GigabitEthernet0/0/1
ip address 192.168.13.3 255.255.255.0
interface GigabitEthernet0/0/2
ip address 192.168.35.3 255.255.255.0
配置OSPF
ospf 1 router-id 123.3.3.3
area 0.0.0.0
network 192.168.13.3 0.0.0.0
network 192.168.35.3 0.0.0.0
(4)配置R4
修改设备名称
sysname AR4
配置IP
interface GigabitEthernet0/0/1
ip address 192.168.24.4 255.255.255.0
interface GigabitEthernet0/0/2
ip address 192.168.45.4 255.255.255.0
配置OSPF
ospf 1 router-id 123.4.4.4
area 0.0.0.0
network 192.168.24.4 0.0.0.0
network 192.168.45.4 0.0.0.0
(5)配置R6
修改设备名称
sysname AR6
配置IP
interface GigabitEthernet0/0/1
ip address 202.103.67.6 255.255.255.0
interface GigabitEthernet2/0/0
ip address 202.103.56.6 255.255.255.0
配置OSPF
ospf 1 router-id 255.6.6.6
default-route-advertise always
area 0.0.0.0
network 202.103.67.6 0.0.0.0
(6)配置R7
修改设备名称
sysname AR7
配置IP
interface GigabitEthernet0/0/0
ip address 200.1.1.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 202.103.67.7 255.255.255.0
interface GigabitEthernet0/0/2
ip address 100.1.1.1 255.255.255.0
配置OSPF
ospf 1 router-id 255.7.7.7
area 0.0.0.0
network 100.1.1.1 0.0.0.0
network 200.1.1.1 0.0.0.0
network 202.103.67.7 0.0.0.0