The Red Hat Enterprise Linux 7 Networking Guide (see link) says that the following syntax should be used to assign a subnet to a gateway:nmcli connection modify eth0 +ipv4.routes 192.168.122.0/24  10.0.0.1How do I adjust the above to accommodate the 255.255.255.248 Subnet Mask and the aa.aa.aaa.aa6 Default Gateway given by an internet service provider?  Something like:  nmcli connection modify eth0 +ipv4.routes 255.255.255.248  aa.aa.aaa.aa6Note that: the subnet is given in two different formats.a. The RHEL7 Networking Guide gives the subnet in the format 192.168.122.0/24, whileb. the internet service provider gives the subnet in the format 255.255.255.248.  What is more,a.  the RHEL7 Networking Guide gives the gateway as a private IP, whileb.  the internet service provider gives the gateway as a public IP.  For reference, a Windows laptop is able to connect to the internet and be recognized as one of the 5 valid IP addresses by giving the above information using the following steps:    1.  Control Panel > Network and Internet > Network and Sharing Center    2.  Click Change Adapter Settings  3.  Right click on Ethernet 2 connection and click on Properties  4.  Select Internet Protocol Version 4 (TCP/IPv4)  5.  Then click on Properties Button to open the target dialog box:      a.  In the default state, the Obtain IP address automatically option is checked      b.  To claim a specific IP instead, click Use The Following IP Address and enter the following information:              i.  IP Address:  aa.aa.aaa.aa1              ii. Subnet Mask: 255.255.255.248              iii.    Default Gateway: aa.aa.aaa.aa6              iv. Preferred DNS Server: bb.bb.bb.bb              v.  Alternate DNS Server: bb.bb.cc.cc              vi. Check the Validate Settings on Exit option.              vii.    Click OK  6.  Click on any other open dialog boxes to return computer to normal state  
Using nmcli to set subnet mask and gateway IP
centos;networking;rhel;ip;webserver