Setting Network Centos 7

Tanggal : 01 Oct 2018, Category : Server, Create By : admin

Melanjutkan materi sebelumnya mengenai pengaturan firewall dan selinux, kali ini kami akan membahas mengenai cara setting network pada centos 7, pengaturan network ini sangat di butuhkan pada awal setelah anda mengistal operating system linux, karena jika anda tidak mengatur network maka server anda tidak bisa mengakses internet maupun di akases oleh client, oke langsung saja berikut pengaturannya.

[root@gia ~]# hostnamectl set-hostname gudangilmuaplikasi.com         # mengatur nama hostname
[root@gia ~]# nmcli d # menampilkan perangkat
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected eth0
lo loopback unmanaged --

# bisanya kita akan menyeting ip di eth0

[root@gia ~]# nmcli c modify eth0 ipv4.addresses xx.xx.xx.xx/24 # setting alamat IPv4 ⇒ nmcli *** (alamat ip)
[root@gia ~]# nmcli c modify eth0 ipv4.gateway xx.xx.xx.xx # setting ip gateway
[root@gia ~]# nmcli c modify eth0 ipv4.dns 10.0.0.1 # setting ip dns
[root@gia ~]# nmcli c modify eth0 ipv4.method manual # setting ip dhcp
[root@gia ~]# nmcli c down eth0; nmcli c up eth0 # restart network
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)

[root@gia ~]# nmcli d show eth0 # lIhat pengaturan network
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:0C:29:CD:9C:2D
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: eth0
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/0
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: ip = xx.xx.xx.xx/24, gw = xx.xx.xx.1xx
IP4.DNS[1]: xx.xx.xx.xx
IP6.ADDRESS[1]: ip = fe80::20c:29ff:fecd:9c2d/64, gw = ::

[root@gia ~]# ip addr show # menampilkan status ip

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:cd:9c:2d brd ff:ff:ff:ff:ff:ff
inet xx.xx.xx.xx/24 brd xx.xx.xx.xx scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fecd:9c2d/64 scope link
valid_lft forever preferred_lft forever

Keyword:
  • setting network centos 7
  • pengaturan jaringan centos 7
  • network setting centos 7

Artikel Lain

How To Use Case When In Php

Date : 13 Feb 2023, Category : Tutorial, Create By : admin

The switch statement in PHP can be used as an alternative to multiple if statements. The switch statement tests a variable or expression against multiple cases and executes the code .....

7 Foods That Help With Weight Loss.

Date : 13 Feb 2023, Category : Health, Create By : admin

The basic concept of weight loss is to keep the calorie intake into our body lower than the amount of calories we burn. Food factor is certainly very important in .....

How To Use Css Margin Styles

Date : 14 Feb 2023, Category : CSS, Create By : admin

In CSS, the margin property is used to add space around an HTML element. There are different ways to use the margin property in CSS, depending on the desired effect. Here .....