Guys,
why routes aren't preferred over sham-link? as per below output, sw1, sw2 prefers route thorugh back-door link.
R5#sh run | s router
router ospf 100 vrf VPN_A
log-adjacency-changes
area 1 sham-link 150.1.55.55 150.1.66.66
redistribute bgp 100 subnets
network 155.1.58.5 0.0.0.0 area 1
router ospf 1
router-id 150.1.5.5
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
router bgp 100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 150.1.4.4 remote-as 100
neighbor 150.1.4.4 update-source Loopback0
!
address-family vpnv4
neighbor 150.1.4.4 activate
neighbor 150.1.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf VPN_B
redistribute connected
redistribute static
no synchronization
exit-address-family
!
address-family ipv4 vrf VPN_A
redistribute connected
redistribute static
redistribute ospf 100 vrf VPN_A
no synchronization
network 150.1.55.55 mask 255.255.255.255
exit-address-family
mpls ldp router-id Loopback0 force
R6#sh run | s router
router ospf 100 vrf VPN_A
domain-id 0.0.0.6
log-adjacency-changes
area 1 sham-link 150.1.66.66 150.1.55.55
summary-address 172.16.0.0 255.255.0.0
redistribute bgp 100 subnets
network 155.1.58.6 0.0.0.0 area 1
router ospf 1
router-id 150.1.6.6
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
router rip
version 2
no auto-summary
!
address-family ipv4 vrf VPN_B
redistribute bgp 100 metric transparent
network 155.1.0.0
no auto-summary
exit-address-family
router bgp 100
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 150.1.4.4 remote-as 100
neighbor 150.1.4.4 update-source Loopback0
!
address-family ipv4
redistribute connected
redistribute static
no auto-summary
no synchronization
exit-address-family
!
address-family vpnv4
neighbor 150.1.4.4 activate
neighbor 150.1.4.4 send-community extended
exit-address-family
!
address-family ipv4 vrf VPN_B
redistribute connected
redistribute static
no synchronization
exit-address-family
!
address-family ipv4 vrf VPN_A
redistribute connected
redistribute static
redistribute ospf 100 vrf VPN_A
no synchronization
network 150.1.66.66 mask 255.255.255.255
exit-address-family
mpls ldp router-id Loopback0 force
SW1#sh run | b router
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 1
!
router rip
version 2
no auto-summary
!
address-family ipv4 vrf VPN_B
network 155.1.0.0
network 192.168.7.0
no auto-summary
exit-address-family
SW2#sh run | b router
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 1
!
R5#sh ip os sham-links
Sham Link OSPF_SL0 to address 150.1.66.66 is up
Area 1 source address 150.1.55.55
Run as demand circuit
DoNotAge LSA allowed. Cost of using 1 State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Hello due in 00:00:07
Adjacency State FULL (Hello suppressed)
Index 2/2, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
R5#sh ip route vrf VPN_A 150.1.66.66
Routing entry for 150.1.66.66/32
Known via "bgp 100", distance 200, metric 0, type internal
Redistributing via ospf 100
Advertised by ospf 100 subnets
Last update from 150.1.6.6 00:21:45 ago
Routing Descriptor Blocks:
* 150.1.6.6 (Default-IP-Routing-Table), from 150.1.4.4, 00:21:45 ago
Route metric is 0, traffic share count is 1
AS Hops 0
R6#sh ip os sha
Sham Link OSPF_SL0 to address 150.1.55.55 is up
Area 1 source address 150.1.66.66
Run as demand circuit
DoNotAge LSA allowed. Cost of using 1 State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40,
Hello due in 00:00:00
Adjacency State FULL (Hello suppressed)
Index 1/1, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
R6#sh ip route vrf VPN_A 150.1.55.55
Routing entry for 150.1.55.55/32
Known via "bgp 100", distance 200, metric 0, type internal
Redistributing via ospf 100
Advertised by ospf 100 subnets
Last update from 150.1.5.5 00:22:28 ago
Routing Descriptor Blocks:
* 150.1.5.5 (Default-IP-Routing-Table), from 150.1.4.4, 00:22:28 ago
Route metric is 0, traffic share count is 1
AS Hops 0
SW1#sh run int fa1/0/15
Building configuration...
Current configuration : 107 bytes
!
interface FastEthernet1/0/15
no switchport
ip address 155.1.78.7 255.255.255.0
ip ospf cost 9999
end
SW2#sh run int fa1/0/15
Building configuration...
Current configuration : 107 bytes
!
interface FastEthernet1/0/15
no switchport
ip address 155.1.78.8 255.255.255.0
ip ospf cost 9999
end
SW1#sh ip rou os
155.1.0.0/24 is subnetted, 9 subnets
O 155.1.8.0 [110/10000] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O 155.1.58.0 [110/10000] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O E2 155.1.76.0 [110/1] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O 155.1.108.0 [110/10000] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
O 172.16.8.8/32 [110/10000] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O E2 192.168.6.0/24 [110/1] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O E2 192.168.7.0/24 [110/1] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
150.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
O E2 150.1.66.66/32 [110/1] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O E2 150.1.55.55/32 [110/1] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
O 150.1.8.8/32 [110/10000] via 155.1.78.8, 00:23:03, FastEthernet1/0/15
SW2#sh ip rou os
155.1.0.0/24 is subnetted, 9 subnets
O 155.1.7.0 [110/10000] via 155.1.78.7, 00:23:17, FastEthernet1/0/15
O 155.1.37.0 [110/10000] via 155.1.78.7, 00:23:17, FastEthernet1/0/15
O 155.1.79.0 [110/10000] via 155.1.78.7, 00:23:17, FastEthernet1/0/15
O E2 155.1.76.0 [110/1] via 155.1.58.5, 00:23:17, Vlan58
O 155.1.67.0 [110/10000] via 155.1.78.7, 00:23:17, FastEthernet1/0/15
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
O 172.16.7.7/32 [110/10000] via 155.1.78.7, 00:23:17, FastEthernet1/0/15
O E2 192.168.6.0/24 [110/1] via 155.1.58.5, 00:23:17, Vlan58
O E2 192.168.7.0/24 [110/1] via 155.1.58.5, 00:23:17, Vlan58
150.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
O 150.1.7.0/24 [110/10000] via 155.1.78.7, 00:23:17, FastEthernet1/0/15
O E2 150.1.66.66/32 [110/1] via 155.1.58.5, 00:23:17, Vlan58
O E2 150.1.55.55/32 [110/1] via 155.1.58.5, 00:23:17, Vlan58
R5#sh ip route vrf VPN_A
Routing Table: VPN_A
Codes: 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
Gateway of last resort is not set
155.1.0.0/24 is subnetted, 9 subnets
O 155.1.8.0 [110/2] via 155.1.58.8, 00:24:11, FastEthernet0/0
O 155.1.7.0 [110/10001] via 155.1.58.8, 00:24:11, FastEthernet0/0
C 155.1.58.0 is directly connected, FastEthernet0/0
O 155.1.37.0 [110/10001] via 155.1.58.8, 00:24:11, FastEthernet0/0
O 155.1.78.0 [110/10000] via 155.1.58.8, 00:24:11, FastEthernet0/0
O 155.1.79.0 [110/10001] via 155.1.58.8, 00:24:11, FastEthernet0/0
B 155.1.76.0 [200/0] via 150.1.6.6, 00:23:58
O 155.1.67.0 [110/10001] via 155.1.58.8, 00:24:12, FastEthernet0/0
O 155.1.108.0 [110/2] via 155.1.58.8, 00:24:12, FastEthernet0/0
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C 172.16.5.0/24 is directly connected, Loopback101
O 172.16.8.8/32 [110/2] via 155.1.58.8, 00:24:12, FastEthernet0/0
O 172.16.7.7/32 [110/10001] via 155.1.58.8, 00:24:12, FastEthernet0/0
B 192.168.6.0/24 [200/0] via 150.1.6.6, 00:23:58
B 192.168.7.0/24 [200/0] via 150.1.6.6, 00:23:58
150.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
O 150.1.7.0/24 [110/10001] via 155.1.58.8, 00:24:12, FastEthernet0/0
B 150.1.66.66/32 [200/0] via 150.1.6.6, 00:23:58
C 150.1.55.55/32 is directly connected, Loopback200
O 150.1.8.8/32 [110/2] via 155.1.58.8, 00:24:12, FastEthernet0/0
R5#
R6#sh ip route vrf VPN_A
Routing Table: VPN_A
Codes: 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
Gateway of last resort is not set
155.1.0.0/24 is subnetted, 9 subnets
O 155.1.8.0 [110/3] via 150.1.5.5, 00:24:02
O 155.1.7.0 [110/10002] via 150.1.5.5, 00:24:02
O 155.1.58.0 [110/2] via 150.1.5.5, 00:24:02
O 155.1.37.0 [110/10002] via 150.1.5.5, 00:24:02
O 155.1.78.0 [110/10001] via 150.1.5.5, 00:24:02
O 155.1.79.0 [110/10002] via 150.1.5.5, 00:24:02
B 155.1.76.0 is directly connected, 01:20:47, FastEthernet0/0.76
C 155.1.67.0 is directly connected, FastEthernet0/0.67
O 155.1.108.0 [110/3] via 150.1.5.5, 00:24:04
172.16.0.0/32 is subnetted, 2 subnets
O 172.16.8.8 [110/3] via 150.1.5.5, 00:24:04
O 172.16.7.7 [110/10002] via 150.1.5.5, 00:24:04
S 192.168.7.0/24 [1/0] via 155.1.76.7, FastEthernet0/0.76
150.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
O 150.1.7.0/24 [110/10002] via 150.1.5.5, 00:24:04
C 150.1.66.66/32 is directly connected, Loopback200
B 150.1.55.55/32 [200/0] via 150.1.5.5, 00:24:17
O 150.1.8.8/32 [110/3] via 150.1.5.5, 00:24:04