Setting IP

#Pertama Adalah Mencatat Ip Dan Default Gatewaynya#
List IP :
IP : 202.155.200.5
GATEWAY : 202.155.255.1
NETMASK : 255.255.255.0
BROADCAST : 202.155.200.255
NAMESERVER/DNS : 202.155.0.10
NAMESERVER/DNS : 202.155.0.20

#Pertama Kita Setting Ip Kita Dengan Cara :
[root@cachak root]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
lalu isi dengan:
DEVICE=eth0
BOOTPROTO=static
IPADDR=202.155.200.5
BROADCAST=202.155.200.255
NETMASK=255.255.255.0
USERCTL=no

Lalu Simpan Dengan Menekan :wq

Lalu setting default gatawanya dan nama computer nya :
[root@cachak root]# vi /etc/sysconfig/network
Lalu isi dengan :
GATEWAY=202.155.255.1
HOSTNAME=cachak.dozer.or.id

Lalu save dengan menekan :wq

Lalu setting dns nya :
[root@cachak root]# vi /etc/resolv.conf
Lalu isidengan nameserverdiatas :
nameserver 202.155.0.10
nameserver 202.155.0.20

Lalu simpen:

Sekarang restart networknya
[root@cachak root]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@cachak root]#chkconfig --level 2345 network on

Lalu cek dengan /sbin/ip a
[root@cachak root]# /sbin/ip a
1: lo: mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:30:84:ef:30:cb brd ff:ff:ff:ff:ff:ff
inet 202.155.200.5/24 brd 202.155.200.255 scope global eth0
[root@cachak root]#
testing dengan ping ke defaut gatewaynya yaitu 202.155.200.1

0 Response to "Setting IP"

Posting Komentar

Followers

Club Cooee
rachmanda by Informatika