Mengajar dengan hati, memberikan yang terbaik untuk negeri

Postingan Terbaru

Kamis, 28 Juni 2018

Setting Network di CentOS 7

Guys, berikut cara melihat ip address di centOS :

1. Ketik ip a

[root@sutrisnocentos ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:c6:6c:88 brd ff:ff:ff:ff:ff:ff
    inet 192.168.25.2/30 brd 192.168.25.3 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::c669:33c2:b1be:57b7/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
[root@sutrisnocentos ~]#


2. Tes Ping dengan Ping google.com

[root@sutrisnocentos ~]# ping google.com
PING google.com (74.125.68.101) 56(84) bytes of data.
64 bytes from sc-in-f101.1e100.net (74.125.68.101): icmp_seq=1 ttl=45 time=20.0 ms
64 bytes from sc-in-f101.1e100.net (74.125.68.101): icmp_seq=2 ttl=45 time=36.6 ms
64 bytes from sc-in-f101.1e100.net (74.125.68.101): icmp_seq=3 ttl=45 time=41.2 ms
64 bytes from sc-in-f101.1e100.net (74.125.68.101): icmp_seq=4 ttl=45 time=52.1 ms
64 bytes from sc-in-f101.1e100.net (74.125.68.101): icmp_seq=5 ttl=45 time=56.5 ms
64 bytes from sc-in-f101.1e100.net (74.125.68.101): icmp_seq=6 ttl=45 time=28.0 ms
--- google.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5021ms
rtt min/avg/max/mdev = 20.017/39.126/56.599/12.752 ms
[root@sutrisnocentos ~]#

3. Cara cek interface di centOS :

[root@sutrisnocentos ~]# nmcli d
DEVICE  TYPE      STATE      CONNECTION
ens33   ethernet  connected  eth0
lo      loopback  unmanaged  --
[root@sutrisnocentos ~]#

4. Setting ip address 

vi /etc/sysconfig/network-scripts/ifcfg-Wired_connection_1


TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=0f9a3500-7b25-4777-8fa4-ee338bd77f1f
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.25.2
PREFIX=30
GATEWAY=192.168.25.1
DNS1=8.8.8.8
DOMAIN=sutrisnocentos.local

5. cara restart network

[root@sutrisnocentos ~]# systemctl restart network