Thứ Hai, 21 tháng 11, 2011

CONFIG MPLS VPN L3 (EIGRP PE CE)

CONFIG MPLS VPN L3 (EIGRP PE CE)

1, BASIC CONFIG, HOSTNAME, IP ADDRESS ACCORDING TO THE DIAGRAM.
# R3_P SPEED UP
# STEP 1: HOSTNAME R3_P
      enable
config terminal
hostname R3_P
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
==================================

# STEP 1: HOSTNAME R2_PE
      enable
config terminal
hostname R2_PE
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
===================================

# STEP 1: HOSTNAME R4_PE
      enable
config terminal
hostname R4_PE
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
=========================================

# STEP 1: HOSTNAME R1_CE
      enable
config terminal
hostname R1_CE
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
=========================================

# STEP 1: HOSTNAME R5_CE
      enable
config terminal
hostname R5_CE
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
========================================

# STEP 1: HOSTNAME R6_CE
      enable
config terminal
hostname R6_CE
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
============================================

# STEP 1: HOSTNAME R7_CE
      enable
config terminal
hostname R7_CE
line console 0
loggin synch
no exec-timeout
no ip domain-lookup
line console 0
  privilege level 15
  no login
line vty 0 4
  privilege level 15
  no login
end
wr
=========================================

# STEP2: ASSIGN IP ADDRESS AND LOOPBACKS
# R3_P ASSIGN IP ADDRESS 
     config terminal
interface s0/0
           ip address 192.168.23.3 255.255.255.0
  no shutdown
interface s0/1
           ip address 192.168.34.3 255.255.255.0
  no shutdown
end
wr
=============================================

# R2_PE ASSIGN IP ADDRESS AND LOOPBACKS
     config terminal
interface s0/2
           ip address 192.168.23.2 255.255.255.0
  no shutdown
interface s0/1
           ip address 192.168.26.2 255.255.255.0
  no shutdown
interface s0/0
           ip address 192.168.12.2 255.255.255.0
  no shutdown
interface loopback0
           ip address 2.2.2.2 255.255.255.255
  no shutdown
end
wr
=================================================

# R4_PE ASSIGN IP ADDRESS AND LOOPBACKS
     config terminal
interface s0/1
           ip address 192.168.34.4 255.255.255.0
  no shutdown
interface s0/2
           ip address 192.168.47.4 255.255.255.0
  no shutdown
interface s0/0
           ip address 192.168.45.4 255.255.255.0
  no shutdown
interface loopback0
           ip address 4.4.4.4 255.255.255.255
  no shutdown
end
wr
======================================================

# R1_CE ASSIGN IP ADDRESS AND LOOPBACKS
     config terminal
interface s0/0
           ip address 192.168.12.1 255.255.255.0
  no shutdown
interface loopback0
           ip address 1.1.1.1 255.255.255.0
  no shutdown
end
wr
======================================================

# R5_CE ASSIGN IP ADDRESS AND LOOPBACKS
     config terminal
interface s0/0
           ip address 192.168.45.5 255.255.255.0
  no shutdown
interface loopback0
           ip address 5.5.5.5 255.255.255.0
  no shutdown
end
wr
=====================================================

# R6_CE ASSIGN IP ADDRESS AND LOOPBACKS
     config terminal
interface s0/1
           ip address 192.168.26.6 255.255.255.0
  no shutdown
interface loopback0
           ip address 6.6.6.6 255.255.255.0
  no shutdown
end
wr
=======================================================

# R7_CE ASSIGN IP ADDRESS AND LOOPBACKS
     config terminal
interface s0/2
           ip address 192.168.47.7 255.255.255.0
  no shutdown
interface loopback0
           ip address 7.7.7.7 255.255.255.0
  no shutdown
end
wr
=========================================================

# STEP 3: ROUTING WITH OSPF IN CORE NETWORK PROVIDE
# R3_P ROUTING WITH OSPF 1
      config terminal
         router ospf 1
            network 192.168.23.0 0.0.0.255 area 0
            network 192.168.34.0 0.0.0.255 area 0
         end
       wr
========================================================

# R2_PE ROUTING WITH OSPF 1
      config terminal
         router ospf 1
            network 192.168.23.0 0.0.0.255 area 0
            network 2.2.2.2 0.0.0.0 area 0
         end
       wr
========================================================

# R4_PE ROUTING WITH OSPF 1
      config terminal
         router ospf 1
            network 192.168.34.0 0.0.0.255 area 0
            network 4.4.4.4 0.0.0.0 area 0
         end
       wr
=========================================================

# STEP 4: CONFIGURE MPLS IN CORE NETWORK PROVIDE
# R3_P CONFIGURE MPLS
      config terminal
         interface s0/0
            mpls label protocol ldp
            mpls ip
         interface s0/1
            mpls label protocol ldp
            mpls ip
          end
         wr
=====================================================

# R2_PE CONFIGURE MPLS
      config terminal
         interface s0/2
            mpls label protocol ldp
            mpls ip
          end
         wr
======================================================

# R4_PE CONFIGURE MPLS
      config terminal
         interface s0/1
            mpls label protocol ldp
            mpls ip
          end
         wr
======================================================
# Testing table routing, LIB, LFIB, CEF
# show ip route
# show mpls ldp neighbor
# show mpls forwarding-table (LFIB)
# show mpls ldp bindings (FIB)
# show ip cef 
========================================================

2, CREATED BY CORRESPONDING VRF FOR EACH CUSTOMER ON ROUTER PE 
# STEP 5: ON ROUTER PE CREATED BY CORRESPONDING VRF FOR EACH CUSTOMER  
# SITE A 
# R2_PE 
     config terminal
ip vrf siteA
 rd 15:15
 route-target export 1:1
 route-target import 5:5
end
wr
=========================================================

# R4_PE 
     config terminal
ip vrf siteA
 rd 15:15
 route-target export 5:5
 route-target import 1:1
end
wr
============================================================
 
# SITE B 
# R2_PE 
     config terminal
ip vrf siteB
 rd 67:67
 route-target export 6:6
 route-target import 7:7
end
wr
=========================================================

# R4_PE 
     config terminal
ip vrf siteB
 rd 67:67
 route-target export 7:7
 route-target import 6:6
end
wr
============================================================
# Testing table VRF on R2_PE; R4_PE
# show ip vrf
============================================================

# STEP 6: ASSOCIATE TABLE VRF WITH INTERFACE OF EACH CUSTOMER 
# SITE A 
# R2_PE 
     config terminal
interface s0/0
 ip vrf forwarding siteA
 ip address 192.168.12.2 255.255.255.0
end
wr
===================================================

# R4_PE
     config terminal
interface s0/0
 ip vrf forwarding siteA
 ip address 192.168.45.4 255.255.255.0
end
wr
===================================================

# SITE B 
# R2_PE 
     config terminal
interface s0/1
 ip vrf forwarding siteB
 ip address 192.168.26.2 255.255.255.0
end
wr
===================================================

# R4_PE 
     config terminal
interface s0/2
 ip vrf forwarding siteB
 ip address 192.168.47.4 255.255.255.0
end
wr
===================================================
# Testing routing VRF and ping on R2_PE; R4_PE
# show ip route vrf siteA
# ping vrf siteA 192.168.12.1
# show ip route vrf siteB
# ping vrf siteB 192.168.45.5
====================================================

3 ROUTING WITH EIGRP BETWEEN PE AND CE 
# STEP7: CONFIGURE ON ROUTER PE OF PROVIDE
# R2_PE SITE A
      config terminal
        router eigrp 1
 address-family ipv4 vrf siteA
   network 192.168.12.0
   no auto-summary
   autonomous-system 101
   redistribute bgp 24 metric 1000 100 255 1 1500
 end
wr
===========================================================
 
# R4_PE SITE A
      config terminal
        router eigrp 1
 address-family ipv4 vrf siteA
   network 192.168.45.0
   no auto-summary
   autonomous-system 101
   redistribute bgp 24 metric 1000 100 255 1 1500
 end
wr
===========================================================

# R2_PE SITE B
      config terminal
        router eigrp 1
 address-family ipv4 vrf siteB
   network 192.168.26.0
   no auto-summary
   autonomous-system 201
   redistribute bgp 24 metric 1000 100 255 1 1500
 end
wr
===========================================================

# R4_PE SITE B
      config terminal
        router eigrp 1
 address-family ipv4 vrf siteB
   network 192.168.47.0
   no auto-summary
   autonomous-system 202
   redistribute bgp 24 metric 1000 100 255 1 1500
 end
wr
===========================================================

# STEP8: CONFIGURE ON ROUTER CE OF CUSTOMER
# R1_CE
     config terminal
        router eigrp 101
network 192.168.12.0
network 1.1.1.0
no auto-summary
      end
      wr
===========================================================

# R5_CE
     config terminal
        router eigrp 101
network 192.168.45.0
network 5.5.5.0
no auto-summary
      end
      wr
============================================================

# R6_CE
     config terminal
        router eigrp 201
network 192.168.26.0
network 6.6.6.0
no auto-summary
      end
      wr
============================================================

# R7_CE
     config terminal
        router eigrp 202
network 192.168.47.0
network 7.7.7.0
no auto-summary
      end
      wr
==========================================================
# Testing establish VRF neighborly relations on R2_PE, R4_PE
# show ip eigrp vrf siteA neighbors
# show ip eigrp vrf siteB neighbors
# Test establish neighborly relations on R1_CE, R5_CE, R6_CE, R7_CE
# show ip eigrp neighbors 
==========================================================

4 ROUTING WITH MP-BGP BETWEEN PE AND PE 
# STEP8: ESTABLISH NEIGHBOR RELATION MP-BGP BETWEEN R2_PE AND R4_PE
# R2_PE
     config terminal
router bgp 24
 neighbor 4.4.4.4 remote-as 24
          neighbor 4.4.4.4 update-source loopback 0
end
wr
==========================================================

# R4_PE
     config terminal
router bgp 24
 neighbor 2.2.2.2 remote-as 24
          neighbor 2.2.2.2 update-source loopback 0
end
wr
=========================================================
# Testing establish BGP neighborly relations on R2_PE, R4_PE
# show ip bgp summary
=========================================================

5 CONFIGURE VPNv4 ADDRESS-FAMILY 
# STEP9: CONFIGURE VPNv4 ADDRESS-FAMILY 
# R2_PE
     config terminal
router bgp 24
 address-family vpnv4
          neighbor 4.4.4.4 activate
end
wr
=========================================================

# R4_PE
     config terminal
router bgp 24
 address-family vpnv4
          neighbor 2.2.2.2 activate
end
wr
=========================================================

6 CONFIGURE IPv4 ADDRESS-FAMILY
# STEP10: CONFIGURE IPv4 ADDRESS-FAMILY 
# R2_PE siteA
     config terminal
router bgp 24
 address-family ipv4 vrf siteA
          redistribute eigrp 101
end
wr
=========================================================

# R4_PE siteA
     config terminal
router bgp 24
 address-family ipv4 vrf siteA
          redistribute eigrp 101
end
wr
==========================================================

# R2_PE siteB
     config terminal
router bgp 24
 address-family ipv4 vrf siteB
          redistribute eigrp 201
end
wr
=========================================================

# R2_PE siteB
     config terminal
router bgp 24
 address-family ipv4 vrf siteB
          redistribute eigrp 202
end
wr
==========================================================
     =======================THE END================

Không có nhận xét nào:

Đăng nhận xét