Milesight 4G Router configuration

From Sensors in Schools
Jump to navigation Jump to search

Introduction

  • The Milesight 4G router is being used to connect the Raspberry Pi (BirdNET-Pi) computer to the 4G network and hence the internet.
  • The Milesight 4G router behaves in a similar way to a home internet router.
  • The Milesight 4G router can also be used to access the Raspberry pi computer from the internet using SSH (Secure Shell).
  • These instructions will explain how to configure the Milesight router.

Milesight Menu Navigation

  • Status
    • Overview
    • Cellular
    • Network

Resolving Network Address Range Conflict

  • When the Milesight Router was initially connected to the Raspberry Pi (BirdNET-Pi) the Raspberry Pi was also connected using WiFi to my home router.
  • Unfortuately both networks shared the same address range which was 192.168.1.* and the same
  • To resolve this conflict the Home address was left as 192.168.1.* (255.255.255.0)
  • The Milestream address range was reconfigured to 192.168.2.* (255.255.255.0)

IP Address Conflict

When a computer is connected to two networks, and both of these networks share the same address range, such as both using the IP address range 192.168.1.*, it can lead to what is known as an "IP address conflict." An IP address conflict occurs when two devices on the same network segment (in this case, the computer connected to both networks) have been assigned the same IP address. This situation can result in various networking issues:

  • Communication Problems: The computer may experience communication problems because it doesn't know which network to send data to when trying to reach a device with the same IP address on both networks. This can lead to intermittent connectivity issues or complete loss of network connectivity.
  • Duplicate IP Detection: Modern network protocols have mechanisms to detect IP address conflicts. When a device detects that another device on the same network has the same IP address, it may trigger an error message or attempt to resolve the conflict by changing its IP address.
  • Unpredictable Behavior: The behavior of the computer in such a situation can be unpredictable. It might use one network for certain traffic and the other network for other traffic, leading to inconsistent results.

To resolve IP address conflicts when a computer is connected to multiple networks, you should:

Configure Unique IP Addresses: Ensure that each network assigns unique IP addresses to devices. This usually involves adjusting the DHCP (Dynamic Host Configuration Protocol) settings on one or both of the networks to use different address ranges.

  • Static IP Assignment: If you have control over the IP assignments, consider statically assigning IP addresses to devices on one or both networks to avoid conflicts.
  • Network Segmentation: In cases where you have multiple networks with overlapping address ranges, consider segmenting your networks using routers or VLANs (Virtual Local Area Networks). This way, you can control the routing between networks and avoid IP conflicts.
  • Subnetting: Implement subnetting to divide your networks into smaller subnetworks with distinct address ranges. This can help prevent address conflicts and manage IP address allocation more efficiently.

By ensuring that each device on your networks has a unique IP address within its respective network segment, you can prevent IP address conflicts and maintain stable and predictable network communication.


Subnet Mask

The term you're referring to, "net mask," is more commonly known as the "subnet mask" in networking. The subnet mask is a 32-bit number that is used to divide an IP address into network and host portions. It's a fundamental component of the IP addressing scheme and is used to determine which part of an IP address belongs to the network and which part belongs to the individual host within that network.

In the format you provided, 255.255.255.0, this subnet mask is expressed in dotted-decimal notation, where each of the four octets represents 8 bits. In this example:

  • The leftmost three octets (255.255.255) are set to all ones (binary 1s), indicating the network portion of the IP address.
  • The rightmost octet (0) is set to all zeros (binary 0s), indicating the host portion of the IP address.
  • This subnet mask corresponds to a Class C network and allows for up to 254 host addresses within that network. The first and last addresses (with all zeros and all ones in the host portion) are typically reserved for network address (identifying the network itself) and broadcast address (broadcasting messages to all hosts on the network), respectively, leaving 252 usable host addresses.

Here's a breakdown:

  • Network Portion: 255.255.255.0
  • Host Portion: 0.0.0.255 (the host portion, which allows 8 bits for hosts)

The subnet mask plays a crucial role in determining network boundaries, routing, and IP address allocation within a network. Different subnet masks can be used to create networks of varying sizes, from small local networks to large global networks, by dividing the available address space accordingly.