Friday, August 21, 2015

RHEL7 - Assign static IP address to your system

Assign following information to your system.

Hostname: ruma.expanor.local
IP Addr: 192.168.10.201/24
Gateway: 192.168.10.1
DNS Server: 192.168.10.110

Here, you have couple of options,
one, you can directly edit the interface config file or, use network manager commandline interface.
We will be using commandline in this example.

# nmcli connection show
# nmcli connection add con-name eth0 ifname eth0 type ethernet ipv4 192.168.10.201/24 gw4 192.168.10.1
# nmcli connection modify eth0 ipv4.dns 192.168.10.110
# mncli connection modify eth0 ipv4.dns-search "expanor.local"
# nmcli connection modify eth0 ipv4.method manual [ or static]
# nmcli connection modify eth0 connection.autoconnect true
# nmcli connection down eth0
# nmcli connection up eth0

# hostnamectl set-hostname ruma.expanor.local
# hostname
# uname -a


No comments:

Post a Comment