H3C认证GRE典型配置案例

时间:2022-12-28 02:13:51 H3C认证 我要投稿
  • 相关推荐

H3C认证GRE典型配置案例

  本文为大家详细描述了路由器上配置GRE的基本方法和详细步骤,给出了一种GRE基本的配置案例。

H3C认证GRE典型配置案例

  1. 组网需求

  运行ip 协议的两个子网group1 和group2,通过在secpath1 和secpath2 之间使用三层隧道协议gre 实现互联。

  2. 组网图

  3. 配置步骤

  (1) 配置secpath1

  # 配置接口ethernet0/0/0。

  [h3c] interface ethernet 0/0/0

  [h3c-ethernet0/0/0] ip address 10.1.1.1 255.255.255.0

  [h3c-ethernet0/0/0] quit

  # 配置接口ethernet1/0/0(隧道的实际物理接口)。

  [h3c] interface ethernet 1/0/0

  [h3c-ethernet1/0/0] ip address 192.13.2.1 255.255.255.0

  [h3c-ethernet1/0/0] quit

  # 创建tunnel1 接口。

  [h3c] interface tunnel 1

  # 配置tunnel1 接口的ip 地址。

  [h3c-tunnel1] ip address 10.1.2.1 255.255.255.0

  # 配置tunnel 封装模式。

  [h3c-tunnel1] tunnel-protocol gre

  # 配置tunnel1 接口的源地址(ethernet1/0/0 的ip 地址)。

  [h3c-tunnel1] source 192.13.2.1

  # 配置tunnel1 接口的目的地址(secpath2 的ethernet2/0/1 的ip 地址)。

  [h3c-tunnel1] destination 131.108.5.2

  [h3c-tunnel1] quit

  # 配置从secpath1 经过tunnel1 接口到group2 的静态路由。

  [h3c] ip route-static 10.1.3.0 255.255.255.0 tunnel 1

  (2) 配置secpath2

  # 配置接口ethernet0/0/0。

  [h3c] interface ethernet 0/0/0

  [h3c-ethernet0/0/0] ip address 10.1.3.1 255.255.255.0

  [h3c-ethernet0/0/0] quit

  # 配置接口ethernet2/0/1(隧道的实际物理接口)。

  [h3c] interface ethernet 2/0/1

  [h3c-ethernet2/0/1] ip address 131.108.5.2 255.255.255.0

  [h3c-ethernet2/0/1] quit

  # 创建tunnel2 接口。

  [h3c] interface tunnel 2

  # 配置tunnel2 接口的ip 地址。

  [h3c-tunnel2] ip address 10.1.2.2 255.255.255.0

  # 配置tunnel 封装模式。

  [h3c-tunnel2] tunnel-protocol gre

  # 配置tunnel2 接口的源地址(ethernet2/0/1 的ip 地址)。

  [h3c-tunnel2] source 131.108.5.2

  # 配置tunnel2 接口的目的地址(secpath1 的ethernet1/0/0 的ip 地址)。

  [h3c-tunnel2] destination 192.13.2.1

  [h3c-tunnel2] quit

  # 配置从secpath2 经过tunnel2 接口到group1 的静态路由。

  [h3c] ip route-static 10.1.1.0 255.255.255.0 tunnel 2

  interface Tunnel0

  tunnel source 192.15.135.81

  tunnel destination 192.15.135.80

  tunnel key 0

  tunnel checksum

  用以上例子为例,假设本端路由器

  eth0:10.1.1.1/24(连接内部局域网)

  tunnel0:10.2.1.1/30(192.15.135.81----192.15.135.80)

  serial0:192.15.135.81/24(连接Internet)

  ip route 10.3.1.0 255.255.255.0 10.2.1.2

  对端路由器

  eth0:10.3.1.1/24(连接内部局域网)

  tunnel0:10.2.1.2/30(192.15.135.80----192.15.135.81)

  serial0:192.15.135.80/24(连接Internet)

  ip route 10.1.1.0 255.255.255.0 10.2.1.1

  本端局域网里的主机10.1.1.2发一个报文给10.3.1.2:报文为{SA:10.1.12,DA:10.3.1.2}

  首先该报文会发给PC网关,即“本端路由器”,路由器根据目的地址路由,发现需要从tunnel0口发出,做GRE封装后,报文为{SA:192.15.135.81,DA:192.15.135.80,{原来报文}},然后实际上从Serial0口发出,经过Internet上的N个路由器后到达“对端路由器”,路由器解开GRE封装恢复原来报文,再从eth0口发出去。

【H3C认证GRE典型配置案例】相关文章:

思科认证QOS配置案例06-21

基于端口的VLAN典型配置「案例」05-12

H3C交换机简单配置案例08-11

2016年H3C交换机简单配置案例05-20

H3C防火墙2区域配置案例06-20

h3c交换机配置telnet配置教程09-23

H3C认证考试说明06-05

关于H3C认证考试06-05

H3C认证模拟试题08-29