PC1:-
PC1> ip 10.1.1.10
255.255.255.0 10.1.1.1
255.255.255.0 10.1.1.1
Checking for
duplicate address…
duplicate address…
PC1 : 10.1.1.10
255.255.255.0 gateway 10.1.1.1
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
10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int
fa2/0
fa2/0
R1(config-if)#ip add
12.12.12.1 255.255.255.0
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
1.1.1.1 255.255.255.255
R1(config)#ip route
0.0.0.0 0.0.0.0 12.12.12.2
0.0.0.0 0.0.0.0 12.12.12.2
R2:-
R2(config)#ip vrf
cust1
cust1
R2(config-vrf)#rd
100:1
100:1
R2(config-vrf)#route-target
200:1
200:1
R2(config-vrf)#int
fa2/0
fa2/0
R2(config-if)#ip vrf
for cust1
for cust1
R2(config-if)#ip add
12.12.12.2 255.255.255.0
12.12.12.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#int
fa0/0
fa0/0
R2(config-if)#ip add
23.23.23.2 255.255.255.0
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
2.2.2.2 255.255.255.255
R2(config-if)#mpls
ldp router lo0 force
ldp router lo0 force
R2(config)#router
ospf 1
ospf 1
R2(config-router)#router-id
2.2.2.2
2.2.2.2
R2(config-router)#net
23.23.23.2 0.0.0.0 are
23.23.23.2 0.0.0.0 are
R2(config-router)#net
23.23.23.2 0.0.0.0 area 0
23.23.23.2 0.0.0.0 area 0
R2(config-router)#network
2.2.2.2 0.0.0.0 area 0
2.2.2.2 0.0.0.0 area 0
R2(config-if)#router
bgp 1
bgp 1
R2(config-router)#neighbor
4.4.4.4 remote-as 1
4.4.4.4 remote-as 1
R2(config-router)#neighbor
4.4.4.4 update-source lo0
4.4.4.4 update-source lo0
R2(config-router)#address-family
vpnv4
vpnv4
R2(config-router-af)#neighbor
4.4.4.4 activate
4.4.4.4 activate
R2(config-router-af)#exit
R2(config-router)#address-family
ipv4 vrf cust1
ipv4 vrf cust1
R2(config-router-af)#
redistribute static
redistribute static
R2(config-router-af)#exit
R2(config-router)#exit
R2(config)#ip route
vrf cust1 10.1.1.0 255.255.255.0 12.12.12.1
vrf cust1 10.1.1.0 255.255.255.0 12.12.12.1
R3:-
R3(config)#int lo0
R3(config-if)#ip add
3.3.3.3 255.255.255.255
3.3.3.3 255.255.255.255
R3(config-if)#exit
R3(config)#mpls ldp
router lo0 force
router lo0 force
R3(config)#int fa0/0
R3(config-if)#ip add
23.23.23.3 255.255.255.0
23.23.23.3 255.255.255.0
R3(config-if)#mpls ip
R3(config-if)#no shut
R3(config-if)#int
fa1/0
fa1/0
R3(config-if)#ip add
34.34.34.3 255.255.255.0
34.34.34.3 255.255.255.0
R3(config-if)#mpls ip
R3(config-if)#no shut
R3(config-if)#router
ospf 1
ospf 1
R3(config-router)#router-id
3.3.3.3
3.3.3.3
R3(config-router)#net
23.23.23.3 0.0.0.0 area 0
23.23.23.3 0.0.0.0 area 0
R3(config-router)#net
34.34.34.3 0.0.0.0 are 0
34.34.34.3 0.0.0.0 are 0
R3(config-router)#net
3.3.3.3 0.0.0.0 area 0
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
4.4.4.4 255.255.255.255
R4(config-if)#int
fa1/0
fa1/0
R4(config-if)#ip add
34.34.34.4 255.255.255.0
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
router lo0 force
R4(config)#ip vrf
cust1
cust1
R4(config-vrf)#rd 1:1
R4(config-vrf)#route-target
200:1
200:1
R4(config-vrf)#exit
R4(config)#int fa2/0
R4(config-if)#ip vrf
for cust1
for cust1
R4(config-if)#ip add
45.45.45.4 255.255.255.0
45.45.45.4 255.255.255.0
R4(config-if)#no shut
R4(config-if)#router
ospf 1
ospf 1
R4(config-router)#router-id
4.4.4.4
4.4.4.4
R4(config-router)#net
34.34.34.4 0.0.0.0 area 0
34.34.34.4 0.0.0.0 area 0
R4(config-router)#network
4.4.4.4 0.0.0.0 area 0
4.4.4.4 0.0.0.0 area 0
R4(config)#router bgp
1
1
R4(config-router)#neighbor
2.2.2.2 remote-as 1
2.2.2.2 remote-as 1
R4(config-router)#neighbor
2.2.2.2 update-source lo0
2.2.2.2 update-source lo0
R4(config-router)#address-family
vpnv4
vpnv4
R4(config-router-af)#neighbor
2.2.2.2 activate
2.2.2.2 activate
R4(config-router-af)#addres
ipv4 vrf cust1
ipv4 vrf cust1
R4(config-router-af)#redistribute
static
static
R4(config-router-af)#exit
R4(config-router)#exit
R4(config)#ip route
vrf cust1 20.1.1.0 255.255.255.0 45.45.45.5
vrf cust1 20.1.1.0 255.255.255.0 45.45.45.5
R5:-
R5(config)#int lo0
R5(config-if)#ip add
5.5.5.5 255.255.255.255
5.5.5.5 255.255.255.255
R5(config-if)#int
fa2/0
fa2/0
R5(config-if)#ip add
45.45.45.5 255.255.255.0
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
20.1.1.1 255.255.255.0
R5(config-if)#no shut
R5(config)#ip route
0.0.0.0 0.0.0.0 45.45.45.4
0.0.0.0 0.0.0.0 45.45.45.4
Verification:-
PC1:-
PC1> ping
20.1.1.10
20.1.1.10
84 bytes from
20.1.1.10 icmp_seq=1 ttl=59 time=368.619 ms
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
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
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
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
20.1.1.10 icmp_seq=5 ttl=59 time=379.615 ms
PC1> trace
20.1.1.10
20.1.1.10
trace to 20.1.1.10, 8
hops max, press Ctrl+C to stop
hops max, press Ctrl+C to stop
1
10.1.1.1 98.128 ms 32.396 ms 38.933 ms
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
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
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
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
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)
*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
connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O –
OSPF, IA – OSPF inter area
OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 –
OSPF NSSA external type 2
OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF
external type 2
external type 2
i – IS-IS, su – IS-IS summary, L1 –
IS-IS level-1, L2 – IS-IS level-2
IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate
default, U – per-user static route
default, U – per-user static route
o – ODR, P – periodic downloaded static
route, H – NHRP
route, H – NHRP
+ – replicated route, % – next hop
override
override
Gateway of last
resort is 12.12.12.2 to network 0.0.0.0
resort is 12.12.12.2 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 12.12.12.2
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected,
Loopback0
Loopback0
10.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
subnets, 2 masks
C 10.1.1.0/24 is directly connected,
FastEthernet0/0
FastEthernet0/0
L 10.1.1.1/32 is directly connected,
FastEthernet0/0
FastEthernet0/0
12.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
subnets, 2 masks
C 12.12.12.0/24 is directly connected,
FastEthernet2/0
FastEthernet2/0
L 12.12.12.1/32 is directly connected,
FastEthernet2/0
FastEthernet2/0
R2:-
R2#show ip bgp
vpnv4 all summary
vpnv4 all summary
BGP router identifier
2.2.2.2, local AS number 1
2.2.2.2, local AS number 1
BGP table version is
40, main routing table version 40
40, main routing table version 40
3 network entries
using 456 bytes of memory
using 456 bytes of memory
3 path entries using
156 bytes of memory
156 bytes of memory
2/2 BGP path/bestpath
attribute entries using 264 bytes of memory
attribute entries using 264 bytes of memory
1 BGP extended
community entries using 24 bytes of memory
community entries using 24 bytes of memory
0 BGP route-map cache
entries using 0 bytes of memory
entries using 0 bytes of memory
0 BGP filter-list
cache entries using 0 bytes of memory
cache entries using 0 bytes of memory
BGP using 900 total
bytes of memory
bytes of memory
BGP activity 15/12
prefixes, 21/18 paths, scan interval 60 secs
prefixes, 21/18 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4
1 358
351 40 0
0 05:08:52 1
1 358
351 40 0
0 05:08:52 1
R2#show ip bgp vpnv4
all
all
BGP table version is
40, local router ID is 2.2.2.2
40, local router ID is 2.2.2.2
Status codes: s
suppressed, d damped, h history, * valid, > best, i – internal,
suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m
multipath, b backup-path, x best-external
multipath, b backup-path, x best-external
Origin codes: i –
IGP, e – EGP, ? – incomplete
IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher:
1:1
1:1
*>i20.1.1.0/24 4.4.4.4 0 100
0 ?
0 ?
Route Distinguisher:
100:1 (default for vrf cust1)
100:1 (default for vrf cust1)
*>
10.1.1.0/24 12.12.12.1 0 32768 ?
10.1.1.0/24 12.12.12.1 0 32768 ?
*>i20.1.1.0/24 4.4.4.4 0 100
0 ?
0 ?
R2#show ip bgp vpnv4
all 20.1.1.0/24
all 20.1.1.0/24
BGP routing table
entry for 1:1:20.1.1.0/24, version 39
entry for 1:1:20.1.1.0/24, version 39
Paths: (1 available,
best #1, no table)
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 0, localpref
100, valid, internal, best
100, valid, internal, best
Extended Community: RT:200:1
mpls labels in/out nolabel/17
BGP routing table
entry for 100:1:20.1.1.0/24, version 40
entry for 100:1:20.1.1.0/24, version 40
Paths: (1 available,
best #1, table cust1)
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 0, localpref
100, valid, internal, best
100, valid, internal, best
Extended Community: RT:200:1
mpls labels in/out nolabel/17
R3:-
R3#sh ip ospf
neighbor
neighbor
Neighbor
ID Pri
State Dead
Time Address
Interface
ID Pri
State Dead
Time Address
Interface
4.4.4.4
1 FULL/BDR
00:00:35 34.34.34.4
FastEthernet1/0
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
1 FULL/DR
00:00:31 23.23.23.2
FastEthernet0/0
R3#show mpls ldp
neighbor
neighbor
Peer LDP Ident:
4.4.4.4:0; Local LDP Ident 3.3.3.3:0
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
discovery
Local LDP
Identifier:
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
forwarding-table
Local
Outgoing
Prefix Bytes
Label Outgoing Next Hop
Outgoing
Prefix Bytes
Label Outgoing Next Hop
Label
Label or Tunnel Id
Switched interface
Label or Tunnel Id
Switched interface
16
Pop Label 4.4.4.4/32
14366
Fa1/0 34.34.34.4
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
Pop Label 2.2.2.2/32 15433
Fa0/0
23.23.23.2
R4:-
R4#sh ip route vrf
cust1
cust1
Routing Table: cust1
Codes: L – local, C –
connected, S – static, R – RIP, M – mobile, B – BGP
connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O –
OSPF, IA – OSPF inter area
OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 –
OSPF NSSA external type 2
OSPF NSSA external type 2
E1
– OSPF external type 1, E2 – OSPF external type 2
– 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
IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate
default, U – per-user static route
default, U – per-user static route
o – ODR, P – periodic downloaded static
route, H – NHRP
route, H – NHRP
+ – replicated route, % – next hop
override
override
Gateway of last
resort is not set
resort is not set
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 2.2.2.2, 00:36:14
20.0.0.0/24 is subnetted, 1 subnets
S 20.1.1.0 [1/0] via 45.45.45.5
45.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
subnets, 2 masks
C 45.45.45.0/24 is directly connected,
FastEthernet2/0
FastEthernet2/0
L 45.45.45.4/32 is directly connected,
FastEthernet2/0
FastEthernet2/0
R4#sh ip bgp vpnv4
all summary
all summary
BGP router identifier
4.4.4.4, local AS number 1
4.4.4.4, local AS number 1
BGP table version is
28, main routing table version 28
28, main routing table version 28
3 network entries
using 456 bytes of memory
using 456 bytes of memory
3 path entries using
156 bytes of memory
156 bytes of memory
2/2 BGP path/bestpath
attribute entries using 264 bytes of memory
attribute entries using 264 bytes of memory
1 BGP extended
community entries using 24 bytes of memory
community entries using 24 bytes of memory
0 BGP route-map cache
entries using 0 bytes of memory
entries using 0 bytes of memory
0 BGP filter-list
cache entries using 0 bytes of memory
cache entries using 0 bytes of memory
BGP using 900 total
bytes of memory
bytes of memory
BGP activity 12/9
prefixes, 15/12 paths, scan interval 60 secs
prefixes, 15/12 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer
InQ OutQ Up/Down State/PfxRcd
InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 1 365
372 28 0
0 05:21:31 1
372 28 0
0 05:21:31 1
R4#show ip bgp vpnv4
all
all
BGP table version is
28, local router ID is 4.4.4.4
28, local router ID is 4.4.4.4
Status codes: s
suppressed, d damped, h history, * valid, > best, i – internal,
suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m
multipath, b backup-path, x best-external
multipath, b backup-path, x best-external
Origin codes: i –
IGP, e – EGP, ? – incomplete
IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher:
1:1 (default for vrf cust1)
1:1 (default for vrf cust1)
*>i10.1.1.0/24 2.2.2.2 0 100
0 ?
0 ?
*>
20.1.1.0/24 45.45.45.5 0 32768 ?
20.1.1.0/24 45.45.45.5 0 32768 ?
Route Distinguisher:
100:1
100:1
*>i10.1.1.0/24 2.2.2.2 0 100
0 ?
0 ?
R4#show ip bgp vpnv4
all 10.1.1.0/24
all 10.1.1.0/24
BGP routing table
entry for 1:1:10.1.1.0/24, version 27
entry for 1:1:10.1.1.0/24, version 27
Paths: (1 available,
best #1, table cust1)
best #1, table cust1)
Not advertised to any peer
Local, imported path from 100:1:10.1.1.0/24
2.2.2.2 (metric 3) from 2.2.2.2 (2.2.2.2)
Origin incomplete, metric 0, localpref
100, valid, internal, best
100, valid, internal, best
Extended Community: RT:200:1
mpls labels in/out nolabel/17
BGP routing table
entry for 100:1:10.1.1.0/24, version 26
entry for 100:1:10.1.1.0/24, version 26
Paths: (1 available,
best #1, no table)
best #1, no table)
Not advertised to any peer
Local
2.2.2.2 (metric 3) from 2.2.2.2 (2.2.2.2)
Origin incomplete, metric 0, localpref
100, valid, internal, best
100, valid, internal, best
Extended Community: RT:200:1
mpls labels in/out nolabel/17
R5:-
R5#sh ip route
Codes: L – local, C –
connected, S – static, R – RIP, M – mobile, B – BGP
connected, S – static, R – RIP, M – mobile, B – BGP
D
– EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
– EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 –
OSPF NSSA external type 2
OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF
external type 2
external type 2
i – IS-IS, su – IS-IS summary, L1 –
IS-IS level-1, L2 – IS-IS level-2
IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate
default, U – per-user static route
default, U – per-user static route
o – ODR, P – periodic downloaded static
route, H – NHRP
route, H – NHRP
+ – replicated route, % – next hop
override
override
Gateway of last
resort is 45.45.45.4 to network 0.0.0.0
resort is 45.45.45.4 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 45.45.45.4
5.0.0.0/32 is subnetted, 1 subnets
C 5.5.5.5 is directly connected,
Loopback0
Loopback0
20.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
subnets, 2 masks
C 20.1.1.0/24 is directly connected,
FastEthernet0/0
FastEthernet0/0
L 20.1.1.1/32 is directly connected,
FastEthernet0/0
FastEthernet0/0
45.0.0.0/8 is variably subnetted, 2
subnets, 2 masks
subnets, 2 masks
C 45.45.45.0/24 is directly connected,
FastEthernet2/0
FastEthernet2/0
L 45.45.45.5/32 is directly connected,
FastEthernet2/0
FastEthernet2/0
