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.
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.
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:
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does
j ai une question j ai achete un routeur cisco 887VA-k9 , je le configuré avec la configuration ci- dessous
si je le lier avec mon pc portable sur l un de ses ports directement ça marche toute est bien ( la connexion internet + m...
Attached policy provides CLI access to the Cisco 4G router over text messaging. Two files are in the attached .tar file:
2. PDF with instructions on how to load and use the .tcl file.