Background: BGP is fully functional and works as expected so nothing need to worry about, the problem is the route injection between HK_Office <> HK2 and LON1 <> LON_Office, as you could see on "show ip route" section below in HK_Office and LON_Office, it can't see routes in-between, for example in HK_Office, it doesn't contain routes to either 10.10.20.0/24 or 192.168.20.0/24...vice versa, how exactly should I correctly inject those subnets in HK_Office and LON_Office properly so both ends could see each other subnets?
Remark: This is actually running inside my lab, as we have to test it before live; I am taking shortcuts to use loopback interface IP to mimick the subnet that supposed to inject into OSPF/BGP in the future, loopback interface shall not be used in the production environment. We are using BGP in-between because of traffic engineering, please don't try to propose something else as it's not within my control.
========================
Config section,
HK_Office:
interface Loopback0
ip address 10.10.0.1 255.255.255.0
interface Loopback1
ip address 192.168.10.1 255.255.255.0
interface FastEthernet1/0
ip address 172.16.0.1 255.255.255.0
duplex auto
speed auto
router ospf 10
log-adjacency-changes
redistribute connected
passive-interface default
no passive-interface FastEthernet1/0
network 10.10.0.0 0.0.0.255 area 0
network 172.16.0.0 0.0.0.255 area 0
network 192.168.10.0 0.0.0.255 area 0
HK2:
interface FastEthernet0/0
description VIP Network
ip address 10.0.0.1 255.255.255.0
duplex auto
speed auto
interface FastEthernet0/1
description General network
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
interface FastEthernet1/0
ip address 172.16.0.2 255.255.255.0
duplex auto
speed auto
router ospf 10
log-adjacency-changes
redistribute connected subnets
redistribute bgp 64512 metric-type 1 subnets
passive-interface default
no passive-interface FastEthernet1/0
network 172.16.0.0 0.0.0.255 area 0
redistribute ospf 10
router bgp 64512
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 64512
neighbor 192.168.0.2 remote-as 64512
address-family ipv4
redistribute connected
redistribute ospf 10
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 next-hop-self
neighbor 10.0.0.2 route-map VIP_NET out
neighbor 192.168.0.2 activate
neighbor 192.168.0.2 next-hop-self
neighbor 192.168.0.2 route-map General_NET out
no auto-summary
no synchronization
network 10.0.0.0
network 172.16.0.0
network 192.168.0.0
exit-address-family
route-map VIP_NET permit 10
match ip address prefix-list PREFIX-TO-HK-VIP-NETWORK
set local-preference 50
route-map VIP_NET permit 20
match ip address prefix-list PREFIX-TO-HK-GENERAL-NETWORK
set local-preference 5000
route-map VIP_NET permit 10
match ip address prefix-list PREFIX-TO-HK-VIP-NETWORK
set local-preference 5000
route-map VIP_NET permit 20
match ip address prefix-list PREFIX-TO-HK-GENERAL-NETWORK
set local-preference 50
LON1:
interface FastEthernet0/0
description VIP Network
ip address 10.0.0.2 255.255.255.0
duplex auto
speed auto
interface FastEthernet0/1
description General network
ip address 192.168.0.2 255.255.255.0
duplex auto
speed auto
interface FastEthernet1/0
ip address 172.16.20.2 255.255.255.0
duplex auto
speed auto
router ospf 10
log-adjacency-changes
redistribute connected subnets
redistribute bgp 64512 metric-type 1 subnets
passive-interface default
no passive-interface FastEthernet1/0
network 172.16.20.0 0.0.0.255 area 0
redistribute ospf 10
router bgp 64512
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 64512
neighbor 192.168.0.1 remote-as 64512
address-family ipv4
redistribute connected
redistribute ospf 10
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 next-hop-self
neighbor 10.0.0.1 route-map VIP_NET out
neighbor 192.168.0.1 activate
neighbor 192.168.0.1 next-hop-self
neighbor 192.168.0.1 route-map General_NET out
no auto-summary
no synchronization
network 10.0.0.0
network 192.168.0.0
exit-address-family
route-map GENERALNET permit 20
match ip address prefix-list PREFIX-TO-LON-OFFICE-GENERAL-NETWORK
set local-preference 5000
!
route-map VIP_NET permit 10
match ip address prefix-list PREFIX-TO-LON-OFFICE-VIP-NETWORK
set local-preference 5000
!
route-map VIP_NET permit 20
match ip address prefix-list PREFIX-TO-LON-OFFICE-GENERAL-NETWORK
set local-preference 50
LON_Office:
interface Loopback0
ip address 10.10.20.1 255.255.255.0
interface Loopback1
ip address 192.168.20.1 255.255.255.0
interface FastEthernet1/0
ip address 172.16.20.1 255.255.255.0
duplex auto
speed auto
router ospf 10
log-adjacency-changes
redistribute connected
passive-interface default
no passive-interface FastEthernet1/0
network 10.10.20.0 0.0.0.255 area 0
network 172.16.20.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
========================
"show ip route" section,
HK_Office:
C 192.168.10.0/24 is directly connected, Loopback1
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, FastEthernet1/0
10.0.0.0/24 is subnetted, 2 subnets
C 10.10.0.0 is directly connected, Loopback0
O E2 10.0.0.0 [110/20] via 172.16.0.2, 2d00h, FastEthernet1/0
O E2 192.168.0.0/24 [110/20] via 172.16.0.2, 2d00h, FastEthernet1/0
HK2:
192.168.10.0/32 is subnetted, 1 subnets
O 192.168.10.1 [110/2] via 172.16.0.1, 2d00h, FastEthernet1/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, FastEthernet1/0
192.168.20.0/32 is subnetted, 1 subnets
B 192.168.20.1 [200/2] via 192.168.0.2, 00:33:23
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O 10.10.0.1/32 [110/2] via 172.16.0.1, 2d00h, FastEthernet1/0
C 10.0.0.0/24 is directly connected, FastEthernet0/0
B 10.10.20.1/32 [200/2] via 10.0.0.2, 00:33:24
C 192.168.0.0/24 is directly connected, FastEthernet0/1
LON1:
192.168.10.0/32 is subnetted, 1 subnets
B 192.168.10.1 [200/2] via 192.168.0.1, 00:29:20
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.20.0 is directly connected, FastEthernet1/0
192.168.20.0/32 is subnetted, 1 subnets
O 192.168.20.1 [110/2] via 172.16.20.1, 01:28:43, FastEthernet1/0
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B 10.10.0.1/32 [200/2] via 10.0.0.1, 00:29:20
C 10.0.0.0/24 is directly connected, FastEthernet0/0
O 10.10.20.1/32 [110/2] via 172.16.20.1, 01:28:44, FastEthernet1/0
C 192.168.0.0/24 is directly connected, FastEthernet0/1
LON_Office:
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.20.0 is directly connected, FastEthernet1/0
C 192.168.20.0/24 is directly connected, Loopback1
10.0.0.0/24 is subnetted, 2 subnets
O E2 10.0.0.0 [110/20] via 172.16.20.2, 00:42:44, FastEthernet1/0
C 10.10.20.0 is directly connected, Loopback0
O E2 192.168.0.0/24 [110/20] via 172.16.20.2, 00:42:44, FastEthernet1/0
==================================================
Update: After I did some config change on LON1 and HK2 router, finally both offices could see the routes from "show ip route", BUT! routing still has an issue, let's see below...
HK_Office "show ip route":
C 192.168.10.0/24 is directly connected, Loopback1
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, FastEthernet1/0
192.168.20.0/32 is subnetted, 1 subnets
O E2 192.168.20.1 [110/1] via 172.16.0.2, 00:39:33, FastEthernet1/0
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.0.0/24 is directly connected, Loopback0
O E2 10.10.20.1/32 [110/1] via 172.16.0.2, 00:39:33, FastEthernet1/0
O E2 192.168.0.0/24 [110/1] via 172.16.0.2, 01:43:34, FastEthernet1/0
LON_Office "show ip route":
192.168.10.0/32 is subnetted, 1 subnets
O E2 192.168.10.1 [110/1] via 172.16.20.2, 00:42:52, FastEthernet1/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.20.0 is directly connected, FastEthernet1/0
C 192.168.20.0/24 is directly connected, Loopback1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O E2 10.10.0.1/32 [110/1] via 172.16.20.2, 00:42:52, FastEthernet1/0
C 10.10.20.0/24 is directly connected, Loopback0
O E2 192.168.0.0/24 [110/1] via 172.16.20.2, 00:45:09, FastEthernet1/0
LON_Office traceroute to HK_Office:
1 172.16.20.2 8 msec 12 msec 8 msec
2 * * *
3 * * *
HK_Office traceroute to LON_Office:
1 172.16.0.2 8 msec 8 msec 12 msec
2 * * *
3 * * *
LON1 config:
router ospf 10
log-adjacency-changes
redistribute bgp 64512 subnets
passive-interface default
no passive-interface FastEthernet1/0
network 172.16.20.0 0.0.0.255 area 0
redistribute ospf 10
router bgp 64512
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 64512
neighbor 192.168.0.1 remote-as 64512
address-family ipv4
redistribute ospf 10
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 next-hop-self
neighbor 10.0.0.1 route-map VIP_NET out
neighbor 192.168.0.1 activate
neighbor 192.168.0.1 next-hop-self
neighbor 192.168.0.1 route-map General_NET out
no auto-summary
no synchronization
bgp redistribute-internal
network 10.0.0.0
network 172.16.20.0
network 192.168.0.0
exit-address-family
HK2 config:
router ospf 10
log-adjacency-changes
redistribute bgp 64512 subnets
passive-interface default
no passive-interface FastEthernet1/0
network 172.16.0.0 0.0.0.255 area 0
redistribute ospf 10
router bgp 64512
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 64512
neighbor 192.168.0.2 remote-as 64512
address-family ipv4
redistribute ospf 10
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 next-hop-self
neighbor 10.0.0.2 route-map VIP_NET out
neighbor 192.168.0.2 activate
neighbor 192.168.0.2 next-hop-self
neighbor 192.168.0.2 route-map General_NET out
no auto-summary
no synchronization
bgp redistribute-internal
network 10.0.0.0
network 172.16.0.0
network 192.168.0.0
exit-address-family
==================================================
Update: I got it working, please check my answer
ip ospf network broadcast
.no auto-summary
command, and put the mask on the network statement.