HCIE 模拟LAB MPLS-BGP BFD-VRRP IPV6Routing

 

 

v2-1979d27a5b3722819f80a6dd71b51324_b.jpg

1. Layer 2 Technology

1.1 Trunk

1. 交换机 SW3 GE0/0/1,SW1/SW2 GE0/0/2 链路类型为 Access,PVID 为 10。

2. 交换机之间互连接口链路类型为 Trunk,允许 VLAN10 通过。

  • interface GigabitEthernet0/0/1
  • port link-type access
  • port default vlan 10
  • stp edged-port enable
  • #
  • interface GigabitEthernet0/0/10
  • port link-type trunk
  • port trunk allow-pass vlan 2 to 4094

1.2 MSTP

1. SW1/2/3 全都运行 MSTP。VLAN 10 在 Instance 10,SW1 为 Primary Root,SW2 为 Secondary Root。MSTP 的 Region-name 是 HUAWEI,Revision-level 为 12。

  • SW1
  • stp instance 10 root primary
  • #
  • stp region-configuration
  • region-name HUAWEI
  • revision-level 12
  • instance 10 vlan 10
  • active region-configuration
  • #
  • SW2
  • stp instance 10 root secondary
  • #
  • stp region-configuration
  • region-name HUAWEI
  • revision-level 12
  • instance 10 vlan 10
  • active region-configuration

2. 交换机 SW3 GE0/0/1,SW1/SW2 GE0/0/2,接口 up 后需要能立即处于转发状态。当该接口收到 BPDU 报文后,接口能够自动关闭。

  • interface GigabitEthernet0/0/2
  • stp edged-port enable

1.3 VRRP

1. CE1 和 CE2 之间运行 VRRP 协议,VRRP ID 为 1,虚拟 IP 地址为 10.3.1.254,为 PC 的网关。CE1 VRRP 优先级为 120。

  • CE1
  • interface GigabitEthernet0/0/2
  • ip address 10.3.1.1 255.255.255.0
  • vrrp vrid 1 virtual-ip 10.3.1.254
  • vrrp vrid 1 priority 120
  • CE2
  • interface GigabitEthernet0/0/2
  • ip address 10.3.1.2 255.255.255.0
  • vrrp vrid 1 virtual-ip 10.3.1.254

2. 配置 CE1 GE0/0/1 和 PE1 GE0/0/1 的三层静态 BFD 直连检测,CE1 VRRP 跟踪 BFD 会话。当该 BFD 会话 down,CE2 成为 VRRP 主设备。

  • CE1
  • bfd
  • quit
  • bfd 1 bind peer-ip 10.2.11.2 source-ip 10.2.11.1
  • discriminator local 10
  • discriminator remote 20
  • min-tx-interval 100
  • min-rx-interval 100
  • commit
  • #
  • interface GigabitEthernet0/0/2
  • ip address 10.3.1.1 255.255.255.0
  • vrrp vrid 1 virtual-ip 10.3.1.254
  • vrrp vrid 1 priority 120
  • vrrp vrid 1 track bfd-session 10 reduced 30
  • #
  • PE1
  • bfd
  • quit
  • bfd 1 bind peer-ip 10.2.11.1 vpn-instance vpna source-ip 10.2.11.2
  • discriminator local 20
  • discriminator remote 10
  • min-tx-interval 100
  • min-rx-interval 100
  • commit

2 IPv4 IGP-ospf

 

v2-742646e6fce5b62ab922465adee4389f_b.jpg
  • ospf 1 router-id 172.16.1.10
  • area 0.0.0.0
  • network 10.1.81.0 0.0.0.3
  • network 10.1.91.0 0.0.0.3
  • network 10.1.102.0 0.0.0.3
  • network 172.16.1.10 0.0.0.0
  • interface GigabitEthernet0/0/0
  • ospf cost 50
  • #
  • interface GigabitEthernet0/0/1
  • ospf cost 1000
  • #
  • interface GigabitEthernet0/0/2
  • ospf cost 1500

3 IPv4 IGP-isis

 

v2-3e2305549141d6304ef9450b9002ea35_b.jpg
  • isis 1
  • cost-style wide
  • network-entity 49.0001.1720.1600.1003.00
  • #
  • interface GigabitEthernet0/0/0
  • isis enable 1
  • isis circuit-level level-2
  • isis cost 50
  • #
  • interface GigabitEthernet0/0/1
  • isis enable 1
  • isis circuit-level level-2
  • isis cost 1500
  • #
  • interface GigabitEthernet0/0/2
  • isis enable 1
  • isis circuit-level level-2
  • isis cost 3000
  • #
  • #
  • interface LoopBack0
  • isis enable 1
  • isis circuit-level level-2

4 MPLS VPN

1. PE1、PE2、PE3、PE4 创建 VPN,名字为 VPN1,RD 值为 100:1, 双向 RT 值为 100:1。

  • ip vpn-instance vpna
  • ipv4-family
  • route-distinguisher 100:1
  • vpn-target 100:1 export-extcommunity
  • vpn-target 100:1 import-extcommunity

2. 如图 3,CE 和 PE 之间建立 EBGP 邻居。 3. CE1 和 CE2 在 BGP 协议通告 PC 所在的网段 10.3.1.0/24。 4.CE3 在 BGP 协议通告 loopback1 所在的网段 10.3.3.3/32。

  • CE端
  • bgp 65000
  • router-id 172.17.1.1
  • peer 10.2.11.2 as-number 100
  • #
  • ipv4-family unicast
  • undo synchronization
  • network 10.3.1.0 255.255.255.0
  • peer 10.2.11.2 enable
  • PE端
  • bgp 100
  • router-id 172.16.1.1
  • peer 172.16.1.3 as-number 100
  • peer 172.16.1.3 connect-interface LoopBack0
  • #
  • ipv4-family unicast
  • undo synchronization
  • peer 172.16.1.3 enable
  • #
  • ipv4-family vpnv4
  • policy vpn-target
  • peer 172.16.1.3 enable
  • #
  • ipv4-family vpn-instance vpna
  • import-route direct
  • peer 10.2.11.1 as-number 65000

 

v2-0b6c273c38881ded72fd0bddcb0b44ac_b.jpg

5. AS100 和 AS200 之间使用 MPLS BGP VPN 跨域 OptionB。

6. AS100 内部,RR1 和 RR2 是 VPNv4 路由反射器, 配置相同的 cluster-id 172.16.1.3。


  • bgp 100
  • router-id 172.16.1.3
  • peer 172.16.1.1 as-number 100
  • peer 172.16.1.1 connect-interface LoopBack0
  • ……
  • #
  • ipv4-family unicast
  • undo synchronization
  • reflector cluster-id 172.16.1.3
  • peer 172.16.1.1 enable
  • peer 172.16.1.1 reflect-client
  • ……
  • #
  • ipv4-family vpnv4
  • reflector cluster-id 172.16.1.3
  • undo policy vpn-target
  • peer 172.16.1.1 enable
  • peer 172.16.1.1 reflect-client
  • ……

7. AS200 内部,RR3 和 RR4 是 VPNv4 路由反射器,配置相同的 cluster-id 172.16.1.9,将 PE3、PE4 指定为

  • [RR3-bgp]peer inside enable
  • [RR3-bgp]peer 172.16.1.11 group inside
  • [RR3-bgp]peer 172.16.1.2 group inside

8. 调整 BGP 协议的本地优先级属性,使双向流量优选 PE1-RR1-ASBR1-ASBR3-RR3-PE3。

  • bgp 65001
  • peer 10.2.33.2 preferred-value 100

9. CE3 从 PE4 收到的路由,MED 值为 200。

  • PE4
  • #
  • ip ip-prefix p1 index 10 permit 10.3.1.0 24
  • #
  • route-policy addmed200 permit node 10
  • if-match ip-prefix p1
  • apply cost 100
  • #
  • bgp 200
  • #
  • ipv4-family vpn-instance vpna
  • peer 10.2.33.1 route-policy addmed200 export

10. PC1 能够 ping 通 10.3.3.3。

 

v2-ef18ee5e145d17b6319509288e9460a3_b.jpg

4 IPv6 IGP

4.1 IPv6 Basic Configuration

1. 所有设备的接口 IPv6 地址,按照图 4 配置。(已预配置)

4.2 IPv6 IGP

1. 如图 5,ASBR3、ASBR4、RR3、RR4、PE3、PE4 运行 OSPFv3 协议,router-id 与 loopback0 的 IPv4 地址相同。区域号为 0,loopback0 和互 连接口全都通告入 OSPFv3。

  • ospfv3 1
  • router-id 172.16.1.2
  • #
  • interface GigabitEthernet0/0/0
  • ospfv3 1 area 0
  • #
  • interface GigabitEthernet0/0/2
  • ospfv3 1 area 0
  • #
  • interface LoopBack0
  • ospfv3 1 area 0
  • #

 

v2-4ceeb4f37c231a512126f5ac024e2627_b.jpg

 

 

v2-62880e9fa829e88e30f8a3cc4dd7e073_b.jpg

 

5 IPv6 BGP

1. 如图 6,ASBR3 和 ASBR1 之间建立 IPv6 的 EBGP 邻居关系,并在 ASBR1 上把 loopback0 通告入 BGP。

#ASBR1

  • bgp 100
  • peer 2570:CCDD:CCBB:3CAF:EFFE:ACDD:CCDB:5700 as-number 200
  • ipv6-family unicast
  • undo synchronization
  • network 2005:CB50:D150:150F:500E:ACED:50DB:505 128
  • network 2570:CCDD:CCBB:3CAF:EFFE:ACDD:CCDB:5701 128
  • peer 2570:CCDD:CCBB:3CAF:EFFE:ACDD:CCDB:5700 enable

 

2. 在 ASBR3 做 BGP 和 OSPFv3 的双向引入,确保 AS 之间只有 loopback0 可相互通信。

#ASBR3

  • bgp 200
  • peer 2570:CCDD:CCBB:3CAF:EFFE:ACDD:CCDB:5701 as-number 100
  • #
  • ipv6-family unicast
  • undo synchronization
  • import-route ospfv3 1
  • peer 2570:CCDD:CCBB:3CAF:EFFE:ACDD:CCDB:5701 enable
  • ospfv3 1
  • router-id 172.16.1.7
  • import-route direct
  • import-route bgp

 

v2-e107b904812096bcf86bac13d78f9fec_b.jpg

 

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

期待未来的男孩

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

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

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

打赏作者

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

抵扣说明:

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

余额充值