使用GRE隧道实现IPv4和IPv6通信配置

1.网络拓扑图
链接:https://pan.baidu.com/s/1sSjeFDxq3nw_DR2L2u2xuA
提取码:8888
eNSP
链接:https://pan.baidu.com/s/1wP0vHim4yqVV0bc0wmzhFw
提取码:8888
在这里插入图片描述
2.网络需求
通过配置GRE隧道跨过IPv4网络把IPv6网络连起来,实现PC1和PC2相互通信。

3.配置
3.1、R1的配置
display current-configuration
[V200R003C00]

sysname R1

snmp-agent local-engineid 800007DB03000000000000
snmp-agent

clock timezone China-Standard-Time minus 08:00:00

portal local-server load flash:/portalpage.zip

drop illegal-mac alarm

ipv6

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher % % K8m.Nt84DZ}e#<0`8bmE3Uw}% %
local-user admin service-type http

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0

interface GigabitEthernet0/0/1

interface GigabitEthernet0/0/2
ipv6 enable
ipv6 address 2001::1/64

interface NULL0

interface Tunnel0/0/0
ipv6 enable
ip address 192.168.1.1 255.255.255.0
ipv6 address 2003::1/64
tunnel-protocol gre
source GigabitEthernet0/0/0
destination 23.1.1.2

ospf 1 router-id 12.1.1.1
area 0.0.0.0
network 12.1.1.0 0.0.0.255

ip route-static 0.0.0.0 0.0.0.0 Tunnel0/0/0

ipv6 route-static 2002:: 64 Tunnel0/0/0

user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20

wlan ac

return
3.2、R2的配置
display current-configuration
[V200R003C00]

sysname R2

snmp-agent local-engineid 800007DB03000000000000
snmp-agent

clock timezone China-Standard-Time minus 08:00:00

portal local-server load flash:/portalpage.zip

drop illegal-mac alarm

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher % % K8m.Nt84DZ}e#<0`8bmE3Uw}% %
local-user admin service-type http

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0

interface GigabitEthernet0/0/1
ip address 23.1.1.1 255.255.255.0

interface GigabitEthernet0/0/2

interface NULL0

ospf 1 router-id 23.1.1.1
area 0.0.0.0
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255

user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20

wlan ac

return
3.3、R3的配置
display current-configuration
[V200R003C00]

sysname R3

snmp-agent local-engineid 800007DB03000000000000
snmp-agent

clock timezone China-Standard-Time minus 08:00:00

portal local-server load flash:/portalpage.zip

drop illegal-mac alarm

ipv6

wlan ac-global carrier id other ac id 0

set cpu-usage threshold 80 restore 75

aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher % % K8m.Nt84DZ}e#<0`8bmE3Uw}% %
local-user admin service-type http

firewall zone Local
priority 15

interface GigabitEthernet0/0/0
ip address 23.1.1.2 255.255.255.0

interface GigabitEthernet0/0/1

interface GigabitEthernet0/0/2
ipv6 enable
ipv6 address 2002::1/64

interface NULL0

interface Tunnel0/0/0
ipv6 enable
ip address 192.168.1.2 255.255.255.0
ipv6 address 2003::2/64
tunnel-protocol gre
source GigabitEthernet0/0/0
destination 12.1.1.1

ospf 1 router-id 23.1.1.2
area 0.0.0.0
network 23.1.1.0 0.0.0.255

ip route-static 0.0.0.0 0.0.0.0 Tunnel0/0/0

ipv6 route-static 2001:: 64 Tunnel0/0/0

user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20

wlan ac

return

4.测试PC1和PC2的通信情况
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_41235506/article/details/109694459