OSVDC Series: Network Services Build with Ubiquiti Networks - rharmonson/richtech GitHub Wiki
OSVDC Series: Network Services Build with Ubiquiti Networks
Revised: April 18, 2016
Article 5 of the Open Source Virtual Data Center Series
EdgeSwitch
Before beginning, obtain the Quick Start Guide, Administrator Manual, and current firmware from here:
https://www.ubnt.com/download/edgemax
The firmware is under the section "Firmware" and the Guide and Manual are found under "Documentation." Note there is an unobtrusive button "See More Documents" at the bottom of the page.
After downloading the firmware, power-on the EdgeSwitch without any connected devices. Once boot is completed, connect a workstation to eth0 port. Configure the workstation's interface as:
- IP address: 192.168.1.100
- Subnet mask: 255.255.255.0
Next, open a browser to 192.168.1.2 and enter the credentials:
- user: ubnt
- password: ubnt
Firmware Upgrade
After login, note the version of the installed firmware show in the upper-left corner next to the EdgeMAX logo. Assuming you don't have the most current firmware:
- Select the "System" tab or button found in the upper-right corner
- Select "Firmware"
- Select "Configuration and Upgrade"
- Select the icon with the up-arrow next to the inactive image within the "Firmware Upgrade" dialogue window
- Select "Browse" and locate the firmware file ending in 'stk'
- Select "Begin Transfer"
- Wait for transfer to complete for exiting dialogue or browser will stop the process. It takes a while but you will see the status change to "Transfer completed"
- Select "Close" within the "Firmware Upgrade" dialogue window
- Under "Images" note the "Next Active" and select the radio button for the new firmware version
- Select "Submit" button
- Select the "Status" tab and verify "Next Active" shows the firmware version you installed
- Select "System" tab, "Utilities," then "Restart Switch"
- Select "Restart"
- Select "OK" to begin restart
- login and verify the firmware version
Create Admin User
- Select "System" tab
- Select "Users"
- Select "Add" button
- Specify user name, password, and read/write access level.
- Select "Submit"
- Select "Log Out" upper-right corner and login with the new account.
- Select "System" tab
- Select "Users"
- Select the default user "ubnt" and either "Remove" or "Edit" to update password.
- Select "Save Configuration" in the upper-right corner
- Select "Save" button
- Select "OK"
- Select "Close"
System Connectivity
HTTPS
- Select "System" tab
- Select "Management Access"
- Select "HTTPS" tab
- Update the "HTTP Session Soft Time Out (Minutes)" to 15 minutes.
- Note for "Certificate Status" the value is "Absent"
- Selecting the cog button result with prompt "Do you want to generate the certificate?"
- Select "OK" to create a self-signed certificate
- After a brief wait, the "Certificate Status" will change to "Present"
- Update "HTTPS Admin Mode" from Disable to Enable
- Select "Submit"
- Note that there may be a brief pause, less than ten seconds, where HTTP is not responsive.
SSH
Assumption is you will be using SSH to manage the switch.
- Select "System" tab
- Select "Management Access"
- Select "SSH" tab
- Remove check mark from SSH Version 1.
- Update the "HTTP Session Soft Time Out (Minutes)" to 15 minutes.
- Select the cog button to generate both RSA and DSA keys
- Wait briefly for both to display status "Present"
- Update "SSH Admin Mode" from Disable to Enable
- Select "Submit"
Telnet
- Select "System" tab
- Select "Management Access"
- Select "Telnet" tab
- Update "Admin Mode" from Enable to Disable
- Select "Submit"
System Connectivity
- Select "System" tab
- Select "Disable" for "HTTP Admin Mode"
- Verify or select "Disable" for "Telnet Server Admin Mode"
- Verify or select "Enable" for "HTTPS Admin Mode"
- Verify or select "Enable" for "SSH Admin Mode"
- Select "Submit" button
- Select "Save Configuration" in the upper-right corner
- Wait ten seconds, then
- Update the browser from HTTP to HTTPS and login using the new credentials you created
System IPv4
- Select "System" tab
- Select "Connectivity"
- Select "IPv4" tab
- Network Configuration Protocol: "None"
- IP Address: 192.168.11.254
- Subnet Mask: 255.255.255.0
- Select "Submit" button
- Update workstation interface as show below
- Change browser IP address from 192.168.1.2 to 192.168.11.254 and login to continue
- Select "Save Configuration" in the upper-right corner
- Select "Save" button
- Select "OK"
- Select "Close"
Workstation Interface
- IP address: 192.168.11.100
- Subnet mask: 255.255.255.0
- Gateway: 192.168.11.254
Switch Host Name
- Select "System" tab
- Select "Summary"
- Select "Description" tab
- Update "System Name" to whatever
- Select "Submit" button
- Select "Save Configuration" in the upper-right corner
- Select "Save" button
- Select "OK"
- Select "Close"
VLAN Wizard
Create VLANs
- Select "Switching" tab
- Select "VLAN"
- Select "Wizard"
- Note the field next to the "Add" button
- Enter 101 and select "Add"
- Repeat for VLANs 121, 131, 201, and 211
- Update the VLAN "Name" or use the default values
- Select "Submit" button
Assign VLANs
- For "default" select "E" (exclude) for ports 2 through and including 10 and ports 13 through and including 16
- For "VLAN0101" select "U" (untagged) for ports 2 through and including 10 and "T" (tagged) for ports 13 through and including 16
- For "VLAN0121" select "T" (tagged) for ports 13 through and including 16
- For "VLAN0131" select "T" (tagged) for ports 13 through and including 16
- For "VLAN0201" select "T" (tagged) for ports 13 through and including 16
- For "VLAN0211" select "T" (tagged) for ports 13 through and including 16
- Select "Submit" button
Results with
Note
To review or see the port and VLAN settings made using the "Wizard", select Switching > VLAN > Port Configuration to review.
VLAN Routing
To avoid hair-pinning trusted traffic to a router interface, enable trusted VLANs for routing on the EdgeSwitch. Untrusted VLANS will be forwarded and filtered by the EdgeRouter.
Trusted VLANs are 101, 121, and 131 and untrusted VLANs are 201 and 211.
- Select "Switching" tab
- Select "VLAN"
- Select "Status"
- Select "VLAN ID" 101
- Select "Edit"
- VLAN Routing: Enable
- Select "Submit"
- Repeat the steps above for VLANs 121 and 131
- Done
PVID
- Select "Switching" tab
- Select "VLAN"
- Select "Port Summary" tab
- Select ports 0/2 to 0/10
- Select "Edit" button
- Port VLAN ID: 101
- Select "Submit" button
In addition, you may want to limit frames to tagged frames.
- Select ports 0/13 to 0/16
- Select "Edit" button
- Acceptable Frame Type: Only Tagged
- Select "Submit" button
Access VLAN ID
- Select "Switching" tab
- Select "VLAN"
- Select "Switchport Summary"
- Select interface 0/2 through 0/10
- Select "Access"
- Access VLAN ID: 101
- Select "Submit"
Routing IP Interface
Assign interface for connection to EdgeRouter
- Select "Routing"
- Select "IP"
- Select "Interface Configuration"
- Interface: 0/1
- Routing Mode: Enable
- IP Address Configuration Method: Manual
- IP Address: 192.168.69.2
- Subnet Mask: 255.255.255.252
- Select "Submit"
VLAN Routing IP Interfaces
- Select "Routing"
- Select "IP"
- Select "Interface Configuration"
- Interface: VLAN-101
- Routing Mode: Enable
- IP Address Configuration Method: Manual
- IP Address: 192.168.101.254
- Subnet Mask: 255.255.255.0
- Select "Submit"
- Complete the above steps for VLAN-121 using 192.168.121.254/255.255.255.0
- Complete the above steps for VLAN-131 using 192.168.131.254/255.255.255.0
Set Routing Mode
- Select "Routing"
- Select "IP"
- Select "Configuration"
- Routing Mode: Enable
- Select "Submit"
Test VLAN Routing
Test #1
Test untagged connection on VLAN 101 for ports 2 - 10
- Connect workstation to any port between 2 and 10
- Update network interface to use IP address/subnet mask, 192.168.101.100/255.255.255.0 and gateway 192.168.101.254
- From the cmd prompt or bash shell, ping 192.168.101.254
- Success!
- From the cmd prompt or bash shell, ping 192.168.69.2
- Expected outcome is success
Warning
Before proceeding, connect a device to one of the ports 13 - 16. Otherwise, the VLAN interface (gateway) will be "inactive" and attempts to ping x.x.x.254 will fail. You can review the current status of interfaces using Routing > IP > Interface Summary.
Test #2
Test tagged connection on VLAN 101 for ports 2 - 10
- Update the network interface to tag using vlan "101"
- From the cmd prompt or bash shell, ping 192.168.101.254
- Success!
- From the cmd prompt or bash shell, ping 192.168.69.2
- Expected outcome is success
Note
VLAN tagging on a workstation interface is generally supported by current network interface cards. Configuration will differ based on the operating system. For Linux use the interface configuration file that may be found /etc/sysconfig/network-scripts. For Windows select "Network and Internet" within the "Control Panel," properties for the connection, select "Configure" for the device, "Advanced" tab, then update the value for "VLAN" from 0 to 101.
Test #3
Test tagged connection on VLAN 101 for ports 13 - 16
- Connect workstation to any port between 13 and 16
- Repeat Test #2
- Expected outcome is success
Test #4
Test untagged connection on VLAN 101 for ports 13 - 16
- Update workstation interface to not use VLAN tagging.
- Repeat Test #1
- Expected outcome is failure
Test #5
Test tagged connection on VLAN 121 for ports 13 - 16
- Update network interface to use IP address/subnet mask, 192.168.121.100/255.255.255.0, gateway 192.168.121.254, and VLAN tag 121
- From the cmd prompt or bash shell, ping 192.168.121.254
- From the cmd prompt or bash shell, ping 192.168.101.254
- From the cmd prompt or bash shell, ping 192.168.131.254
- Success!
- From the cmd prompt or bash shell, ping 192.168.69.2
- Expected outcome is success
- Repeat test for VLAN 131 using IP address/subnet mask, 192.168.131.100/255.255.255.0, gateway 192.168.131.254, and VLAN tag 131
Note
VLANs 201 and 211 will fail until interfaces are created on the EdgeRouter.
Results with
Default Route
In preparation for configuring the EdgeRouter, create a default route for the EdgeSwitch to the EdgeRouter.
- Select "Routing" tab
- Select "Router"
- Select "Configured Routes" tab
- Select "Add" button
- Route Type: Default
- Next Hop IP Address: 192.168.69.1
- Select "Submit" button
Port Channeling (LAG)
The process to create a LAG for use with the Storage host and Compute hosts is a three step process.
Step 1
- Select "Basic" tab
- Select "Port Summary"
- Check-mark the ports to participate in LAGs; ports 0/5-0/10 & 0/13-0/16
- Select "Edit" button
- Verify the port is enabled for "Admin Mode" and "LACP Mode"
- Update and select "Submit" button or "Cancel if no changes are required
Step 2
- Under the "Basic" tab, select "Port Channel (LAG)" tab
- Select an unused interface; 3/1
- Select "Edit" button
- Port Channel Name: mgmt-storage
- Admin Mode: Enable
- STP Mode: Enable
- Static Mode: Disable
- Link Trap: Disable
- Load Balance: Source/Destination MAC, VLAN, Ethertype, Incoming Port
- Members: 0/5 & 0/6
- Select "Submit" button
Repeat the steps above to create:
- 3/2, mgmt-node1, 0/7 & 0/8
- 3/3, mgmt-node2, 0/9 & 0/10
- 3/4, vm-node1, 0/13 & 0/14
- 3/5, vm-node2, 0/15 & 0/16
Step 3
- Under the "Basic" tab, select "VLAN" tab
- For VLAN 1, "E"clude for port channels 3/1 through and including 3/5 on the far right
- For VLAN 101, select "U"ntagged for port channels 3/1, 3/2, and 3/3
- For VLANs 121, 131, 201, and 211, select "T"agged for port channels 3/4 and 3/5
- Select "Submit" button
Testing the LAG interfaces will wait until creation of the first virtual machine.
Save Configuration
- Select "Save Configuration"
- Select "Save"
- Select "OK"
- Select "Close"
Backup aka "Transfer"
Advisable to export the configuration as a restore point.
- Select "System" tab
- Select "Utilities"
- Select "Transfer"
- Select "Startup Configuration"
- Select "Begin Transfer"
- Specify save location then select "Close"
EdgeRouter
Before beginning, obtain the Quick Start Guide and current firmware from here:
https://www.ubnt.com/download/edgemax
The firmware is under the section "Firmware" and the Quick Start Guide is found under "Documentation." Note there is an unobtrusive button "See More Documents" at the bottom of the page.
After downloading the firmware, power-on the EdgeRouter without any connected devices. Once boot is completed, connect a workstation to eth0 port. Configure the workstation's interface as:
- IP address: 192.168.1.100
- Subnet mask: 255.255.255.0
- Gateway: 192.168.1.1
Next, open a browser to 192.168.1.1 and enter the credentials:
- user: ubnt
- password: ubnt
Firmware Upgrade
After login, note the version of the installed firmware shown in the upper-left corner next to the EdgeMAX logo. Assuming you don't have the most current firmware:
- Select the "System" tab or button found in the lower-left corner
- Scroll towards the bottom to "Upgrade System Image"
- Select "Upload a file"
- Browse to the location you saved the firmware file
- Wait, briefly, for the file to upload
- Select reboot when prompted
- login and verify the firmware version
Wizard
To create a base configuration, lets use the Wizard. Select the Wizards tab found in the upper-right corner. Then select either "WAN+2LAN" or "WAN+2LAN2." I will be using the latter.
- Open a browser to 192.168.1.1 and enter credentials
- Internet port (eth0): accept the defaults
- LAN port (eth1): interface will be the next hope from the cluster's EdgeSwitch. My settings are 192.168.69.1/255.255.255.252
- Secondary LAN port (eth2): interface will be for an existing access switch. My settings are 192.168.22.254/255.255.255.0 with DHCP enabled
- User setup: advise creating a new admin user. It will replace user ubnt.
- Select "Apply"
- Read the dialogue and select "Apply Changes"
- Select "Reboot"
- Select "Yes, I'm sure"
- Move the workstation Ethernet cable to eth2
- Update the workstation interface to use DHCP
Basic Settings
- Connected to interface eth2 and using DHCP
- Open a browser to 192.168.22.254 and enter credentials
- Select the "System" tab or button found in the lower-left corner
- Update Host "Name," "Doman Name," "Time Zone," and "Name Server"
- Scroll down and select "Save" button found in the lower left corner
DMZ VLAN Interfaces
- Select "Dashboard" tab
- Select "Add Interface" button
- Select "Add VLAN"
- VLAN ID: 201
- Interface: eth1
- Description: dmz1
- Address: 192.168.201.254/24
- Select "Save"
- Note the creation of eth1.201
- Select "Add VLAN"
- VLAN ID: 211
- Interface: eth1
- Description: dmz2
- Address: 192.168.211.254/24
- Select "Save"
- Note the creation of eth1.211
Static Routes
Create static routes for the EdgeSwitch VLAN gateways.
- Select "Routing" tab
- Select "Add Static Route" button
- Select Route Type: Gateway
- Destination network: 192.168.101.0/24
- Next hop address: 192.168.69.2
- Select "Save" button
- Repeat the above for 192.168.121.0/24 and 192.168.131.0/24 with next hop 192.168.69.2.
Results with
Backup Configuration
- Select the "System" tab or button found in the lower-left corner
- Back up config: select Download button
- Backup done!
Testing
Before testing, connect a cable from EdgeSwitch interface 1 to EdgeRouter interface 1. Next, I would recommend using a combination of the EdgeSwitch ping utility found at System > Utilities > Ping, the EdgeRouter's "Toolbox" found in the upper-right corner, and a workstation to test tagged and untagged traffic. One interesting characteristic of EdgeSwitch's is that pinging a VLAN interface, i.e. 4/0, will result in higher latency than crossing the interface to another VLAN. Here is an excerpt from one of my posts on the Ubiquiti's forums.
All traffic sent to a VLAN interface, e.g. 4/0, suffers a performance penalty for it is using CPU versus an ASIC due to being categorized as "management traffic." This is by design. This can be verified using ping or hping for listening ports on interface 4/0 which will result with 1+ ms times.
However, pinging another host through 4/0 will not be categorized as management traffic and will use the ASIC, thus does not suffer a performance penalty. Again, use ping or hping to verify.
Remember! On the EdgeSwitch, VLAN interfaces 4/0, 4/1, and 4/2 will not be active or in an up state until you connect to a physical port that uses the interface.
Next
Next article in the series is Storage Host Build with FreeNAS 9.3.