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
ONBOOT=yes
USERCTL=no

lalu simpen 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: <loopback ,UP> 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: <broadcast ,MULTICAST,UP> 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
dan juga testing ping ke google.com :)
sudah selesai kan :)

11 thoughts on “Setting IP

  1. mas mau tanya gimana cara buat squid agar langsung jalan saat booting atau direstart.punyaku kalo direstart atau booting squid minta di start dulu

  2. Pingback: Setting IP « Powered By iDiots

  3. Pingback: Marcello

  4. bisa datang ke polda banten kang, ditunggu wendi, sakalangkong
    sekalian bede proyek. ok. ditunggu

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.