cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
47236
Views
7
Helpful
3
Replies

Sub-Interface Routing Error

Jesse Hottle
Level 1
Level 1

Hello,

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 192.168.60.1 255.255.255.0

% 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.

3 Replies 3

Hi,

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 192.168.60.1 255.255.255.0 secondary

ip add 192.168.1.1 255.255.255.0

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

HTH

Sundar

gpulos
Level 8
Level 8

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 192.168.60.1 255.255.255.0

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:

http://www.cisco.com/en/US/products/hw/switches/ps628/products_configuration_example09186a00800ef797.shtml

laditella
Level 1
Level 1

on the sub-interface configure: encencapsulation dot1q  X

X = vlan ID

on the connected router configure : vlan-id dot1q X

Review Cisco Networking for a $25 gift card