【需求】
分部1和分部2通过野蛮IPSec的方式连接到中心,采用GRE-Over-IPSec的方式,在tunnel上运行OSPF协议来实现总部和分部之间的互通。
【配置脚本】
中心配置脚本
#
sysname Center
#
ike local-name center /中心ike的local-name为:center/
#
router id 1.1.1.1
#
radius scheme system
#
domain system
#
ike peer branch1 /配置到分部1的ike peer/
exchange-mode aggressive /设置IPSec为野蛮方式/
pre-shared-key abc /预共享密钥为abc/
id-type name /选择名字作为ike协商过程中使用的ID/
remote-name branch1 /分部1的名字为branch1/
ike peer branch2 /配置到分部2的ike peer/
exchange-mode aggressive
pre-shared-key abc
id-type name
remote-name branch2
#
ipsec proposal 1 /定义ipsec proposal/
#
ipsec policy center 10 isakmp /配置到分部1的ipsec policy/
security acl 3001 /指定安全策略所引用的访问控制列表号/
ike-peer branch1 /引用ike peer/
proposal 1 /引用ipsec proposal/
ipsec policy center 20 isakmp /到分部2的配置和分部1的配置类似/
security acl 3002
ike-peer branch2
proposal 1
#
acl number 3001 /定义从中心到分部1的GRE数据流/
rule 0 permit gre source 202.101.1.2 0 destination 202.101.2.2 0
acl number 3002 /定义从中心到分部2的GRE数据流/
rule 0 permit gre source 202.101.1.2 0 destination 202.101.3.2 0
#
interface Serial2/0
link-protocol ppp
ip address 202.101.1.2 255.255.255.252
ipsec policy center /在公网出口上应用IPSec policy/
interface Tunnel0 /配置中心和分部1之间的GRE tunnel/
ip address 10.0.0.1 255.255.255.252
source 202.101.1.2
destination 202.101.2.2
#
interface Tunnel1 /配置中心和分部2之间的GRE tunnel/
ip address 10.0.0.5 255.255.255.252
source 202.101.1.2
destination 202.101.3.2
#
interface NULL0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
interface Ethernet0/0
ip address 192.168.1.1 255.255.255.0 /中心的内网地址/
#
ospf 1
area 0.0.0.10 /分部1属于area 10/
network 10.0.0.0 0.0.0.3
#
area 0.0.0.20 /分部2属于area 20/
network 10.0.0.4 0.0.0.3
#
area 0.0.0.0 /总部属于area 0/
network 1.1.1.1 0.0.0.0
network 192.168.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 202.101.1.1 preference 60
#
user-interface con 0
user-interface vty 0 4
#
return
分部1配置脚本
#
sysname Branch1
#
ike local-name branch1 /分部1的ike的local-name为:branch1/
#
radius scheme system
#
domain system
#
ike peer center /配置到中心的ike peer/
exchange-mode aggressive /设置IPSec为野蛮方式/
pre-shared-key abc /预共享密钥为abc/
id-type name /选择名字作为ike协商过程中使用的ID/
remote-name center /对端的名字为center/
remote-address 202.101.1.2 /对端的地址为202.101.1.2(中心的公网地址)/
ipsec proposal 1 /定义ipsec proposal/
#
ipsec policy branch1 10 isakmp /配置到中心的ipsec policy/
security acl 3001 /指定安全策略所引用的访问控制列表号/
ike-peer center /引用ike peer/
proposal 1 /引用ipsec proposal/
#
acl number 3001 /定义从分部1到中心的GRE数据流/
rule 0 permit gre source 202.101.2.2 0 destination 202.101.1.2 0
#
interface Serial2/0
link-protocol ppp
ip address 202.101.2.2 255.255.255.252
ipsec policy branch1 /在公网出口上应用IPSec policy/
#
interface Tunnel0 /配置分部1和中心之间的GRE tunnel/
ip address 10.0.0.2 255.255.255.252
source 202.101.2.2
destination 202.101.1.2
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
interface Ethernet0/0 /配置分部1的内网地址/
ip address 192.168.2.1 255.255.255.0
#
ospf 1
area 0.0.0.10 /分部1属于area 10/
network 2.2.2.2 0.0.0.0
network 10.0.0.0 0.0.0.3
network 192.168.2.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 202.101.2.1 preference 60
#
user-interface con 0
user-interface vty 0 4
#
return
|
|
||
|
|
||
|
|
7月26 |
H3CNE认证 |
热报中 |
8月16 |
H3C-IMC认证 |
热报中 |
7月26 |
H3CNE认证 |
热报中 |
7月26 |
H3CIE+认证 |
热报中 |
8月16 |
H3C-IMC认证 |
热报中 |
7月26 |
H3CNE培训 |
热报中 |
7月26 |
H3CSE认证 |
热报中 |
8月16 |
H3C无线 |
热报中 |
7月26 |
H3CSE培训 |
热报中 |
8月16 |
H3CIMC培训 |
热报中 |
8月16 |
H3C无线培训 |
热报中 |
8月31 |
H3CEAD培训 |
热报中 |
8月16 |
H3CPME认证 |
热报中 |
8月16 |
H3C安全认证 |
热报中 |
8月16 |
H3CIMC培训 |
热报中 |
8月16 |
H3C无线培训 |
热报中 |
8月09 |
H3CEAD培训 |
热报中 |
8月16 |
H3CPME认证 |
热报中 |
8月16 |
H3C安全认证 |
热报中 |
8月16 |
H3CIMC培训 |
热报中 |
8月09 |
H3C无线培训 |
热报中 |
8月09 |
H3CEAD培训 |
热报中 |
8月09 |
H3CPME认证 |
热报中 |
8月09 |
H3C安全认证 |
热报中 |