日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

H3C MSR路由器GRE over IPv4典型配置案例

發布時間:2025/3/15 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 H3C MSR路由器GRE over IPv4典型配置案例 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一、?組網需求
??? 路由器H3C A和路由器H3C B之間通過Internet相連。兩個私有子網Group 1和Group 2,通過在兩臺路由器之間使用GRE建立隧道實現互聯。

二、組網拓撲圖如下
?


三、?配置步驟


在開始下面的配置之前,需確保H3C? A和H3C? B之間路由可達。

(1)配置路由器H3C A

# 配置接口Ethernet1/1。

<H3C A> system-view

[H3C A] interface ethernet 1/1

[H3C A-Ethernet1/1] ip address 10.1.1.1 255.255.255.0

[H3C A-Ethernet1/1] quit

# 配置接口Serial2/0(隧道的實際物理接口)。

[H3C A] interface serial 2/0

[H3C A-Serial2/0] ip address 1.1.1.1 255.255.255.0

[H3C A-Serial2/0] quit

# 創建Tunnel0接口。

[H3C A] interface tunnel 0

# 配置Tunnel0接口的IP地址。

[H3C A-Tunnel0] ip address 10.1.2.1 255.255.255.0

# 配置Tunnel封裝模式。

[H3C A-Tunnel0] tunnel-protocol gre

# 配置Tunnel0接口的源地址(Serial2/0的IP地址)。

[H3C A-Tunnel0] source 1.1.1.1

# 配置Tunnel0接口的目的地址(H3C ?B的Serial2/1的IP地址)。

[H3C A-Tunnel0] destination 2.2.2.2

[H3C A-Tunnel0] quit

# 配置從H3C A經過Tunnel0接口到Group 2的靜態路由。

[H3C A] ip route-static 10.1.3.0 255.255.255.0 tunnel 0

(2) 配置路由器H3C B

# 配置接口Ethernet1/1。

<H3C B> system-view

[H3C B] interface ethernet 1/1

[H3C B-Ethernet1/1] ip address 10.1.3.1 255.255.255.0

[H3C B-Ethernet1/1] quit

# 配置接口Serial2/1(隧道的實際物理接口)。

[H3C B] interface serial 2/1

[H3C B-Serial2/1] ip address 2.2.2.2 255.255.255.0

[H3C B-Serial2/1] quit

# 創建Tunnel0接口。

[H3C B] interface tunnel 0

# 配置Tunnel0接口的IP地址。

[H3C B-Tunnel0] ip address 10.1.2.2 255.255.255.0

# 配置Tunnel封裝模式。

[H3C B-Tunnel0] tunnel-protocol gre

# 配置Tunnel0接口的源地址(Serial2/1的IP地址)。

[H3C B-Tunnel0] source 2.2.2.2

# 配置Tunnel0接口的目的地址(H3C A的Serial2/0的IP地址)。

[H3C B-Tunnel0] destination 1.1.1.1

[H3C B-Tunnel0] quit

# 配置從H3C B經過Tunnel0接口到Group 1的靜態路由。

[H3C B] ip route-static 10.1.1.0 255.255.255.0 tunnel 0

四、驗證配置結果

完成以上配置后,分別查看H3C? A和H3C ?B的Tunnel接口狀態。

[H3C A] display interface tunnel 0

Tunnel0 current state: UP

Line protocol current state: UP

Description: Tunnel0 Interface

The Maximum Transmit Unit is 1476

Internet Address is 10.1.2.1/24 Primary

Encapsulation is TUNNEL, service-loopback-group ID not set.

Tunnel source 1.1.1.1, destination 2.2.2.2

Tunnel keepalive disabled

Tunnel protocol/transport GRE/IP

??? GRE key disabled

??? Checksumming of GRE packets disabled

Output queue : (Urgent queuing : Size/Length/Discards)? 0/100/0

Output queue : (Protocol queuing : Size/Length/Discards)? 0/500/0

Output queue : (FIFO queuing : Size/Length/Discards)? 0/75/0

Last clearing of counters:? Never

??? Last 300 seconds input:? 0 bytes/sec, 0 packets/sec

??? Last 300 seconds output:? 0 bytes/sec, 0 packets/sec

??? 10 packets input,? 840 bytes

??? 0 input error

??? 10 packets output,? 840 bytes

??? 0 output error

[H3C B] display interface tunnel 0

Tunnel0 current state: UP

Line protocol current state: UP

Description: Tunnel0 Interface

The Maximum Transmit Unit is 1476

Internet Address is 10.1.2.2/24 Primary

Encapsulation is TUNNEL, service-loopback-group ID not set.

Tunnel source 2.2.2.2, destination 1.1.1.1

Tunnel keepalive disabled

Tunnel protocol/transport GRE/IP

??? GRE key disabled

??? Checksumming of GRE packets disabled

Output queue : (Urgent queuing : Size/Length/Discards)? 0/100/0

Output queue : (Protocol queuing : Size/Length/Discards)? 0/500/0

Output queue : (FIFO queuing : Size/Length/Discards)? 0/75/0

Last clearing of counters:? Never

??? Last 300 seconds input:? 2 bytes/sec, 0 packets/sec

??? Last 300 seconds output:? 2 bytes/sec, 0 packets/sec

??? 10 packets input,? 840 bytes

??? 0 input error

??? 10 packets output,? 840 bytes

??? 0 output error

# 從H3C ?B可以Ping通H3C ?A上Ethernet1/1接口的地址。

[H3C B] ping 10.1.1.1

? PING 10.1.1.1: 56? data bytes, press CTRL_C to break

??? Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=255 time=2 ms

??? Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=255 time=2 ms

??? Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=255 time=2 ms

??? Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=255 time=2 ms

??? Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=255 time=2 ms

?

? --- 10.1.1.1 ping statistics ---

??? 5 packet(s) transmitted

??? 5 packet(s) received

??? 0.00% packet loss

??? round-trip min/avg/max = 2/2/2 ms

??? 好了,通過這個案例的配置,相信大家對H3C MSR路由器的GRE over IPv4應該比較熟悉了。歡迎交流!

總結

以上是生活随笔為你收集整理的H3C MSR路由器GRE over IPv4典型配置案例的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。