Skip to main content

Inter Vlan configuration in switch

More
13 years 8 months ago #35373 by simwintech
Using this below configuration not bale to communicate from vlan 10 to vlan 20 and vlan 30. Inter vlan communication is there between vlan 20 and vlan 30.

Core Switch#sh run
Building configuration...

Current configuration : 2593 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname "Core Switch"
!
!
!
ip routing
!!
!
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/2
spanning-tree portfast
!
interface FastEthernet0/3
spanning-tree portfast
!
interface FastEthernet0/4
spanning-tree portfast
!
interface FastEthernet0/5
spanning-tree portfast
!
interface FastEthernet0/6
spanning-tree portfast
!
interface FastEthernet0/7
spanning-tree portfast
!
interface FastEthernet0/8
spanning-tree portfast
!
interface FastEthernet0/9
spanning-tree portfast
!
interface FastEthernet0/10
spanning-tree portfast
!
interface FastEthernet0/11
spanning-tree portfast
!
interface FastEthernet0/12
switchport access vlan 20
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/13
spanning-tree portfast
!
interface FastEthernet0/14
spanning-tree portfast
!
interface FastEthernet0/15
spanning-tree portfast
!
interface FastEthernet0/16
switchport access vlan 30
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/17
spanning-tree portfast
!
interface FastEthernet0/18
spanning-tree portfast
!
interface FastEthernet0/19
spanning-tree portfast
!
interface FastEthernet0/20
spanning-tree portfast
!
interface FastEthernet0/21
spanning-tree portfast
!
interface FastEthernet0/22
spanning-tree portfast
!
interface FastEthernet0/23
description "Connected to Edge Switch 2 port 24"
switchport trunk native vlan 10
switchport mode trunk
spanning-tree portfast
!
interface FastEthernet0/24
description "Connected to Edge Switch 1 port 24"
switchport trunk native vlan 10
switchport mode trunk
spanning-tree portfast
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.10.2 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
!
interface Vlan30
ip address 192.168.30.1 255.255.255.0
!
ip classless
!
!
!
ip dhcp excluded-address 192.168.10.1 192.168.10.25
ip dhcp excluded-address 192.168.20.1 192.168.20.25
ip dhcp excluded-address 192.168.30.1 192.168.30.25
!
ip dhcp pool Management
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool Sales
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
ip dhcp pool Tech
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end


Core Switch#
Core Switch#
Core Switch#sh vlan

VLAN Name Status Ports
----


1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/13, Fa0/14
Fa0/15, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Gig0/1
Gig0/2
10 Management active Fa0/1
20 Sales active Fa0/12
30 Tech active Fa0/16
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
----





----


1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
30 enet 100030 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs


Primary Secondary Type Ports



Core Switch#
More
13 years 8 months ago #35377 by JamieP
do you have the outputs from a "show ip route" and "show ip interface brief"

Jamie Parks
Network Engineer, UK
More
13 years 8 months ago #35378 by simwintech
Hi,

Thanks for your reply.
Our network conenctivity is as follows:
- 1 x Linksys Router
- 3 x Cisco 3560 switches (one switch as a core switch and others as Edge switch).


Linksys Router (LAN IP: 192.168.10.254/24) - connected to Cisco 3560 switch port 20.

Three Vlans: Vlan 10, Vlan 20, Vlan 30. Requirement is all these three vlans should communicate with each other. Now there is communication between all these three Vlan's.

Now i am facing the problem with communicating with Linksys router LAN interface from switches. I am not able to ping linksys router LAN IP: 192.168.10.254/24 from vlan 20 and vlan 30.

The core switch configuration, sh ip route and sh ip interface brief outputs are attached.

Switch#sh vlan

VLAN Name Status Ports
----


1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/21, Gig0/1, Gig0/2
10 VLAN0010 active Fa0/1, Fa0/20, Fa0/22
20 VLAN0020 active Fa0/2
30 VLAN0030 active Fa0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
----





----


1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
30 enet 100030 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs


Primary Secondary Type Ports



Switch#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route

Gateway of last resort is 192.168.10.254 to network 0.0.0.0

C 192.168.10.0/24 is directly connected, Vlan10
C 192.168.20.0/24 is directly connected, Vlan20
C 192.168.30.0/24 is directly connected, Vlan30
S* 0.0.0.0/0 [1/0] via 192.168.10.254
Switch#sh ip inte
Switch#sh ip interface b
Switch#sh ip interface brief
Interface IP-Address OK? Method Status Protocol

FastEthernet0/1 unassigned YES manual up up

FastEthernet0/2 unassigned YES manual up up

FastEthernet0/3 unassigned YES manual up up

FastEthernet0/4 unassigned YES manual down down

FastEthernet0/5 unassigned YES manual down down

FastEthernet0/6 unassigned YES manual down down

FastEthernet0/7 unassigned YES manual down down

FastEthernet0/8 unassigned YES manual down down

FastEthernet0/9 unassigned YES manual down down

FastEthernet0/10 unassigned YES manual down down

FastEthernet0/11 unassigned YES manual down down

FastEthernet0/12 unassigned YES manual down down

FastEthernet0/13 unassigned YES manual down down

FastEthernet0/14 unassigned YES manual down down

FastEthernet0/15 unassigned YES manual down down

FastEthernet0/16 unassigned YES manual down down

FastEthernet0/17 unassigned YES manual down down

FastEthernet0/18 unassigned YES manual down down

FastEthernet0/19 unassigned YES manual down down

FastEthernet0/20 unassigned YES manual up up

FastEthernet0/21 unassigned YES manual down down

FastEthernet0/22 unassigned YES manual administratively down down

FastEthernet0/23 unassigned YES manual up up

FastEthernet0/24 unassigned YES manual up up

GigabitEthernet0/1 unassigned YES manual down down

GigabitEthernet0/2 unassigned YES manual down down

Vlan1 unassigned YES manual administratively down down

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
Switch#sh run
Building configuration...

Current configuration : 1692 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
ip routing
!
!
!
interface FastEthernet0/1
Description"connected to PC"
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/2
Description"connected to PC"
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/3
Description"connected to PC"
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
Description"connected to Linksys router"
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/21
!
interface FastEthernet0/22

shutdown
!
interface FastEthernet0/23
Description"connected to C3560 edge switch-2"
switchport trunk allowed vlan 10,20,30
switchport mode trunk
!
interface FastEthernet0/24
Description"connected to C3560 edge switch-2"
switchport trunk allowed vlan 10,20,30
switchport mode trunk
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.10.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
!
interface Vlan30
ip address 192.168.30.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.10.254
!
!
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end


Switch#
More
13 years 7 months ago #35399 by KiLLaBeE
I suspect that the router's LAN interface (192.168.10.254) is indeed getting the packet from hosts in VLAN 20 and VLAN 30, but the router doesn't know how to route the packets back to the source (192.168.20.0/24 and 192.168.30.0/24).

Try this: on the router, add a static route that tells it to route traffic destined for 192.168.20.0/24 and 192.168.30.0/24 to 192.168.10.1 (the SVI for VLAN 10).

That's my guess, but note that I'm not very familiar with L3 switches. I don't think the connection between the router and the switch needs to be trunked and subinterfaces need to be configured on the router since the switch is the one doing the inter-VLAN routing.

Let us know the results
More
13 years 7 months ago #35411 by simwintech
Thanks.

After configuring ip route in the router, its working.

I have one more query.

Now i have three VLANs in my network. Vlan 10, Vlan 20 and Vlan 30 are configured for InterVlan communication in switch.

- Vlan 10 and Vlan 20 has Inter Vlan communication.
- Vlan 30 should be separated from the intervlan communication.

What is the command to configure vlan 30 for non - inter vlan communication with other vlans.
More
13 years 7 months ago #35450 by Losh
Use this command on the trunk interface you are using to carry vlan traffic.
Switch(config-if)#switchport trunk allowed vlan except 30.

This command allows the trunk link to carry traffic from all vlans except vlan 30.
Then i have noted that on all your interfaces you have configured spanning-tree portfast. This should NOT be configured on trunk ports, only access ports. Remove that command on the trunk ports because it prevents the switch from sending BPDUs on that link which are used to prevent loops.

~ Networking :- Just when u think its starting to make sense......... ~
____________________________________________
CCNA, CCNP, CCNA Security, JNCIA, APDS, CISA
Time to create page: 0.155 seconds