配置IPv4 over IPv6隧道示例

IPv4 over IPv6隧道:

在IPv4 Internet向IPv6 Internet过渡后期,IPv6网络被大量部署后,而IPv4网络只是散布在世界各地的一些孤岛。利用隧道技术可以在IPv6网络上创建隧道,从而实现IPv4孤岛的互联,IPv4孤岛能通过IPv6公网访问其他IPv4网络。

IPv4 over IPv6拓扑结构:

两个IPv4网络分别通过R1和R5与IPv6网络连接。IPv6网络的边界设备R2和R4支持IPv4和IPv6双协议栈。客户在R2和R4之间配置IPv4 over IPv6隧道,使物理分离的这两个IPv4网络可以互通

拓扑图

配置IPv4 over IPv6隧道示例_第1张图片

IPv4 over IPv6配置方法:

1、在两端IPv6网络边界路由器上配置IPv4-over-IPv6隧道

2、采用动态路由协议配置经过该隧道接口转发的路由

IPv4 over IPv6配置步骤:

1、配置IPv6网络的IPv6地址和IS-IS的IPv6特性,实现IPv6网络的IP连通性

[Huawei]sysname R2

[R2]ipv6

[R2]int g0/0/1

[R2-GigabitEthernet0/0/1]ipv6 enable

[R2-GigabitEthernet0/0/1]ipv6 address 2001::1 64

[R2]isis

[R2-isis-1]network-entity 10.0000.0000.0001.00

[R2-isis-1]ipv6 enable topology standard

[R2]int g0/0/1

[R2-GigabitEthernet0/0/1]isis ipv6 enable 1

[Huawei]sysname R3

[R3]ipv6

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]ipv6 enable

[R3-GigabitEthernet0/0/0]ipv6 address 2001::2 64

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]ipv6 enable

[R3-GigabitEthernet0/0/1]ipv6 address 2002::1 64

[R3]isis

[R3-isis-1]network-entity 10.0000.0000.0002.00

[R3-isis-1]ipv6 enable topology standard

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]isis ipv6 enable 1

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]isis ipv6 enable 1

[Huawei]sysname R4

[R4]ipv6

[R4]int g0/0/0

[R4-GigabitEthernet0/0/0]ipv6 enable

[R4-GigabitEthernet0/0/0]ipv6 address 2002::2 64

[R4]isis

[R4-isis-1]network-entity 10.0000.0000.0003.00

[R4-isis-1]ipv6 enable topology standard

[R4-isis-1]q

[R4]int g0/0/0

[R4-GigabitEthernet0/0/0]isis ipv6 enable 1

2、配置IPv4网络的IPv4地址和OSPF,实现IPv4网络的IP连通性

[Huawei]sysname R1

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ip add 10.1.12.1 24

[R1]ospf

[R1-ospf-1]area 0

[R1-ospf-1-area-0.0.0.0]network 10.1.12.1 0.0.0.0

[R2]int g0/0/0

[R2-GigabitEthernet0/0/0]ip add 10.1.12.2 24

[R2]ospf

[R2-ospf-1]area 0

[R2-ospf-1-area-0.0.0.0]network 10.1.12.2 0.0.0.0

[R4]int g0/0/1

[R4-GigabitEthernet0/0/1]ip add 10.1.45.4 24

[R4]ospf

[R4-ospf-1]area 0

[R4-ospf-1-area-0.0.0.0]network 10.1.45.4 0.0.0.0

[Huawei]sysname R5

[R5]int g0/0/0

[R5-GigabitEthernet0/0/0]ip add 10.1.45.5 24

[R5]ospf

[R5-ospf-1]area 0

[R5-ospf-1-area-0.0.0.0]network 10.1.45.5 0.0.0.0

3、配置tunnel接口

配置R2tunnel接口

[R2]interface Tunnel 0/0/1

[R2-Tunnel0/0/1]tunnel-protocol ipv4-ipv6

[R2-Tunnel0/0/1]ip add 10.1.24.2 24

[R2-Tunnel0/0/1]source g0/0/1

[R2-Tunnel0/0/1]destination 2002::2

配置R4tunnel接口

[R4]int Tunnel 0/0/1

[R4-Tunnel0/0/1]tunnel-protocol ipv4-ipv6

[R4-Tunnel0/0/1]ip add 10.1.24.4 24

[R4-Tunnel0/0/1]source g0/0/0

[R4-Tunnel0/0/1]destination 2001::1

配置隧道接口路由

[R2]ospf

[R2-ospf-1]area 0

[R2-ospf-1-area-0.0.0.0]network 10.1.24.2 0.0.0.0

[R4]ospf

[R4-ospf-1]area 0

[R4-ospf-1-area-0.0.0.0]network 10.1.24.4 0.0.0.0

4、测试连通性

在R2上查看学到的路由

[R2]dis ip routing-table protocol ospf

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Public routing table : OSPF

Destinations : 1 Routes : 1

OSPF routing table status :

Destinations : 1 Routes : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.1.45.0/24 OSPF 10 1563 D 10.1.24.4 Tunnel0/0/1

OSPF routing table status :

Destinations : 0 Routes : 0

在R1上pingR5测试

ping 10.1.45.5

PING 10.1.45.5: 56 data bytes, press CTRL_C to break

Reply from 10.1.45.5: bytes=56 Sequence=1 ttl=253 time=60 ms

Reply from 10.1.45.5: bytes=56 Sequence=2 ttl=253 time=50 ms

Reply from 10.1.45.5: bytes=56 Sequence=3 ttl=253 time=30 ms

Reply from 10.1.45.5: bytes=56 Sequence=4 ttl=253 time=30 ms

Reply from 10.1.45.5: bytes=56 Sequence=5 ttl=253 time=40 ms

你可能感兴趣的:(服务器,运维)