基于BGP技术和防火墙双机热备技术的校园网设计与实现

规划设计描述

网络拓扑设计分为三部分进行设计:主校区网络、 运营商骨干网络、分校区网络。

总公司网络设计:

划分:教学楼区域、宿舍区域、办公楼区域、行政楼区域,图书馆区域、数据中心。并且设有web服务器。出口设置双机热备技术,与互联相连,并设置NAT。

运营商设计:

底层路由采用OSPF多区域设计,BGP进行AS路由互联。提供互联网访问。

分公司网络设计:

功能区域划分:教学楼、图书馆。出口与互联网相连。设置NAT提供上网业务。

总校区与分校区采用MPLS vpn隧道 穿越互联网 进行 互访。

部门vlan划分及IP地址

网络用户

IP网段

网关

所属VLAN

办公楼

192.168.10.0/24

192.168.10.254

Vlan10

行政楼

192.168.20.0/24

192.168.20.254

VLAN20

教学楼

192.168.30.0/24

192.168.30.254

VLAN30

图书馆

192.168.40.0/24

192.168.40.254

VLAN40

宿舍楼

192.168.50.0/24

192.168.50.254

VLAN50

服务器

192.168.60.0/24

192.168.60.254

VLAN60

分校区规划

教学楼

192.168.70.0/24

192.168.70.254

VLAN70

图书馆

192.168.80.0/24

192.168.80.254

VLAN80

网络拓扑

网络配置实施

接入层配置:

interface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

interface Ethernet0/0/2

port link-type trunk

port trunk allow-pass vlan 2 to 4094

interface Ethernet0/0/3

port link-type access

port default vlan 10

其他接入交换机配置同理

汇聚三层配置

interface Vlanif50

ip address 192.168.50.254 255.255.255.0

dhcp select interface

VRRP配置

以一个汇聚层为例:

汇聚A

interface Vlanif10

ip address 192.168.10.1 255.255.255.0

vrrp vrid 10 virtual-ip 192.168.10.254

vrrp vrid 10 priority 120

interface Vlanif20

ip address 192.168.20.1 255.255.255.0

vrrp vrid 20 virtual-ip 192.168.20.254

汇聚B

interface Vlanif10

ip address 192.168.10.2 255.255.255.0

vrrp vrid 10 virtual-ip 192.168.10.254

interface Vlanif20

ip address 192.168.20.2 255.255.255.0

vrrp vrid 20 virtual-ip 192.168.20.254

vrrp vrid 20 priority 120

MSTP配置

stp region-configuration

region-name huawei

instance 1 vlan 10

instance 2 vlan 20

active region-configuration

[Huawei]stp instance 1 root primary

[Huawei]stp instance 2 root secondary

核心汇聚路由配置

ospf 1

area 0.0.0.0

network 192.168.0.0 0.0.255.255

出口防火墙配置

hrp interface GigabitEthernet1/0/6 remote 10.1.1.1

hrp mirror session enable

interface GigabitEthernet1/0/0

undo shutdown

ip address 100.1.1.1 255.255.255.0

vrrp vrid 1 virtual-ip 100.1.1.100 active

interface GigabitEthernet1/0/0

undo shutdown

ip address 100.1.1.2 255.255.255.0

vrrp vrid 1 virtual-ip 100.1.1.100 standby

安全策略

security-policy

rule name ISP

source-zone trust

destination-zone untrust

action permit

rule name Server

source-zone trust

destination-zone dmz

action permit

#

NAT配置

rule name ISP

source-zone trust

destination-zone untrust

action source-nat easy-ip

#

公网及MPLS vpn 配置

底层IGP路由OSPF

ospf 1

area 0.0.0.0

network 12.1.1.1 0.0.0.0

network 14.1.1.1 0.0.0.0

公网MPLS 建立LSP

[Huawei]mpls lsr-id 1.1.1.1

[Huawei-mpls]mpls ldp

配置VPN实例

[Huawei]ip vpn-instance vpn1

[Huawei-vpn-instance-vpn1]route-distinguisher 100:1

[Huawei-vpn-instance-vpn1-af-ipv4]vpn-target 100:200

[Huawei-GigabitEthernet0/0/0]ip binding vpn-instance vpn1

[Huawei-GigabitEthernet0/0/0]ip add 100.1.1.254 24

建立BGP vpnv4邻居

[Huawei]bgp 100

[Huawei-bgp]undo default ipv4-unicast

[Huawei-bgp]peer 5.5.5.5 as 100

[Huawei-bgp]peer 5.5.5.5 connect-interface lo0

[Huawei-bgp]ipv4-family vpnv4

[Huawei-bgp-af-vpnv4]peer 5.5.5.5 enable

对端PE同理配置

PE与CE的路由配置

ospf 2 vpn-instance vpn1

area 0.0.0.1

network 100.1.1.254 0.0.0.0

分部侧使用静态路由来形成

[Huawei]ip route-static vpn-instance vpn2 192.168.70.0 24 200.1.1.1

[Huawei]ip route-static vpn-instance vpn2 192.168.80.0 24 200.1.1.1

在BGP中引入VPN 实例的路由

[Huawei-bgp-vpn1]import-route ospf 2 route-policy p1

route-policy 用于过滤不需要的路由

acl number 2000

rule 5 permit source 192.168.10.0 0.0.0.255

rule 10 permit source 192.168.20.0 0.0.0.255

rule 15 permit source 192.168.30.0 0.0.0.255

rule 20 permit source 192.168.40.0 0.0.0.255

rule 25 permit source 192.168.50.0 0.0.0.255

rule 30 permit source 192.168.60.0 0.0.0.255

rule 35 permit source 192.168.70.0 0.0.0.255

rule 40 permit source 192.168.80.0 0.0.0.255

route-policy p1 permit node 10

if-match acl 2000

网络测试

DHCP服务测试

内网互联互通测试

MPLS VPN 进行访问测试

数据抓包

测试截图联系作者获取

猜你喜欢

转载自blog.csdn.net/m0_59193722/article/details/128765053
今日推荐