拓扑图如下:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_02

实验目的:

1、vlan互通

2、内网PAT访问外网

3、内网发布web服务器供外网访问


实验步骤:

一、为了实现这些目标,首先我们需要配置防火墙使得各自网段可以ping到防火墙

1、配置云

cloud1:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_04

cloud2:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_06

cloud3:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_08

2、OK,先不管防火墙,先实现第一个实验目的,将内网互通

那么第一步,配置端口vlan状态以及本地IP地址

SW1:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_10

SW2:(算了先不配本地IP了一会儿跟虚拟IP一起配,不然全乱了)

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_12

SW3:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_14

写这么多vlan的原因是,当然是后面要用啦;以及,stp中:vlan必须一致


3、接下来,把根交换机设置到SW2上,因为SW2连着inside1,这样方便走流量;然后,设IP设VRRP,把1,2,100的网关都设置到SW2上,备用网关设置到SW3上(刚刚那个vlan1不会手贱设早了嘛,我删掉重新做一下,这样看着整齐)

SW1:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_高级_16

SW2:(注意啊,颜色一样不代表是一类东西,我颜色不够用了、、)

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_高级_18

SW3:这里说明一下,因为SW3用来备份网关,所以不用检测,另外,敲后面懒得敲优先级了,默认100凑活下吧

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_20


4、接下来,宣告网段(不然不同网段怎么通)

SW1:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_22

SW2:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_24

SW3:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_26

验证下:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_28

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_30


到目前为止,vlan互通了,我们开始第二个实验目的,既然要内网访问外网,那就需要配置防火墙


二、配置防火墙

1、内外网配置

内外网通用:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_高级_32


内网:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_34

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_36

外网:

R1:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_38

F-W:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_高级_40

在这之余,想让内网能访问到外网还需要两条非常重要的命令

在SW2中输入“ip route-static 0.0.0.0 0.0.0.0 10.1.1.254”

在SW3中输入“ip route-static 0.0.0.0 0.0.0.0 20.1.1.254”


F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_42

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_44

好了,这个是默认状况下高安全级别可以访问低安全级别,接下来,配置PAT访问

F-W:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_46

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_48

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_50


三、实验目的三,外网访问内网web服务器

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_F-W_52

验证:

F-W高级配置(OSPF+STO+VRRP)_配置F-W高级配置(OSPF+STO+VRRP)_配置_54