Cisco Support Community
Community Member

Sub-Interface Routing Error


I am receiving this error when trying to assign IP address to LAN sub-interfaces I have created. I am running a 2651 router.

Lebanon_2651(config-subif)#ip address

% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.

Any ideas? I know I can do this with Vlans connected to a switch, but that is not what I am trying to accomplish.


Re: Sub-Interface Routing Error


When you create sub-interfaces on a router and assign IP addresses to it what you are trying to do is called router-on-a-stick. This would require configuring a trunk from the switch to the router and doing dot1q or isl encapsulation on sub-interfaces on a router.

You didn't state why is it that you want to create sub-interfaces without doing dot1q or isl encapsulation. If your intention is to create a secondary IP subnet on the LAN interface then you don't need sub-interfaces and it can be configured on the main interface with the 'secondary' keyword like the one below.

int f0/0

ip add secondary

ip add

Instead, if you have a different requirement then provide more details to suggest a solution for you.




Re: Sub-Interface Routing Error

to get rid of that error and allow you to complete your command as you've specified, you need the following command:

router(config-subif)# encapsulation dot1q 60

router(config-subif)# ip add

with the first command, setting the interface to a dot1q, you will now be able to complete the ip address command on that same interface.

(the first command defines the encapsulation as dot1q, aka TRUNK, and sets the VLAN to be supported by that subInterface; vlan 60 in this case)

the bottom line is, since you've gotten to the 'subInterface' level, IOS knows you intend to use multiple 'interfaces/networks' for that single interface; therefore it requires you to setup the interface as a trunk to acommodate that configuration.

please see the following link for more info on configuring a router to use a dot1q trunk:

Community Member

on the sub-interface

on the sub-interface configure: encencapsulation dot1q  X

X = vlan ID

on the connected router configure : vlan-id dot1q X

CreatePlease to create content