Category Archives: O365

Optimize your Microsoft Teams traffic with QoS on a UniFi USG

At times like these, when everybody is working from home and the whole family uses the internet as well, the traffic requirements can be tough on your internet connection. When you are using real-time collaboration tools, such as Microsoft Teams, that rely on a good and stable internet connection for voice, video and screen sharing, parallel Netflix/Disney+/Hulu/Amazon Prime traffic can make the experience subpar for everybody involved.

Thankfully it’s possible to optimize your outgoing traffic based on what services are used.

In this example I show you how to setup traffic shaping on a UniFi USG or EdgeRouter using DSCP to optimize your Microsoft Teams meetings. This setup is only an example and you can easily adapt it to your router if it supports DSCP. If it does not, the Ubiquiti EdgeRouter X is about 50 bucks.

Continue reading

Is this ip address part of the Office 365 IP address range?

The analysis of firewall logs in Office 365 projects repeatedly raises the question: Is this blocked IP address part of the Office 365 address range?

Thanks to PowerShell and the information published by Microsoft, the answer is only a few lines of code away.

My script “Test-IsO365IpAddress.ps1” simply needs the IP address in question and optionally the TCP/UDP port. It retrieves the current list of address ranges from Microsoft and checks if the IP address is part of one of the IP networks. If this is the case, the script outputs all services that use this network.

If a port was also specified as part of the command the output will be filtered.

In addition to the service name (e.g. “Exchange Online”), the category (Optimize, Allow or Default), the required ports, the subnet and the somewhat obsolete “Required” category are also displayed.

Equipped with this data, the visit to the firewall team should be successful.

Many thanks also to Luben Kirov who allowed my to use his network functions to analysis the IP networks fast and reliable and Siva Padisetty whose function checkSubnet I used as inspiration for my own implementation.