分享

多厂商***系列之十三:***综合实验分享

 印度阿三17 2021-03-13

一、拓扑

image001.png

一个小的综合实验,包括路由协议、tunnel、IPSEC等结合在一起。

二、配置


ROUTER 1
————————————————-


int lo0
ip add 1.1.1.1 255.255.255.0
no sh
int s1/0
clock rate 64000
ip add 15.1.1.1 255.255.255.0
no sh
router rip //rip 路由协议
ver 2
no au
net 15.1.1.0

int tun 1 // ***隧道1
ip add 12.1.1.1 255.255.255.0
tun sour s1/0
tun dest 25.1.1.2
router eigrp 100 //eigrp 路由协议
no au
net 1.1.1.0 0.0.0.255
net 12.1.1.0

crypto isakmp policy 10 //ipsec策略编号1-1000,号越小,优先级越高
hash md5 // 密钥认证的算法
authentication pre-share // 告诉路由使用预先共享的密钥
exit
crypto isakmp key cisco14 address 47.1.1.4 // 设置密钥cisco14 , 对端ip地址
crypto ipsec transform-set TOR4 esp-des esp-md5-hmac
// 设置test传输模式的名称。ah-md5-hamc esp-des表示传输模式中采用的验证和加密参数
crypto map IPSec*** 10 ipsec-isakmp
// 设置map的名字,10是策略的编号
set peer 47.1.1.4 // 设置对端的IP 地址
set transform-set TOR4 // IPSec传输模式的名字TOR4
match address 100 //映射匹配acl
exit
interface Serial1/0 //进入应用***的接口
crypto map IPSec*** //IPSec*** map的名字
exit
access-list 100 permit ip 1.1.1.0 0.0.0.255 4.4.4.0 0.0.0.255 // 定义哪些地址的报文加密或是不加密

int tun 0 // ***隧道0
ip add 13.1.1.1 255.255.255.0
tun sour s1/0
tun dest 37.1.1.3
router eigrp 100
no au
net 3.3.3.0 0.0.0.255
net 13.1.1.0

crypto isakmp policy 20
hash md5
authentication pre-share
exit
crypto isakmp key cisco13 address 37.1.1.3
crypto ipsec transform-set TOR3 esp-des esp-md5-hmac
crypto map IPSec*** 20 ipsec-isakmp
set peer 37.1.1.3
set transform-set TOR3
match address 150
exit
interface Serial1/0
crypto map IPSec***
exit
access-list 150 permit ip 1.1.1.0 0.0.0.255 3.3.3.0 0.0.0.255

ip route 0.0.0.0 0.0.0.0 5.5.5.5 //默认路由

conf t
wr

ROUTER 2
————————————————-
int lo0
ip add 2.2.2.2 255.255.255.0
no sh
int s1/0
ip add 25.1.1.2 255.255.255.0
clock rate 64000
no sh
int tun 1 // ***隧道1
ip add 12.1.1.2 255.255.255.0
tun sour s1/0
tun des 15.1.1.1
router rip //rip 路由协议
ver 2
no au
net 25.1.1.0
router eigrp 100 //eigrp 路由协议
no au
net 12.1.1.0
net 2.2.2.0 0.0.0.255

ROUTER 3
————————————————-
int lo0
ip add 3.3.3.3 255.255.255.0
no sh
int s1/0
ip add 37.1.1.3 255.255.255.0
no sh
router rip //rip 路由协议
ver 2
no au
net 37.1.1.0

int tun 0
ip add 13.1.1.3 255.255.255.0
tun sour s1/0
tun dest 15.1.1.1
exit
router eigrp 100 //eigrp 路由协议
no au
net 3.3.3.0 0.0.0.255
net 13.1.1.0

crypto isakmp policy 20
hash md5
authentication pre-share
exit
crypto isakmp key cisco13 address 15.1.1.1
crypto ipsec transform-set TOR1 esp-des esp-md5-hmac
crypto map IPSec*** 20 ipsec-isakmp
set peer 15.1.1.1
set transform-set TOR1
match address 150
exit
interface Serial1/0
crypto map IPSec***
exit
access-list 150 permit ip 1.1.1.0 0.0.0.255 3.3.3.0 0.0.0.255

ROUTER 4
————————————————-
int lo0
ip add 4.4.4.4 255.255.255.0
no sh
int s1/0
ip add 47.1.1.4 255.255.255.0
no sh
router rip //rip 路由协议
ver 2
no au
net 47.1.1.0

ip route 0.0.0.0 0.0.0.0 7.7.7.7 //默认路由

crypto isakmp policy 10
hash md5
authentication pre-share
exit
crypto isakmp key cisco14 address 15.1.1.1
crypto ipsec transform-set TOR1 esp-des esp-md5-hmac
crypto map IPSec*** 10 ipsec-isakmp
set peer 15.1.1.1
set transform-set TOR1
match address 100
exit
interface Serial1/0
crypto map IPSec***
exit
access-list 100 permit ip 1.1.1.0 0.0.0.255 4.4.4.0 0.0.0.255

ROUTER 5
————————————————-
interface Loopback0
ip address 5.5.5.5 255.255.255.0
int s1/0
ip add 15.1.1.5 255.255.255.0
no sh
int s1/1
ip add 25.1.1.5 255.255.255.0
no sh
int s1/2
ip add 56.1.1.5 255.255.255.0
clock rate 64000
no sh
router rip //rip 路由协议
ver 2
no au
net 15.1.1.0
net 25.1.1.0
net 56.1.1.0

ip route 0.0.0.0 0.0.0.0 1.1.1.1 //默认路由
ip route 0.0.0.0 0.0.0.0 6.6.6.6

ROUTER 6
————————————————-

interface Loopback0
ip address 6.6.6.6 255.255.255.0
int s1/0
ip add 56.1.1.6 255.255.255.0
no sh
int s1/1
ip add 67.1.1.6 255.255.255.0
clock rate 64000
no sh
router rip //rip 路由协议
ver 2
no au
net 56.1.1.0
net 67.1.1.0

ip route 0.0.0.0 0.0.0.0 5.5.5.5 //默认路由
ip route 0.0.0.0 0.0.0.0 7.7.7.7

ROUTER 7
————————————————-
interface Loopback0
ip address 7.7.7.7 255.255.255.0
int s1/0
ip add 67.1.1.7 255.255.255.0
no sh
int s1/1
ip add 37.1.1.7 255.255.255.0
clock rate 64000
no sh
int s1/2
ip add 47.1.1.7 255.255.255.0
clock rate 64000
no sh
router rip //rip 路由协议
ver 2
no au
net 67.1.1.0
net 37.1.1.0
net 47.1.1.0
ip route 0.0.0.0 0.0.0.0 6.6.6.6 //默认路由
ip route 0.0.0.0 0.0.0.0 4.4.4.4

三、验证

image002.jpg
image003.jpg
image004.jpg
image005.jpg

本文转载于公众号:网络之路博客

来源:https://www./content-4-890251.html

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多