
/ interface bridge add name = loopback add l2mtu = 1526 name = vpn / ip address add address = 10.0.11.24 / 24 interface = eth2 add address = 172.19.238.33 / 32 interface = loopback network = 172.19.238.33
/ routing ospf instance set [find default = yes] router-id = 172.19.238.33 / routing ospf interface add interface = eth2 / routing ospf network add area = backbone network = 10.0.11.0 / 24 add area = backbone network = 172.19.238.33 / 32
/ mpls interface set [find default = yes] mpls-mtu = 1526 / mpls ldp set enabled = yes lsr-id = 172.19.238.33 transport-address = 172.19.238.33 / mpls ldp interface add interface = eth2
/ interface vpls advertised-l2mtu = 1526 cisco-style = yes cisco-style-id = 5 disabled = no l2mtu = 1526 \ name = junos-l2circuit remote-peer = 172.19.238.34 / interface bridge port add bridge = vpn interface = eth5 add bridge = vpn interface = junos-l2circuit
/ interface bridge add name = loopback add l2mtu = 1526 name = vpn / ip address add address = 172.19.238.34 / 32 interface = loopback network = 172.19.238.34 add address = 192.168.168.2 / 24 interface = eth2 network = 192.168.168.0 / routing ospf instance set [find default = yes] router-id = 172.19.238.34 / routing ospf interface add interface = eth2 / routing ospf network add area = backbone network = 192.168.168.0 / 24 add area = backbone network = 172.19.238.34 / 32 / mpls interface set [find default = yes] mpls-mtu = 1526 / mpls ldp set enabled = yes lsr-id = 172.19.238.34 transport-address = 172.19.238.34 / mpls ldp interface add interface = eth2 / interface vpls advertised-l2mtu = 1526 cisco-style = yes cisco-style-id = 5 disabled = no l2mtu = 1526 \ name = junos-l2circuit remote-peer = 172.19.238.33 / interface bridge port add bridge = vpn interface = eth5 add bridge = vpn interface = junos-l2circuit
interfaces {
fe-0/0/6 {
description mkt.192.168.168.2 - pe;
mtu 1624;
unit 0 {
family inet {
mtu 1500;
address 192.168.168.1/24;
}
family mpls;
}
}
fe-0/0/7 {
description mkt.10.0.11.24 - pe;
mtu 1624;
unit 0 {
family inet {
mtu 1500;
address 10.0.11.23/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 172.19.238.35/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface fe-0/0 / 6.0 {
hello-interval 10;
}
interface fe-0/0 / 7.0 {
hello-interval 10;
}
interface lo0.0 {
passive;
}
}
}
}
protocols {
mpls {
interface all;
}
ldp {
egress-policy CONNECTED-ONLY;
transport-address 172.19.238.35;
interface fe-0/0 / 6.0;
interface fe-0/0 / 7.0;
interface lo0.0;
}
policy-options {
prefix-list LOOPBACK-PREFIX {
172.19.238.35/32;
}
policy-statement CONNECTED-ONLY {
from {
prefix-list LOOPBACK-PREFIX;
}
then accept;
}
}
security {
forwarding-options {
family {
mpls {
mode packet-based;
}
}
}
}

interfaces {
fe-0/0/5 {
description vpws2 - pe;
vlan tagging;
mtu 1624;
encapsulation vlan-ccc;
unit 0 {
encapsulation vlan-ccc;
vlan-id 1806;
}
}
fe-0/0/7 {
description mkt.10.0.11.24 - p;
mtu 1624;
unit 0 {
family inet {
mtu 1500;
address 10.0.11.23/24;
}
family mpls {
mtu 1526;
}
}
}
lo0 {
unit 0 {
family inet {
address 172.19.238.35/32;
}
}
}
}
routing-options {
static {
route 0.0.0.0/0 {
next-hop 172.19.238.1;
no-readvertise;
preference 200;
}
}
}
protocols {
mpls {
interface all;
}
ospf {
area 0.0.0.0 {
interface fe-0/0 / 7.0 {
hello-interval 10;
}
interface lo0.0 {
passive;
}
}
}
ldp {
egress-policy CONNECTED-ONLY;
transport-address 172.19.238.35;
interface all;
}
l2circuit {
neighbor 172.19.238.34 {
interface fe-0/0 / 5.0 {
virtual-circuit-id 5;
mtu 1526;
}
}
}
}
/ interface bridge add name = loopback / ip address add address = 10.0.11.24 / 24 interface = eth3 add address = 172.19.238.33 / 32 interface = loopback network = 172.19.238.33 add address = 192.168.168.1 / 24 interface = eth2 / routing ospf instance set [find default = yes] router-id = 172.19.238.33 / routing ospf interface add interface = eth2 add interface = eth3 / routing ospf network add area = backbone network = 10.0.11.0 / 24 add area = backbone network = 172.19.238.33 / 32 add area = backbone network = 192.168.168.0 / 24 / mpls interface set [find default = yes] mpls-mtu = 1526 / mpls ldp set enabled = yes lsr-id = 172.19.238.33 transport-address = 172.19.238.33 / mpls ldp interface add interface = eth2 add interface = eth3

/ interface bridge add name = loopback / ip address add address = 10.0.11.24 / 24 interface = eth3 add address = 10.0.12.24 / 24 interface = eth5 add address = 172.19.238.33 / 32 interface = loopback network = 172.19.238.33 add address = 192.168.168.1 / 24 interface = eth2 add address = 192.168.88.1 / 24 interface = eth4 / routing ospf instance set [find default = yes] router-id = 172.19.238.33 / routing ospf interface add interface = eth2 add interface = eth3 add interface = eth4 add interface = eth5 / routing ospf network add area = backbone network = 10.0.11.0 / 24 add area = backbone network = 10.0.12.0 / 24 add area = backbone network = 172.19.238.33 / 32 add area = backbone network = 192.168.168.0 / 24 add area = backbone network = 192.168.88.0 / 24 / mpls interface set [find default = yes] mpls-mtu = 1526 / mpls ldp set enabled = yes lsr-id = 172.19.238.33 transport-address = 172.19.238.33 / mpls ldp interface add interface = eth2 add interface = eth3 add interface = eth4 add interface = eth5
/ interface bridge add name = loopback add l2mtu = 1526 name = vpn / ip address add address = 172.19.238.34 / 32 interface = loopback network = 172.19.238.34 add address = 192.168.168.2 / 24 interface = eth2 network = 192.168.168.0 / routing ospf instance set [find default = yes] router-id = 172.19.238.34 / routing ospf interface add interface = eth2 / routing ospf network add area = backbone network = 192.168.168.0 / 24 add area = backbone network = 172.19.238.34 / 32 / mpls interface set [find default = yes] mpls-mtu = 1526 / mpls ldp set enabled = yes lsr-id = 172.19.238.34 transport-address = 172.19.238.34 / mpls ldp interface add interface = eth2 / interface vpls advertised-l2mtu = 1526 cisco-style = yes cisco-style-id = 5 disabled = no l2mtu = 1526 \ name = junos-l2circuit remote-peer = 172.19.238.33 / interface bridge port add bridge = vpn interface = eth5 add bridge = vpn interface = junos-l2circuit horizon = 1
/ interface bridge port set 0 horizon = 1
interfaces {
fe-0/0/5 {
description vpws2 - pe;
mtu 1624;
encapsulation ethernet-vpls;
unit 0 {
family vpls;
}
}
fe-0/0/6 {
description mkt.192.168.168.2 - pe;
mtu 1624;
unit 0 {
family inet {
mtu 1500;
address 192.168.168.1/24;
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 172.19.238.35/32;
}
}
}
}
protocols {
mpls {
interface all;
}
ospf {
area 0.0.0.0 {
interface fe-0/0 / 6.0 {
hello-interval 10;
}
interface fe-0/0 / 7.0 {
hello-interval 10;
}
interface lo0.0 {
passive;
}
}
}
ldp {
egress-policy CONNECTED-ONLY;
transport-address 172.19.238.35;
interface all;
}
}
policy-options {
prefix-list LOOPBACK-PREFIX {
172.19.238.35/32;
}
policy-statement CONNECTED-ONLY {
from {
prefix-list LOOPBACK-PREFIX;
}
then accept;
}
}
security {
forwarding-options {
family {
mpls {
mode packet-based;
}
}
}
}
routing-instances {
vpls-re {
instance-type vpls;
interface fe-0/0 / 5.0;
protocols {
vpls {
no-tunnel-services;
vpls-id 5;
mtu 1526;
neighbor 172.19.238.34;
neighbor 172.19.238.105;
}
}
}
}
snake @ srx1> show ldp neighbor Address Interface Label space ID Hold time 172.19.238.34 lo0.0 172.19.238.34 aion 42 10.0.11.24 fe-0/0 / 7.0 172.19.238.33 () 11
snake @ srx1> show l2circuit connections status
Layer-2 Circuit Connections:
Legend for connection status (St)
EI - encapsulation invalid NP - interface h / w not present
MM - mtu mismatch Dn - down
EM - encapsulation mismatch VC-Dn - Virtual circuit Down
CM - control-word mismatch Up - operational
VM - vlan id mismatch CF - Call admission control failure
OL - no outgoing label IB - TDM incompatible bitrate
NC - intf encaps not CCC / TCC TM - TDM misconfiguration
BK - Backup Connection ST - Standby Connection
CB - rcvd cell-bundle size bad SP - Static Pseudowire
LD - local site signaled down RS - remote site standby
RD - remote site signaled down XX - unknown
Legend for interface status
Up - operational
Dn - down
Neighbor: 172.19.238.34
Interface Type St Time last up # Up trans
fe-0/0 / 5.0 (vc 5) rmt Up Nov 9 18:27:45 2012 1
Remote PE: 172.19.238.34, Negotiated control-word: No
Incoming label: 300096, Outgoing label: 21
Negotiated PW status TLV: No
Local interface: fe-0/0 / 5.0, Status: Up, Encapsulation: VLAN
[admin @ pe-router] / mpls ldp neighbor> print
Flags: X - disabled, D - dynamic, O - operational, T - sending-targeted-hello, V - vpls
# TRANSPORT LOCAL-TRANSPORT PEER SEND-TARGETED ADDRESSES
0 DO 172.19.238.33 172.19.238.34 172.19.238.33 Audio no 10.0.11.24
172.19.74.2
172.19.238.33
192.168.88.1
192.168.168.1
1 DOTV 172.19.238.35 172.19.238.34 172.19.238.35 Spray yes 10.0.11.23
172.19.238.4
172.19.238.30
172.19.238.35
172.19.238.58
[admin @ pe-router] / mpls> forwarding-table print Flags: L - ldp, V - vpls, T - traffic-eng # IN-LABEL OUT-LABELS DESTINATION INTERFACE NEXTHOP 0 expl-null 1 L 16 56 172.19.238.56 / 30 eth2 192.168.168.1 2 L 17 10.0.11.0/24 eth2 192.168.168.1 3 L 18 57 172.19.238.28/30 eth2 192.168.168.1 4 L 19 58 172.19.238.35/32 eth2 192.168.168.1 5 L 20 172.19.238.33 / 32 eth2 192.168.168.1 6 V 21 junos-l2circuit
[admin @ pe-router]> interface vpls monitor junos-l2circuit once
remote label: 300096
local-label: 21
remote-status:
transport: 172.19.238.35/32
transport-nexthop: 192.168.168.1
imposed-labels: 58,300096
Source: https://habr.com/ru/post/169103/
All Articles