bormoglotx@PE1> show configuration routing-instances CE1 instance-type vrf; interface ge-0/0/3.10; interface ge-0/0/3.20; route-distinguisher 1:1; vrf-target { import target:2:100; export target:2:100; } protocols { ospf { export ospf-export; area 0.0.0.0 { interface ge-0/0/3.10; interface ge-0/0/3.20; } } }
bormoglotx@PE1> show configuration interfaces ge-0/0/3 description "to SW1"; vlan-tagging; unit 10 { description "to CE1 site 1"; vlan-id 10; family inet { address 10.0.0.1/24; } } unit 20 { description "to CE1 site 2"; vlan-id 20; family inet { address 20.0.0.1/24; } }
bormoglotx@PE1> show route advertising-protocol bgp 10.0.10.10 CE1.inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/24 Self 100 I * 10.1.1.1/32 Self 2 100 I * 20.0.0.0/24 Self 100 I * 20.1.1.1/32 Self 2 100 I
bormoglotx@PE1> show route advertising-protocol bgp 10.0.10.10 detail CE1.inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden) * 10.0.0.0/24 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 299888 Nexthop: Self Flags: Nexthop Change Localpref: 100 AS path: [1] I Communities: target:2:100 * 10.1.1.1/32 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 299888 Nexthop: Self Flags: Nexthop Change MED: 2 Localpref: 100 AS path: [1] I Communities: target:2:100 rte-type:0.0.0.0:1:0 * 20.0.0.0/24 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 299904 Nexthop: Self Flags: Nexthop Change Localpref: 100 AS path: [1] I Communities: target:2:100 * 20.1.1.1/32 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 299904 Nexthop: Self Flags: Nexthop Change MED: 2 Localpref: 100 AS path: [1] I Communities: target:2:100 rte-type:0.0.0.0:1:0
bormoglotx@PE1> show route advertising-protocol bgp 10.0.10.10 detail | match label VPN Label: 299888 VPN Label: 299888 VPN Label: 299904 VPN Label: 299904
bormoglotx@PE1> show route table mpls.0 label 299904 mpls.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 299904 *[VPN/170] 00:46:19 > to 20.0.0.2 via ge-0/0/3.20, Pop
bormoglotx@PE1> show route table mpls.0 label 299888 mpls.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 299888 *[VPN/170] 00:46:25 > to 10.0.0.2 via ge-0/0/3.10, Pop
PE2#sh ip bgp vpnv4 rd 1:1 labels Network Next Hop In label/Out label Route Distinguisher: 1:1 10.0.0.0/24 10.0.10.1 nolabel/299888 10.1.1.1/32 10.0.10.1 nolabel/299888 20.0.0.0/24 10.0.10.1 nolabel/299904 20.1.1.1/32 10.0.10.1 nolabel/299904
CE2#sh ip rou | b Ga Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks O E2 10.0.0.0/24 [110/10] via 10.0.1.1, 00:22:32, GigabitEthernet1/0.10 C 10.0.1.0/24 is directly connected, GigabitEthernet1/0.10 L 10.0.1.2/32 is directly connected, GigabitEthernet1/0.10 O E2 10.1.1.1/32 [110/10] via 10.0.1.1, 00:22:32, GigabitEthernet1/0.10 C 10.1.1.2/32 is directly connected, Loopback0 20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks O E2 20.0.0.0/24 [110/10] via 10.0.1.1, 00:22:32, GigabitEthernet1/0.10 O E2 20.1.1.1/32 [110/10] via 10.0.1.1, 00:22:32, GigabitEthernet1/0.10
CE2#traceroute 20.0.0.2 Type escape sequence to abort. Tracing the route to 20.0.0.2 1 10.0.1.1 36 msec 32 msec 8 msec 2 10.1.3.2 [MPLS: Labels 20/18/299904 Exp 0] 56 msec 64 msec 60 msec 3 10.1.2.1 [MPLS: Labels 18/299904 Exp 0] 72 msec 108 msec 40 msec 4 10.2.0.1 [MPLS: Labels 299952/299904 Exp 0] 60 msec 88 msec 60 msec 5 10.0.3.2 [MPLS: Labels 299808/299904 Exp 0] 76 msec 68 msec 64 msec 6 10.0.2.1 [MPLS: Label 299904 Exp 0] 60 msec 52 msec 64 msec 7 20.0.0.2 60 msec 60 msec 56 msec
CE2#traceroute 20.0.0.1 Type escape sequence to abort. Tracing the route to 20.0.0.1 1 10.0.1.1 40 msec 4 msec 16 msec 2 10.1.3.2 [MPLS: Labels 20/18/299904 Exp 0] 80 msec 64 msec 60 msec 3 10.1.2.1 [MPLS: Labels 18/299904 Exp 0] 56 msec 60 msec 72 msec 4 10.2.0.1 [MPLS: Labels 299952/299904 Exp 0] 48 msec 76 msec 112 msec 5 10.0.3.2 [MPLS: Labels 299808/299904 Exp 0] 68 msec 96 msec 64 msec 6 10.0.2.1 [MPLS: Label 299904 Exp 0] 80 msec 68 msec 4 msec 7 20.0.0.2 92 msec 72 msec 64 msec 8 20.0.0.1 96 msec 48 msec 88 msec
bormoglotx@PE1# show firewall family inet filter To-CE1-2 term 1 { from { destination-address { 20.0.0.0/24; } } then { reject; } } term 2 { then accept; } [edit] bormoglotx@PE1# show interfaces ge-0/0/3.20 description "to CE1 site 2"; vlan-id 20; family inet { filter { output To-CE1-2; } address 20.0.0.1/24; }
CE2#ping 20.0.0.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 20.0.0.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 64/69/72 ms
[edit] bormoglotx@PE1# set routing-instances CE1 vrf-table-label
CE2#ping 20.0.0.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 20.0.0.2, timeout is 2 seconds: UUUUU Success rate is 0 percent (0/5)
[edit] bormoglotx@PE1# deactivate interfaces ge-0/0/3.20 family inet filter [edit] bormoglotx@PE1# show | compare [edit interfaces ge-0/0/3 unit 20 family inet] ! inactive: filter { ... }
CE2#ping 20.0.0.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 20.0.0.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 60/88/148 ms
CE1.inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path * 10.0.0.0/24 Self 100 I * 10.1.1.1/32 Self 2 100 I * 20.0.0.0/24 Self 100 I * 20.1.1.1/32 Self 2 100 I
bormoglotx@PE1> show route advertising-protocol bgp 10.0.10.10 detail CE1.inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden) * 10.0.0.0/24 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 16 Nexthop: Self Flags: Nexthop Change Localpref: 100 AS path: [1] I Communities: target:2:100 * 10.1.1.1/32 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 16 Nexthop: Self Flags: Nexthop Change MED: 2 Localpref: 100 AS path: [1] I Communities: target:2:100 rte-type:0.0.0.0:1:0 * 20.0.0.0/24 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 16 Nexthop: Self Flags: Nexthop Change Localpref: 100 AS path: [1] I Communities: target:2:100 * 20.1.1.1/32 (1 entry, 1 announced) BGP group RR type Internal Route Distinguisher: 1:1 VPN Label: 16 Nexthop: Self Flags: Nexthop Change MED: 2 Localpref: 100 AS path: [1] I Communities: target:2:100 rte-type:0.0.0.0:1:0
bormoglotx@PE1> show route advertising-protocol bgp 10.0.10.10 detail | match label VPN Label: 16 VPN Label: 16 VPN Label: 16 VPN Label: 16
CE2#traceroute 20.0.0.1 Type escape sequence to abort. Tracing the route to 20.0.0.1 1 10.0.1.1 32 msec 16 msec 20 msec 2 10.1.3.2 [MPLS: Labels 20/18/16 Exp 0] 76 msec 48 msec 68 msec 3 10.1.2.1 [MPLS: Labels 18/16 Exp 0] 68 msec 48 msec 56 msec 4 10.2.0.1 [MPLS: Labels 299952/16 Exp 0] 52 msec 48 msec 52 msec 5 10.0.3.2 [MPLS: Labels 299808/16 Exp 0] 52 msec 52 msec 52 msec 6 20.0.0.1 76 msec 52 msec 72 msec
bormoglotx@PE1> show route table mpls.0 label 16 mpls.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 16 *[VPN/0] 00:04:23 to table CE1.inet.0, Pop
bormoglotx@PE1> show interfaces terse | match lsi lsi up up lsi.0 up up inet
bormoglotx@PE1> show configuration routing-instances ? Possible completions: <[Enter]> Execute this command <instance_name> Routing instance name CE1 Routing instance name CE2 Routing instance name + apply-groups Groups from which to inherit configuration data + apply-groups-except Don't inherit configuration data from these groups | Pipe through a command
bormoglotx@PE1> show interfaces terse | match lsi lsi up up lsi.0 up up inet lsi.1 up up inet
bormoglotx@PE1> show interfaces lsi routing-instance CE1 | match logical Logical interface lsi.0 (Index 71) (SNMP ifIndex 524) bormoglotx@PE1> show interfaces lsi routing-instance CE2 | match logical Logical interface lsi.1 (Index 81) (SNMP ifIndex 525)
Source: https://habr.com/ru/post/303090/
All Articles