舒畅 发表于 2018-7-12 10:29:57

CISCO MPLS ***

  1、 按IP地址配置各接口
  2、 配置PE1-P-PE2 公网路由
  3、 各设备启用ip cef
  Router (config)#ip cef
  4、 在PE1-P-PE2主干接口启用mpls
  Pe1(config)#int fa0/1
  PE1(config-if)#mpls ip
  5、 在PE上创建VRF
  PE1(config)#ip vrf ***a
  PE1(config-vrf)#rd 100:1
  PE1(config-vrf)#route-target 100:1
  6、 将PE上与CE相连的接口加入到VRF中
  PE1(config)#int fa0/0
  PE1(CONFIG-IF)#ip vrfforwarding ***a
  PE1(config-if)#ip add 192.168.1.1 255.255.255.0
  PE1(config-if)#no shut
  7、 在PE上配置VRF 静态路由
  PE1(config)#ip route vrf ***a1.1.1.1255.255.255.255 192.168.1.1
  8、 配置PE1、PE2 iBGP
  PE1(config)#router bgp 100
  PE1(config-router )#bgp router –id 2.2.2.2
  PE1(config-router)#nei 4.4.4.4 remote-as 100
  PE1(config-router)#nei 4.4.4.4 update lo0
  PE1(config-router)#no sy
  PE1(config-router)#no auto
  9、 在PE上启用address-family ***V4扩展团体属性
  PE1(config)#router bgp 100
  PE1(config-router)#address-family ***v4
  PE1(config –router )#nei 4.4.4.4 acti
  PE1(config –router )#nei 4.4.4.4 send-community ex
  10、在PE上启用address-family vrf ipv4 ***a
  PE1(config)#router bgp 100
  PE1(config-router)#address-family ipv4 vrf ***a
  PE1(config-router-af)#no sy
  PE1(config-router-af)#no auto
  将静态路由重分布到address-family ipv4 vrf ***a中
  PE1(config-router-af)#redis static
  11、配置CE间的静态路由
  CE1(config)#ip route 5.5.5.5 255.255.255.255 192.168.1.2
  配置命令:
  =========================================================================================
  CE1
  ====================================================
  en
  conf t
  int f0/0
  ip add 192.168.1.1 255.255.255.0
  no shu
  exit
  int lo0
  ip add 1.1.1.1 255.255.255.255
  exit
  ip cef
  ip route 5.5.5.5 255.255.255.255 192.168.1.2
  PE1
  =========================================================
  en
  conf t
  int f0/0
  ip add 192.168.1.2 255.255.255.0
  no shu
  exit
  int f1/0
  ip add 100.1.1.1 255.255.255.252
  no shu
  exit
  int lo0
  ip add 2.2.2.2 255.255.255.255
  exit
  router ospf 1
  net 2.2.2.2 0.0.0.0 a 0
  net 100.1.1.0 0.0.0.3 a 0
  exit
  ip cef
  int f1/0
  mpls ip
  exit
  ip vrf ***a
  rd 100:1
  route-target 100:1
  exit
  int f0/0
  ip vrf forwarding ***a
  ip add 192.168.1.2 255.255.255.0
  no shu
  exit
  ip route vrf ***a 1.1.1.1 255.255.255.255 192.168.1.1
  router bgp 100
  bgp router-id 2.2.2.2
  neighbor 4.4.4.4 remote-as 100
  neighbor 4.4.4.4 update-source lo0
  no synchronization
  no auto-summary
  exit
  router bgp 100
  address-family ***v4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended
  exit
  router bgp 100
  address-family ipv4 vrf ***a
  no synchronization
  no auto-summary
  redistribute static
  end
  P
  ==============================================================
  en
  conf t
  int f0/0
  ip add 100.1.1.2 255.255.255.252
  no shu
  exit
  int f1/0
  ip add 100.1.1.5 255.255.255.252
  no shu
  exit
  int lo0
  ip add 3.3.3.3 255.255.255.255
  exit
  router ospf 1
  net 3.3.3.3 0.0.0.0 a 0
  net 100.1.1.0 0.0.0.3 a 0
  net 100.1.1.4 0.0.0.3 a 0
  exit
  ip cef
  int f0/0
  mpls ip
  int f1/0
  mpls ip
  exit
  RE2
  =========================================================
  en
  conf t
  int f0/0
  ip add 100.1.1.6 255.255.255.252
  no shu
  exit
  int f1/0
  ip add 192.168.2.1 255.255.255.0
  no shu
  exit
  int lo0
  ip add 4.4.4.4 255.255.255.255
  no shu
  exit
  router ospf 1
  net 4.4.4.4 0.0.0.0 a 0
  net 100.1.1.4 0.0.0.3 a 0
  exit
  ip cef
  int f0/0
  mpls ip
  exit
  ip vrf ***a
  rd 100:1
  route-target 100:1
  exit
  int f1/0
  ip vrf forwarding ***a
  ip add 192.168.2.1 255.255.255.0
  no shu
  exit
  ip route vrf ***a 5.5.5.5 255.255.255.255 192.168.2.2
  router bgp 100
  bgp router-id 4.4.4.4
  neighbor 2.2.2.2 remote-as 100
  neighbor 2.2.2.2 update-source lo0
  no synchronization
  no auto-summary
  exit
  router bgp 100
  address-family ***v4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community extended
  exit
  router bgp 100
  address-family ipv4 vrf ***a
  no synchronization
  no auto-summary
  redistribute static
  end
  CE2
  ======================================================
  en
  conf t
  int f0/0
  ip add 192.168.2.2 255.255.255.0
  no shu
  exit
  int lo0
  ip add 5.5.5.5 255.255.255.255
  exit
  ip cef
  ip route 1.1.1.1 255.255.255.255 192.168.2.1
  exit
页: [1]
查看完整版本: CISCO MPLS ***