Switches, Hubs, and Modems
1753641 Members
5289 Online
108798 Solutions
New Discussion юеВ

How to connect a vlan through 2 switches 2626

 
Juanjo_1
Frequent Advisor

How to connect a vlan through 2 switches 2626

I have 2 switches 2626, each one in separated buildings, connected through fiber.

In one switch I have 2 vlan's, vlan 1 (default) and 2. In the other switch there's just configured vlan 1 (default).

Now I want to extend vlan 2 to the other building. So I followed the steps:

- I've created the vlan 2 in the other switch
- I've assigned untagged ports to the vlan 2 in the switch 2
- I've tagged the fiber port on swtich 1 to the vlan 2
- I've tagged the fiber port on switch 2 to the vlan 2
- I've assigned IP's to the vlan 2 in the switches 1 and 2 of the same range

I can't ping from one switch to the other from the console, of course the two switches cannot communicate in the vlan 2, the vlan 1 works OK.

What am I missing?

I've tried enabling and disabling IP routing, creating a trunk group and tagging the trunk group to the vlan 2...
25 REPLIES 25
groque
Frequent Advisor

Re: How to connect a vlan through 2 switches 2626

apply gvrp on both switches then you should be good to go.

so do this

1. configure the connections between both switches make sure they can ping each other
2. enable gvrp on both switches
3. show vlan on switch 2 to make sure the vlans are there
4. once u have the vlans convert the dynamic vlan to a static vlan then your all good to go

Juanjo_1
Frequent Advisor

Re: How to connect a vlan through 2 switches 2626

Thank you Grogue for your response.

I've tried enabling gvrp on both switches, but the result is the same, I can't ping each other switch. I thought GVRP is the protocol for dynamic vlans, I want to configure static vlan.

Should I define a Management VLAN? Or that's not important in that case?

Should I disable LACP? Or should I define one of the LACP as active?...

I'm sure I'm very near but something is missing or misconfigured.

Right now each switch has 2 IP's defined, one for vlan 1 and other for vlan 2, from the IP range of vlan 1 I can ping each switch, but using the IP range of vlan 2 ping doesn't work.
Pieter 't Hart
Honored Contributor

Re: How to connect a vlan through 2 switches 2626

trunk groups lacp gvrp should be not necessary at this moment.
You don't need to create a management vlan first.

first check connecticvity between ports of different switches within the same vlan.
(vlan-1 was OK, so)
connect a workstation in vlan-2 on each switch (with adresses in same subnet) and see if they can connect.
At this time no routing is involved, only L2 connection within vlan-2.
So, if no connection, first check the vlan tagging on the connecting port(s).

if switch-2 only has a vlan-2 adress then this switch should be able to connect to switch-1's ip-adress on vlan2.

only one of the switches will do the routing, so:
enable ip routing on switch-1.

On switch-2 you can configure the default-gateway or you can create a static route on switch-2 pointing to switch-1's address (in vlan-2).

on switch-1 (that has routing enabled) the default-gateway statement is ignored, you can only use static routes (ip route ....)


on all endpoint configure swith-1's adress as default-gateway.
Juanjo_1
Frequent Advisor

Re: How to connect a vlan through 2 switches 2626

I've followed your advice, I've connected two workstations, one in each switch in vlan 2, they have an IP address of the same range but they can't ping each other.

Stations in vlan 1 (DEFAULT_VLAN) works properly.

switch 1 have ports configured in vlan 2 in that way:

Status and Counters - VLAN Information - Ports - VLAN 2

802.1Q VLAN ID : 2
Name : DMZ
Status : Port-based Voice : No

Port Information Mode Unknown VLAN Status
---------------- -------- ------------ ----------
19 Untagged Learn Up
20 Untagged Learn Down
21 Untagged Learn Up
22 Untagged Learn Up
23 Untagged Learn Down
24 Untagged Learn Up
25 Tagged Learn Up

And switch 2:

Status and Counters - VLAN Information - Ports - VLAN 2

802.1Q VLAN ID : 2
Name : DMZ
Status : Port-based Voice : No

Port Information Mode Unknown VLAN Status
---------------- -------- ------------ ----------
1 Untagged Learn Down
25 Tagged Learn Up


Ports 25 are the fiber channel, and both 25 ports are configured equal in both switches, they are tagged, so the traffic of vlan 1 and vlan 2 should work properly, but the workstation I plugged into port 1 of switch 2 can't ping any worstation of switch 1.

Any ideas?

Thank you in advance.
Pieter 't Hart
Honored Contributor

Re: How to connect a vlan through 2 switches 2626

lets do one step at a time

you plug in a workstation with a vlan-2 ip-address on port-1 of switch-2
can it ping the switch2 ip-adress ?

It may help if you post a "show running-config" of both switches.
Jorge Pons
Trusted Contributor

Re: How to connect a vlan through 2 switches 2626

Hi Juanjo

Can you show both configurations?

Regards, Jorge
Juanjo_1
Frequent Advisor

Re: How to connect a vlan through 2 switches 2626

Yes, the workstation in port 1 of switch 2 can ping the IP of vlan 2 on the same switch 2.

The running config of the switches:

Running configuration Switch1:

; J4900B Configuration Editor; Created on release #H.10.50
interface 21
speed-duplex 100-full
exit
interface 25
lacp Active
exit
ip default-gateway 192.168.1.1
ip routing
vlan 1
name "DEFAULT_VLAN"
untagged 1-18,25-26
ip address 192.168.2.205 255.255.255.0
no untagged 19-24
exit
vlan 2
name "DMZ"
untagged 19-24
ip address 192.168.1.205 255.255.255.0
tagged 25
exit
gvrp
no stack


Running configuration Switch2:

; J4900B Configuration Editor; Created on release #H.10.50

time timezone 2
ip default-gateway 192.168.1.205
vlan 1
name "DEFAULT_VLAN"
untagged 2-26
ip address 192.168.2.208 255.255.255.0
no untagged 1
exit
vlan 2
name "DMZ"
untagged 1
ip address 192.168.1.208 255.255.255.0
tagged 25
exit
no stack

By default all interfaces have LACP activated in Passive mode, I've disabled GVRP since I want to configure static VLAN's.

The route table of switch 1:

sho ip route

IP Route Entries

Destination Gateway VLAN Type Sub-Type Metric Dist.
------------------ --------------- ---- --------- ---------- ---------- -----
127.0.0.0/8 reject static 0 250
127.0.0.1/32 lo0 connected 0 0
192.168.1.0/24 DMZ 2 connected 0 0
192.168.2.0/24 DEFAULT_VLAN 1 connected 0 0


Jorge Pons
Trusted Contributor

Re: How to connect a vlan through 2 switches 2626

HI

Why you don├В┬┤t put tagged port 25 in VLAN1?
Juanjo_1
Frequent Advisor

Re: How to connect a vlan through 2 switches 2626

I thouhgt one port should be untagged in at least one VLAN and tagged in all the others VLAN's.

Should port 25 be tagged in all VLAN's?