- In this section of document we will have a look on how we can configure an interface to get the DHCP IP address assignment done (IPV4) in RHEL/CENTOS 7
- First execute below command to get into command line UI provided by OS
[root@myserver2 ~]# nmtui
- Post execution of command “nmtui” on putty itself you will be given an user interface which will help you step wise for the configuration of network interface details.
- Select the desired physical connection profile to which IP address details are to be modified.
- Now keep the IPV4 Configuration section to Automatic  and get same disabled for the IPV6 as we don’t need it for now.
- Once all changes are saved IP address details can be seen in the below command and file outputs,
[root@myserver2 ~]# ip addr show enp0s83: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000    link/ether 08:00:27:74:9d:4b brd ff:ff:ff:ff:ff:ff[root@myserver2 ~]# ifup enp0s8Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)[root@myserver2 ~]# ip addr show enp0s83: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000    link/ether 08:00:27:74:9d:4b brd ff:ff:ff:ff:ff:ff    inet 192.168.248.201/24 brd 192.168.248.255 scope global dynamic enp0s8       valid_lft 1203sec preferred_lft 1203sec    inet 192.168.248.11/24 brd 192.168.248.255 scope global secondary enp0s8       valid_lft forever preferred_lft forever    inet6 fe80::a00:27ff:fe74:9d4b/64 scope link       valid_lft forever preferred_lft forever[root@myserver2 ~]# nmtui[root@myserver2 ~]# ifdown enp0s8[root@myserver2 ~]# ifup enp0s8Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7)[root@myserver2 ~]# ^C[root@myserver2 ~]# ip addr show enp0s83: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000    link/ether 08:00:27:74:9d:4b brd ff:ff:ff:ff:ff:ff    inet 192.168.248.201/24 brd 192.168.248.255 scope global dynamic enp0s8       valid_lft 1200sec preferred_lft 1200sec    inet6 fe80::a00:27ff:fe74:9d4b/64 scope link       valid_lft forever preferred_lft forever[root@myserver2 network-scripts]# cat ifcfg-Wired_connection_2TYPE=EthernetBOOTPROTO=dhcpDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=noNAME=Wired_connection_2UUID=ba922995-30c0-4494-899c-d9bdc92d068eDEVICE=enp0s8ONBOOT=yesHWADDR=08:00:27:74:9D:4BPEERDNS=yesPEERROUTES=yes






No comments:
Post a Comment