genesisnsa.blogg.se

Centos 7 static ip netmask
Centos 7 static ip netmask








centos 7 static ip netmask

Set the manual configuration (from dhcp to static), ~]# nmcli con mod enp0s3 thod manual Set the gateway using below nmcli command, ~]# nmcli con mod enp0s3 ipv4.gateway 192.168.1.1 Note: In short form, we usually replace connection with ‘con’ keyword and modify with ‘mod’ keyword in nmcli command.Īssign ipv4 (192.168.1.4) to enp0s3 interface, ~]# nmcli con mod enp0s3 ipv4.addresses 192.168.1.4/24 Use beneath nmcli command to assign static ip on enp0s3,

centos 7 static ip netmask

List currently active Ethernet cards using “ nmcli connection” command, ~]# nmcli connectionĮnp0s3 7c1b8444-cb65-440d-9bf6-ea0ad5e60bae ethernet enp0s3 Run the following nmcli commands one after the another to configure static ip, Let’s assume we want to assign the static IP address on first NIC (enp0s3) with the following details, Currently ip address assigned to the NIC is via dhcp server.

centos 7 static ip netmask

Run the below ip addr command to list Ethernet cards on your server ~]# ip addrĪs we can see in above command output, we have two NICs enp0s3 & enp0s8.










Centos 7 static ip netmask