ipv6 综合实验

发布于:2023-01-22 ⋅ 阅读:(11) ⋅ 点赞:(0) ⋅ 评论:(0)

实验题目:

实验拓扑:

实验内容

先进行 ipv4部分

ipv4部分公网和是私网配置

私网

r1

[r1-LoopBack0]ip add 192.168.1.1 25
[r1-LoopBack1]ip add 192.168.1.129 25
[r1-GigabitEthernet0/0/1]ip add 192.168.0.1 30

[r1]ip route-static 0.0.0.0 0 192.168.0.2 

r2

公网部分:

[Huawei]sysname  r2
[r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
[r2]ip route-static 0.0.0.0 0 23.1.1.2
[r2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[r2-LoopBack0]ip add 192.168.2.1 24
[r2-GigabitEthernet0/0/0]ip add 192.168.0.2 30

私网
[r2-LoopBack0]ip add 192.168.2.1 24
[r2]ip route-static 192.168.1.0 24 192.168.0.1
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.0.0 0.0.255.255
[r2-GigabitEthernet0/0/1]nat outbound 2000

公网

r3:

[Huawei]sysname r3
[r3-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[r3-LoopBack0]ip add 3.3.3.3 24
[r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24

r4:

公网

[Huawei]sysname r4
[r4-GigabitEthernet0/0/0]ip add 34.1.1.1 24
[r4]ip route-static 0.0.0.0 0 23.1.1.1 

检验公网架设

 r1ping 通 r3 环回(公网)

接下来是ipv6部分

R1 R2间启用RIPNG协议

R1:

[r1]ripng 1
[r1-ripng-1]int lo0
[r1-LoopBack0]ripng 1 enable
[r1-LoopBack0]int lo1    
[r1-LoopBack1]ripng 1 enable 
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ripng 1 enable

R2:

[r2]ripng 1

[r2-ripng-1]int g 0/0/0

[r2-GigabitEthernet0/0/0]ripng 1 enable

[r2-GigabitEthernet0/0/0]int lo0

[r2-LoopBack0]ripng 1 enable

 配置tunnel

R2:

[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ipv6 enable  
[r2-Tunnel0/0/0]ipv6 address 2002:1701:0101:4::1 64       
[r2-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4 
[r2-Tunnel0/0/0]source 23.1.1.1
[r2]ipv6 route-static 2002:: 16 Tunnel 0/0/0

R4:

[r4]int t0/0/0
[r4-Tunnel0/0/0]ipv6 enable 
[r4-Tunnel0/0/0]ipv6 add 2002:1701:0101:4::2 64
[r4-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4 
[r4-Tunnel0/0/0]source 34.1.1.2

[r4]ipv6  route-static 2002:: 16 Tunnel 0/0/0

r2 和 r4使用隧道进行连接

 

配置R4-R8的IPV6地址

 

 

配置ospfv3

R5:

[r5]ospfv3 1
[r5-ospfv3-1]router-id 5.5.5.5
[r5-ospfv3-1]int lo0    
[r5-LoopBack0]ospfv3 1 area 0
[r5-LoopBack0]int g 0/0/1
[r5-GigabitEthernet0/0/1]ospfv3 1 area 0

R6:

[r6]ospfv3 1
[r6-ospfv3-1]router-id 6.6.6.6
[r6-ospfv3-1]int g 0/0/0    
[r6-GigabitEthernet0/0/0]ospfv3 1 area 0
[r6-GigabitEthernet0/0/0]int lo0    
[r6-LoopBack0]ospfv3 1 area 0
[r6-LoopBack0]int g 0/0/1
[r6-GigabitEthernet0/0/1]ospfv3 1 area 0

R7:

[r7]ospfv3 1     
[r7-ospfv3-1]router-id 7.7.7.7
[r7-ospfv3-1]int g 0/0/0    
[r7-GigabitEthernet0/0/0]ospfv3 1 area 0
[r7-GigabitEthernet0/0/0]int lo0    
[r7-LoopBack0]ospfv3 1 area 0
[r7-LoopBack0]int g 0/0/1    
[r7-GigabitEthernet0/0/1]ospfv3 1 area 0

R8:

[r8]ospfv3 1    
[r8-ospfv3-1]router-id 8.8.8.8
[r8-ospfv3-1]int g0/0/0
[r8-GigabitEthernet0/0/0]ospfv3 1 area 0
[r8-GigabitEthernet0/0/0]int lo0    
[r8-LoopBack0]ospfv3 1 area 0

启用bgp

R5:

[r5]bgp 64512

[r5-bgp]router-id 5.5.5.5

[r5-bgp]confederation id 2

[r5-bgp]peer 2002:2201:102:1::1 as-number 1

[r5-bgp]ipv6-family

[r5-bgp-af-ipv6]peer 2002:2201:102:1::1 enable

实验验证:

r1 ping r3 的环回

.

r1ping r4-r8的环回

 


网站公告

欢迎关注微信公众号

今日签到

点亮在社区的每一天
签到