I have a Layer-3 switch with three VLANs and a router, using OSPF routing protocol.
My current setting:
- A router with router-id 126.96.36.199
- An interface connect to L3 switch with 192.168.2.1/24
- A L3 switch with router-id 188.8.131.52
- VLAN 1 on L3 switch 192.168.1.10/24
- VLAN 2 on L3 switch 192.168.2.10/24, a port connected to router
- VLAN 10 on L3 switch 192.168.10.1/24
I didn't set VLANs on the router. So maybe that's why it doesn't aware there are VLANs from 192.168.2.1/24. I have looked into InterVLAN routing and set same VLANs on router with switchport command. However, only VLAN 2 is working and I lost LSA of subnet of 192.168.2.0/24. I guess I still don't know how to achieve that.
Under current setting, I can advertise a LSA of subset 192.168.2.0/24 with a direct link on VLAN 2 to the router, and that makes OSPF network aware subnet of 192.168.2.0/24. However, I want OSPF network know it can connect to subnet of 192.168.1.0/24 and subnet of 192.168.10.0/24 too. How do I do that? Or is it possible?