Manual:MPLS L2VPN vs Juniper: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Line 19: Line 19:
PE2 JunOS:
PE2 JunOS:


===Set up OSPF and LDP===
===Set up IP connection, OSPF and LDP===


PE1 RouterOS:
PE1 (RouterOS):
<pre>
/interface bridge
  add name=loopback


P RouterOS:
/ip address
  add address=192.168.168.2/24 interface=ether3
  add address=10.255.11.31/32 interface=loopback


PE2 JunOS:
/routing ospf network
  add area=backbone disabled=no network=192.168.168.0/24
  add area=backbone disabled=no network=10.255.11.31/32
 
/mpls ldp
  set enabled=yes lsr-id=10.255.11.31 transport-address=10.255.11.31
 
/mpls ldp interface
  add interface=ether3
</pre>
 
P (RouterOS):
<pre>
/interface bridge
  add name=loopback
 
/ip address
  add address=10.0.11.23/24 interface=ether1
  add address=192.168.168.1/24 interface=ether2
  add address=10.255.11.23/32 interface=loopback
 
/routing ospf network
  add area=backbone disabled=no network=10.0.11.0/24
  add area=backbone disabled=no network=192.168.168.0/24
  add area=backbone disabled=no network=10.255.11.23/32
 
/mpls ldp
  set enabled=yes lsr-id=10.255.11.23 transport-address=10.255.11.23
 
/mpls ldp interface
  add interface=ether1
  add interface=ether2
</pre>
 
PE2 (JunOS):
<pre>
interfaces {
    fe-0/0/0 {
        unit 0 {
            family inet {
                address 10.0.11.201/24;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.255.11.201/32;
            }
        }
    }
}
 
protocols {
    mpls {
        interface fe-0/0/0.0;
        interface lo0.0;
 
    }
 
    ospf {
        export [ export-connected originate ];
        area 0.0.0.0 {
            interface fe-0/0/0.0;
            interface lo0.0 {
                passive;
            }
        }
    }
    ldp {
        egress-policy connected-only;
        transport-address 10.255.11.201;
        interface all;
    }
}
</pre>
 
Finally we need to define policy options to advertise label binding for Loopback prefix:
<pre>
policy-options {
    prefix-list loopback-prefix {
        10.255.11.201/32;
    }
    policy-statement connected-only {
        from {
            prefix-list loopback-prefix;
        }
        then accept;
    }
}
</pre>


===Set up L2VPN===
===Set up L2VPN===

Revision as of 14:09, 19 April 2012

Summary

This article describes the basic setup of Point-to-Point L2VPN with Juniper J-series routers.

Configuration

Consider network setup as ilustrated below:

We will be setting up the layer 2 connection between the CE and PE routers as well as the MPLS and L2VPN between PE routers. The layer 2 link between the CE and PE routers will be an Ethernet VLAN circuit.


Set up VLANs

CE1 and CE2 routers:

PE1 RouterOS:

PE2 JunOS:

Set up IP connection, OSPF and LDP

PE1 (RouterOS):

/interface bridge 
  add name=loopback

/ip address
  add address=192.168.168.2/24 interface=ether3
  add address=10.255.11.31/32 interface=loopback

/routing ospf network
  add area=backbone disabled=no network=192.168.168.0/24
  add area=backbone disabled=no network=10.255.11.31/32

/mpls ldp
  set enabled=yes lsr-id=10.255.11.31 transport-address=10.255.11.31

/mpls ldp interface
  add interface=ether3

P (RouterOS):

/interface bridge 
  add name=loopback

/ip address
  add address=10.0.11.23/24 interface=ether1
  add address=192.168.168.1/24 interface=ether2
  add address=10.255.11.23/32 interface=loopback

/routing ospf network
  add area=backbone disabled=no network=10.0.11.0/24
  add area=backbone disabled=no network=192.168.168.0/24
  add area=backbone disabled=no network=10.255.11.23/32

/mpls ldp
  set enabled=yes lsr-id=10.255.11.23 transport-address=10.255.11.23

/mpls ldp interface
  add interface=ether1
  add interface=ether2

PE2 (JunOS):

interfaces {
    fe-0/0/0 {
        unit 0 {
            family inet {
                address 10.0.11.201/24;
            }
            family mpls;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                address 10.255.11.201/32;
            }
        }
    }
}

protocols {
    mpls {
        interface fe-0/0/0.0;
        interface lo0.0;

    }

    ospf {
        export [ export-connected originate ];
        area 0.0.0.0 {
            interface fe-0/0/0.0;
            interface lo0.0 {
                passive;
            }
        }
    }
    ldp {
        egress-policy connected-only;
        transport-address 10.255.11.201;
        interface all;
    }
}

Finally we need to define policy options to advertise label binding for Loopback prefix:

policy-options {
    prefix-list loopback-prefix {
        10.255.11.201/32;
    }
    policy-statement connected-only {
        from {
            prefix-list loopback-prefix;
        }
        then accept;
    }
}

Set up L2VPN

PE1 RouterOS:

PE2 Junos:

Verify Operation

PE1:

PE2:

See Also