Live Journal

All About Log

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 )

Sumber: http://sahir.dozer.or.id/wp/2005/07/11/setting-ip/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: