Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VLAN configuration 6

Status
Not open for further replies.

mohamdr

Technical User
Sep 21, 2001
626
BH
I am doing self-study of CCNA , trying to configure a vlan in Boson Simulation Software 6 I have a problem while assigning ip to other vlan other than defualt vlan 1.

I have created the vlan in switch 1 and configure it to be VTP server and switch 2 as VTP client , whenever I create a new vlan in switch 1 I can get it in switch 2 .

I have created vlan 10 vlan 20, vlan 30


when I go to
switch1(Config): int vlan 20
switch1(config-if) : ip address 192.158.20.254 255.255.255.0
switch1(config-if) : no shut

when I say sh running-config , I can't see any ip assigned to vlan 20 nothing is there

I can change only vlan 1

any idea please help again? do I am doing the wrong way of assigning ip to vlan

I am using Boson Simulation

regards
 
do it in vlan database in prev. mode, once you have it assigned make sure you type "exit" so that it will save your vlan(s).
 
I know how to create the vlans , I need to assign ip to vlans .

when I go to
switch1(Config): int vlan 20
switch1(config-if) : ip address 192.158.20.254 255.255.255.0
switch1(config-if) : no shut

it doesn't appear in running-config
 
You don't put IP addresses for the VLANs on the switch unless the switch is a multilayer switch.

You define VLANS and place ports in VLANs. The switch will only allow ports within the same VLAN to communicate. The IP addresses will go on the external router that is attached to another port on the switch configured for trunking. The router will need subinterfaces with an IP address assigned on each subinterface for the interVLAN routing.

A Layer 2 switch will only allow a single switched virtual interface (default is interface Vlan 1) to have an IP address.

HTH
 
I am follwing CCNA book on how to create vlans and use a router subinterface to route between them.
to do it I think I need to give every vlan an IP and configure each router subinterface to for each vlan to route between them.

what I need is to assign IP for each vlan which I am failing to make it.

again I am using Boson Simulator.

mohdy

 
mohamdr,

As Cluebird pointed out - you are assigning the IP addresses to the subinterfaces on the router - not on the switch. eg. Interface E0/0 on the router would have subinterfaces E0/0.1 E0/0.2 E0/0.3 and each of those subinterfaces would have an IP and would be the gateway for the computers in that VLAN atached to those ports on the switch that were in the same VLAN.

If you are doing CCNA labs from a CCNA book you would not be working with a layer 3 switch but a layer 2 switch. The layer 2 switch will get 1 IP address for management - not on each switch interface on the VLAN.

The router will will have the IPs on the subinterfaces that are part of the Ethernet interface that is being used to trunk the VLAN traffic to the Layer 2 switch.

Hope this helps!


E.A. Broda
CCNA, CCDA, CCAI, Network +
 
On the switchport connected to the router you should do something like this:
Switch#configure terminal
Switch(config)#interface Fa0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#no shutdown

On the router you should see something like this:
Router#conf t
Router(config)#interface f0/0
Router(config-if)#description Native Vlan goes here
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#interface f0/0.10
Router(config-subif)#description Vlan 10 default gateway
Router(config-subif)#encap dot1q 10
Router(config-subif)#ip add 192.168.10.1 255.255.255.0
Router(config-subif)#int f0/0.20
Router(config-subif)#desc Vlan 20 default gateway
Router(config-subif)#encap dot1q 20
Router(config-subif)#ip add 192.168.20.1 255.255.255.0
Router(config-subif)#end
Router#

This configures inter-Vlan routing for 3 networks; one is the native Vlan, the other two are the tagged Vlans. The 2950 can only do 802.1q frame tagging.

The hosts need to be plugged into ports associated with their respective Vlans and given IP addresses from the proper network address space. The hosts and the Router are the devices that get IP addresses. The layer-2 switch knows nothing about IP addresses since it forwards based on MAC addresses.

HTH
 
Thanks as for all of you ... exactly I am confused as our team configured vlan on L3 switch .. now I am clear about how to do without L3 switch ..

Thanks again also to CiscoGuy33
 
Great topic, I have been running into the same issues myself. One question I have from the above solution. In Cluebird's answer he puts an IP address on f0/0. All my studies say to issue the "no ip address" command on the actual interface and only ip the subs, is this correct or just a preference? Thanks and thanks for the answers above!
 
Hi Prizmm,

How you do the untagged native VLAN varies based on the IOS you're running. Newer IOS supports all IP addresses on subinterfaces with the keyword "native" added to the encapsulation dot1q to identify the untagged frames. Older IOS required the native VLAN on the main interface with tagged traffic on subinterfaces for dot1q.

ISL has always put all addresses on subinterfaces since ISL wraps all frames with new header and FCS.

I showed the configuration "that always works" for dot1q and ignored ISL since ISL is legacy. If your code supports, do everything on subifs.

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top