network-programminggoogle-cloud-platformipgoogle-anthos

What does it mean by CIDR range for the local network and how could we check it?


I tried to install Google Anthos in my bare metal server. But I stuck in finding the ip adress needed to set the yaml configuration. I found an article https://cloud.google.com/blog/topics/developers-practitioners/hands-anthos-bare-metal stating a statement

The CIDR range for my local network is 192.168.86.0/24. Furthermore, I have my Intel NUCs all on the same switch, so they are all on the same L2 network. 

What is this CIDR range the writer talking about? How could we check the CIDR range of our local network in terminal? (I am using Linux Ubuntu 18 machine


Solution

  • Posting this answer as a community wiki as the question was addressed in the comments by @John Hanley.

    Feel free to edit/expand it.

    The CIDR range is determined by your network. If you look at another machine on the same network running Windows, Linux or macOS, it is fairly easy to determine. Run a network utility such as ipconfig, ifconfig, ip, etc. Look for netmask or Subnet Mask. Common values are 255.255.255.0 which is CIDR /24 or 255.255.0.0 which is CIDR /16.

    There are tools on the Internet to translate from netmasks to CIDRs. In simple terms a CIDR is the number of most significant consecutive ones in a netmask. If you convert 255 to binary, that is 8 ones. Repeat. 255.255.255.0 has 24 consecutive ones.

    Note that a lot of networks are not setup correctly for client machines. It is generally best to speak to someone who controls your network. The router or network switch will have the correct netmask value. Use that value if available. It is also important to know if IP addresses are static or allocated by a DHCP server and the DNS servers.

    Example:

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
          <-- OMITTED --> 
    2: enp0s5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:1c:42:1a:1e:57 brd ff:ff:ff:ff:ff:ff
        inet --> 10.211.55.4/24 <-- brd 10.211.55.255 scope global dynamic enp0s5
          <-- OMITTED --> 
    

    A side note explanation:

    By that example of network configuration the CIDR will be 10.211.55.0/24.

    Jodies.de: Ipcalc


    Adding to that, there is quite extensive documentation about Anthos:

    The networking part which the question is connected with can be found here:


    Additional resources: