GRE配置
R1配置 interface Loopback1 ip address 192.168.3.1 255.255.255.0 ip ospf network point-to-point interface Loopback2 ip address 192.168.4.1 255.255.255.0 ip ospf network point-to-point interface Tunnel 1 //创建GRE Tunnel 1 ip address 192.168.0.1 255.255.255.0 //配置ip与对端在一个子网即 tunnel source 202.100.1.1 //本地出口地址 tunnel destination 202.100.2.3 //对端公网地址 interface FastEthernet0/0 ip address 202.100.1.1 255.255.255.0 router ospf 110 router-id 192.168.0.1 log-adjacency-changes network 192.168.0.1 0.0.0.0 area 0 network 192.168.3.1 0.0.0.0 area 0 network 192.168.4.1 0.0.0.0 area 0 ip route 0.0.0.0 0.0.0.0 202.100.1.2 | R3配置 interface Loopback1 ip address 192.168.5.1 255.255.255.0 ip ospf network point-to-point interface Loopback2 ip address 192.168.6.1 255.255.255.0 ip ospf network point-to-point interface Tunnel1 //创建GRE Tunnel 1 ip address 192.168.0.2 255.255.255.0 //配置ip与对端在一个子网即可 tunnel source 202.100.2.3 //本地出口地址 tunnel destination 202.100.1.1 //对端公网地址 interface FastEthernet0/0 ip address 202.100.2.3 255.255.255.0 router ospf 110 router-id 192.168.0.2 log-adjacency-changes network 192.168.0.2 0.0.0.0 area 0 network 192.168.5.1 0.0.0.0 area 0 network 192.168.6.1 0.0.0.0 area 0 ip route 0.0.0.0 0.0.0.0 202.100.2.2 |
GRE OVER IPSEC配置
R1配置 crypto isakmp policy 10 encr 3des authentication pre-share group 2 crypto isakmp key cisco address 202.100.2.3 crypto ipsec transform-set gre esp-des esp-md5-hmac mode transport crypto ipsec profile gre-ipsec set transform-set gre interface Loopback1 ip address 192.168.3.1 255.255.255.0 ip ospf network point-to-point interface Loopback2 ip address 192.168.4.1 255.255.255.0 ip ospf network point-to-point interface Tunnel1 ip address 192.168.0.1 255.255.255.0 tunnel source 202.100.1.1 tunnel destination 202.100.2.3 tunnel protection ipsec profile gre-ipsec interface FastEthernet0/0 ip address 202.100.1.1 255.255.255.0 router ospf 110 router-id 192.168.0.1 log-adjacency-changes network 192.168.0.1 0.0.0.0 area 0 network 192.168.3.1 0.0.0.0 area 0 network 192.168.4.1 0.0.0.0 area 0 ip route 0.0.0.0 0.0.0.0 202.100.1.2 | R3配置 crypto isakmp policy 10 encr 3des authentication pre-share group 2 crypto isakmp key cisco address 202.100.1.1 crypto ipsec transform-set gre esp-des esp-md5-hmac mode transport crypto ipsec profile gre-ipsec set transform-set gre interface Loopback1 ip address 192.168.5.1 255.255.255.0 ip ospf network point-to-point interface Loopback2 ip address 192.168.6.1 255.255.255.0 ip ospf network point-to-point interface Tunnel1 ip address 192.168.0.2 255.255.255.0 tunnel source 202.100.2.3 tunnel destination 202.100.1.1 tunnel protection ipsec profile gre-ipsec interface FastEthernet0/0 ip address 202.100.2.3 255.255.255.0 router ospf 110 router-id 192.168.0.2 log-adjacency-changes network 192.168.0.2 0.0.0.0 area 0 network 192.168.5.1 0.0.0.0 area 0 network 192.168.6.1 0.0.0.0 area 0 ip route 0.0.0.0 0.0.0.0 202.100.2.2 |
show crypto engine connection active //查看***信息
转载于:https://blog.51cto.com/baigp/1301489