Qui hoạch IP:
(1)192.168.1.0/24
(2)192.168.2.0/24
(3)192.168.3.0/24
(4)192.168.4.0/24
(5)192.168.5.0/24
(6)192.168.6.0/24
(7)Lo0: 10.10.10.10/24
(8)Lo0: 20.20.20.20/24
(9)Lo0: 1.1.1.1/24
(10)Lo0: 3.3.3.3/24
(11)Lo0: 2.2.2.2/24
(12)Lo0: 30.30.30.30/24
(13)Lo0: 40.40.40.40/24
1.Yêu cầu:
·Cấu hình MPLS domain giữa PE01 – P – PE02 (IGP = RIPv2)
·Cấu hình BGP AS 1 giữa PE01 và PE 02
·Trên PE01 tạo vrf A1 và B1 tương ứng với mỗi Router A1,B1
·Trên PE02 tạo vrf A2 và B2 tương ứng với mỗi Router A2,B2
·A1 – A2 – B1 – B2 chạy giao thức định tuyến EIGRP
i.A1 : AS = 10
ii.A2 : AS = 30
iii.B1 : AS = 20
iv.B2 : AS = 40
2.Cấu hình:
ROUTER A1:
!
hostname A1
!
no ip domain lookup
!
interface Loopback0
ip address 10.10.10.10 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
!
router eigrp 10
network 10.0.0.0
network 192.168.1.0
no auto-summary
!
ip classless
!
ip http server
End
ROUTER B1:
hostname B1
!
ip cef
!
no ip domain lookup
!
interface Loopback0
ip address 20.20.20.20 255.255.255.0
!
interface Serial0/0
ip address 192.168.2.1 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
ip address 100.100.100.100 255.255.255.0
no keepalive
!
!
router eigrp 20
network 20.0.0.0
network 100.0.0.0
network 192.168.2.0
no auto-summary
!
ip classless
!
ip http server
End
ROUTER PE01:
hostname PE01
!
!
no ip domain lookup
ip vrf A1
rd 1:100
route-target export 1:100
route-target import 1:100
!
ip vrf B1
rd 1:200
route-target export 1:200
route-target import 1:200
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip vrf forwarding A1
ip address 192.168.1.2 255.255.255.0
!
interface Serial0/0
ip vrf forwarding B1
ip address 192.168.2.2 255.255.255.0
clock rate 64000
!
interface FastEthernet0/1
ip address 192.168.3.1 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
!
router eigrp 100
auto-summary
!
address-family ipv4 vrf B1
network 192.168.2.0
no auto-summary
autonomous-system 20
exit-address-family
!
address-family ipv4 vrf A1
network 192.168.1.0
no auto-summary
autonomous-system 10
exit-address-family
!
router rip
version 2
network 1.0.0.0
network 192.168.3.0
no auto-summary
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf B1
redistribute eigrp 20
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf A1
redistribute eigrp 10
no auto-summary
no synchronization
exit-address-family
!
ip classless
!
ip http server
no ip http secure-server
!
End
ROUTER P:
hostname P
!
!
ip cef
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.3.2 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
interface FastEthernet0/1
ip address 192.168.4.1 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
router rip
version 2
network 3.0.0.0
network 192.168.3.0
network 192.168.4.0
no auto-summary
!
ip classless
!
ip http server
End
ROUTER PE02:
!
hostname PE02
!
ip cef
!
no ip domain lookup
ip vrf A2
rd 1:100
route-target export 1:100
route-target import 1:100
!
ip vrf B2
rd 1:200
route-target export 1:200
route-target import 1:200
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.4.2 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
interface Serial0/0
ip vrf forwarding A2
ip address 192.168.5.1 255.255.255.0
clock rate 64000
!
interface FastEthernet0/1
ip vrf forwarding B2
ip address 192.168.6.1 255.255.255.0
duplex auto
speed auto
!
router eigrp 100
auto-summary
!
address-family ipv4 vrf B2
redistribute bgp 1 metric 1000 100 100 100 100
network 192.168.6.0
auto-summary
autonomous-system 40
exit-address-family
!
address-family ipv4 vrf A2
redistribute bgp 1 metric 1000 100 100 100 100
network 192.168.5.0
auto-summary
autonomous-system 30
exit-address-family
!
router rip
version 2
network 2.0.0.0
network 192.168.4.0
no auto-summary
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf B2
redistribute eigrp 40
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf A2
redistribute eigrp 30
no auto-summary
no synchronization
exit-address-family
!
ip classless
!
ip http server
no ip http secure-server
!
!
End
ROUTER A2:
!
hostname A2
!
!
!
ip cef
!
no ip domain lookup
ip audit po max-events 100
!
interface Loopback0
ip address 30.30.30.30 255.255.255.0
!
interface Serial0/0
ip address 192.168.5.2 255.255.255.0
clock rate 2000000
!
!
router eigrp 30
network 30.0.0.0
network 192.168.5.0
no auto-summary
!
ip classless
!
ip http server
no ip http secure-server
!
End
ROUTER B2:
!
hostname B2
!
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
no ip domain lookup
ip audit po max-events 100
!
!
interface Loopback0
ip address 40.40.40.40 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.6.2 255.255.255.0
duplex auto
speed auto
!
!
router eigrp 40
network 40.0.0.0
network 192.168.6.0
no auto-summary
!
ip classless
!
ip http server
!
End
(1)192.168.1.0/24
(2)192.168.2.0/24
(3)192.168.3.0/24
(4)192.168.4.0/24
(5)192.168.5.0/24
(6)192.168.6.0/24
(7)Lo0: 10.10.10.10/24
(8)Lo0: 20.20.20.20/24
(9)Lo0: 1.1.1.1/24
(10)Lo0: 3.3.3.3/24
(11)Lo0: 2.2.2.2/24
(12)Lo0: 30.30.30.30/24
(13)Lo0: 40.40.40.40/24
1.Yêu cầu:
·Cấu hình MPLS domain giữa PE01 – P – PE02 (IGP = RIPv2)
·Cấu hình BGP AS 1 giữa PE01 và PE 02
·Trên PE01 tạo vrf A1 và B1 tương ứng với mỗi Router A1,B1
·Trên PE02 tạo vrf A2 và B2 tương ứng với mỗi Router A2,B2
·A1 – A2 – B1 – B2 chạy giao thức định tuyến EIGRP
i.A1 : AS = 10
ii.A2 : AS = 30
iii.B1 : AS = 20
iv.B2 : AS = 40
2.Cấu hình:
ROUTER A1:
!
hostname A1
!
no ip domain lookup
!
interface Loopback0
ip address 10.10.10.10 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
!
router eigrp 10
network 10.0.0.0
network 192.168.1.0
no auto-summary
!
ip classless
!
ip http server
End
ROUTER B1:
hostname B1
!
ip cef
!
no ip domain lookup
!
interface Loopback0
ip address 20.20.20.20 255.255.255.0
!
interface Serial0/0
ip address 192.168.2.1 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
ip address 100.100.100.100 255.255.255.0
no keepalive
!
!
router eigrp 20
network 20.0.0.0
network 100.0.0.0
network 192.168.2.0
no auto-summary
!
ip classless
!
ip http server
End
ROUTER PE01:
hostname PE01
!
!
no ip domain lookup
ip vrf A1
rd 1:100
route-target export 1:100
route-target import 1:100
!
ip vrf B1
rd 1:200
route-target export 1:200
route-target import 1:200
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip vrf forwarding A1
ip address 192.168.1.2 255.255.255.0
!
interface Serial0/0
ip vrf forwarding B1
ip address 192.168.2.2 255.255.255.0
clock rate 64000
!
interface FastEthernet0/1
ip address 192.168.3.1 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
!
router eigrp 100
auto-summary
!
address-family ipv4 vrf B1
network 192.168.2.0
no auto-summary
autonomous-system 20
exit-address-family
!
address-family ipv4 vrf A1
network 192.168.1.0
no auto-summary
autonomous-system 10
exit-address-family
!
router rip
version 2
network 1.0.0.0
network 192.168.3.0
no auto-summary
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf B1
redistribute eigrp 20
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf A1
redistribute eigrp 10
no auto-summary
no synchronization
exit-address-family
!
ip classless
!
ip http server
no ip http secure-server
!
End
ROUTER P:
hostname P
!
!
ip cef
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.3.2 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
interface FastEthernet0/1
ip address 192.168.4.1 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
router rip
version 2
network 3.0.0.0
network 192.168.3.0
network 192.168.4.0
no auto-summary
!
ip classless
!
ip http server
End
ROUTER PE02:
!
hostname PE02
!
ip cef
!
no ip domain lookup
ip vrf A2
rd 1:100
route-target export 1:100
route-target import 1:100
!
ip vrf B2
rd 1:200
route-target export 1:200
route-target import 1:200
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.4.2 255.255.255.0
mpls label protocol ldp
tag-switching ip
!
interface Serial0/0
ip vrf forwarding A2
ip address 192.168.5.1 255.255.255.0
clock rate 64000
!
interface FastEthernet0/1
ip vrf forwarding B2
ip address 192.168.6.1 255.255.255.0
duplex auto
speed auto
!
router eigrp 100
auto-summary
!
address-family ipv4 vrf B2
redistribute bgp 1 metric 1000 100 100 100 100
network 192.168.6.0
auto-summary
autonomous-system 40
exit-address-family
!
address-family ipv4 vrf A2
redistribute bgp 1 metric 1000 100 100 100 100
network 192.168.5.0
auto-summary
autonomous-system 30
exit-address-family
!
router rip
version 2
network 2.0.0.0
network 192.168.4.0
no auto-summary
!
router bgp 1
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf B2
redistribute eigrp 40
no auto-summary
no synchronization
exit-address-family
!
address-family ipv4 vrf A2
redistribute eigrp 30
no auto-summary
no synchronization
exit-address-family
!
ip classless
!
ip http server
no ip http secure-server
!
!
End
ROUTER A2:
!
hostname A2
!
!
!
ip cef
!
no ip domain lookup
ip audit po max-events 100
!
interface Loopback0
ip address 30.30.30.30 255.255.255.0
!
interface Serial0/0
ip address 192.168.5.2 255.255.255.0
clock rate 2000000
!
!
router eigrp 30
network 30.0.0.0
network 192.168.5.0
no auto-summary
!
ip classless
!
ip http server
no ip http secure-server
!
End
ROUTER B2:
!
hostname B2
!
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
no ip domain lookup
ip audit po max-events 100
!
!
interface Loopback0
ip address 40.40.40.40 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.6.2 255.255.255.0
duplex auto
speed auto
!
!
router eigrp 40
network 40.0.0.0
network 192.168.6.0
no auto-summary
!
ip classless
!
ip http server
!
End
khi chay cho ra bang LIFB
PE01#show mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 16 2.2.2.0/24 0 Fa0/1 192.168.3.2
17 Pop tag 3.3.3.0/24 0 Fa0/1 192.168.3.2
18 Pop tag 192.168.4.0/24 0 Fa0/1 192.168.3.2
19 Untagged 20.20.20.0/24[V] 0 Se0/0 point2point
20 Untagged 100.100.100.0/24[V] \
0 Se0/0 point2point
21 Untagged 10.10.10.0/24[V] 0 Fa0/0 192.168.1.1
22 Aggregate 192.168.1.0/24[V] 520
23 Aggregate 192.168.2.0/24[V] 520
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 16 2.2.2.0/24 0 Fa0/1 192.168.3.2
17 Pop tag 3.3.3.0/24 0 Fa0/1 192.168.3.2
18 Pop tag 192.168.4.0/24 0 Fa0/1 192.168.3.2
19 Untagged 20.20.20.0/24[V] 0 Se0/0 point2point
20 Untagged 100.100.100.0/24[V] \
0 Se0/0 point2point
21 Untagged 10.10.10.0/24[V] 0 Fa0/0 192.168.1.1
22 Aggregate 192.168.1.0/24[V] 520
23 Aggregate 192.168.2.0/24[V] 520
Comment