HCIP之MPLS实验
华子目录
- 实验拓扑及要求
- 规划网段和IP地址
- 实验步骤
- 配置IP地址
- 配置OSPF
- 配置BGP
- MPLS配置
- 建立虚拟接口
- 重发布
- RIP
实验拓扑及要求
规划网段和IP地址
实验步骤
配置IP地址
依次类推
interface LoopBack 0
ip address 1.1.1.1 32
interface GigabitEthernet 0/0/0
ip address 12.1.1.1 24
配置OSPF
以R2为例,R3~R8同理
ospf 1 router-id 2.2.2.2
area 0
network 23.1.1.1 0.0.0.0
network 24.1.1.1 0.0.0.0
network 2.2.2.2 0.0.0.0
配置BGP
以R2为例,R5和R6依次类推
bgp 100
router-id 2.2.2.2
peer 5.5.5.5 as-number 100
peer 5.5.5.5 connect-interface LoopBack 0
peer 6.6.6.6 as-number 100
peer 6.6.6.6 connect-interface LoopBack 0
MPLS配置
mpls lsr-id 2.2.2.2
mpls
mpls ldp
quit
interface g 0/0/1
mpls
mpls ldp
quit
interface g 0/0/2
mpls
mpls ldp
bgp 100
ipv4-family vpnv4
peer 5.5.5.5 enable
peer 6.6.6.6 enable
peer 5.5.5.5 next-hop-local
peer 6.6.6.6 next-hop-local
建立虚拟接口
ip vpn-instance 1
route-distinguisher 1:1
vpn-target 1:1 export-extcommunity
vpn-target 2:2 3:3 import-extcommunityint g 0/0/0
undo ip ad
ip binding vpn-instance 1
ip add 12.1.1.2 24
ip route-static vpn-instance 1 1.1.1.1 32 12.1.1.1
重发布
RIP