配置流程
1)全网需要连通IPV6
2)需要通信接口必须配置ipv4和ipv6地址
int g0/0/0
ipv6 enable
ipv6 address auto link-local
ipv6 address 2023:19::1 64
ip address 10.1.1.1 24
对端接口同理
3)建立ipv4 over ipv6隧道
int tunnel 0/0/12 //0/0/012是隧道号码
tunnel-protocol ipv4-ipv6
source 2023:79::1 //隧道本端的ip地址
destination 2023:810::1 //隧道对端的ip地址
ip add 12.1.1.1 24 //本端口设置的地址
对端接口同理
4)配置放完的静态路由
ip route-static 20.1.1.0 24 tunnel 0/0/12 12.1.1.2
对端接口同理
完整配置内容
R1:
<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
#
ospfv3 100
router-id 1.1.1.1
import-route direct
import-route static
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2023:12::1/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.2
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2023:17::1/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ipv6 enable
ipv6 address 2023:1::1/128
ipv6 address auto link-local
ospfv3 100 area 0.0.0.2
#
ipv6 route-static 2023:79:: 64 GigabitEthernet0/0/1 2023:17::7
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r1>
R2:
<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
#
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
#
ospfv3 100
router-id 2.2.2.2
area 0.0.0.1
vlink-peer 4.4.4.4
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2023:12::2/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.2
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2023:23::2/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ipv6 enable
ipv6 address 2023:2::2/128
ipv6 address auto link-local
ospfv3 100 area 0.0.0.2
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r2>
R3:
<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
#
ospfv3 100
router-id 3.3.3.3
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2023:23::3/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.1
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2023:34::3/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ipv6 enable
ipv6 address 2023:3::3/128
ipv6 address auto link-local
ospfv3 100 area 0.0.0.1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r3>
R4:
<r4>display current-configuration
[V200R003C00]
#
sysname r4
#
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
#
ospfv3 100
router-id 4.4.4.4
area 0.0.0.1
vlink-peer 2.2.2.2
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2023:34::4/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.1
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2023:45::4/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ipv6 enable
ipv6 address 2023:4::4/128
ipv6 address auto link-local
ospfv3 100 area 0.0.0.0
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r4>
R5:
<r5>display current-configuration
[V200R003C00]
#
sysname r5
#
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
#
ospfv3 100
router-id 5.5.5.5
import-route direct
import-route static
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2023:45::5/64
ipv6 address auto link-local
ospfv3 100 area 0.0.0.0
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2023:58::5/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
ipv6 enable
ipv6 address 2023:5::5/128
ipv6 address auto link-local
ospfv3 100 area 0.0.0.0
#
ipv6 route-static 2023:810:: 64 GigabitEthernet0/0/1 2023:58::8
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r5>
R7:
<r7>display current-configuration
[V200R003C00]
#
sysname r7
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
ipv6
#
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
ipv6 enable
ipv6 address 2023:17::7/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/1
ipv6 enable
ip address 10.1.1.1 255.255.255.0
ipv6 address 2023:79::7/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/12
ip address 12.1.1.1 255.255.255.0
tunnel-protocol ipv4-ipv6
source 2023:79::7
destination 2023:810::8
#
ip route-static 20.1.1.0 255.255.255.0 Tunnel0/0/12 12.1.1.2
#
ipv6 route-static :: 0 GigabitEthernet0/0/0 2023:17::1
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r7>
R8:
<r8>display current-configuration
[V200R003C00]
#
sysname r8
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
ipv6
#
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
ipv6 enable
ipv6 address 2023:58::8/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/1
ipv6 enable
ip address 20.1.1.1 255.255.255.0
ipv6 address 2023:810::8/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface Tunnel0/0/12
ip address 12.1.1.2 255.255.255.0
tunnel-protocol ipv4-ipv6
source 2023:810::8
destination 2023:79::7
#
ip route-static 10.1.1.0 255.255.255.0 Tunnel0/0/12 12.1.1.1
#
ipv6 route-static :: 0 GigabitEthernet0/0/0 2023:58::5
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<r8>
R9:
<pc1>display current-configuration
[V200R003C00]
#
sysname pc1
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
ipv6
#
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
ipv6 enable
ip address 10.1.1.9 255.255.255.0
ipv6 address 2023:79::9/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 10.1.1.1
#
ipv6 route-static :: 0 GigabitEthernet0/0/0 2023:79::7
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<pc1>
R10
<pc2>display current-configuration
[V200R003C00]
#
sysname pc2
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
ipv6
#
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
ipv6 enable
ip address 20.1.1.10 255.255.255.0
ipv6 address 2023:810::10/64
ipv6 address auto link-local
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 20.1.1.1
#
ipv6 route-static :: 0 GigabitEthernet0/0/0 2023:810::8
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<pc2>