IPV6简单运用

1.合理规划地址

 R10和R11使用91.1.1.1化成IPV6网段2002:5b01:0101::/48使用

 ipv4地址29.1.1.1化成ipv6网段2002:1D01:0101:: /48使用

2.R1R2R9R10R11互通

R1配置
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ip address 12.1.1.1 255.255.255.0 
 ipv6 address 2002:1D01:101:1::1/64 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
#
interface LoopBack1
 ipv6 enable 
 ipv6 address 1::1/64 
#
ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
#
ipv6 route-static :: 0 2002:1D01:101:1::2 
#
R2配置
acl number 2000  
 rule 5 permit 
#
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ip address 12.1.1.2 255.255.255.0 
 ipv6 address 2002:1D01:101:1::2/64 
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ipv6 address 2002:1D01:101:2::1/64 
#
interface GigabitEthernet0/0/2
 ip address 29.1.1.1 255.255.255.0 
 nat outbound 2000
#
interface NULL0
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
#
interface LoopBack1
 ipv6 enable 
 ipv6 address 2::2/64 
#
interface Tunnel0/0/2
 ipv6 enable 
 ipv6 address 2002:1D01:101::1/64 
 tunnel-protocol ipv6-ipv4
 source GigabitEthernet0/0/2
 destination 91.1.1.2
#
ip route-static 0.0.0.0 0.0.0.0 29.1.1.2
#
ipv6 route-static :: 0 Tunnel0/0/2 
#
R9配置
interface GigabitEthernet0/0/0
 ip address 29.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 91.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 9.9.9.9 255.255.255.255 
#
R10配置
interface GigabitEthernet0/0/0
 ip address 91.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ipv6 address 2002:5B01:101::1/64 
 ripng 1 enable
 ripng default-route originate 
#
interface LoopBack0
 ipv6 enable 
 ipv6 address 10::10/64 
 ripng 1 enable
#
interface Tunnel0/0/0
 ipv6 enable 
 ipv6 address 2002:1D01:101::2/64 
 tunnel-protocol ipv6-ipv4
 source GigabitEthernet0/0/0
 destination 29.1.1.1
#
ripng 1
#
ip route-static 0.0.0.0 0.0.0.0 91.1.1.1
#
ipv6 route-static :: 0 Tunnel0/0/0 
R11配置
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 2002:5B01:101::2/64 
 ripng 1 enable
#
interface LoopBack0
 ipv6 enable 
 ipv6 address 11::11/64 
 ripng 1 enable
#
ripng 1
#

R1通R9和R11

R10通R9

 3.宣告OSPFV3和ripng2

[r3]ospf
[r3]ospfv3 100 
[r3-ospfv3-100]router-id 3.3.3.3	
[r3-ospfv3-100]area 0
[r3]interface LoopBack 0 
[r3-LoopBack0]ospfv3 100 area  0
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ospfv3 100 area  0
[r7]ripng	
[r7]ripng 1
[r7]interface g0/0/1
[r7-GigabitEthernet0/0/1]ripng 1 enable 
[r7-GigabitEthernet0/0/1]quit 
[r7]interface LoopBack 0 
[r7-LoopBack0]ripng  1 enable 

4.建立BGP邻居关系

[r4]bgp 64512
[r4-bgp]router-id 4.4.4.4	
[r4-bgp]confederation id 100	
[r4-bgp]peer 3::3 as-number 64512
[r4-bgp]peer 3::3 connect-interface LoopBack 0 	
[r4-bgp]peer 5::5 as-number  64512
[r4-bgp]peer 5::5 connect-interface LoopBack 0 
[r4-bgp]ipv6-family
[r4-bgp-af-ipv6]peer 3::3 enable 
[r4-bgp-af-ipv6]peer 5::5 enable 
[r4-bgp-af-ipv6]peer 3::3 reflect-client 	
[r4-bgp-af-ipv6]peer 5::5 reflect-client 
[r5]bgp 64512
[r5-bgp]router-id 5.5.5.5
[r5-bgp]confederation id 100
[r5-bgp]confederation peer-as 64513(联邦的小AS号只需要在边界联邦的路由器上写)
[r5-bgp]peer 4::4 as-number  64512
[r5-bgp]peer 4::4 connect-interface LoopBack 0 
[r5-bgp]peer 6::6 as-number 64513
[r5-bgp]peer 6::6 connect-interface LoopBack 0 
[r5-bgp]peer 6::6 ebgp-max-hop 
[r5-bgp]ipv6-family
[r5-bgp-af-ipv6]peer 4::4 enable 	
[r5-bgp-af-ipv6]peer 6::6 enable 
[r5-bgp-af-ipv6]peer 4::4 next-hop-local 
[r6]bgp 64513
[r6-bgp]router-id 6.6.6.6	
[r6-bgp]confederation id 100
[r6-bgp]confederation peer-as 64512	
[r6-bgp]peer 5::5 as-number 64512	
[r6-bgp]peer 5::5 connect-interface LoopBack 0 
[r6-bgp]peer 5::5 ebgp-max-hop 
[r6-bgp]peer 2002:1D01:101:6::2 as-number 101
[r6-bgp]ipv6-family	
[r6-bgp-af-ipv6]peer 5::5 enable 
[r6-bgp-af-ipv6]peer 2002:1D01:101:6::2 enable 
[r6-bgp-af-ipv6]import-route ospfv3 100
[r6-bgp-af-ipv6]import-route direct 
[r7]bgp 101
[r7-bgp]router-id 7.7.7.7
[r7-bgp]peer 2002:1D01:0101:6::1 as-number 100(指对面大的AS并非小AS)
[r7-bgp]peer 8::8 as-number  101
[r7-bgp]peer 8::8 connect-interface LoopBack 0 
[r7-bgp]ipv6-family
[r7-bgp-af-ipv6]peer 2002:1D01:101:6::1 enable 
[r7-bgp-af-ipv6]peer 8::8 enable 
[r6-bgp-af-ipv6]import-route ripng 2

5.R2上汇总缺省

R3上缺省并下放地址
[r3]ipv6 route-static :: 0 2002:1D01:0101:2::1
[r3-ospfv3-100]default-route-advertise
R2上配置汇总地址
[r2]ipv6 route-static 2002:1D01:0101:: 61 2002:1D01:0101:2::2
R7上配置缺省并下放地址
[r7]ipv6 route-static :: 0 2002:1D01:101:6::1
[r7]interface g0/0/1
[r7-GigabitEthernet0/0/1]ripng default-route only

6.下方网络之间可达

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值