How to define a Network with IP Address in Linux

Back

Three Key IP addresses define a network , the network address, the broadcast address, and the sub-net mask. The network address is always the first IP address in range, The broadcast is always the last address in the same range . The sub-net mask helps your computer define the difference between the two addresses. You can assign IP addresses between the network and broadcast addresses to any computer on the network .

A sub-net mask is also known as a network mask or net-mask. An example of an IPv4 net-mask is 255.255.255.0, which is class c net-mask it can also be defined by the numbers of associated bits ,24.
    192.168.122.0 / 24.

Related to networking and net-masks is the concept of the gateway. It's an IP address that defines the junction between the local network and an external network. While that gateway IP address is a part of the local network such as the public Internet. The gateway IP address is normally configured in the routing table for the local system, as defined by the route or netstat -r command.