Juniper Point-to-Point Guide
Note: This guide is even further in-depth than the Point-to-Point configuration guide. This is only intended for a technical audience who is looking to create an NYCMesh P2P, when one or both sides of the link is routed by a Juniper router.
Overview
To create a mesh-specific OSPF P2P link on the Juniper, there are 4 configuration changes you will need to make
- Create an irb interface - creating an irb interface is the Juniper equivalent of creating a MikroTik VLAN interface, or a Brocade virtual interface (ve). It's an interface with an IP address, that is assigned to a certain VLAN. The only difference is that this VLAN is not limited to a port, and can be sent out any port. This is where you will assign your /30 P2P IP address.
- Create a VLAN - the VLAN and the irb interface are be linked together, and the VLAN is assigned to the switch port that the P2P traffic will come from. This will either be a switchport that the antenna is directly connected to, or a switchport that goes to another switch, which is connected to the antenna.
- Configure OSPF on the irb - this is where you configure the OSPF cost of your P2P.
- Add the VLAN to a switchport - this is where you assign the VLAN to the port where P2P traffic will be coming from on the Juniper
Prerequisites
- Subnet allocated using the IP Ranges spreadsheet
- P2P already configured on the MikroTik side of the link (follow this guide)
- OSPF cost known
Choosing a VLAN ID
In order to create a P2P, we need to choose an unused VLAN on the Juniper.
- Log into the Juniper with
ssh root@ip_address
- Enter
cli
at the initial prompt to enter the switch configuration - Enter
show vlans
and press enter. This will display a list of all the VLANs on the Juniper. Note down a tag that is unused (this can be anything between 1 and 4094, but you should keep it close to other existing VLANs)
Configuring the Juniper
- At the main Juniper CLI prompt (where you should be after entering
show vlans
above), enterconfigure
to start configuring the router. - First, we'll create the irb. Enter the following commands, replacing
<P2P_NAME>
with the name of your P2P link, and<IP_ADDRESS>
with the IP address of the Juniper side of the link.set interfaces irb unit <VLAN_TAG> description <P2P NAME>
set interfaces irb unit <VLAN_TAG> family inet address <IP_ADDRESS>/30
- Next, create a VLAN and link it to your irb interface, replacing variables as needed.
set vlans <P2P_NAME> vlan-id <VLAN_TAG>
set vlans <P2P_NAME> l3-interface irb.<VLAN_TAG>
- Next, configure OSPF on the interface. Note the PTMP setting, meaning the OSPF configuration is Point to Multi Point and not Point to Point, NBMA (Non-Broadcast Multiple Access), or Broadcast (more info on the different types here)
set protocols ospf area 0.0.0.0 interface irb.<VLAN_TAG> interface-type p2mp
set protocols ospf area 0.0.0.0 interface irb.<VLAN_TAG> metric <OSPF_COST>
- (Optional: if the MikroTik side of the link is using Bidirectional Forwarding Detection (aka BFD, a faster way of detecting when a link is down than the built-in OSPF method), configure that here. If you don't know, disregard these steps)
set protocols ospf area 0.0.0.0 interface irb.<VLAN_TAG> bfd-liveness-detection minimum-interval 200
set protocols ospf area 0.0.0.0 interface irb.<VLAN_TAG> bfd-liveness-detection multiplier 5
set protocols ospf area 0.0.0.0 interface irb.<VLAN_TAG> bfd-liveness-detection full-neighbors-only
- Now add the VLAN to the switchport where the P2P is coming from (usually a switch)
- To figure out what interface goes to which switch, enter the command
run show interfaces description
. This will list all of the ports and their descriptions. Note the interface name (examplexe-0/0/4
) that the switch or antenna is connected to. Note: if the switch is connected to a bond (known as ae interfaces in Juniper) be sure to add the vlan to that port. - Add the vlan with
set interfaces <INTERFACE> unit 0 family ethernet-switching vlan members <P2P_NAME>
- To figure out what interface goes to which switch, enter the command
- Type
commit
to save your configuration. Once the commit succeeds, typeexit
to leave configuration mode. - If there are upstream switches that your P2P VLAN needs to be added to, add them normally according to the guide listed in prerequisites.
- To confirm OSPF comes up on the Juniper, enter
show ospf neighbor
, and the router will give you a list of neighbors, and their connected interfaces.