1

I have a simple question about a network (I am new to this concept so please correct me if I am wrong).

I have a simple network as shown (GNS3):

The network have 3VLANS (VLAN10 = DesignTeam, VLAN30 = EngTeam and VLAN20=Storage). What I would like is for Vlan30 to be accessed by VLAN10 & VLAN30.

I have done some research and I do few things here i.e use router on a stick method but I want to do this via multi-layer switch.

enter image description here

This is what I have done: First created Vlans Second assigned port to my VLAN's: VLAN10 = f1/3 VLAN30 = f1/0 VLAN20 = f1/4 Third Assign ports to VLAN's: MainSwitch#conf t MainSwitch(config)#interface fastEthernet 1/4 MainSwitch(config-if)#switchport access vlan 10 MainSwitch(config-if)#switchport access vlan 30 and then if I run show vlan-switch

I get different output each time (some port gets assigned to wrong VLAN's)

Am I doing anything wrong, anything I shod read further?

EDIT: if I do: show ip int br i get:

Vlan10 192.168.10.1 YES manual up up Vlan20 192.168.20.1 YES manual up up Vlan30 192.168.30.1 YES manual up up 

I did show lan-switch and I get:

1 default active Fa1/1, Fa1/2, Fa1/5, Fa1/6 Fa1/7, Fa1/8, Fa1/9, Fa1/10 10 DesignTeam active Fa1/3 20 Storage active Fa1/4 30 EngTeam active Fa1/0 

If I access fa1/3 and do switch port access vlan10 then I get:

 1 default active Fa1/1, Fa1/2, Fa1/5, Fa1/6 Fa1/7, Fa1/8, Fa1/9, Fa1/10 10 DesignTeam active Fa1/3 Fa1/4 20 Storage active 30 EngTeam active Fa1/0 

As you can see the storage port moved to VLAN10 This is what I want (VLAN 10 & 30 have access to 20):

 1 default active Fa1/1, Fa1/2, Fa1/5, Fa1/6 Fa1/7, Fa1/8, Fa1/9, Fa1/10 10 DesignTeam active Fa1/3 Fa1/4 20 Storage active Fa1/4 30 EngTeam active Fa1/0 Fa1/4 

Am I still doing anything wrong?

2 Answers 2

2

I think you're assigning ports the wrong way. You have to specify each port before you enter the vlan command. Something like this:

MainSwitch(config)#interface fastEthernet 1/4 MainSwitch(config-if)#switchport access vlan 20 MainSwitch(config)#interface fastEthernet 1/3 MainSwitch(config-if)#switchport access vlan 10 MainSwitch(config)#interface fastEthernet 1/0 MainSwitch(config-if)#switchport access vlan 30 

Then you need to assign an IP address to each VLAN interface:

MainSwitch(config)#interface vlan 10 MainSwitch(config-if)#ip address 1.2.3.4 255.255.255.0 

Etc.

5
  • Hi, So I have edited my question and as you can see the ports are assigned to VLAN and ip are also assigned to VLAN. The question is: if I do go to fa1/3 and do switch port access lan 20 (I want f1/3 and f1/0 to access Storage). I see 1/4 move next VLAN10 (so now I don't have any port assign toVLAN20 which is storage) I'll appreciate if you can show me full configuration Commented Nov 17, 2016 at 10:59
  • do i have to make port f1/4 a trunk? Commented Nov 17, 2016 at 11:48
  • 1
    You want each port to be on one VLAN only. Your multilayer switch will route traffic between the VLANs. Make sure your host devices have their default gateways set to the VLAN interface address. Commented Nov 17, 2016 at 13:30
  • Yes I would like each port to be in one VLAN - "Make sure your host devices have their default gateways set to the VLAN interface address"? in my case I did: MainSwitch(config)# ip default-gateway 192.168.1.1? PC2 I am setting IP to: ip 192.168.21.1/192.168.1.1 - but thats not working as i cannot ping from pc2 to pc1 (if VLAN can communicate then I should be able to ping it). Am I doing anything wrong here? Commented Nov 18, 2016 at 10:02
  • You don't need the "ip default gateway" statement on your switch--remove it. Make sure all your hosts can ping their default gateway. Commented Nov 18, 2016 at 13:01
0

It's feasible to assign multiple VLANs to one port on switch

This can be done by Configuring trunk port allowing all Vlans

Switch(config)#int f0/1

Switch(config)#switchport mode trunk

Switch(config)#switchport trunk allowed Vlan all

Switch (config)#no shutdown

Or els we can assign specific multiple Vlan on single port .

Switch(config)#int f0/1

Switch(config)#Switchport mode trunk

`Switch(config)#switchport trunk allowed vlan 10,20,30

Switch(config)#no shutdown

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.