12-06-2016 02:45 PM - edited 03-08-2019 08:28 AM
I am trying to establish inter vlan connectivity between two 3850 switches. I setup a test environment in my private lab as follows
Switch 1
VLAN 116 10.1.16.254 (PC1 on this nertwork - 10.1.16.1)
VLAN 131 10.1.31.254 (PC2 on this network - 10.1.31.1)
Switch 2
VLAN 132 10.1.32.254 (PC3 on this network - 10.1.32.1)
VLAN 230 10.2.30.254 (PC4 on this network - 10.2.30.1)
PC's are pinging each other in the same switch as I enabled "ip routing" command on the switch. But I am not able ping from Switch 1 PCs to Switch 2 PCs.
I also tried enabling trunk mode on both the switches but no success. Could anybody help me in this.
I am not sure this is right place to post this question.
Solved! Go to Solution.
12-12-2016 10:09 AM
There are a few of ways to accomplish that.
One way, would be to define a routed port on each 3850 and configure it as a p2p link between the two switches. Then you could static route or run a routing protocol between them.
e.g. (static routing, g1<>g1)
sw1
int g1
no switchport
ip address 192.168.1.1 255.255.255.252
ip route 10.1.32.0 255.255.255.0 192.168.1.2 !assuming /24
ip route 10.2.30.0 255.255.255.0 192.168.1.2 !assuming /24
sw2
int g1
no switchport
ip address 192.168.1.2 255.255.255.252
ip route 10.1.16.0 255.255.255.0 192.168.1.1 !assuming /24
ip route 10.1.31.0 255.255.255.0 192.168.1.1 !assuming /24
12-06-2016 03:15 PM
there is no common subnet between the two switches, so you cant route between them.
add a vlan 100 between the two, and assign a subnet to that vlan 100 and stick each swith in that vlan and add static routes from one switch to the other, and vice versa.
do a sh ip route on each switch to see if the can "see" eachothers subnets
cheers
12-06-2016 03:16 PM
Hi,
You also need to enable routing between the two switches so that each switch knows about the networks on the other switch. Create another vlan which is available on both switches and configure static routing or enable dynamic routing e.g.
Switch 1
VLAN 116 10.1.16.254 (PC1 on this nertwork - 10.1.16.1)
VLAN 131 10.1.31.254 (PC2 on this network - 10.1.31.1)
VLAN 100 10.1.1.1 255.255.255.0
ip route 10.1.32.0 255.255.255.0 10.1.1.2
ip route 10.2.30.0 255.255.255.0 10.1.1.2
Switch 2
VLAN 100 10.1.1.2 255.255.255.0
VLAN 132 10.1.32.254 (PC3 on this network - 10.1.32.1)
VLAN 230 10.2.30.254 (PC4 on this network - 10.2.30.1)
ip route 10.1.16.0 255.255.255.0 10.1.1.1
ip route 10.1.31.0 255.255.255.0 10.1.1.1
In this example vlan 100 is common to both switches and trunked between the switches. This example uses static routing but you could do the same by enabling dynamic routing between the switches.
Thanks
John
12-06-2016 06:10 PM
12-06-2016 08:39 PM
Hi,
Have you created vlan 100 i.e.
vlan 100
name test
is interface vlan 100 up
Thanks
John
12-07-2016 07:18 AM
Yes it is up. I ran no shut after assigning IP to vlan 100. I did sh ip route and still it showing C paths. Is there a need to assign a port to vlan 100 and make that port trunk to each other with dot1q encapsulation ?
Ping results: Destination is unreachable.
12-07-2016 02:35 PM
There is no reason to make the ports between the 2 switches trunk, just stick it in vlan 100, what subnet are you using for vlan 100, and what IP in that subnet did you put on each switch and can you ping from one to the other?
12-07-2016 06:28 PM
I created vlan 100 and assigned IP 10.1.1.1 and add port g0/1 by issuing switchport access vlan 100 in int g0/1. Same in switch 2 vlan 100 with IP 10.1.1.2 and added g0/2. Now I am getting message CDP-4 NATIVE VLAN MISMATCH discovered on gigabit Ethernet 0/1 (1), with switch gigabit Ethernet 0/2 (100)
12-12-2016 07:17 AM
Hello
I would suggest utilize a first hop routing protocol such like HRSP , below basic connectivity CFG
SW1
ip routing
vlan 116,131,132,230
interface Vlan116
ip address 10.1.16.252 255.255.255.0
standby 116 ip 10.1.16.254
standby 116 priority 120 <------------------------Primary for Sw1
standby 116 preempt
interface Vlan131
ip address 10.1.31.252 255.255.255.0
standby 131 ip 10.1.31.254
standby 131 preempt
standby 131 priority 120 <------------------------Primary for Sw1
interface Vlan132
ip address 10.1.32.252 255.255.255.0
standby 132 ip 10.1.32.254
standby 132 preempt
interface Vlan230
ip address 10.2.30.252 255.255.255.0
standby 230 ip 10.2.30.254
standby 230 preempt
int x/x
description Trunk to Sw2
switchport mode trunk
switchport nonegotiate
SW2
ip routing
vlan 116,131,132,230
interface Vlan116
ip address 10.1.16.253 255.255.255.0
standby 116 ip 10.1.16.254
standby 116 preempt
interface Vlan131
ip address 10.1.31.253 255.255.255.0
standby 131 ip 10.1.31.254
standby 131 preempt
interface Vlan132
ip address 10.1.32.253 255.255.255.0
standby 132 ip 10.1.32.254
standby 132 priority 120 <------------------------Primary for Sw2
standby 132 preempt
interface Vlan230
ip address 10.2.30.253 255.255.255.0
standby 230 ip 10.2.30.254
standby 230 priority 120 <------------------------Primary for Sw2
standby 230 preempt
int x/x
description Trunk to Sw1
switchport mode trunk
switchport nonegotiate
res
Paul
12-12-2016 08:07 AM
According this configuration I have to change the IP address of the vlans ?
12-12-2016 08:23 AM
hello
yes that is correct as the DG will be now a virtual address assigned to the hrsp of L3 SVI's for resiliency
res
paul
12-12-2016 08:40 AM
Thanks. My original cofiguration have 5 VLANs (116, 131, 132, 230 & 235) on switch 1. And 7 VLANs (330, 430, 530, 630, 730, 830 & 930) on Switch 2 with ports assigned to those VLANs in both switches and configured as Switchport Mode Access.
But I didn't get, on which vlan I have to write "preempt"
Priority 120 goes to the primary vlan's of the switches. Please bare with me I am new to Cisco. Could you please tell. Thanks
12-12-2016 08:51 AM
And I am not using any router in the environment. Trying to ping switch to switch VLAN.
12-12-2016 12:53 PM
Hi tried your configuration in Packet tracer with 3560 Switches by creating 116, 131 vlan on switch 1 and 132, 230 on switch 2 with some ports assigned to both the vlans. And enabled Ip Routing. One PC is connected to each vlan in both the switches.
After this I followed your config in both the switches.
Still I cant ping from the PC of SW 2 to SW 1 and vice versa. Ping works within the switch vlan.
I dont know it is really doable in switches or not ? Please advise.
Thanks
12-12-2016 10:09 AM
There are a few of ways to accomplish that.
One way, would be to define a routed port on each 3850 and configure it as a p2p link between the two switches. Then you could static route or run a routing protocol between them.
e.g. (static routing, g1<>g1)
sw1
int g1
no switchport
ip address 192.168.1.1 255.255.255.252
ip route 10.1.32.0 255.255.255.0 192.168.1.2 !assuming /24
ip route 10.2.30.0 255.255.255.0 192.168.1.2 !assuming /24
sw2
int g1
no switchport
ip address 192.168.1.2 255.255.255.252
ip route 10.1.16.0 255.255.255.0 192.168.1.1 !assuming /24
ip route 10.1.31.0 255.255.255.0 192.168.1.1 !assuming /24
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