Open main menu

My Notepad β

Cisco

Certification Material

MPLS, VRF and BGP between a Cisco and a Mikrotik

!
!
ip vrf c1
 description Custom #1 VRF
 rd 1:1
 route-target export 1:1
 route-target import 1:1
!
ip vrf c2
 description Custom #2 VRF
 rd 1:2
 route-target export 1:2
 route-target import 1:2
!
!
mpls label protocol ldp
!
!
interface Loopback0
 description MPLS Backbone Loopback Interface
 ip address 172.16.0.1 255.255.255.255
!
interface Loopback1
 description Customer #1 Local Loopback Interface (used for testing)
 ip vrf forwarding c1
 ip address 10.0.1.1 255.255.255.255
!
interface Loopback2
 description Customer #2 Local Loopback Interface (used for testing)
 ip vrf forwarding c2
 ip address 10.0.2.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 1.1.1.1 255.255.255.252
 duplex full
 speed 100
 mpls ip
!
interface FastEthernet0/1
 ip vrf forwarding c1
 ip address 10.2.0.1 255.255.255.252
 duplex full
 speed 100
!
router ospf 1
 router-id 172.16.0.1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 172.16.0.2 remote-as 1
 neighbor 172.16.0.2 update-source Loopback0
 no auto-summary
 !
 address-family vpnv4
 neighbor 172.16.0.2 activate
 neighbor 172.16.0.2 send-community both
 exit-address-family
 !
 address-family ipv4 vrf c2
 redistribute connected
 redistribute static
 no auto-summary
 no synchronization
 exit-address-family
 !
 address-family ipv4 vrf c1
 redistribute connected
 redistribute static
 no auto-summary
 no synchronization
 exit-address-family
!
!
/interface bridge
add name=bridge-loopback-mpls-core
add name=bridge-loopback-vrf-c1
add name=bridge-loopback-vrf-c2
/routing bgp instance
set default as=1 client-to-client-reflection=yes comment="" disabled=no \
    ignore-as-path-len=no name=default out-filter="" redistribute-connected=\
    no redistribute-ospf=no redistribute-other-bgp=no redistribute-rip=no \
    redistribute-static=no router-id=0.0.0.0 routing-table=""
/routing ospf instance
set default comment="" disabled=no distribute-default=never in-filter=ospf-in \
    metric-bgp=auto metric-connected=20 metric-default=1 metric-other-ospf=\
    auto metric-rip=20 metric-static=20 name=default out-filter=ospf-out \
    redistribute-bgp=no redistribute-connected=no redistribute-other-ospf=no \
    redistribute-rip=no redistribute-static=no router-id=172.16.0.2
/routing ospf area
set backbone area-id=0.0.0.0 comment="" disabled=no instance=default name=\
    backbone type=default
/ip address
add address=1.1.1.2/30 broadcast=1.1.1.3 comment="" disabled=no interface=\
    ether1 network=1.1.1.0
add address=172.16.0.2/32 broadcast=172.16.0.2 comment="" disabled=no \
    interface=bridge-loopback-mpls-core network=172.16.0.2
add address=10.0.1.2/32 broadcast=10.0.1.2 comment="" disabled=no interface=\
    bridge-loopback-vrf-c1 network=10.0.1.2
add address=10.0.2.2/32 broadcast=10.0.2.2 comment="" disabled=no interface=\
    bridge-loopback-vrf-c2 network=10.0.2.2
add address=10.10.20.4/24 broadcast=10.10.20.255 comment="" disabled=yes \
    interface=ether3 network=10.10.20.0
/ip route vrf
add comment="" disabled=no export-route-targets=1:1 import-route-targets=1:1 \
    interfaces=bridge-loopback-vrf-c1,ether3 route-distinguisher=1:1 \
    routing-mark=vrf-c1
add comment="" disabled=no export-route-targets=1:2 import-route-targets=1:2 \
    interfaces=bridge-loopback-vrf-c2 route-distinguisher=1:2 routing-mark=\
    vrf-c2
/mpls
set dynamic-label-range=16-1048575 propagate-ttl=yes
/mpls interface
add comment="" disabled=no interface=all mpls-mtu=1508
/mpls ldp
set distribute-for-default-route=no enabled=yes hop-limit=255 loop-detect=no \
    lsr-id=172.16.0.2 path-vector-limit=255 transport-address=172.16.0.2 \
    use-explicit-null=no
/mpls ldp interface
add accept-dynamic-neighbors=yes comment="" disabled=no hello-interval=5s \
    hold-time=15s interface=ether1 transport-address=172.16.0.2
/routing bgp instance vrf
add disabled=no in-filter="" instance=default out-filter="" \
    redistribute-connected=yes redistribute-ospf=no redistribute-other-bgp=\
    yes redistribute-rip=no redistribute-static=yes routing-mark=vrf-c1
add disabled=no in-filter="" instance=default out-filter="" \
    redistribute-connected=yes redistribute-ospf=no redistribute-other-bgp=\
    yes redistribute-rip=no redistribute-static=yes routing-mark=vrf-c2
/routing bgp peer
add address-families=vpnv4 as-override=no comment="" default-originate=never \
    disabled=no hold-time=3m in-filter="" instance=default multihop=no name=\
    peer1 nexthop-choice=default out-filter="" passive=no remote-address=\
    172.16.0.1 remote-as=1 remove-private-as=no route-reflect=no tcp-md5-key=\
    "" ttl=default update-source=172.16.0.2 use-bfd=no
/routing ospf network
add area=backbone comment="" disabled=no network=0.0.0.0/0

T1 Controller Information

show service-module 
show controllers T1