参考:http://wenku.baidu.com/view/76a0bd2ab4daa58da0114a8c.html
2.基本接口配置
R1:
R1(config)#int e0/0
R1(config-if)#ip add 10.1.1.1 255.255.2555.0
R1(config-if)#no sh
R1(config-if)#int l0
R1(config-if)#ip add 1.1.1.1 255.255.255.0
FW1:
pixfirewall(config)# int e0
pixfirewall(config-if)# ip add 10.1.1.10 255.255.255.0
pixfirewall(config-if)# nameif inside
INFO: Security level for "inside" set to 100 by default.
pixfirewall(config-if)# no sh
pixfirewall(config-if)# int e1
pixfirewall(config-if)# ip add 202.100.1.10 255.255.255.0
pixfirewall(config-if)# nameif outside
INFO: Security level for "outside" set to 0 by default.
pixfirewall(config-if)# no sh
R2:
R2(config)#INT E0/0
R2(config-if)#ip add 202.100.1.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int e0/1
R2(config-if)#ip add 202.100.2.2 255.255.255.0
R2(config-if)#no sh
R3:
R3(config)#int e0/0
R3(config-if)#ip add 202.100.2.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#ip add 3.3
R3(config-if)#ip add 3.3.3.3 255.255.255.0
R3(config-if)#no sh
3.路由配置:
R1(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.10
pixfirewall(config)# route outside 0.0.0.0 0.0.0.0 202.100.1.2
R3(config)#ip route 0.0.0.0 0.0.0.0 202.100.2.2
4.防火墙NAT及策略配置:
pixfirewall(config)# access-list 10 permit ip 10.1.1.0 255.255.255.0 any
pixfirewall(config)# nat (inside) 1 access-list 10
pixfirewall(config)# global (outside) 1 interface
pixfirewall(config)# static (inside,outside) 202.100.1.101 10.1.1.1
pixfirewall(config)# access-list outside extended permit icmp any any
pixfirewall(config)# access-list outside extended permit gre host 202.100.2.3 host 202.100.1.101
pixfirewall(config-if)# access-group outside in interface outside
5.GRE及动态路由配置
R1:
R1(config)#int tunnel 0
R1(config-if)#ip add 192.168.0.1 255.255.255.0
R1(config-if)#tunnel source ethernet 0/0
R1(config-if)#tunnel destination 202.100.2.3
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 1.1.1.0 0.0.0.255 a 0
R1(config-router)#network 172.16.1.0 0.0.0.255 a 0
R1(config-router)#network 192.168.0.0 0.0.0.255 a 0
R3:
R3(config)#int tunnel 0
R3(config-if)#ip add 192.168.0.3 255.255.255.0
R3(config-if)#tunnel source ethernet 0/0
R3(config-if)#tunnel destination 202.100.1.101
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 3.3.3.0 0.0.0.255 a 0
R3(config-router)#network 172.16.3.0 0.0.0.255 a 0
R3(config-router)#network 192.168.0.0 0.0.0.255 a 0
如果没有问题的话,ospf邻居能够成建立。
6.***配置
R1:
A.配置感兴趣流
R1(config)#ip access-list extended ***
R1(config-ext-nacl)#permit ip 1.1.1.0 0.0.0.255 3.3.3.0 0.0.0.255
B.第一阶段策略:
R1(config)#crypto isakmp policy 10
R1(config-isakmp)#group 2
R1(config-isakmp)#ha md
R1(config-isakmp)#en de
R1(config-isakmp)#au pr
R1(config-isakmp)#exit
R1(config)#crypto isakmp key 0 cisco add 3.3.3.3
C.第二阶段策略:
R1(config)#crypto ipsec transform-set transet esp-des esp-md5-hmac
D.配置Crypto MAP:
R1(config)#crypto map crymap 10 ipsec-isakmp
R1(config-crypto-map)#set peer 202.100.2.3
R1(config-crypto-map)#set transform-set transet
R1(config-crypto-map)#match address ***
R1(config)#crypto map crymap local-address loopback 0
E.tunnel接口应用MAP:
R1(config)#int tunnel 0
R1(config-if)#crypto map crymap
R3:
A.配置感兴趣流
R3(config)#ip access-list extended ***
R3(config-ext-nacl)#permit ip 3.3.3.0 0.0.0.255 1.1.1.0 0.0.0.255
B.第一阶段策略:
R3(config)#crypto isakmp policy 10
R3(config-isakmp)#encryption de
R3(config-isakmp)#ha md
R3(config-isakmp)#gr 2
R3(config-isakmp)#au pr
R3(config-isakmp)#exit
R3(config)#crypto isakmp key 0 cisco add 1.1.1.1
C.第二阶段策略:
R3(config)#crypto ipsec transform-set transet esp-des esp-md5-hmac
D.配置Crypto MAP:
R3(config)#crypto map crymap 10 ipsec-isakmp
R3(config-crypto-map)#set peer 1.1.1.1
R3(config-crypto-map)#set transform-set transet
R3(config-crypto-map)#match address ***
E.tunnel接口应用MAP:
R3(config)#int tunnel 0
R3(config-if)#crypto map crymap