标签:思科设备部署运营商架构-ipv6+isis+bgp配置实战
1. 实验拓扑:
使用GNS3(版本0.8.6)+c3725-adventerprisek9-mz.124-15.T5.bin
2. 实验需求:
A. 通过IPV6技术部署
B. 省干通过ISIS协议将AS内部的直连口和环回口路由通告
C. 通过路由反射器实现省内、市内业务路由互传
D. 国干通过OSPF协议将AS内部的直连口和环回口路由通告
E. 通过EBGP协议实现省干与国干路由互传
3. 实验步骤:
A. IP地址规划
R1 | f0/0 | 12::1/120 | R5 | f0/1 | 25::5/120 |
f0/1 | 16::1/120 | f0/0 | 56::5/120 | ||
Loopback0 | 1::1/128 | Loopback0 | 5::5/128 | ||
R2 | f0/0 | 12::2/120 | R6 | f0/1 | 56::6/120 |
f1/0 | 25::2/120 | f1/0 | 16::6/120 | ||
f1/1 | 26::2/120 | f1/1 | 26::6/120 | ||
f0/1 | 23::2/120 | f0/0 | 67::6/120 | ||
Loopback0 | 2::2/128 | Loopback0 | 6::6/128 | ||
R3 | f0/0 | 23::3/120 | R7 | f0/1 | 67::7/120 |
f1/1 | 37::3/120 | f1/1 | 37::7/120 | ||
f0/1 | 34::3/120 | f0/0 | 78::7/120 | ||
Loopback0 | 3::3/128 | loopback | 7::7/128 | ||
R4 | f0/0 | 34::4/120 | R8 | f0/1 | 78::8/120 |
f0/1 | 48::4/120 | f0/0 | 48::8/120 | ||
Loopback0 | 4::4/128 | Loopback0 | 8::8/128 |
B. IP地址配置
R1的IP配置如下
R1#conf t //进入配置模式
R1(config)#ipv6 unicast-routing //开启设备ipv6功能
R1(config)#int f0/0 //进入接口配置模式
R1(config-if)#ipv6 add 12::1/120 //配置ipv6地址
R1(config-if)#no shut //激活接口
R1(config-if)#int f0/1
R1(config-if)#ipv6 add 16::1/120
R1(config-if)#no shut
R1(config)#int lo 0
R1(config-if)#ipv6 add 1::1/128
R1(config-if)#no shut
R2的IP配置如下
R2#conf t
R2(config)#ipv6 unicast-routing
R2(config)#int f0/0
R2(config-if)#ipv6 add 12::2/120
R2(config-if)#no shut
R2(config-if)#int f1/0
R2(config-if)#no switchport //三层接口不够用,加了二层接口,因为二层接口不可以陪IP地址,所以需要开启三层接口
R2(config-if)#ipv6 add 25::2/120
R2(config-if)#no shut
R2(config-if)#int f1/1
R2(config-if)#no switchport
R2(config-if)#ipv6 add 26::2/120
R2(config-if)#no shut
R2(config-if)#int f0/1
R2(config-if)#ipv6 add 23::2/120
R2(config-if)#no shut
R2(config-if)#int lo 0
R2(config-if)#ipv6 add 2::2/128
R2(config-if)#no shut
R3的IP配置如下
R3#conf t
R3(config)#ipv unicast-routing
R3(config)#int f0/0
R3(config-if)#ipv6 add 23::3/120
R3(config-if)#no shut
R3(config-if)#int f1/1
R3(config-if)#no switchport
R3(config-if)#ipv6 add 37::3/120
R3(config-if)#no shut
R3(config-if)#int f0/1
R3(config-if)#ipv6 add 34::3/120
R3(config-if)#no shut
R3(config-if)#int lo 0
R3(config-if)#ipv6 add 3::3/128
R3(config-if)#no shut
R4的IP配置如下
R4#conf t
R4(config)#ipv6 unicast-routing
R4(config)#int f0/0
R4(config-if)#ipv6 add 34::4/120
R4(config-if)#no shut
R4(config-if)#int f0/1
R4(config-if)#ipv6 add 48::4/120
R4(config-if)#no shut
R4(config)#int lo 0
R4(config-if)#ipv6 add 4::4/128
R4(config-if)#no shut
R5的IP配置如下
R5#conf t
R5(config)#ipv6 unicast-routing
R5(config)#int f0/1
R5(config-if)#ipv6 add 25::5/120
R5(config-if)#no shut
R5(config-if)#int f0/0
R5(config-if)#ipv6 add 56::5/120
R5(config-if)#no shut
R5(config-if)#int lo 0
R5(config-if)#ipv add 5::5/128
R5(config-if)#no shut
R6的IP配置如下
R6#conf t
R6(config)#ipv6 unicast-routing
R6(config)#int f0/1
R6(config-if)#ipv6 add 56::6/120
R6(config-if)#no shut
R6(config-if)#int f1/0
R6(config-if)#no switchport
R6(config-if)#ipv6 add 16::6/120
R6(config-if)#no shut
R6(config-if)#int f1/1
R6(config-if)#no switchport
R6(config-if)#ipv6 add 26::6/120
R6(config-if)#no shut
R6(config-if)#int f0/0
R6(config-if)#ipv6 add 67::6/120
R6(config-if)#no shut
R6(config-if)#int lo 0
R6(config-if)#ipv6 add 6::6/128
R6(config-if)#no shut
R7的IP配置如下
R7#conf t
R7(config)#ipv6 unicast-routing
R7(config)#int f0/1
R7(config-if)#ipv6 add 67::7/120
R7(config-if)#no shut
R7(config-if)#int f1/1
R7(config-if)#no switchport
R7(config-if)#ipv6 add 37::7/120
R7(config-if)#no shut
R7(config-if)#int f0/0
R7(config-if)#ipv6 add 78::7/120
R7(config-if)#no shut
R7(config-if)#int lo 0
R7(config-if)#ipv6 add 7::7/128
R7(config-if)#no shut
R8的IP配置如下
R8#conf t
R8(config)#ipv6 unicast-routing
R8(config)#int f0/1
R8(config-if)#ipv6 add 78::8/120
R8(config-if)#no shut
R8(config-if)#int f0/0
R8(config-if)#ipv6 add 48::8/120
R8(config-if)#no shut
R8(config-if)#int lo 0
R8(config-if)#ipv6 add 8::8/128
R8(config-if)#no shut
--------------------------------以上是IP地址配置----------------------------------
C. 配置脚本
R1的配置如下
R1(config)#router isis //开启ISIS协议
R1(config-router)#net 49.0001.0001.0001.0001.00 //配置net地址,49是主网络号,第一个0001表示区域号,第二到第四个0001表示系统号,系统号是唯一的,最后00表示NSEL
R1(config-router)#is-type level-1 //配置路由器类型级别为level-1,默认是level-1-2
R1(config-router)#int f0/0
R1(config-if)#ipv6 router isis
R1(config-if)#int f0/1
R1(config-if)#ipv6 router isis
R1(config-if)#int lo 0
R1(config-if)#ipv6 router isis
R2的配置如下
R2(config)#router isis
R2(config-router)#net 49.0001.0002.0002.0002.00
R2(config-router)#is-type level-1-2 //配置路由器类型级别为level-1-2,默认就是了level-1-2,可以不配置
R2(config-router)#int f0/0
R2(config-if)#ipv6 router isis
R2(config-if)#int f1/0
R2(config-if)#ipv6 router isis
R2(config-if)#int f1/1
R2(config-if)#ipv6 router isis
R2(config-if)#int f0/1
R2(config-if)#ipv6 router isis
R2(config-if)#int lo 0
R2(config-if)#ipv6 router isis
R3的配置如下
R3(config)#router isis
R3(config-router)#net 49.0002.0003.0003.0003.00 //省干属于区域2
R3(config-router)#is-type level-2
R3(config-router)#int f0/0
R3(config-if)#ipv6 router isis
R3(config-if)#int f1/1
R3(config-if)#ipv6 router isis
R3(config-if)#int f0/1
R3(config-if)#ipv6 router isis
R3(config-if)#int lo 0
R3(config-if)#ipv6 router isis
R5的配置如下
R5(config)#router isis
R5(config-router)#net 49.0001.0005.0005.0005.00
R5(config-router)#is-type level-1
R5(config-router)#int f0/1
R5(config-if)#ipv6 router isis
R5(config-if)#int f0/0
R5(config-if)#ipv6 router isis
R5(config-if)#int lo 0
R5(config-if)#ipv6 router isis
R6的配置如下
R6(config-router)#int f0/1
R6(config-if)#ipv6 router isis
R6(config-if)#int f1/0
R6(config-if)#ipv6 router isis
R6(config-if)#int f1/1
R6(config-if)#ipv6 router isis
R6(config-if)#int f0/0
R6(config-if)#ipv6 router isis
R6(config-if)#int lo 0
R6(config-if)#ipv6 router isis
R7的配置如下
R7(config)#router isis
R7(config-router)#net 49.0002.0007.0007.0007.00
R7(config-router)#is-type level-2
R7(config-router)#int f0/1
R7(config-if)#ipv6 router isis
R7(config-if)#int f1/1
R7(config-if)#ipv6 router isis
R7(config-if)#int f0/0
R7(config-if)#ipv6 router isis
R7(config-if)#int lo 0
R7(config-if)#ipv6 router isis
在R1上查看路由表(查看命令show ipv6 route)
说明:level-1是区域内路由,只可以学习到内部的路由。Level-2是区域间路由,可以学习到内部路由也可以学习到其他区域的路由。Level-1-2是不同区域路由,即属于内部路由也属于区域间路由
----------------------------------以上是ISIS协议配置---------------------------------------
R4的配置如下
R4(config)#ipv6 router ospf 100 //开启OSPFv3版本协议,OSPFv3版本协议支持ipv6,
R4(config-rtr)#router-id 4.4.4.4 //配置OSPF的routerID为4.4.4.4
R4(config-rtr)#int f0/0
R4(config-if)#ipv6 ospf 100 area 0 //
R4(config-if)#int f0/1
R4(config-if)#ipv6 ospf 100 area 0
R4(config-if)#int lo 0
R4(config-if)#ipv6 ospf 100 area 0
R8的配置如下
R8(config)#ipv6 router ospf 100
R8(config-rtr)#router-id 8.8.8.8
R8(config-rtr)#int f0/1
R8(config-if)#ipv6 ospf 100 area 0
R8(config-if)#int f0/0
R8(config-if)#ipv6 ospf 100 area 0
R8(config-if)#int lo 0
R8(config-if)#ipv6 ospf 100 area 0
在R4上查看路由表(查看命令show ipv6 route)
-------------------------------以上是OSPF协议配置----------------------------------
R1的配置如下
R1(config)#router bgp 65001 //开启BGP协议,指定ASid
R1(config-router)#bgp router-id 1.1.1.1 //配置BGP的routerID为1.1.1.1
R1(config-router)#address-family ipv6 unicast
R1(config-router-af)#neighbor 2::2 remote-as 65001 //手工指定邻居关系
R1(config-router-af)#neighbor 2::2 update-source lo 0 //指定通过地址的lo 0环回口地址建立
R1(config-router-af)#neighbor 3::3 remote-as 65001
R1(config-router-af)#neighbor 3::3 update-source lo 0
R1(config-router-af)#neighbor 5::5 remote-as 65001
R1(config-router-af)#neighbor 5::5 update-source lo 0
R1(config-router-af)#neighbor 6::6 remote-as 65001
R1(config-router-af)#neighbor 6::6 update-source lo 0
R1(config-router-af)#neighbor 7::7 remote-as 65001
R1(config-router-af)#neighbor 7::7 update-source lo 0
R2的配置如下
R2(config)#router bgp 65001
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#address-family ipv6 unicast
R2(config-router-af)#neighbor 1::1 remote-as 65001
R2(config-router-af)#neighbor 1::1 update-source lo 0
R2(config-router-af)#neighbor 1::1route-reflector-client //配置路由发射器客户端,指定1::1为自己的客户端
R2(config-router-af)#neighbor 3::3 remote-as 65001
R2(config-router-af)#neighbor 3::3 update-source lo 0
R2(config-router-af)#neighbor 5::5 remote-as 65001
R2(config-router-af)#neighbor 5::5 update-source lo 0
R2(config-router-af)#neighbor 5::5 route-reflector-client
R2(config-router-af)#neighbor 6::6 remote-as 65001
R2(config-router-af)#neighbor 6::6 update-source lo 0
R2(config-router-af)#neighbor 7::7 remote-as 65001
R2(config-router-af)#neighbor 7::7 update-source lo 0
R3的配置如下
R3(config)#router bgp 65001
R3(config-router)#bgp router-id 3.3.3.3
R3(config-router)#address-family ipv6 unicast
R3(config-router-af)#neighbor 1::1 remote-as 65001
R3(config-router-af)#neighbor 1::1 update-source lo 0
R3(config-router-af)# neighbor 1::1 next-hop-self //指定下一跳地址为自己
R3(config-router-af)#neighbor 2::2 remote-as 65001
R3(config-router-af)#neighbor 2::2 update-source lo 0
R3(config-router-af)#neighbor 2::2route-reflector-client
R3(config-router-af)# neighbor 2::2 next-hop-self
R3(config-router-af)#neighbor 5::5 remote-as 65001
R3(config-router-af)#neighbor 5::5 update-source lo 0
R3(config-router-af)# neighbor 5::5 next-hop-self
R3(config-router-af)#neighbor 6::6 remote-as 65001
R3(config-router-af)#neighbor 6::6 update-source lo 0
R3(config-router-af)# neighbor 6::6 next-hop-self
R3(config-router-af)#neighbor 7::7 remote-as 65001
R3(config-router-af)#neighbor 7::7 update-source lo 0
R4的配置如下
R4(config)#router bgp 65002
R4(config-router)#bgp router-id 4.4.4.4
R4(config-router)#address-family ipv6 unicast
R4(config-router-af)#neighbor 8::8 remote-as 65002
R4(config-router-af)#neighbor 8::8 update-source lo 0
R5的配置如下
R5(config)#router bgp 65001
R5(config-router)#bgp router-id 5.5.5.5
R5(config-router)#address-family ipv6 unicast
R5(config-router-af)#neighbor 1::1 remote-as 65001
R5(config-router-af)#neighbor 1::1 update-source lo 0
R5(config-router-af)#neighbor 2::2 remote-as 65001
R5(config-router-af)#neighbor 2::2 update-source lo 0
R5(config-router-af)#neighbor 3::3 remote-as 65001
R5(config-router-af)#neighbor 3::3 update-source lo 0
R5(config-router-af)#neighbor 6::6 remote-as 65001
R5(config-router-af)#neighbor 6::6 update-source lo 0
R5(config-router-af)#neighbor 7::7 remote-as 65001
R5(config-router-af)#neighbor 7::7 update-source lo 0
R6的配置如下
R6(config)#router bgp 65001
R6(config-router)#bgp router-id 6.6.6.6
R6(config-router)#address-family ipv6 unicast
R6(config-router-af)#neighbor 1::1 remote-as 65001
R6(config-router-af)#neighbor 1::1 update-source lo 0
R6(config-router-af)#neighbor 1::1 route-reflector-client
R6(config-router-af)#neighbor 2::2 remote-as 65001
R6(config-router-af)#neighbor 2::2 update-source lo 0
R6(config-router-af)#neighbor 3::3 remote-as 65001
R6(config-router-af)#neighbor 3::3 update-source lo 0
R6(config-router-af)#neighbor 5::5 remote-as 65001
R6(config-router-af)#neighbor 5::5 update-source lo 0
R6(config-router-af)#neighbor 5::5route-reflector-client
R6(config-router-af)#neighbor 7::7 remote-as 65001
R6(config-router-af)#neighbor 7::7 update-source lo 0
R7的配置如下
R7(config)#router bgp 65001
R7(config-router)#bgp router-id 7.7.7.7
R7(config-router)#address-family ipv6 unicast
R7(config-router-af)#neighbor 1::1 remote-as 65001
R7(config-router-af)#neighbor 1::1 update-source lo 0
R7(config-router-af)#neighbor 1::1 next-hop-self
R7(config-router-af)#neighbor 2::2 remote-as 65001
R7(config-router-af)#neighbor 2::2 update-source lo 0
R7(config-router-af)#neighbor 2::2 next-hop-self
R7(config-router-af)#neighbor 3::3 remote-as 65001
R7(config-router-af)#neighbor 3::3 update-source lo 0
R7(config-router-af)#neighbor 5::5 remote-as 65001
R7(config-router-af)#neighbor 5::5 update-source lo 0
R7(config-router-af)#neighbor 5::5 next-hop-self
R7(config-router-af)#neighbor 6::6 remote-as 65001
R7(config-router-af)#neighbor 6::6 update-source lo 0
R7(config-router-af)#neighbor 6::6 next-hop-self
R7(config-router-af)#neighbor 6::6route-reflector-client
R8的配置如下
R8(config)#router bgp 65002
R8(config-router)#bgp router-id 8.8.8.8
R8(config-router)#address-family ipv6 unicast
R8(config-router-af)#neighbor 4::4 remote-as 65002
R8(config-router-af)#neighbor 4::4 update-source lo 0
---------------------------以上是建立IBGP邻居----------------------------
R3的配置如下
R3(config)#ipv6 route 4::4/128 34::4 //配置静态路由,因为用loopback0建立邻居关系需要可以ping通loopback0
R3(config)#router bgp 65001
R3(config-router)#address-family ipv6 unicast
R3(config-router-af)#neighbor 4::4 remote-as 65002
R3(config-router-af)#neighbor 4::4 update-source lo 0
R3(config-router-af)#neighbor 4::4 ebgp-multihop 2 //因为ebgp的默认条数为1跳,当与loopback0建立邻居关系需要2跳,所以需要设置为2跳
R4的配置如下
R4(config)#ipv6 route 3::3/128 34::3
R4(config)#router bgp 65002
R4(config-router)#address-family ipv6 unicast
R4(config-router-af)#neighbor 3::3 remote-as 65001
R4(config-router-af)#neighbor 3::3 update-source lo 0
R4(config-router-af)#neighbor 3::3 ebgp-multihop 2
R7的配置如下
R7(config)#ipv6 route 8::8/128 78::8
R7(config)#router bgp 65001
R7(config-router)#address-family ipv6 unicast
R7(config-router-af)#neighbor 8::8 remote-as 65002
R7(config-router-af)#neighbor 8::8 update-source lo 0
R7(config-router-af)#neighbor 8::8 ebgp-multihop 2
R8的配置如下
R8(config)#ipv6 route 7::7/128 78::7
R8(config)#router bgp 65002
R8(config-router)#address-family ipv6 unicast
R8(config-router-af)#neighbor 7::7 remote-as 65001
R8(config-router-af)#neighbor 7::7 update-source lo 0
R8(config-router-af)#neighbor 7::7 ebgp-multihop 2
在R3上查看邻居关系(命令show bgp ipv6 unicast summary)
------------------------------以上是建立EBGP邻居关系----------------------------------
D. 配置业务网段
在R1下挂个业务并通过BGP通告出去
R1#conf t
R1(config)#int lo 10
R1(config-if)#ipv6 add 11::1/120
R1(config-if)#router bgp 65001
R1(config-router)#address-family ipv6 unicast
R1(config-router-af)#net 11::/120 //通告业务网段
在R8下挂个业务并通过BGP通告出去
R8#conf t
R8(config)#int lo 10
R8(config-if)#ipv6 add 88::1/120
R8(config-if)#router bgp 65002
R8(config-router)#address-family ipv6 unicast
R8(config-router-af)#net 88::/120
在R1上查看通告通告的路由
4. 验证结果:
在R1上用loopback10访问 R8的loopback10
本文出自 “波仔网络技术” 博客,请务必保留此出处http://bozai666.blog.51cto.com/10138815/1643720
标签:思科设备部署运营商架构-ipv6+isis+bgp配置实战
原文地址:http://bozai666.blog.51cto.com/10138815/1643720