LAN Routing
1753785 Members
7435 Online
108799 Solutions
New Discussion юеВ

How to configure 2 different Layer3 switches connected via P2P Layer2

 
SOLVED
Go to solution
EnricoL_VTC
Frequent Visitor

How to configure 2 different Layer3 switches connected via P2P Layer2

Hi,

I have two switches in two different buildings that has been linked with a P2P Layer2 line.

For every of the two buildings I have a dedicated /24 networks, so I need to configure the ports in which this P2P line has been connected in a way that I can let the two networks speak between each one.

Note: both buildings has their own internet connection

If you need any other details to help me I'll reply as soon as possible.

Thanks and Regards,

9 REPLIES 9
akg7
HPE Pro

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Hello,
Which switches are you using?
Which type of P2P connections you are using?
Are /24 subnets part of any vlan?

Thanks!
Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the companyAccept or Kudo
EnricoL_VTC
Frequent Visitor

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Models following:

HP J9727A 2920-24G-PoE+ Switch
Aruba JL259A 2930F-24G-4SFP Switch

The two /24 subnets are the default VLAN 1 in their relative switch, there are some others vlan in one building 

parnassus
Honored Contributor

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

First of all, are your switches Comware os based (HPE FlexNetwork, as example) or ArubaOS-Swtich os based (HP ProCurve or newer HPE Arbua switches)?

If the latter (ArubaOS-Switch os based) AND involved Switches have IP Routing enabled (thus each one is the router for its VLAN Interfaces) you could proceed by tagging the ports facing the P2P link on a new dedicated "Transit VLAN" id (and assign a /31 IP Address on both switches to that VLAN "X"), configure the interface "N" as tagged member of VLAN "X" on Switch A of Building "A" and configure the interface "M" as tagged member of VLAN "X" on Switch B of Building "B".

At this stage both interfaces "N" and "M" ( N -- P2P link -- M) are only tagged members of VLAN "X" on both ends of the link  (eventually - better - you should remove the Default VLAN 1 from those interfaces by untagging of "N" and "M" with VLAN 1 context -> untagged ethernet "N" on Switch "A" and the same for interface "M" on Switch "B").

You have "N" and "M" interfaces tagged members of VLAN "X" (/31) on both ends, you just need to set one or more static routes on each end to instruct the Switch "A" (and "B") how to reach subnets of Switch "B" (and "A") and their respective gateways are the /31 peer IP addresses you previously assigned.

On Switch A add static routes as needed to reach Subnets on Switch "B":

  • destination Subnet "B1" on Switch "B" is reacheable through "Switch B /31 Transit IP address"
  • destination Subnet "B2" on Switch "B" is reacheable through "Switch B /31 Transit IP address"
  • ...
  • destination Subnet "Bn" on Switch "B" is reacheable through "Switch B /31 Transit IP address"

On Switch B add static routes as needed to reach Subnets on Switch "A":

  • destination Subnet "A1" on Switch "A" is reacheable through "Switch A /31 Transit IP address"
  • destination Subnet "A2" on Switch "A" is reacheable through "Switch A /31 Transit IP address"
  • ...
  • destination Subnet "An" on Switch "A" is reacheable through "Switch A /31 Transit IP address"

You should then separate Spanning Trees (each buiding has its network, its router, tis gateways) between buildings...so if the P2P Link between buildings is a true single link you should made peer "N" and "M" ports to not partecipate in their respective Spanning Tree topologies by using the spanning-tree bpdu-filtering command ("The STP BPDU filter feature allows control of spanning tree participation on a per-port basis. It can be used to exclude specific ports from becoming part of spanning tree operations. A port with the BPDU filter enabled will ignore incoming BPDU packets and stay locked in the spanning tree forwarding state. All other ports will maintain their role.").


I'm not an HPE Employee
Kudos and Accepted Solution banner
Rajendra_Jena
HPE Pro
Solution

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Hi @EnricoL_VTC 

Let me give an example as per your requirement. 

Site A : 

It has Switch A with vlan 1 & Vlan 2

Vlan 1 is configured with a /24 subnet. e.g 10.0.0.1/24 (Vlan 1 is your local LAN)

vlan 2 is configured with a /31 subent, e.g 192.168.0.1/30 (VLan 2 is used to connect your inter office)

Port 1 to 27 - Used for LAN 

Port 28 - Used to connect beetween sites (WAN)

Site B : 

It has Switch B with vlan 1 & Vlan 2

Vlan 1 is configured with a /24 subnet. e.g 20.0.0.1/24

vlan 2 is configured with a /31 subent, e.g 192.168.0.2/30 (VLan 2 is used to connect your inter office)

Switch A port 28 is connected to Switch B port 28 using your P2P link. 

Port 1 to 27 - Used for LAN 

Port 28 - Used to connect beetween sites (WAN)

 

SwitchA_Port28_Vlan2<-------P2P-------->Vlan2_Port28_SwitchB

Now you configure below on Switch A:

ip routing
ip route 20.0.0.0 255.255.255.0 192.168.0.2

vlan 1
name "DEFAULT_VLAN"
untagged 1-27
ip address 10.0.0.1 255.255.255.0
exit


vlan 2
name "P2P_Link"
untagged 28
ip address 192.168.0.1 255.255.255.254
exit

Now you configure below on Switch B:

ip routing
ip route 10.0.0.0 255.255.255.0 192.168.0.1

vlan 1
name "DEFAULT_VLAN"
untagged 1-27
ip address 20.0.0.1 255.255.255.0
exit
vlan 2
name "P2P_Link"
untagged 28
ip address 192.168.0.2 255.255.255.254
exit

 

Hope this helps you.  

Best Regards,
I am an HPE Employee

Accept or Kudo

EnricoL_VTC
Frequent Visitor

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Thanks for your support, it's the solution I've already tried more or less; but as I have more knowledge in cisco, and quite new in HP,  I think I'm maybe missing something..
Please note that I'm sure the P2P link works fine, as before I did connect the switch of building A to a FW of building B; I've configured that FW port with an IP of the buidling A VLAN1 and it worked fine.

Here after the configuration I've made ( please note that with the /31 configuration suggested, I was not able to set the static routing, I did the command, but the route never happeared.. )

Building A:
vlan 1
name "DEFAULT_VLAN"
no untagged 1-4,11-15
untagged 5-10,16-24
ip address 192.168.114.29 255.255.255.0
exit
vlan 5
name "P2P-HK"
untagged 15
ip address 10.27.2.2 255.255.255.252
exit
ip route 10.27.1.0 255.255.255.0 10.27.2.1

show ip route
IP Route Entries

Destination Gateway VLAN Type Sub-Type Metric Dist.
------------------ --------------- ---- --------- ---------- ---------- -----
0.0.0.0/0 192.168.114.7 1 static 1 1
10.27.1.0/24 10.27.2.1 5 static 1 1
10.27.2.0/30 P2P-HK 5 connected 1 0
192.168.114.0/24 DEFAULT_VLAN 1 connected 1 0


Building B
vlan 1
name "DEFAULT_VLAN"
no untagged 19
untagged 1-18,20-28
ip address 10.27.1.29 255.255.255.0
ipv6 enable
ipv6 address dhcp full
exit
vlan 5
name "P2P-HK"
untagged 19
ip address 10.27.2.1 255.255.255.254
exit
ip route 192.168.114.0 255.255.255.0 10.27.2.2

show ip route
IP Route Entries

Destination Gateway VLAN Type Sub-Type Metric Dist.
------------------ --------------- ---- --------- ---------- ---------- -----
0.0.0.0/0 10.27.1.23 1 static 1 1
10.27.1.0/24 DEFAULT_VLAN 1 connected 1 0
10.27.2.0/30 P2P-HK 5 connected 1 0
192.168.114.0/24 10.27.2.2 5 static 1 1


.
.
Do you have any suggestions?

 

EnricoL_VTC
Frequent Visitor

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Actually seems like the tech in the DC did connect the wrong device.. so please stand by.. 

Anyway, are you sure that the /31 should work? 

parnassus
Honored Contributor

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Hi, the usage of /31 SVI addressing for the Transit VLAN's subnet is supported for sure starting with a particular ArubaOS-Switch software version, I don't recall exactly what build it was BUT if you're running fully updated switches it should work.

If you can't update a fallback action would be to use IP addresses of a /30 or of a /29 (not elegant as using a /31...but it works).

I'm not an HPE Employee
Kudos and Accepted Solution banner
akg7
HPE Pro

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

Hello @EnricoL_VTC ,

Are you able to ping switch A  from switch B and vice versa.

I believe connectivity between switch as trunk (tagged) port on vlan 5.

You can use both side /30 instead of one side /30 and other side /31.

Is there any default gateway configured in switch?

Thanks!

 

 

Note: While I am an HPE Employee, all of my comments (whether noted or not), are my own and are not any official representation of the companyAccept or Kudo
EnricoL_VTC
Frequent Visitor

Re: How to configure 2 different Layer3 switches connected via P2P Layer2

so.. at the end the tecnician onsite did connect the cable to the wrong device

the transit VLAN works fine

thanks all for your support!