eigrp tunnel 联合建网

一个红圆圈是一个mgre

距离矢量型路由协议时关闭水平分割,(关自动下一跳(可选))

no ip split-horizon eigrp 1

no ip next-hop-self eigrp 1

使用来下层分支通过公网直接通信

ip nhrp shortcut 启动nhrp的最短路径查找 (不再做隧道口映射,查目标公网口的映射)

ip nhrp redirect  启动nhrp的中转(重定向)

效果

R5 traceroute R4

第一次流量触发

流量出发后 直接通过公网一跳到达

  

R1

interface Loopback0
 ip address 10.0.1.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.0.1 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map multicast dynamic
 ip nhrp network-id 100
 ip nhrp redirect
 ip summary-address eigrp 1 10.0.0.0 255.255.0.0 5
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
!
interface Ethernet1/0
 ip address 19.0.0.1 255.255.255.0
 duplex half

router eigrp 1
 network 10.0.1.1 0.0.0.0
 network 192.168.0.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0
no ip http server
no ip http secure-server

R2

!
interface Loopback0
 ip address 10.0.2.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.0.2 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map 192.168.0.1 19.0.0.1
 ip nhrp map multicast 19.0.0.1
 ip nhrp network-id 100
 ip nhrp nhs 192.168.0.1
 ip nhrp shortcut
 ip nhrp redirect
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
!
interface Tunnel1
 ip address 192.168.1.1 255.255.255.0
 no ip redirects
 no ip next-hop-self eigrp 1
 ip nhrp authentication xiaobai
 ip nhrp map multicast dynamic
 ip nhrp network-id 100
 ip nhrp redirect
 no ip split-horizon eigrp 1
 tunnel source Ethernet1/1
 tunnel mode gre multipoint
 tunnel key 1
interface Ethernet1/0
 ip address 29.0.0.1 255.255.255.0
 duplex half
!
interface Ethernet1/1
 ip address 28.0.0.1 255.255.255.0
 duplex half
!
router eigrp 1
 network 10.0.2.1 0.0.0.0
 network 192.168.0.0
 network 192.168.1.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0
ip route 58.0.0.0 255.255.255.0 Ethernet1/1
ip route 78.0.0.0 255.255.255.0 Ethernet1/1

R3

interface Loopback0
 ip address 10.0.3.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.0.3 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map 192.168.0.1 19.0.0.1
 ip nhrp map multicast 19.0.0.1
 ip nhrp network-id 100
 ip nhrp nhs 192.168.0.1
 ip nhrp shortcut
 ip nhrp redirect
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
!
interface Tunnel1
 ip address 192.168.2.1 255.255.255.0
 no ip redirects
 no ip next-hop-self eigrp 1
 ip nhrp authentication xiaobai
 ip nhrp map multicast dynamic
 ip nhrp network-id 100
 ip nhrp redirect
 no ip split-horizon eigrp 1
 tunnel source Ethernet1/1
 tunnel mode gre multipoint
 tunnel key 1
interface Ethernet1/0
 ip address 39.0.0.1 255.255.255.0
 duplex half
!
interface Ethernet1/1
 ip address 103.0.0.1 255.255.255.0
 duplex half
router eigrp 1
 network 10.0.3.1 0.0.0.0
 network 192.168.0.0
 network 192.168.2.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0
ip route 104.0.0.0 255.255.255.0 Ethernet1/1
ip route 106.0.0.0 255.255.255.0 Ethernet1/1

R4

interface Loopback0
 ip address 10.0.4.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.2.2 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map 192.168.2.1 103.0.0.1
 ip nhrp map multicast 103.0.0.1
 ip nhrp network-id 100
 ip nhrp nhs 192.168.2.1
 ip nhrp shortcut
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
interface Ethernet1/0
 ip address 104.0.0.1 255.255.255.0
 duplex half
router eigrp 1
 network 10.0.4.0 0.0.0.255
 network 192.168.2.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0
no ip http server

R5

!
interface Loopback0
 ip address 10.0.5.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.1.2 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map 192.168.1.1 28.0.0.1
 ip nhrp map multicast 28.0.0.1
 ip nhrp network-id 100
 ip nhrp nhs 192.168.1.1
 ip nhrp shortcut
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
interface Ethernet1/0
 ip address 58.0.0.1 255.255.255.0
router eigrp 1
 network 10.0.5.1 0.0.0.0
 network 192.168.1.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0
no ip http server

R6

!
interface Loopback0
 ip address 10.0.6.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.2.3 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map 192.168.2.1 103.0.0.1
 ip nhrp map multicast 103.0.0.1
 ip nhrp network-id 100
 ip nhrp nhs 192.168.2.1
 ip nhrp shortcut
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
!
interface Ethernet1/0
 ip address 106.0.0.1 255.255.255.0
 duplex half
router eigrp 1
 network 10.0.6.1 0.0.0.0
 network 192.168.1.0
 network 192.168.2.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0

R7

interface Loopback0
 ip address 10.0.7.1 255.255.255.255
!
interface Tunnel0
 ip address 192.168.1.3 255.255.255.0
 no ip redirects
 ip nhrp authentication xiaobai
 ip nhrp map 192.168.1.1 28.0.0.1
 ip nhrp map multicast 28.0.0.1
 ip nhrp network-id 100
 ip nhrp nhs 192.168.1.1
 ip nhrp shortcut
 tunnel source Ethernet1/0
 tunnel mode gre multipoint
 tunnel key 1
interface Ethernet1/0
 ip address 78.0.0.1 255.255.255.0
 duplex half

router eigrp 1
 network 10.0.7.1 0.0.0.0
 network 192.168.1.0
 no auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Ethernet1/0

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值