3

How can I give an IP address to a vlan interface on a Cisco 1900series router?

as request from my customers :

Routerlintas#

interface Vlan10
ip address 10.10.12.77 255.255.255.252

interface FastEthernet0/0/0
description LAN KartuKu
switchport access vlan 10
no ip address

I have successfully made vlan 10 with the command:

Routerlintas#vlan database
R(vlan)#vlan 10 name TO-NETWORK-VLAN-10
R(vlan)#exit

and the problem is:
I can't go into interface vlan 10.

I must give ip address in vlan 10 and command #interface vlan 10 is not working.

  • What is the router software version? – JFL Oct 4 '16 at 9:06
  • Hello JFL, The router version is : Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9-M), Version 15.4(3)M3, RELEASE SOFTWARE (fc2) Technical Support: cisco.com/techsupport Copyright (c) 1986-2015 by Cisco Systems, Inc. Compiled Fri 05-Jun-15 12:31 by prod_rel_team – Budi Permadi Oct 4 '16 at 9:10
  • Ask the customer what it is they really want to achieve. Do they simply want to use 10.10.12.77 as gateway, for devices on a switch connected to this router? Then simply configure the ip address on the router interface? – hertitu Oct 4 '16 at 10:46
  • the customer want the router interface fa 0/0/0 made into access vlan 10. cause fa0/0/0 will connect to HUB. and HUB connect to users. and The customer want to achieve the HWIC module to use as a switch module. – Budi Permadi Oct 5 '16 at 4:36
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 15 '17 at 4:09
2

if your router host small LAN switches modules.which is could be configured from the router itself and it is separate logical device with its own configuration.so

  1. They are logical L3 interfaces so called (SVI = switched virtual interfaces) they provide layer 3 services (a gateway) to corresponding L2 Vlan.the L2 vlan can be associated to one or multiple switch ports of the module and they are configured like in an IOS LAN switch.
  2. Vlan interfaces are a form of logical interfaces like loopbacks but: an SVI vlan 10 can be up/up only if at least one switch port is up and associated to vlan 10 (including trunk ports and actually the correct definition is at least one port in Spanning tree state forwarding). Note: this is true for real switches it can be false for these modules on routers (the internal trunk between router and module can be enough to make the L3 SVI to stay up)
  3. First of all the corresponding L2 object Vlan has to be created, it is likely that you should use vlan database context as you did

router# vlan database
router(vlan)# vlan 10
router(vlan)# name test10
router(vlan)#apply
router(vlan)#exit

apply or exit are needed to have the new vlan created

then you need to configure the interface vlan and enable it, as next

router#config t
router(config)#interface vlan 10
router(config)#ip address 10.10.10.1 255.255.255.0
you need to enable with no shut
router(config)#no shut

then associate the interface you want to this vlan

also make use of this link

| improve this answer | |
  • i can't command router(config)#interface vlan 10 and i don't know what wrong. The customer want to achieve the HWIC-2FE module to use as a switch module. – Budi Permadi Oct 5 '16 at 4:46
  • its may be restricted to only layer 2 functionality, in this case you can use encapsulation dot1Q method of configuration . may you make use of this link supportforums.cisco.com/discussion/11143096/… – Gadeliow Oct 5 '16 at 7:32
1

interface vlan is used on layer-3 switches, not 'real' routers.

It depends on what your customer wants to achieve exactly and how the link between the router and the rest of the network is configured.

If they they gave you this:

interface Vlan10
 ip address 10.10.12.77 255.255.255.252

interface FastEthernet0/0/0
 description LAN KartuKu
 switchport access vlan 10
 no ip address

Then this implies that the port to which the router connects, is an access port in vlan 10, so you could simply configure:

interface Ethernet0
 ip address 10.10.12.77 255.255.255.252

If, however, they require multiple interfaces of the router to be in vlan10 (in other words, they expect the router to behave like a L3 switch) then you may need to configure IRB, so for example:

interface Ethernet0
 bridge-group 1

interface Ethernet1
 bridge-group 1

interface BVI1
 ip address 10.10.12.77 255.255.255.252
| improve this answer | |
0

vlan is about creating logical network with switch, you cannot create vlan with router; however, you can use a technique called router on a stick to route packet between vlans

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.