vlan-tagging; activate 802.1q
vlan-tagging; activate 802.1q
admin@ROUTER-PR> show configuration
## Last commit: 2021-09-04 00:32:19 UTC by admin
version 12.1R1.9;
system {
host-name ROUTER-PR;
root-authentication {
encrypted-password encrypted-password; ## SECRET-DATA
}
login {
user admin {
full-name ADMINISTRADOR;
uid 100;
class super-user;
authentication {
encrypted-password "$1$7HIQbfrq$TB3x4EVFJRBDWJUxnqhZM/"; ## SECRET-DATA
}
}
}
services {
ftp;
ssh;
telnet;
netconf {
ssh {
port 830;
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
interfaces {
em0 {
description INTERNET;
unit 0 {
family inet {
address 192.168.1.2/30;
}
family mpls;
}
}
em1 {
vlan-tagging;
encapsulation vlan-ccc;
unit 512 {
encapsulation vlan-ccc;
vlan-id 512;
}
}
em2 {
unit 0 {
family inet {
address 192.168.1.200/24;
address 192.168.1.180/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 1.1.1.1/32;
}
family mpls;
}
}
}
routing-options {
static {
route 0.0.0.0/0 next-hop 192.168.1.254;
}
autonomous-system 2;
auto-export;
}
protocols {
mpls {
traffic-engineering mpls-forwarding;
interface lo0.0;
interface em0.0;
}
bgp {
group EXTERNOS {
type external;
peer-as 1;
local-as 2;
neighbor 192.168.1.1 {
peer-as 1;
}
}
group INTERNO {
type internal;
local-address 10.0.0.1;
peer-as 65000;
local-as 65000;
neighbor 10.0.0.2;
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface em0.0;
interface lo0.0;
}
}
ldp {
interface em0.0;
interface lo0.0;
}
l2circuit {
neighbor 2.2.2.2 {
interface em1.512 {
virtual-circuit-id 131313;
}
}
}
}
policy-options {
policy-statement ACEITA-LOOPBACK {
term 1 {
from {
route-filter 1.1.1.1/32 exact;
}
then accept;
}
}
policy-statement REDISTRIBUI-LOOPBACK {
from protocol direct;
then accept;
}
}
admin@ROUTER-PR> show configuration | display set
set version 12.1R1.9
set system host-name ROUTER-PR
set system root-authentication encrypted-password encrypted-password
set system login user admin full-name ADMINISTRADOR
set system login user admin uid 100
set system login user admin class super-user
set system login user admin authentication encrypted-password "$1$7HIQbfrq$TB3x4EVFJRBDWJUxnqhZM/"
set system services ftp
set system services ssh
set system services telnet
set system services netconf ssh port 830
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces em0 description INTERNET
set interfaces em0 unit 0 family inet address 192.168.1.2/30
set interfaces em0 unit 0 family mpls
set interfaces em1 vlan-tagging
set interfaces em1 encapsulation vlan-ccc
set interfaces em1 unit 512 encapsulation vlan-ccc
set interfaces em1 unit 512 vlan-id 512
set interfaces em2 unit 0 family inet address 192.168.1.200/24
set interfaces em2 unit 0 family inet address 192.168.1.180/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
set interfaces lo0 unit 0 family mpls
set routing-options static route 0.0.0.0/0 next-hop 192.168.1.254
set routing-options autonomous-system 2
set routing-options auto-export
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls interface lo0.0
set protocols mpls interface em0.0
set protocols bgp group EXTERNOS type external
set protocols bgp group EXTERNOS peer-as 1
set protocols bgp group EXTERNOS local-as 2
set protocols bgp group EXTERNOS neighbor 192.168.1.1 peer-as 1
set protocols bgp group INTERNO type internal
set protocols bgp group INTERNO local-address 10.0.0.1
set protocols bgp group INTERNO peer-as 65000
set protocols bgp group INTERNO local-as 65000
set protocols bgp group INTERNO neighbor 10.0.0.2
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface em0.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface em0.0
set protocols ldp interface lo0.0
set protocols l2circuit neighbor 2.2.2.2 interface em1.512 virtual-circuit-id 131313
set policy-options policy-statement ACEITA-LOOPBACK term 1 from route-filter 1.1.1.1/32 exact
set policy-options policy-statement ACEITA-LOOPBACK term 1 then accept
set policy-options policy-statement REDISTRIBUI-LOOPBACK from protocol direct
set policy-options policy-statement REDISTRIBUI-LOOPBACK then accept
root@ROUTER-SP# show
## Last changed: 2021-09-04 00:29:31 UTC
version 12.1R1.9;
system {
host-name ROUTER-SP;
root-authentication {
encrypted-password "$1$rlKQZr8F$cBkPXF.7YxTf1aCbSall8/"; ## SECRET-DATA
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 192.168.1.1/30;
}
family mpls;
}
}
em1 {
vlan-tagging;
encapsulation vlan-ccc;
unit 512 {
encapsulation vlan-ccc;
vlan-id 512;
}
}
lo0 {
unit 0 {
family inet {
address 2.2.2.2/32;
address 55.5.5.5/32;
}
family mpls;
}
}
}
routing-options {
autonomous-system 1;
auto-export {
family inet {
unicast;
}
}
}
protocols {
mpls {
traffic-engineering mpls-forwarding;
interface em0.0;
interface lo0.0;
}
bgp {
group EXTERNOS {
type external;
log-updown;
family l2vpn {
signaling;
}
export REDISTRIBUI;
peer-as 2;
local-as 1;
neighbor 192.168.1.2 {
peer-as 2;
}
}
}
ospf {
traffic-engineering;
area 0.0.0.0 {
interface em0.0;
interface lo0.0;
}
}
ldp {
interface em0.0;
interface lo0.0;
}
l2circuit {
neighbor 1.1.1.1 {
interface em1.512 {
virtual-circuit-id 131313;
}
}
}
}
policy-options {
prefix-list DENY-LOOPBACK {
2.2.2.2/32;
}
policy-statement DENY-PREFIXOS {
from {
prefix-list DENY-LOOPBACK;
}
then reject;
}
policy-statement REDISTRIBUI {
term 1 {
from protocol direct;
then accept;
}
}
}
[edit]
root@ROUTER-SP# exit
Exiting configuration mode
root@ROUTER-SP> show configuration | display set
set version 12.1R1.9
set system host-name ROUTER-SP
set system root-authentication encrypted-password "$1$rlKQZr8F$cBkPXF.7YxTf1aCbSall8/"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces em0 unit 0 family inet address 192.168.1.1/30
set interfaces em0 unit 0 family mpls
set interfaces em1 vlan-tagging
set interfaces em1 encapsulation vlan-ccc
set interfaces em1 unit 512 encapsulation vlan-ccc
set interfaces em1 unit 512 vlan-id 512
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
set interfaces lo0 unit 0 family inet address 55.5.5.5/32
set interfaces lo0 unit 0 family mpls
set routing-options autonomous-system 1
set routing-options auto-export family inet unicast
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls interface em0.0
set protocols mpls interface lo0.0
set protocols bgp group EXTERNOS type external
set protocols bgp group EXTERNOS log-updown
set protocols bgp group EXTERNOS family l2vpn signaling
set protocols bgp group EXTERNOS export REDISTRIBUI
set protocols bgp group EXTERNOS peer-as 2
set protocols bgp group EXTERNOS local-as 1
set protocols bgp group EXTERNOS neighbor 192.168.1.2 peer-as 2
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface em0.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface em0.0
set protocols ldp interface lo0.0
set protocols l2circuit neighbor 1.1.1.1 interface em1.512 virtual-circuit-id 131313
set policy-options prefix-list DENY-LOOPBACK 2.2.2.2/32
set policy-options policy-statement DENY-PREFIXOS from prefix-list DENY-LOOPBACK
set policy-options policy-statement DENY-PREFIXOS then reject
set policy-options policy-statement REDISTRIBUI term 1 from protocol direct
set policy-options policy-statement REDISTRIBUI term 1 then accept
root@ROUTER-SP> show l2circuit connections
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: 1.1.1.1
Interface Type St Time last up # Up trans
em1.512(vc 131313) rmt Up Sep 4 00:30:33 2021 1
Remote PE: 1.1.1.1, Negotiated control-word: Yes (Null)
Incoming label: 299776, Outgoing label: 299776
Negotiated PW status TLV: No
Local interface: em1.512, Status: Up, Encapsulation: VLAN
root@ROUTER-SP> ping mpls l2circuit virtual-circuit 131313 neighbor 1.1.1.1...
!!!!!
--- lsping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
root@ROUTER-SP>
root@ROUTER-SP> show ldp database
Input label database, 2.2.2.2:0--1.1.1.1:0
Label Prefix
3 1.1.1.1/32
299808 2.2.2.2/32
299776 L2CKT CtrlWord VLAN VC 131313
Output label database, 2.2.2.2:0--1.1.1.1:0
Label Prefix
299808 1.1.1.1/32
3 2.2.2.2/32
299776 L2CKT CtrlWord VLAN VC 131313