Subinterfaces and IP addressing

Unanswered Question

Can a INTERFACE like fa0/1 have a layer 3 IP address and then I create a subinterfaces say fa0/1.1 and put an IP address on them as well with DOT1Q....should this be done I have read mixed comments...not best practice I know but I am trying to do configs ahead of time to migrate IP schema...we are moving from 199.x.x.x to 10.x.x.x so the fa0/0 is 199.x.x.x and the fa0/1.1 is 10x.x.x.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
thotsaphon Wed, 06/17/2009 - 06:51


Sub-interface is used when you connect f0/1 with the trunk port. It means you have to create vlans there. Sub-interface will then route traffic between vlans. That's why it asks for DOT1Q. In case of migration from the existing network and you don't want to change anything except ip addresses. You may think about secondary ip address on f0/1. However,It's the same broadcast domain. You can now change the client ip address while the existing network can be used as well.



thanks for the quick replay...I currently use sub interfaces and understand trunking and how to configure it. I normally dont put an IP address on the interface ...only the sub-interfaces. Secondary IPs we have considered and will work well with EIGRP as I deploy now. I think I may have caused an outage with adding sub interfaces to an interface that already had a layer 3 IP but I am not sure because I never lost connectivity with the router but could not ping other devices at site. I removed the config change but still no joy...I searched Cisco site but have not found a clear answer. I did replace the router last night due to the other router fan dying and then it went into ROMMON it may have all just been a coincidence but I am looking for best practice and or does that cause packet loss

thotsaphon Wed, 06/17/2009 - 07:09


In case you left the ip address on the physical interface while configuring sub-interface without using a "native" keyword. Router will use the physical interface for your native vlan. That's why you may connect this router via vlan1(I thought).I'm not sure that I understand your question correctly. It's a good idea to know the main point you are going to deal with.

Please check out this link:

Hopes I help you some.(grin)


John Blakley Wed, 06/17/2009 - 06:55

Generally, you wouldn't put an address on fa0/1, but instead put it under the interfaces like:

int fa0/1

no ip address

int fa0/1.1

encapsulat dot1q 1 native

ip address

int fa0/1.100

encapsulation dot1q 100

ip address

You'd then trunk the port that the router connects to and allow vlans 1 and 100 through.

You won't be able to put the same address, or an address in the same subnet, under a subinterface if the main interface has an address that conflicts with the subinterface's address. (subnet or actual address.)



iyde Wed, 06/17/2009 - 12:35

It depends - is it a router or a lsyer 3 switch you have in mind?

Routers: Use subinterfaces, as you describe.

Switches: Use trunking and SVI (Switch Virtual Interface = interface VLAN x).



This Discussion