- In this section of document we will have a look on how we can configure an IP address (IPV4) on an Ethernet interface 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.
- Assign required details to the interface such as MAC address, MTU to be supported, IP address , Gateway IP Address, DNS Server’s IP address, Domain name of which interface should belong, Parameter to get Interface Automatically UP
- Once all changes are saved IP address details can be seen in the below command and file outputs,
[root@myserver2 ~]# ip addr show enp0s94: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000    link/ether 08:00:27:b6:50:f3 brd ff:ff:ff:ff:ff:ff    inet 192.168.248.202/24 brd 192.168.248.255 scope global dynamic enp0s9 valid_lft 813sec preferred_lft 813sec    inet6 fe80::a00:27ff:feb6:50f3/64 scope link valid_lft forever preferred_lft forever[root@myserver2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-wired-connection-enp0s9TYPE=EthernetBOOTPROTO=dhcpDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=yesNAME=wired-connection-enp0s9UUID=fc5cd587-6e1d-4266-a1da-aad57036a1f6ONBOOT=yesDNS1=192.168.248.1HWADDR=08:00:27:B6:50:F3MACADDR=08:00:27:B6:50:F3MTU=1500IPADDR=192.168.248.202PREFIX=32GATEWAY=192.168.248.1PEERDNS=yesPEERROUTES=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesNote:- IPV6 related can be removed from the file if needed manually, presence of it will not be of that much problem of confusion
Back To Top
Home
Home








No comments:
Post a Comment