Issue
In this example we will
configure MPLS L3VPN between two sites but one of the PE routers will be Cisco and
the other one will be Juniper
Static routing will be
the PE-CE routing protocol and OSPF will be the operating IGP inside the MPLS backbone,
area 0 is in use
MPLS backbone will be
located in AS 100
Configuration
R1
hostname
R1
interface
Loopback0
ip address 1.1.1.1 255.255.255.255
interface
FastEthernet1/0
ip address 192.1.12.1 255.255.255.0
speed 100
duplex full
mpls ip
interface
FastEthernet1/1
ip address 192.1.13.1 255.255.255.0
speed 100
duplex full
mpls ip
mpls
label protocol ldp
mpls
ldp router-id Loopback0 force
router
ospf 1
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0
network 192.1.12.1 0.0.0.0 area 0
network 192.1.13.1 0.0.0.0 area 0
R2
hostname
R2
vrf
definition MSSK
rd 100:1
address-family ipv4
route-target export 100:1
route-target import 100:1
exit-address-family
interface
Loopback0
ip address 2.2.2.2 255.255.255.255
interface
FastEthernet1/0
ip address 192.1.12.2 255.255.255.0
speed 100
duplex full
mpls ip
interface
FastEthernet1/1
vrf forwarding MSSK
ip address 192.1.24.2 255.255.255.0
speed 100
duplex full
mpls
label protocol ldp
mpls
ldp router-id Loopback0 force
router
ospf 1
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 192.1.12.2 0.0.0.0 area 0
!
router
bgp 100
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
address-family ipv4
exit-address-family
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community both
exit-address-family
address-family ipv4 vrf MSSK
network 192.1.24.0
redistribute static
exit-address-family
ip
route vrf MSSK 4.4.4.4 255.255.255.255 192.1.24.4
R3
set
system host-name J3
set
system root-authentication encrypted-password
"$1$h0ePZfFF$eVHl3o9SK2FcwxcXgilfG0"
set
interfaces em0 unit 0 family inet address 192.1.13.3/24
set
interfaces em0 unit 0 family mpls
set
interfaces em1 unit 0 family inet address 192.1.35.3/24
set
interfaces lo0 unit 0 family inet address 3.3.3.3/32
set
routing-options router-id 3.3.3.3
set
routing-options autonomous-system 100
set
protocols mpls icmp-tunneling
set
protocols mpls no-decrement-ttl
set
protocols mpls label-switched-path J3-To-R2 from 3.3.3.3
set
protocols mpls label-switched-path J3-To-R2 to 2.2.2.2
set
protocols mpls interface all
set
protocols bgp group iBGP local-address 3.3.3.3
set
protocols bgp group iBGP family inet unicast
set
protocols bgp group iBGP family inet-vpn unicast
set
protocols bgp group iBGP peer-as 100
set
protocols bgp group iBGP neighbor 2.2.2.2
set
protocols ospf area 0.0.0.0 interface lo0.0
set
protocols ospf area 0.0.0.0 interface em0.0
set
protocols ldp interface em0.0
set
routing-instances MSSK instance-type vrf
set
routing-instances MSSK interface em1.0
set
routing-instances MSSK route-distinguisher 100:1
set
routing-instances MSSK vrf-target target:100:1
set
routing-instances MSSK vrf-table-label
set
routing-instances MSSK routing-options static route 5.5.5.5/32 next-hop
192.1.35.5
R4
hostname
R4
interface
Loopback0
ip address 4.4.4.4 255.255.255.255
interface
FastEthernet1/0
ip address 192.1.24.4 255.255.255.0
speed 100
duplex full
ip
route 0.0.0.0 0.0.0.0 192.1.24.2
R5
hostname
R5
interface
Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface
FastEthernet0/0
no ip address
shutdown
duplex full
interface
FastEthernet1/0
ip address 192.1.35.5 255.255.255.0
speed 100
duplex full
ip
route 0.0.0.0 0.0.0.0 192.1.35.3
Verification
R1#show
mpls ldp neighbor
Peer LDP Ident: 2.2.2.2:0; Local LDP Ident
1.1.1.1:0
TCP connection: 2.2.2.2.25776 -
1.1.1.1.646
State: Oper; Msgs sent/rcvd: 69/71;
Downstream
Up time: 00:54:42
LDP discovery sources:
FastEthernet1/0, Src IP addr:
192.1.12.2
Addresses bound to peer LDP Ident:
192.1.12.2 2.2.2.2
Peer LDP Ident: 3.3.3.3:0; Local LDP Ident
1.1.1.1:0
TCP connection: 3.3.3.3.60299 -
1.1.1.1.646
State: Oper; Msgs sent/rcvd: 202/84;
Downstream
Up time: 00:28:28
LDP discovery sources:
FastEthernet1/1, Src IP addr: 192.1.13.3
Addresses bound to peer LDP Ident:
192.1.13.3
R2#show
mpls ldp neighbor
Peer LDP Ident: 1.1.1.1:0; Local LDP Ident
2.2.2.2:0
TCP connection: 1.1.1.1.646 -
2.2.2.2.25776
State: Oper; Msgs sent/rcvd: 71/70; Downstream
Up time: 00:54:55
LDP discovery sources:
FastEthernet1/0, Src IP addr:
192.1.12.1
Addresses bound to peer LDP Ident:
192.1.12.1 192.1.13.1 1.1.1.1
MSSK@J3#
run show ldp neighbor
Address Interface Label space ID Hold time
192.1.13.1 em0.0 1.1.1.1:0 14
R2#show
bgp vpnv4 unicast all summary
BGP
router identifier 2.2.2.2, local AS number 100
BGP
table version is 7, main routing table version 7
4
network entries using 624 bytes of memory
4
path entries using 320 bytes of memory
3/3
BGP path/bestpath attribute entries using 432 bytes of memory
1
BGP extended community entries using 24 bytes of memory
0
BGP route-map cache entries using 0 bytes of memory
0
BGP filter-list cache entries using 0 bytes of memory
BGP
using 1400 total bytes of memory
BGP
activity 4/0 prefixes, 4/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
3.3.3.3 4 100 83
173 7 0
0 01:17:35 2
R2#show
bgp vpnv4 unicast all
BGP
table version is 7, local router ID is 2.2.2.2
Status
codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b
backup-path, f RT-Filter,
x best-external, a
additional-path, c RIB-compressed,
Origin
codes: i - IGP, e - EGP, ? - incomplete
RPKI
validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route
Distinguisher: 100:1 (default for vrf MSSK)
*>
4.4.4.4/32 192.1.24.4 0 32768 ?
*>i 5.5.5.5/32 3.3.3.3 100 0 i
*>
192.1.24.0 0.0.0.0 0 32768 i
*>i 192.1.35.0 3.3.3.3 100 0 i
R2#show
bgp vpnv4 unicast all neighbors 3.3.3.3 advertised-routes
BGP
table version is 7, local router ID is 2.2.2.2
Status
codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m
multipath, b backup-path, f RT-Filter,
x best-external, a
additional-path, c RIB-compressed,
Origin
codes: i - IGP, e - EGP, ? - incomplete
RPKI
validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route
Distinguisher: 100:1 (default for vrf MSSK)
*>
4.4.4.4/32 192.1.24.4 0 32768 ?
*>
192.1.24.0 0.0.0.0 0 32768 i
Total
number of prefixes 2
MSSK@J3#
run show route advertising-protocol bgp 2.2.2.2
MSSK.inet.0:
5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref
AS path
*
5.5.5.5/32 Self 100 I
*
192.1.35.0/24 Self 100 I
mkhalil@J3#
run show route receive-protocol bgp 2.2.2.2
inet.0:
7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
inet.3:
3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
MSSK.inet.0:
5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref
AS path
*
4.4.4.4/32 2.2.2.2 0 100 ?
*
192.1.24.0/24 2.2.2.2 0 100 I
mpls.0:
7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
bgp.l3vpn.0:
2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref
AS path
100:1:4.4.4.4/32
* 2.2.2.2 0 100 ?
100:1:192.1.24.0/24
* 2.2.2.2 0 100 I
R4#sh
ip route
Codes:
L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O -
OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 -
OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF
external type 2
i - IS-IS, su - IS-IS summary, L1 -
IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate
default, U - per-user static route
o - ODR, P - periodic downloaded static
route, H - NHRP, l - LISP
+ - replicated route, % - next hop
override
Gateway
of last resort is 192.1.24.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.1.24.2
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected,
Loopback0
192.1.24.0/24 is variably subnetted, 2
subnets, 2 masks
C 192.1.24.0/24 is directly connected,
FastEthernet1/0
L 192.1.24.4/32 is directly connected,
FastEthernet1/0
R5#sh
ip route
Codes:
L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D
- EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 -
OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF
external type 2
i - IS-IS, su - IS-IS summary, L1 -
IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate
default, U - per-user static route
o - ODR, P - periodic downloaded static
route, H - NHRP, l - LISP
+ - replicated route, % - next hop
override
Gateway
of last resort is 192.1.35.3 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 192.1.35.3
5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected,
Loopback0
192.1.35.0/24 is variably subnetted, 2
subnets, 2 masks
C 192.1.35.0/24 is directly connected,
FastEthernet1/0
L 192.1.35.5/32 is directly connected,
FastEthernet1/0
R4#ping
5.5.5.5
Type
escape sequence to abort.
Sending
5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success
rate is 100 percent (5/5), round-trip min/avg/max = 12/20/52 ms
R4#traceroute
5.5.5.5 numeric source lo0
Type
escape sequence to abort.
Tracing
the route to 5.5.5.5
VRF
info: (vrf in name/id, vrf out name/id)
1 192.1.24.2 8 msec 4 msec 4 msec
2 192.1.12.1 [MPLS: Labels 17/16 Exp 0] 16
msec 16 msec 8 msec
3 192.1.35.5 16 msec * 16 msec
R5#ping
4.4.4.4 source lo0
Type
escape sequence to abort.
Sending
5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet
sent with a source address of 5.5.5.5
!!!!!
Success
rate is 100 percent (5/5), round-trip min/avg/max = 12/24/52 ms
R5#traceroute
4.4.4.4 numeric source lo0
Type
escape sequence to abort.
Tracing
the route to 4.4.4.4
VRF
info: (vrf in name/id, vrf out name/id)
1 192.1.35.3 8 msec 4 msec 4 msec
2 192.1.13.1 [MPLS: Labels 16/20 Exp 0] 20
msec 12 msec 12 msec
3 192.1.24.2 [MPLS: Label 20 Exp 0] 16 msec
16 msec 12 msec
4 192.1.24.4 20 msec * 20 msec
No comments:
Post a Comment