Wednesday, January 22, 2014

DNS di CentOS

edit file /etc/sysconfig/network-script/ifcfg-eth0

[root@master ~]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
#HWADDR=B4:B5:2F:AF:4D:BD
#TYPE=Ethernet
#UUID=12197d2c-34a7-42b3-ae04-cdfb00e7ef25
#ONBOOT=no
#NM_CONTROLLED=yes
#BOOTPROTO=dhcp
IPADDR=192.168.17.11
BROADCAST=192.168.17.0
NETMASK=255.255.255.0
GATEWAY=192.168.17.1
BOOTPROTO=static
ONBOOT=yes

[root@master ~]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]


[root@master ~]# ping 183.91.67.5
PING 183.91.67.5 (183.91.67.5) 56(84) bytes of data.
64 bytes from 183.91.67.5: icmp_seq=1 ttl=126 time=4.65 ms
64 bytes from 183.91.67.5: icmp_seq=2 ttl=126 time=5.53 ms
64 bytes from 183.91.67.5: icmp_seq=3 ttl=126 time=3.90 ms
^C
--- 183.91.67.5 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2204ms
rtt min/avg/max/mdev = 3.901/4.698/5.538/0.671 ms

[root@master ~]# ping www.google.com
ping: unknown host www.google.com

[root@master ~]# ping 74.125.200.103
PING 74.125.200.103 (74.125.200.103) 56(84) bytes of data.
64 bytes from 74.125.200.103: icmp_seq=1 ttl=46 time=20.4 ms
64 bytes from 74.125.200.103: icmp_seq=2 ttl=46 time=44.6 ms
64 bytes from 74.125.200.103: icmp_seq=3 ttl=46 time=50.1 ms
64 bytes from 74.125.200.103: icmp_seq=4 ttl=46 time=68.5 ms
64 bytes from 74.125.200.103: icmp_seq=5 ttl=46 time=70.1 ms
64 bytes from 74.125.200.103: icmp_seq=6 ttl=46 time=59.8 ms
^C
--- 74.125.200.103 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5101ms
rtt min/avg/max/mdev = 20.464/52.303/70.136/16.918 ms

Perlu setting DNS

No comments:

Post a Comment