10-10-2006 09:43 AM - edited 03-05-2019 12:10 PM
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.
10-10-2006 10:10 AM
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
10-10-2006 10:37 AM
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:
03-14-2017 01:01 PM
on the sub-interface configure: encencapsulation dot1q X
X = vlan ID
on the connected router configure : vlan-id dot1q X
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide