PC1:-
PC1> ip 10.1.1.10
255.255.255.0 10.1.1.1
Checking for
duplicate address...
PC1 : 10.1.1.10
255.255.255.0 gateway 10.1.1.1
R1:-
R1(config)#int fa0/0
R1(config-if)#ip add
10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int
fa2/0
R1(config-if)#ip add
12.12.12.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int lo0
R1(config-if)#ip add
1.1.1.1 255.255.255.255
R1(config)#router
ospf 1
R1(config-router)#
log-adjacency-changes
R1(config-router)#
network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#
network 10.1.1.1 0.0.0.0 area 0
R1(config-router)#
network 12.12.12.1 0.0.0.0 area 0
R2:-
R2(config)#ip vrf
cust1
R2(config-vrf)#rd
100:1
R2(config-vrf)#route-target
200:1
R2(config-vrf)#int
fa2/0
R2(config-if)#ip vrf
for cust1
R2(config-if)#ip add
12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int
fa0/0
R2(config-if)#ip add
23.23.23.2 255.255.255.0
R2(config-if)#mpls ip
R2(config-if)#no shut
R2(config-if)#int lo0
R2(config-if)#ip add
2.2.2.2 255.255.255.255
R2(config-if)#mpls
ldp router lo0 force
R2(config)#router
ospf 1
R2(config-router)#router-id
2.2.2.2
R2(config-router)#net
23.23.23.2 0.0.0.0 are
R2(config-router)#net
23.23.23.2 0.0.0.0 area 0
R2(config-router)#network
2.2.2.2 0.0.0.0 area 0
R2(config-if)#router
bgp 1
R2(config-router)#neighbor
4.4.4.4 remote-as 1
R2(config-router)#neighbor
4.4.4.4 update-source lo0
R2(config-router)#address-family
vpnv4
R2(config-router-af)#neighbor
4.4.4.4 activate
R2(config-router-af)#exit
R2(config-router)#address-family
ipv4 vrf cust1
R2(config-router-af)#redistribute
ospf 100 vrf cust1 metric 10 --<< metric set here, will be used at remote end while redistributing bgp route to ospf
R2(config-router-af)#exit
R2(config-router)#router
ospf 100 vrf cust1
R2(config-router)#
log-adjacency-changes
R2(config-router)#
redistribute bgp 1 subnets
R2(config-router)#
network 12.12.12.2 0.0.0.0 area 0
R3:-
R3(config)#int lo0
R3(config-if)#ip add
3.3.3.3 255.255.255.255
R3(config-if)#exit
R3(config)#mpls ldp
router lo0 force
R3(config)#int fa0/0
R3(config-if)#ip add
23.23.23.3 255.255.255.0
R3(config-if)#mpls ip
R3(config-if)#no shut
R3(config-if)#int
fa1/0
R3(config-if)#ip add
34.34.34.3 255.255.255.0
R3(config-if)#mpls ip
R3(config-if)#no shut
R3(config-if)#router
ospf 1
R3(config-router)#router-id
3.3.3.3
R3(config-router)#net
23.23.23.3 0.0.0.0 area 0
R3(config-router)#net
34.34.34.3 0.0.0.0 are 0
R3(config-router)#net
3.3.3.3 0.0.0.0 area 0
R3(config-router)#exit
R4:-
R4(config)#int lo0
R4(config-if)#ip add
4.4.4.4 255.255.255.255
R4(config-if)#int
fa1/0
R4(config-if)#ip add
34.34.34.4 255.255.255.0
R4(config-if)#mpls ip
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#mpls ldp
router lo0 force
R4(config)#ip vrf
cust1
R4(config-vrf)#rd 1:1
R4(config-vrf)#route-target
200:1
R4(config-vrf)#exit
R4(config)#int fa2/0
R4(config-if)#ip vrf
for cust1
R4(config-if)#ip add
45.45.45.4 255.255.255.0
R4(config-if)#no shut
R4(config-if)#router
ospf 1
R4(config-router)#router-id
4.4.4.4
R4(config-router)#net
34.34.34.4 0.0.0.0 area 0
R4(config-router)#network
4.4.4.4 0.0.0.0 area 0
R4(config)#router bgp
1
R4(config-router)#neighbor
2.2.2.2 remote-as 1
R4(config-router)#neighbor
2.2.2.2 update-source lo0
R4(config-router)#address-family
vpnv4
R4(config-router-af)#neighbor
2.2.2.2 activate
R4(config-router-af)#addres
ipv4 vrf cust1
R4(config-router-af)# redistribute ospf 100 vrf cust1
R4(config-router-af)#exit
R4(config-router)#exit
R4(config-router-af)#router
ospf 100 vrf cust1
R4(config-router)#net
45.45.45.4 0.0.0.0 area 0
R5:-
R5(config)#int lo0
R5(config-if)#ip add
5.5.5.5 255.255.255.255
R5(config-if)#int
fa2/0
R5(config-if)#ip add
45.45.45.5 255.255.255.0
R5(config-if)#no shut
R5(config)#int fa0/0
R5(config-if)#ip add
20.1.1.1 255.255.255.0
R5(config-if)#no shut
R5(config)#router
ospf 1
R5(config-router)#net
5.5.5.5 0.0.0.0 area 0
R5(config-router)#net
45.45.45.5 0.0.0.0 area 0
R5(config-router)#net
20.1.1.1 0.0.0.0 area 0
Verification:-
PC1:-
PC1> ping
20.1.1.10
84 bytes from
20.1.1.10 icmp_seq=1 ttl=59 time=368.619 ms
84 bytes from
20.1.1.10 icmp_seq=2 ttl=59 time=347.316 ms
84 bytes from
20.1.1.10 icmp_seq=3 ttl=59 time=368.788 ms
84 bytes from
20.1.1.10 icmp_seq=4 ttl=59 time=416.798 ms
84 bytes from
20.1.1.10 icmp_seq=5 ttl=59 time=379.615 ms
PC1> trace
20.1.1.10
trace to 20.1.1.10, 8
hops max, press Ctrl+C to stop
1
10.1.1.1 98.128 ms 32.396 ms 38.933 ms
2
12.12.12.2 193.647 ms 120.998 ms 111.703 ms
3
23.23.23.3 309.530 ms 294.889 ms 276.499 ms
4
45.45.45.4 289.342 ms 309.988 ms 292.062 ms
5
45.45.45.5 329.599 ms 272.541 ms 341.644 ms
6
*20.1.1.10 345.620 ms (ICMP type:3, code:3, Destination port
unreachable)
R1:-
R1#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
+ - replicated route, % - next hop
override
Gateway of last
resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected,
Loopback0
5.0.0.0/32 is subnetted, 1 subnets
O IA 5.5.5.5 [110/3] via 12.12.12.2, 00:27:59,
FastEthernet2/0 -<< If PE are in same OSPF process ID, Intraarea route becomes Interarea route when ospf routes crosses MPLS core. Metric is also remain same throughout the MPLS cloud.
10.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C 10.1.1.0/24 is directly connected,
FastEthernet0/0
L 10.1.1.1/32 is directly connected,
FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C 12.12.12.0/24 is directly connected,
FastEthernet2/0
L 12.12.12.1/32 is directly connected,
FastEthernet2/0
20.0.0.0/24 is subnetted, 1 subnets
O IA 20.1.1.0 [110/3] via 12.12.12.2, 00:27:59,
FastEthernet2/0
45.0.0.0/24 is subnetted, 1 subnets
O IA 45.45.45.0 [110/2] via 12.12.12.2,
00:28:12, FastEthernet2/0
R1#sh ip ospf
neighbor
Neighbor ID Pri
State Dead Time Address Interface
12.12.12.2 1
FULL/BDR 00:00:39 12.12.12.2 FastEthernet2/0
R2:-
R2#sh ip ospf 100
neighbor
Neighbor ID Pri
State Dead Time Address Interface
1.1.1.1 1
FULL/DR 00:00:33 12.12.12.1 FastEthernet2/0
R2#sh ip ospf 1
neighbor
Neighbor ID Pri
State Dead Time Address Interface
3.3.3.3 1
FULL/BDR 00:00:34 23.23.23.3 FastEthernet0/0
R2#sh ip route vrf
cust1
Routing Table: cust1
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
+ - replicated route, % - next hop
override
Gateway of last
resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 12.12.12.1,
00:29:23, FastEthernet2/0
5.0.0.0/32 is subnetted, 1 subnets
B 5.5.5.5 [200/2] via 4.4.4.4, 00:21:53
10.0.0.0/24 is subnetted, 1 subnets
O 10.1.1.0 [110/2] via 12.12.12.1, 00:29:23, FastEthernet2/0
O 10.1.1.0 [110/2] via 12.12.12.1, 00:29:23, FastEthernet2/0
12.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C 12.12.12.0/24 is directly connected,
FastEthernet2/0
L 12.12.12.2/32 is directly connected,
FastEthernet2/0
20.0.0.0/24 is subnetted, 1 subnets
B 20.1.1.0 [200/2] via 4.4.4.4, 00:21:53
45.0.0.0/24 is subnetted, 1 subnets
B 45.45.45.0 [200/0] via 4.4.4.4,
00:22:07
R2#show ip bgp vpnv4
all summary
BGP router identifier
2.2.2.2, local AS number 1
BGP table version is
52, main routing table version 52
9 network entries
using 1368 bytes of memory
9 path entries using
468 bytes of memory
4/4 BGP path/bestpath
attribute entries using 528 bytes of memory
2 BGP extended
community entries using 80 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 2444 total
bytes of memory
BGP activity 23/14
prefixes, 30/21 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 1
437 432 52
0 0 06:19:48 3
R2#show ip bgp
summary
BGP router identifier
2.2.2.2, local AS number 1
BGP table version is
1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 1 437
432 1 0
0 06:19:55 0
R2#show ip bgp vpnv4
all
BGP table version is
52, 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, x best-external
Origin codes: i -
IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher:
1:1
*>i5.5.5.5/32 4.4.4.4 2 100
0 ?
*>i20.1.1.0/24 4.4.4.4 2 100
0 ?
*>i45.45.45.0/24 4.4.4.4 0 100
0 ?
Route Distinguisher:
100:1 (default for vrf cust1)
*> 1.1.1.1/32 12.12.12.1 10 32768 ?
*>i5.5.5.5/32 4.4.4.4 2 100
0 ?
*>
10.1.1.0/24 12.12.12.1 10 32768 ? -<< OSPF metric is copied to BGP metric
*>
12.12.12.0/24 0.0.0.0 0
32768 ?
*>i20.1.1.0/24 4.4.4.4 2 100
0 ?
*>i45.45.45.0/24 4.4.4.4 0 100
0 ?
R2#show ip bgp vpnv4
all 20.1.1.0/24
BGP routing table
entry for 1:1:20.1.1.0/24, version 50
Paths: (1 available,
best #1, no table)
Not advertised to any peer
Local
4.4.4.4 (metric 3) from 4.4.4.4 (4.4.4.4)
Origin incomplete, metric 2, localpref
100, valid, internal, best
Extended Community: RT:200:1 OSPF DOMAIN
ID:0x0005:0x000000640200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:45.45.45.4:0
mpls labels in/out nolabel/24
BGP routing table
entry for 100:1:20.1.1.0/24, version 52
Paths: (1 available,
best #1, table cust1)
Not advertised to any peer
Local, imported path from 1:1:20.1.1.0/24
4.4.4.4 (metric 3) from 4.4.4.4 (4.4.4.4)
Origin incomplete, metric 2, localpref
100, valid, internal, best
Extended Community: RT:200:1 OSPF DOMAIN
ID:0x0005:0x000000640200
OSPF RT:0.0.0.0:2:0 OSPF ROUTER
ID:45.45.45.4:0
mpls labels in/out nolabel/24
R2#show mpls
forwarding-table
Local Outgoing
Prefix Bytes Label Outgoing
Next Hop
Label Label
or Tunnel Id Switched interface
16 Pop Label 34.34.34.0/24 0 Fa0/0 23.23.23.3
18 No Label 12.12.12.0/24[V] 0 aggregate/cust1
19 16 4.4.4.4/32 0 Fa0/0 23.23.23.3
20 Pop Label 3.3.3.3/32 0 Fa0/0 23.23.23.3
21 No Label 1.1.1.1/32[V] 0 Fa2/0 12.12.12.1
22 No Label 10.1.1.0/24[V] 490
Fa2/0 12.12.12.1
R3:-
R3#sh ip ospf
neighbor
Neighbor
ID Pri
State Dead
Time Address
Interface
4.4.4.4
1 FULL/BDR
00:00:35 34.34.34.4
FastEthernet1/0
2.2.2.2
1 FULL/DR
00:00:31 23.23.23.2
FastEthernet0/0
R3#show mpls ldp
neighbor
Peer LDP Ident:
4.4.4.4:0; Local LDP Ident 3.3.3.3:0
TCP connection: 4.4.4.4.21070 - 3.3.3.3.646
State: Oper; Msgs sent/rcvd: 101/102; Downstream
Up time: 01:22:35
LDP discovery sources:
FastEthernet1/0, Src IP addr: 34.34.34.4
Addresses bound to peer LDP Ident:
34.34.34.4 4.4.4.4
Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 3.3.3.3:0
TCP connection: 2.2.2.2.646 - 3.3.3.3.30173
State: Oper; Msgs sent/rcvd: 102/100; Downstream
Up time: 01:22:35
LDP discovery sources:
FastEthernet0/0, Src IP addr: 23.23.23.2
Addresses bound to peer LDP Ident:
23.23.23.2 2.2.2.2
R3#show mpls ldp
discovery
Local LDP
Identifier:
3.3.3.3:0
Discovery Sources:
Interfaces:
FastEthernet0/0 (ldp): xmit/recv
LDP Id: 2.2.2.2:0
FastEthernet1/0 (ldp): xmit/recv
LDP Id: 4.4.4.4:0
R3#show mpls
forwarding-table
Local
Outgoing
Prefix Bytes
Label Outgoing Next Hop
Label
Label or Tunnel Id
Switched interface
16
Pop Label 4.4.4.4/32
14366
Fa1/0 34.34.34.4
17
Pop Label 2.2.2.2/32 15433
Fa0/0
23.23.23.2
R4:-
R4#sh ip ospf 1
neighbor
Neighbor ID Pri
State Dead Time Address Interface
3.3.3.3 1
FULL/DR 00:00:38 34.34.34.3 FastEthernet1/0
R4#sh ip ospf 100
neighbor
Neighbor ID Pri
State Dead Time Address Interface
5.5.5.5 1
FULL/DR 00:00:31 45.45.45.5 FastEthernet2/0
R4#sh ip bgp vpnv4
all summary
BGP router identifier
4.4.4.4, local AS number 1
BGP table version is
40, main routing table version 40
9 network entries
using 1368 bytes of memory
9 path entries using
468 bytes of memory
4/4 BGP path/bestpath
attribute entries using 528 bytes of memory
2 BGP extended
community entries using 80 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 2444 total
bytes of memory
BGP activity 21/12
prefixes, 24/15 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 1 440
446 40 0
0 06:27:49 3
R4#show ip bgp
summary
BGP router identifier
4.4.4.4, local AS number 1
BGP table version is
1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 1 440
446 1 0
0 06:27:57 0
R4#show ip bgp vpnv4
all
BGP table version is
40, local router ID is 4.4.4.4
Status codes: s
suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m
multipath, b backup-path, x best-external
Origin codes: i -
IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher:
1:1 (default for vrf cust1)
*>i1.1.1.1/32 2.2.2.2 10 100
0 ?
*> 5.5.5.5/32 45.45.45.5 2 32768 ?
*>i10.1.1.0/24 2.2.2.2 10 100
0 ?
*>i12.12.12.0/24 2.2.2.2 0 100
0 ?
*>
20.1.1.0/24 45.45.45.5 2 32768 ?
*>
45.45.45.0/24 0.0.0.0 0 32768 ?
Route Distinguisher:
100:1
*>i1.1.1.1/32 2.2.2.2 10 100
0 ?
*>i10.1.1.0/24 2.2.2.2 10 100
0 ?
*>i12.12.12.0/24 2.2.2.2 0 100
0 ?
R5:-
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
+ - replicated route, % - next hop
override
Gateway of last
resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/11] via 45.45.45.4, 00:44:22,
FastEthernet2/0
5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected,
Loopback0
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.1.1.0 [110/11] via 45.45.45.4,
00:44:22, FastEthernet2/0
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.12.12.0 [110/2] via 45.45.45.4,
00:44:22, FastEthernet2/0
20.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C 20.1.1.0/24 is directly connected,
FastEthernet0/0
L 20.1.1.1/32 is directly connected,
FastEthernet0/0
45.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
C 45.45.45.0/24 is directly connected,
FastEthernet2/0
L 45.45.45.5/32 is directly connected,
FastEthernet2/0
No comments:
Post a Comment