ipv6实验

该配置案例展示了如何在多个路由器上设置IPv6,包括地址分配、路由协议(RIPng, OSPFv3)、隧道技术以及BGP配置,以实现IPv6网络之间的互通。配置涉及ACL、NAT、路由静态宣告以及安全和性能设置。
摘要由CSDN通过智能技术生成

实现ipv6之间可以互通
在这里插入图片描述


R1
sysname R1
#
ipv6 
#                                    
interface GigabitEthernet0/0/0            
 ipv6 enable                              
 ip address 192.168.1.1 255.255.255.0     
 ipv6 address 12::1/64                    
 ripng 1 enable                           
#                                                                                 
interface LoopBack0                       
 ip address 192.168.10.1 255.255.255.0    
#                                         
interface LoopBack1                       
 ipv6 enable                              
 ipv6 address 1::1/64                     
 ripng 1 enable                           
#                                         
ripng 1                                   
#                                         
ip route-static 0.0.0.0 0.0.0.0 192.168.1.2
#                                         
ipv6 route-static :: 0 12::2





R2
sysname R2
#
ipv6 
#
acl number 2000  
 rule 5 permit source 192.168.0.0 0.0.255.255 
#                          
 domain default_admin                     
 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
 local-user admin service-type http       
#                                         
                                      
interface GigabitEthernet0/0/0            
 ip address 23.1.1.1 255.255.255.0        
 nat outbound 2000                        
#                                         
interface GigabitEthernet0/0/1            
 ipv6 enable                              
 ip address 192.168.1.2 255.255.255.0     
 ipv6 address 12::2/64                    
 ipv6 address 1122::2/64                  
 ripng 1 enable                           
#                                                                                
interface LoopBack0                       
 ipv6 enable                              
 ipv6 address 2::1/64                     
 ripng 1 enable                           
#                                         
interface Tunnel0/0/0                     
 description 34.1.1.2                     
 ipv6 enable                              
 ipv6 address 10::1/64                    
 ripng 1 enable                           
 tunnel-protocol ipv6-ipv4                
 source 23.1.1.1                          
#                                         
rip 1                                     
#                                         
rip 2                                     
 undo summary                             
 version 2                                
 network 23.0.0.0                         
#                                         
ripng 1                                   
#                                         
ip route-static 0.0.0.0 0.0.0.0 23.1.1.2  
ip route-static 192.168.10.0 255.255.255.0 192.168.1.1
#                                         
ipv6 route-static :: 0 Tunnel0/0/0





R3
#
 sysname R3
                                  
interface GigabitEthernet0/0/0            
 ip address 34.1.1.1 255.255.255.0        
#                                         
interface GigabitEthernet0/0/1            
 ip address 23.1.1.2 255.255.255.0        
#                                                                               
interface LoopBack0                       
 ip address 3.3.3.3 255.255.255.0         
#                                         
rip 1                                     
 undo summary                             
 version 2                                
 network 23.0.0.0                         
 network 34.0.0.0                         
 network 3.0.0.0





R4
sysname R4
#
ipv6 
#                                        
interface GigabitEthernet0/0/0            
 ipv6 enable                              
 ipv6 address 45::1/64                    
#                                         
interface GigabitEthernet0/0/1            
 ip address 34.1.1.2 255.255.255.0        
#                                                                                
interface LoopBack0                       
 ipv6 enable                              
 ipv6 address 4::1/64                     
#                                         
interface Tunnel0/0/0                     
 description 23.1.1.1                     
 ipv6 enable                              
 ipv6 address 10::2/64                    
 tunnel-protocol ipv6-ipv4                
 source 34.1.1.2                          
#                                         
bgp 1                                     
 router-id 4.4.4.4                        
 peer 5::1 as-number 2                    
 peer 5::1 ebgp-max-hop 2                 
 peer 5::1 connect-interface LoopBack0    
 #                                        
 ipv4-family unicast                      
  undo synchronization                    
 #                                        
 ipv6-family unicast                      
  undo synchronization                    
  default-route imported                  
  network 4:: 64                          
  network 45:: 64                         
  import-route static                     
  peer 5::1 enable                        
  peer 5::1 next-hop-local                
#                                         
rip 1                                     
 undo summary                             
 version 2                                
 network 34.0.0.0                         
#                                         
ipv6 route-static :: 0 Tunnel0/0/0        
ipv6 route-static :: 0 10::1              
ipv6 route-static 5:: 64 45::2






R5
sysname R5
#
ipv6 
#                                       
ospfv3 1                                  
 router-id 5.5.5.5                                                    
#                                         
interface GigabitEthernet0/0/0            
 ipv6 enable                              
 ipv6 address 56::1/64                    
 ospfv3 1 area 0.0.0.0                    
#                                         
interface GigabitEthernet0/0/1            
 ipv6 enable                              
 ipv6 address 45::2/64                    
#                                                                               
interface LoopBack0                       
 ipv6 enable                              
 ipv6 address 5::1/64                     
 ospfv3 1 area 0.0.0.0                    
#                                         
bgp 64512                                 
 router-id 5.5.5.5                        
 confederation id 2                       
 peer 4::1 as-number 1                    
 peer 4::1 ebgp-max-hop 2                 
 peer 4::1 connect-interface LoopBack0    
 peer 6::1 as-number 64512                
 peer 6::1 connect-interface LoopBack0    
 #                                        
 ipv4-family unicast                      
  undo synchronization                    
 #                                        
 ipv6-family unicast                      
  undo synchronization                    
  import-route ospfv3 1                   
  peer 4::1 enable                        
  peer 6::1 enable                        
  peer 6::1 next-hop-local                
#                                         
ipv6 route-static 4:: 64 45::1





R6
sysname R6
#
ipv6 
#                                      
ospfv3 1                                  
 router-id 6.6.6.6                        
#                                         
firewall zone Local                       
 priority 15                              
#                                         
interface GigabitEthernet0/0/0            
 ipv6 enable                              
 ipv6 address 67::1/64                    
 ospfv3 1 area 0.0.0.0                    
#                                         
interface GigabitEthernet0/0/1            
 ipv6 enable                              
 ipv6 address 56::2/64                    
 ospfv3 1 area 0.0.0.0                    
#                                                                                  
interface LoopBack0                       
 ipv6 enable                              
 ipv6 address 6::1/64                     
 ospfv3 1 area 0.0.0.0                    
#                                         
bgp 64512                                 
 router-id 6.6.6.6                        
 confederation id 2                       
 peer 5::1 as-number 64512                
 peer 5::1 connect-interface LoopBack0    
 peer 7::1 as-number 64512                
 peer 7::1 connect-interface LoopBack0    
 #                                        
 ipv4-family unicast                      
  undo synchronization                    
 #                                        
 ipv6-family unicast                      
  undo synchronization                    
  peer 5::1 enable                        
  peer 5::1 reflect-client                
  peer 7::1 enable  






R7
sysname R7
#
ipv6 
#
 set cpu-usage threshold 80 restore 75
#                                       
ospfv3 1                                  
 router-id 7.7.7.7                        
#                                         
firewall zone Local                       
 priority 15                              
#                                         
interface GigabitEthernet0/0/0            
 ipv6 enable                              
 ipv6 address 78::1/64                    
 ospfv3 1 area 0.0.0.0                    
#                                         
interface GigabitEthernet0/0/1            
 ipv6 enable                              
 ipv6 address 67::2/64                    
 ospfv3 1 area 0.0.0.0                    
#                                                                                
interface LoopBack0                       
 ipv6 enable                              
 ipv6 address 7::1/64                     
 ospfv3 1 area 0.0.0.0                    
#                                         
bgp 64512                                 
 router-id 7.7.7.7                        
 confederation id 2                       
 confederation peer-as 64513              
 peer 6::1 as-number 64512                
 peer 6::1 connect-interface LoopBack0    
 peer 8::1 as-number 64513                
 peer 8::1 ebgp-max-hop 2                 
 peer 8::1 connect-interface LoopBack0    
 #                                        
 ipv4-family unicast                      
  undo synchronization                    
 #                                        
 ipv6-family unicast                      
  undo synchronization                    
  default-route imported                  
  peer 6::1 enable                        
  peer 8::1 enable
R8
sysname R8
#
ipv6 
#
                                      
ospfv3 1                                  
 router-id 8.8.8.8                        
#                                                                                 
interface GigabitEthernet0/0/1            
 ipv6 enable                              
 ipv6 address 78::2/64                    
 ospfv3 1 area 0.0.0.0                    
#                                                                                  
interface LoopBack0                       
 ipv6 enable                              
 ipv6 address 8::1/64                     
 ospfv3 1 area 0.0.0.0                    
#                                         
bgp 64513                                 
 router-id 8.8.8.8                        
 confederation id 2                       
 confederation peer-as 64512              
 peer 7::1 as-number 64512                
 peer 7::1 ebgp-max-hop 2                 
 peer 7::1 connect-interface LoopBack0    
 #                                        
 ipv4-family unicast                      
  undo synchronization                    
 #                                        
 ipv6-family unicast                      
  undo synchronization                    
  peer 7::1 enable


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小时候不乖的

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值