Sharing Ilmu

Sharing for useful things

How To Configure Network Manually on Linux CentOS/RedHat

When you build a server based on linux, of course you must configure the network fist for connecting the server to network/internet and that server should be able for reached by client in other network.

In this tutorial, I’ll Explain to you about Basic configuration Network Manually on Linux CentOS/RedHat.

The following topologi which are use for this tutorial

In the topologi above, we will to configure ip address, dns and gateway so that the server can be reach internet connection.

there are several ways that can be used for configure network in centOS/Redhat. you can configure on /etc/sysconfig/network-script configuration file or you can using nmcli command.

 

first, check interface name on your system with ip link command

As the showing above, the interface name on my system is ens3, and then let’s do configuration of network.

Check device connection with nmcli command.

# nmcli connection show

As the showing  that are the actively connection is “Wired connection 1” on ens3 device. and the next modify network for Wired connection 1 using nmcli command.

# nmcli connection modify “Wired connection 1” ipv4.method manual ipv4.addresses 10.10.1.2/29 ipv4.gateway 10.10.1.1 ipv4.dns 10.10.1.1

after modify the network,  reload and restart network configuration.

Check network status whether the configuration was successfully

The configuration IP was successfully, and now try to do connection test

Do a connection test to the gateway ip and to internet

As the showing above, server can be reach to gateway and can be connected to the internet network.

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>