10-10-2012 06:22 AM - edited 03-07-2019 09:23 AM
I have a test switch (Cisco 3550) that I want to set up with 6 Vlans and 2 trunk ports. I want to be able to access a virtual server conected to the trunk ports from the switch ports. Ports Fa0/1 to 8 are in a vlan port fa0/9 to 16 another vlan etc. Ports Fa0/47 and 48 are the trunk ports. This is a lab environment so the the switch is the only device being used.
10-10-2012 06:47 AM
Hi,
do like this:
Creating vlans:
Config t
Switch(Config)#vlan2
Switch(Config)#vlan3
Switch(Config)#vlan4
Switch(Config)#vlan5
Switch(Config)#vlan6
assign IP ADDRESS TO vlans.
Switch(Config)#int vlan 1
Switch(Config)#ip address (ip) (mask)
Switch(Config)#no shut
Creat trunk ports like this:
config t
Int fa0/0
switchport mode dynamic desirable
switchport mode trunk
assign ports to vlan:
config t
int range fa0/1-8
Switchport access vlan 3
Hope you can do it now.If still getting problems then let me know.
Regards
Please rate if it helps
10-10-2012 06:51 AM
Hello Leo,
if I have understood your question you would like to see the equivalent configuration to your requirements.)#
You haven't specified the IOS version running in the C3550
In the following I assume an old IOS using separate vlan database mode
switch#config t
switch (config)# vtp domain LAB
switch (config)# vtp mode transparent
switch(config)#end
switch #vlan database
swiitch(vlan)# vlan 2
switch(vlan)# vlan 3
swiitch(vlan)# vlan 4
switch(vlan)# vlan 5
switch(vlan)# vlan 6
switch(vlan)# vlan 7
switch(vlan)# apply
switch(vlan)# exit
switch# config t
switch(config)# interface range fas0/1 - fas0/8
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan 2
switch(config-if)# exit
switch(config)# interface range fas0/9 - fas0/16
switch(config-if)# switchport mode access
switch(config-if)# switchport access vlan 3
switch(config-if)# exit
....
switch(config)# interface fas0/47
switch(config-if)#switchport trunk enc dot1q
switch(config-if)#switchport mode trunk
switch(config)# interface fas0/48
switch(config-if)#switchport trunk enc dot1q
switch(config-if)#switchport mode trunk
If the IOS is newer you don't need to go to vlan database mode in any case you set the vtp mode to transparent
Edit:
L3 interfaces associated to the L2 Vlans (SVIs)
interface Vlan X
ip address A.B.C.D mask
no shut
Hope to help
Giuseppe
10-10-2012 07:34 AM
What routing statments do I need to go accroos the VLANs?
10-10-2012 09:35 AM
Hi,
If you are using L3 switch...then u just need to config IP routing command .
just see the configration to get intervlan routing:
see the example:If you are configuring on Router
Create sub-interfaces, set 802.1Q trunking protocol and ip address on each sub-interface
Router(config)#interface f0/0
Router(config-if)#no shutdown
(Note: The main interface f0/0 doesn’t need an IP address but it must be turned on)
Router(config)#interface f0/0.0
Router(config-subif)#encapsulation dot1q 15
Router(config-subif)#ip address 192.168.15.1 255.255.255.0
Router(config-subif)#interface f0/0.1
Router(config-subif)#encapsulation dot11 20
Router(config-subif)#ip address 192.168.20.1 255.255.255.0
(Note: In the “encapsulation dot1q 15″ command, 15 is the VLAN ID this interface operates in)
Configure VLAN
Switch(config)#vlan 15
Switch(config-vlan)#name SALES
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name TECH
Set ports to access mode & assign ports to VLAN
Switch(config)#interface range fa0/1
Switch(config-if)#no shutdown
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 15
Switch(config-if)#interface range fa0/3
Switch(config-if)#no shutdown
Switch(config-if)#switchport mode access
Switch(config-if)# switchport access vlan 20
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
see the example:If you are configuring on layer 3 switch:
ip routing
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
interface Vlan15
ip address 192.168.15.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
And on hosts just assign IP addresses and default gateways (to the corresponding interface VLANs) -> hosts in different VLANs can communicate.
Regards
Please rate if it helps.
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