Subnet creation using OSPF protocol

I have 20 openwrt routers running batman mesh.Wanted to create 2 different subnets using OSPF on border nodes which communicates on a wireless link.

I used quagga for OSPF and followed openwrt tutorial for BATMAN ADV mesh.

My quagga configuration for my border nodes :

/etc/quagga/ospfd.conf

hostname OpenWrt
password helloworld
enable password helloworld
interface eth0.1
ip ospf hello-interval 60
ip ospf dead-interval 240
router ospf
ospf router-id 192.168.3.1
network 192.168.0.0/16 area 1
access-list vty permit 127.0.0.0/8
access-list vty deny any
line vty
access-class vty

/etc/quagga/zebra.conf

hostname OpenWrt
password helloworld
enable password helloworld
interface eth0.1
ip address 198.168.3.1/16
access-list vty permit 127.0.0.0/8
access-list vty deny any
line vty
access-class vty

Quagga configuration is same for both the border nodes except their ip-configuration

My network configuration :

/etc/config/network

config interface 'loopback

option ifname 'lo'
option proto 'static'
option ipaddr `127.0.0.1`
option netmask `255.0.0.0`

config globals 'globals'

option ula_prefix 'fd04:575b:e9bc::/48'

config interface 'lan'
optin type 'bridge'
option ifname 'eth0.1 bat0'
option proto 'static'`
option ipaddr `192.168.3.1`
option netmask `255.255.0.0`
option gateway `192.168.4.1'
option ip6assign '60'

config device 'lan_eth0_1_dev'

option name 'eth0.1'
option macaddr '84:d8:1b:4a:77:14'

config interface 'wan'

option ifname 'eth0.2'
option proto 'dhcp'

config device 'wan_eth0_2_dev'

option name 'eth0.2'
option macaddr '84:d8:1b:4a:77:15'

config interface 'wan6'

option ifname 'eth0.2'
option proto 'dhcpv6'

config interface 'bat0'


option proto 'batadv'
option routing_algo 'BATMAN_IV'
option aggregated_ogms 1
option ap_isolation 0
option bonding 0
option fragmentation 1
#option gw_bandwidth '10000/2000'
option gw_mode 'off'
#option gw_sel_class 20
option log_level 0
option orig_interval 1000
option bridge_loop_avoidance 1
option distributed_arp_table 1
option multicast_mode 1
option network_coding 0
option hop_penalty 30
option isolation_mark '0x00000000/0x00000000'


config interface 'nwi_mesh0'
option mtu '2304'
option proto 'batadv_hardif'
option master 'bat0'

lan.proto is set to dhcp for the mesh nodes and static for only border nodes.

/etc/config/wireless

config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/10300000.wmac'
option htmode 'HT40'

config wifi-iface 'mesh0'
option device 'radio0'
option ifname 'mesh0'
option network 'nwi_mesh0'
option mode 'mesh'
#option mesh_fwding '0'
option mesh_id 'wemesh'

config wifi-device 'radio1'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
option htmode 'VHT80'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option key 'helloworld'
option ssid 'Node'`
option encryption 'psk2'

OSPF troubleshooting output:
vtysh -c "show ip ospf database"

OSPF Router with ID (192.168.3.1)
Router Link States (Area 0.0.0.1)
Link ID           ADV Router     Age        Seq#                CkSum     Link count
192.168.3.1    192.168.3.1    1717        0x8000000a              0x7812     1
192.168.4.1    192.168.4.1    1727         0x80000009             0xa261     2
Net Link States (Area 0.0.0.1)
Link ID      ADV Router      Age              Seq#        CkSum
192.168.4.1  192.168.4.1     1707       0x80000003            0x8916

vtysh -c "show ip ospf route"

% Unknown command: username root helloworld
============ OSPF network routing table ============
N    192.168.0.0/16[10]     area: 0.0.0.1
                            directly attached to br-lan
N    192.168.1.0/24[20]     area: 0.0.0.1
                            via 192.168.4.1, br-lan
============ OSPF router routing table =============

============ OSPF external routing table ===========

Currently my border nodes don't work as expected.

Needed help with its configuration.

An example diagram of what i am trying to do.

192.168.3.0/16 is overlapping with 192.168.4.0/16, they both belong in 192.168.0.0/16.

Can you give an example ?
What IP should I give and what area should they belong to ?

The left island can be 192.168.3.0/24 and the right island 192.168.4.0/24. The point to point link between the 2 routers can be 192.168.2.0/30. Area doesn't matter in your case so much, as long as it is the same. If in doubt use area 0.

On a sidenote, you have created a lot of topics on ospf which you have abandoned.




Please close the previous ones before you proceed with this one too.