侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

L2 GRE LINE

2023-01-26 星期四 / 0 评论 / 0 点赞 / 67 阅读 / 6527 字

一、组网需求  两个数据中心之间通过IP核心网进行二层互联二、组网拓扑三、配置要点  在交换机上配置好VLAN, 略 在交换机配置IPv4单播路由协议(如OSPF),保证单播路由可达。略  创建L2G

.

一、组网需求

  两个数据中心之间通过IP核心网进行二层互联

二、组网拓扑

三、配置要点

 

  在交换机上配置好VLAN, 略

      在交换机配置IPv4单播路由协议(如OSPF),保证单播路由可达。略

  创建L2GRE实例

  配置L2GRE实例本端地址,对端地址

  配置L2GRE实例允许转发的VLAN

  配置保活功能(可选)

 

      注意:保活功能是对实例的对端地址进行检测(也就是邻居检测),配置之后,通过syslog将邻居状态的提示打印到控制台。例如:

   %L2GRE-6-KEEPALIVE: L2GRE instance ×××ID[4000] Source[3.1.1.1] to Destination[4.1.1.1] keepalive is down.

   %L2GRE-6-KEEPALIVE: L2GRE instance ×××ID[4000] Source[3.1.1.1] to Destination[4.1.1.1] keepalive is up.

   建议开启保活功能。

 

  

四、配置步骤

  配置数据中心交换机A

  A#conf t

  A(config)# l2 gre ***-l2gre id 100 type line   ---->配置L2GRE实例

  A(config-l2gre-line-100)# source interface gi1/1   ---->配置实例本端地址/接口

  A(config-l2gre-line-100)# destination 2.2.2.2   ---->配置实例对端地址

  A(config-l2gre-line-100)# extend-vlan add 100   ---->配置L2GRE实例允许转发的VLAN

  A(config-l2gre-line-100)# keepalive 60 3   ---->配置保活功能(可选)

  A(config-l2gre-line-100)# end

  A(config)#

 

  配置数据中心交换机B   ---->同数据中心交换机A

  B#conf t

  B(config)# l2 gre ***-l2gre id 100 type line

  B(config-l2gre-line-100)# source interface gi1/1

  B(config-l2gre-line-100)# destination 1.1.1.1

  B(config-l2gre-line-100)# extend-vlan add 100

  B(config-l2gre-line-100)# keepalive 60 3

  B(config-l2gre-line-100)# end

  B(config)#

 

五、功能验证

  1、查看数据中心交换机A L2 GRE实例明细

  A#  show l2 gre ***-l2gre

          name: ***-l2gre    id: 100  type: l2gre-line

              source: 1.1.1.1

              destnation: 2.2.2.2

              extend-vlan: 100

              tunnel ttl: 64

  Keepalive set (60 sec), retries 3

  

  2、查看数据中心交换机B L2 GRE实例明细

  B#  show l2 gre ***-l2gre

              name: ***-l2gre    id: 100  type: l2gre-line

              source: 2.2.2.2

              destnation: 1.1.1.1

              extend-vlan: 100

       tunnel ttl: 64

       Keepalive set (60 sec), retries 3

  

  3、HOSTA与HOSTB间正常互访

 

  4、数据中心交换机可正常学习,二层网络中的MAC地址

  A# show l2 gre ***-l2gre mac

  MAC Address      Destination Address     Type  Interface                  

  14fe.b5e1.0890   2.2.2.2                        D     --            ---->同数据中心交换机B下联服务器MAC                                                       

  14fe.b5e1.0970   --                            D     Gi1/2  



.

广告 广告

评论区