| 一、网络拓扑:

二、试验目的:
同学们有时候非常困惑,学了那么多的知识到底怎么用了,在什么地方使用呢,企业的网络结构是什么样的,企业里面的网络服务如何搭建的呢,那么这么试验综合考虑了同学的需求,同时结合同学们所学的网络知识,以此来提高同学们对知识的把握,增强对知识的理解,以及加强对知识的灵活用应!
通过此综合试验让同学们掌握以下技术: VTP 、 STP 、 HSRP 、 Channel 、 NAT 、 ACL 、 OSPF 、 VPN 、浮动路由、三层交换等
三、试验说明:
1) 为了实现 VLAN 的统一配置和统一管理,在 S1 启用 VTP 协议,同时充当 VTP 服务器,可以实现 VLAN 的添加和修改,其他交换机加入到 VTP 域中,并配置为 VTP 客户端,通过 VTP 协议向 S1 学习 VLAN 信息,构建本地 VLAN 数据库!
2) 为了解决单链路断掉造成网络中断的问题,接入层的交换机( S3 和 S4 )分别与核心交换机( S1 和 S2 )相连,构成一个环形的冗余型结构,但是同时也带来了很多的问题,比如产生环路,形成广播风暴等,为了解决此问题,我们在交换机中启用 PVST 协议,我们希望 S1 作为 vlan1-vlan2 的根网桥同时作为其他 vlan3-vlan4 的备份网桥;而 S2 作为另 vlan3-vlan4 的根网桥同时作为 vlan1-vlan3 的备份网桥,通过此方式既可以解决环路产生的问题,同时又可以实现 VLAN 间的负载分担,设备间的备份!
3) 为了实现企业网络中 vlan 之间的互连,我们在 S1 和 S2 中启用了三层交换的功能,同时我们启用了 HSRP 协议,让 S1 作为 vlan1-vlan2 的活跃路由(网关),并作为 vlan3-vlan4 的备份路由(网关);而 S2 作为 vlan3-vlan4 的活跃路由(网关),作为 vlan1-vlan2 的备份路由(网关),同样达到备份、冗余、分流、负载的功能 !
4) 在 S1 和 S2 通过双链路分别和上层路由器相连,我们希望凡是通过 S1 转发出去的数据通过链路送到 R1 上,而另一条连接 R2 路由器的链路启到备份状态;同样在凡是通过 S2 转发出去的数据通过链路送到 R2 上,而另一条连接 R1 路由器的链路启到备份状态,我们实现的方法是:在交换机上配置浮动缺省路由,我们通过改变缺省路由的度量值来改变路由的优先级,实现路由选择的备份!
5) 为了实现内部网络的可达性,我在 S1 和 S2 之间启用了 OSPF 协议,把直连的各个网段都通告出去,那么 S1 和 S2 之间的网段互连就不存在问题了(切记无需使用静态路由,大家可以思考?)
6) 对于一个对网络依赖很高的企业,除了保证企业内部网络的可靠性外,那么对 ISP 的选择也是我们要考虑的问题,我们并不能保证我们的 ISP 永远都不会出现问题,所以为了防止 ISP 出现故障,我们可以选择多个 ISP 供应商,所以我们设计了两个出口网关,分别连接不同的 ISP ,为了能够实现和内部之间的互连,我制定了到达内部的静态路由,通过修改度量值来改变路由选择的优先级问题 ,除了解决内部互连外,我们还需解决内外互连的问题,我在每个路由器上都添加了到达 ISP 的一个缺省路由,并且在每个路由器上都配置了 NAT 和 VPN ,而且他们所实现的功能是完全一样的,所以策略的制定, VPN 的配置,以及 NAT 的转化都几乎一样,这里需要重点说明的,如何解决 VPN 和 NAT 共存的问题,实现的方法很简单,需要 VPN 的数据流是不需要通过 NAT 转化的,所有我们制定了几条操作相反的访问列表,即可以实现此功能!
7) 我们用 R4 、 R5 、 R6 模拟一个骨干网络环境,设备之间是两两相连的,采用我们熟悉的 ospf 协议
8) R3 相连的是我模拟的令一个企业内部环境,实现的功能不多,主要想演示如何通过 PAR (端口重定向)技术来实现对外发布内部服务,同时与 R1 和 R2 构建了一个点到点的 VPN 结构 !
四、试验配置
********S1 相关配置如下 ***********
ena
confi t
line console 0
exec-timeout 0 0
logging sy
end
vlan database
vtp server
vtp domain benet
vlan 2
vlan 3
vlan 4
exit
confi t
int range f0/0 -3
switchport mode trunk
no shut
exit
int port-channel 1
exit
int range f0/0 -1
channel-group 1 mode on
exit
spanning-tree vlan 1 root primary
spanning-tree vlan 2 root primary
spanning-tree vlan 3 root secondary
spanning-tree vlan 4 root secondary
int vlan 1
ip address 192.168.1.1 255.255.255.0
no shut
standby 1 ip 192.168.1.10
standby 1 priority 150
standby 1 preempt
exit
int vlan 2
ip address 192.168.2.1 255.255.255.0
no shut
standby 2 ip 192.168.2.10
standby 2 priority 150
standby 2 preempt
exit
int vlan 3
ip address 192.168.3.2 255.255.255.0
no shut
standby 3 ip 192.168.3.10
standby 3 priority 100
standby 3 preempt
exit
int vlan 4
ip address 192.168.4.2 255.255.255.0
no shut
standby 4 ip 192.168.4.10
standby 4 priority 100
standby 4 preempt
exit
int f0/10
no switchport
ip address 172.16.1.2 255.255.255.0
no shut
exit
int f0/11
no switchport
ip address 172.16.2.2 255.255.255.0
no shut
exit
router ospf 10
network 192.168.1.0 0.0.0 .255 area 0
network 192.168.2.0 0.0.0 .255 area 0
network 192.168.3.0 0.0.0 .255 area 0
network 192.168.4.0 0.0.0 .255 area 0
network 172.16.1.0 0.0.0 .255 area 0
network 172.16.2.0 0.0.0 .255 area 0
end
confi t
ip route 0.0.0 .0 0.0.0.0 172.16.1.1
ip route 0.0.0 .0 0.0.0.0 172.16.2.1 2
end
******S2 相关配置如下 *******
ena
confi t
line console 0
exec-timeout 0 0
logging sy
end
vlan database
vtp domain benet
vtp client
exit
confi t
int range f0/0 -3
switchport mode trunk
no shut
exit
int port-channel 1
exit
int range f0/0 -1
channel-group 1 mode on
exit
spanning-tree vlan 3 root primary
spanning-tree vlan 4 root primary
spanning-tree vlan 1 root secondary
spanning-tree vlan 2 root secondary
int vlan 1
ip address 192.168.1.2 255.255.255.0
no shut
standby 1 ip 192.168.1.10
standby 1 priority 100
standby 1 preempt
exit
int vlan 2
ip address 192.168.2.2 255.255.255.0
no shut
standby 2 ip 192.168.2.10
standby 2 priority 100
standby 2 preempt
exit
int vlan 3
ip address 192.168.3.1 255.255.255.0
no shut
standby 3 ip 192.168.3.10
standby 3 priority 150
standby 3 preempt
exit
int vlan 4
ip address 192.168.4.1 255.255.255.0
no shut
standby 4 ip 192.168.4.10
standby 4 priority 150
standby 4 preempt
exit
int f0/10
no switchport
ip address 172.16.3.2 255.255.255.0
no shut
exit
int f0/11
no switchport
ip address 172.16.4.2 255.255.255.0
no shut
exit
router ospf 10
network 192.168.1.0 0.0.0 .255 area 0
network 192.168.2.0 0.0.0 .255 area 0
network 192.168.3.0 0.0.0 .255 area 0
network 192.168.4.0 0.0.0 .255 area 0
network 172.16.3.0 0.0.0 .255 area 0
network 172.16.4.0 0.0.0 .255 area 0
end
confi t
ip route 0.0.0 .0 0.0.0.0 172.16.3.1
ip route 0.0.0 .0 0.0.0.0 172.16.4.1 2
end
******S3 相关配置如下 *****
ena
confi t
line console 0
exec-timeout 0 0
logging sy
end
vlan database
vtp domain benet
vtp client
exit
confi t
int range f0/0 -1
switchport mode trunk
no shut
exit
int f0/10
no shut
end
******S4 相关配置如下 *****
ena
confi t
line console 0
exec-timeout 0 0
logging sy
end
vlan database
vtp domain benet
vtp client
exit
confi t
int range f0/0 -1
switchport mode trunk
no shut
exit
int f0/10
switchport access vlan 4
no shut
end
*****R1 相关配置如下 *****
ena
confi t
line console 0
exec-timeout 0 0
logging sy
exit
int f1/0
ip address 172.16.1.1 255.255.255.0
no shut
exit
int f1/1
ip address 172.16.4.1 255.255.255.0
no shut
end
confi t
ip route 192.168.1.0 255.255.255.0 172.16.1.2
ip route 192.168.1.0 255.255.255.0 172.16.4.2 2
ip route 192.168.2.0 255.255.255.0 172.16.1.2
ip route 192.168.2.0 255.255.255.0 172.16.4.2 2
ip route 192.168.3.0 255.255.255.0 172.16.1.2
ip route 192.168.3.0 255.255.255.0 172.16.4.2 2
ip route 192.168.4.0 255.255.255.0 172.16.1.2
ip route 192.168.4.0 255.255.255.0 172.16.4.2 2
end
confi t
int f0/0
ip address 222.45.0.1 255.255.255.224
no shut
exit
ip route 0.0.0 .0 0.0.0.0 222.45.0.2
access-list 100 deny ip 192.168.1.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 deny ip 192.168.2.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 deny ip 192.168.3.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 deny ip 192.168.4.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 permit ip any any
ip nat inside source list 100 interface f0/0 overload
int f0/0
ip nat outside
exit
int f1/0
ip nat inside
exit
int f1/1
ip nat inside
end
confi t
access-list 110 permit ip 192.168.1.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 110 permit ip 192.168.2.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 110 permit ip 192.168.3.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 110 permit ip 192.168.4.0 0.0.0 .255 192.168.0.0 0.0.0.255
crypto isakmp policy 1
hash md5
authentication pre-share
group 2
exit
crypto isakmp key cisco address 222.45.0.162
crypto ipsec transform-set benet esp-des esp-sha-hmac
exit
crypto map map1 1 ipsec-isakmp
set peer 222.45.0.162
set transform-set benet
match address 110
exit
int f0/0
crypto map map1
end
*****R2 相关配置如下 *****
ena
confi t
line console 0
exec-timeout 0 0
logging sy
exit
int f1/0
ip address 172.16.3.1 255.255.255.0
no shut
exit
int f1/1
ip address 172.16.2.1 255.255.255.0
no shut
end
confi t
ip route 192.168.1.0 255.255.255.0 172.16.3.2
ip route 192.168.1.0 255.255.255.0 172.16.2.2 2
ip route 192.168.2.0 255.255.255.0 172.16.3.2
ip route 192.168.2.0 255.255.255.0 172.16.2.2 2
ip route 192.168.3.0 255.255.255.0 172.16.3.2
ip route 192.168.3.0 255.255.255.0 172.16.2.2 2
ip route 192.168.4.0 255.255.255.0 172.16.3.2
ip route 192.168.4.0 255.255.255.0 172.16.2.2 2
end
confi t
int f0/0
ip address 222.45.0.33 255.255.255.224
no shut
exit
ip route 0.0.0 .0 0.0.0.0 222.45.0.34
access-list 100 deny ip 192.168.1.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 deny ip 192.168.2.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 deny ip 192.168.3.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 deny ip 192.168.4.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 100 permit ip any any
ip nat inside source list 100 interface f0/0 overload
int f0/0
ip nat outside
exit
int f1/0
ip nat inside
exit
int f1/1
ip nat inside
end
confi t
access-list 110 permit ip 192.168.1.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 110 permit ip 192.168.2.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 110 permit ip 192.168.3.0 0.0.0 .255 192.168.0.0 0.0.0.255
access-list 110 permit ip 192.168.4.0 0.0.0 .255 192.168.0.0 0.0.0.255
crypto isakmp policy 1
hash md5
authentication pre-share
group 2
exit
crypto isakmp key huawei address 222.45.0.162
crypto ipsec transform-set accp esp-3des esp-md5-hmac
exit
crypto map map1 1 ipsec-isakmp
set peer 222.45.0.162
set transform-set accp
match address 110
exit
int f0/0
crypto map map1
end
******R4 相关配置如下 ********
ena
confi t
int f0/0
ip address 222.45.0.34 255.255.255.224
no shut
int f0/1
ip address 222.45.0.65 255.255.255.224
no shut
int f1/0
ip address 222.45.0.129 255.255.255.224
no shut
exit
router ospf 10
network 222.45.0.32 0.0.0 .31 area 0
network 222.45.0.64 0.0.0 .31 area 0
network 222.45.0.128 0.0.0 .31 area 0
end
******R5 相关配置如下 ********
ena
confi t
int f0/0
ip address 222.45.0.2 255.255.255.224
no shut
int f0/1
ip address 222.45.0.66 255.255.255.224
no shut
int f1/0
ip address 222.45.0.97 255.255.255.224
no shut
exit
router ospf 10
network 222.45.0.0 0.0.0 .31 area 0
network 222.45.0.64 0.0.0 .31 area 0
network 222.45.0.128 0.0.0 .31 area 0
end
******R6 相关配置如下 ********
ena
confi t
int f0/0
ip address 222.45.0.161 255.255.255.224
no shut
int f0/1
ip address 222.45.0.130 255.255.255.224
no shut
int f1/0
ip address 222.45.0.98 255.255.255.224
no shut
exit
router ospf 10
network 222.45.0.96 0.0.0 .31 area 0
network 222.45.0.128 0.0.0 .31 area 0
network 222.45.0.160 0.0.0 .31 area 0
end
*******R3 相关配置如下 *****
ena
confi t
line console 0
exec-timeout 0 0
logging sy
exit
int f0/0
ip address 222.45.0.162 255.255.255.224
no shut
exit
int f1/0
ip address 192.168.0.1 255.255.255.0
no shut
exit
ip nat inside source static tcp 192.168.0.2 21 f 0/0 21
ip nat inside source static tcp 192.168.0.2 25 f 0/0 25
ip nat inside source static tcp 192.168.0.2 80 f 0/0 80
int f0/0
ip nat outside
exit
int f1/0
ip nat inside
exit
access-list 110 permit ip 192.168.0.0 0.0.0 .255 192.168.1.0 0.0.0.255
access-list 110 permit ip 192.168.0.0 0.0.0 .255 192.168.2.0 0.0.0.255
access-list 110 permit ip 192.168.0.0 0.0.0 .255 192.168.3.0 0.0.0.255
access-list 110 permit ip 192.168.0.0 0.0.0 .255 192.168.4.0 0.0.0.255
crypto isakmp policy 1
hash md5
authentication pre-share
group 2
exit
crypto isakmp key cisco address 222.45.0.1
crypto isakmp key huawei address 222.45.0.33
crypto ipsec transform-set benet esp-des esp-sha-hmac
crypto ipsec transform-set accp esp-3des esp-md5-hmac
exit
crypto map map1 1 ipsec-isakmp
set peer 222.45.0.1
set transform-set benet
match address 110
exit
crypto map map1 2 ipsec-isakmp
set peer 222.45.0.33
set transform-set accp
match address 110
exit
int f0/0
cryptp map map1
end
五、完毕
|