The network topology is router A and router B are directly connected with IP addresses configured on their physical interfaces int gig 0/0/1 and gig0/0/2. The third interface gig0/0/3 is configured as a layer-2 trunk port, and VLAN 12 is allowed to pass on router A and connect to router B's interface gig 0/0/3 layer-2 trunk port. The IGP ospf 100 is configured on both routers and enabled at int gig 0/0/1 and gig0/0/2.

I have multiple IP addresses on the VLAN interface as below:

interface vlanif 12
ip address 97.119.51.7 255.255.255.224
ip address 97.130.115.16 255.255.255.224 sub
ip address 97.116.60.23 255.255.255.224 sub
ip address 97.112.24.18 255.255.255.224 sub

These are advertised in router ospf by network statements in ospf 100, but by mistake, network 97.119.51.0 0.0.0.31 was skipped when configuring the OSPF process network statement. The directly connected router B does not show the route of the subinterface IP addresses of 97.130.115.16, 97.116.60.23 and 97.112.24.18.

What is the concept of multiple IP addresses on a interface, and where it is used?

Why does OSPF fail to advertise the subinterface IP address when the primary IP address network 97.119.51.0 0.0.0.31 of VLAN 12 has been skipped in the OSPF configuration?

  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 12 '17 at 17:50

You have the Cisco tag on your question, but the secondary address doesn't participate in the OSPF process. Normally, you only have one IPv4 network per VLAN, and you create multiple VLANs using subinterfaces. Subinterfaces are virtual interfaces, but they act just like real interfaces. Normally, you will define dot1q encapsulation on the subinterface so that the overall physical interface forms a layer-2 trunk, and each VLAN has its own network. The physical interface itself can have a network, and may, or may not, have dot1q encapsulation. If it doesn't, it will be the native VLAN.

When configuring OSPF, the network statements tell OSPF which interfaces will participate in the OSPF process, and in which are those interfaces are. Secondary networks configured on interfaces do not participate in the OSPF process, although they may be advertised in OSPF. You can have a single OSPF network statement which encompasses multiple interfaces, e.g. network 0.0.0.0 255.255.255.255 area 1234 will run OSPF on all interfaces, and all the interfaces will be in Area 1234.

Any interface, physical or virtual, not covered by an OSPF network statement will not participate in OSPF, and you would need to do something else, e.g. redistribution, to advertise the networks on those interfaces.

  • @ Ron Router A is Huawei and router B is Cisco – Jatinder Brar Jun 18 '16 at 18:02
  • You really need to mention details like that in your question. I only had the Cisco tag to go by. Since Huawei originally copied Cisco's code, it is likely that secondary addresses on an interface don't participate in the OSPF process on a Huawei router, either, and based on your experience, that seems to be the case. OSPF will only send hellos on the primary network on an interface. Subinterfaces get around this limitation. – Ron Maupin Jun 18 '16 at 18:09
  • Just noticed the age of this... Sorry – Fixitrod Aug 13 '17 at 4:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.