MPLS basic configuration
Posted
by
Vineet Menon
on Server Fault
See other posts from Server Fault
or by Vineet Menon
Published on 2012-10-29T10:26:32Z
Indexed on
2012/10/29
11:03 UTC
Read the original article
Hit count: 263
I want to test out MPLS VPN in my lab. I have 3 routers. 2 PEs and 1P router, all cisco 2921. Something like this,
----- ---- -----
| PE1 |.1____192.168.1.0____.2| P |.2____192.168.2.0____.1| PE2 |
| | | | | |
----- ---- -----
lo0:10.1.1.1 lo0:10.1.1.2 lo0:10.1.1.3
Here's the configuration file for each of them,
PE1 router
hostname PE1
!
no ipv6 cef
ip source-route
ip cef
!
!
!
ip vrf cust1
rd 100:100
route-target export 100:100
route-target import 100:100
!
!
interface Loopback0
ip address 10.1.1.1 255.255.255.255
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip vrf forwarding cust1
ip address 172.16.1.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
network 10.1.1.1 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
!
router bgp 100
bgp log-neighbor-changes
neighbor 10.1.1.3 remote-as 100
neighbor 10.1.1.3 update-source Loopback0
neighbor 172.16.1.2 remote-as 65001
!
address-family vpnv4
neighbor 10.1.1.3 activate
neighbor 10.1.1.3 send-community extended
exit-address-family
For P router:
hostname P
!
no ipv6 cef
ip source-route
ip cef
!
interface Loopback0
ip address 10.1.1.2 255.255.255.255
!
interface GigabitEthernet0/1
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/2
ip address 192.168.2.2 255.255.255.0
duplex auto
speed auto
!
router ospf 1
network 10.1.1.2 0.0.0.0 area 0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
!
For PE2 router:
!
hostname PE2
!
no ipv6 cef
ip source-route
ip cef
!
!
!
ip vrf cust1
rd 100:100
route-target export 100:100
route-target import 100:100
!
!
!
interface Loopback0
ip address 10.1.1.3 255.255.255.0
!
interface GigabitEthernet0/0
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip vrf forwarding cust1
ip address 172.16.2.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
network 10.1.1.3 0.0.0.0 area 0
network 192.168.2.0 0.0.0.255 area 0
!
router bgp 100
bgp log-neighbor-changes
neighbor 10.1.1.1 remote-as 100
neighbor 10.1.1.1 update-source Loopback0
neighbor 172.16.2.2 remote-as 65001
!
address-family vpnv4
neighbor 10.1.1.1 activate
neighbor 10.1.1.1 send-community extended
exit-address-family
!
I am following this article form cisco. But things are not working properly. Any help would be appreciated.
© Server Fault or respective owner