0% found this document useful (0 votes)
49 views2 pages

Setting Ipaddress Red Hat

The document provides steps to configure the IP address on Redhat Linux. It first checks the current network configuration using ifconfig. It then edits the ifcfg-eth0 file to set the device, boot protocol, IP address, netmask, and gateway. The network service is restarted and ifconfig is used again to verify the new IP address. Ping is also used to test network connectivity.

Uploaded by

David Pratama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views2 pages

Setting Ipaddress Red Hat

The document provides steps to configure the IP address on Redhat Linux. It first checks the current network configuration using ifconfig. It then edits the ifcfg-eth0 file to set the device, boot protocol, IP address, netmask, and gateway. The network service is restarted and ifconfig is used again to verify the new IP address. Ping is also used to test network connectivity.

Uploaded by

David Pratama
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Setting IP Address Redhat Linux

Untuk linux berbesa sekali dengan DOS di linux kita bisa konfigurasi dimana saja
asalkan kita sudah tahu persis dmn letak file yang akan di konfigurasikan. berikut penulis
akan mencoba menjelaskan cara setting ip adress pada linux redhat, cek dulu apakah
sudah di konfigurasi dengan mengetikan perintah
[root@radmin /root]#ifconfig (enter)
nah kalau muncul nama NIC yaitu eth0 dan LO (lop Back) beserta ip addressnya berarti
NICnya sudah dikonfigurasi apabila tidak berarti belum di konfigurasi
langkah2nya di langsungkan aja y perintahnya

[root@admin /root]#vi /etc/sysconfig/network-scripts/ifcfg-eth0 (enter)


DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.2.5
NETMASK=255.255.255.0
NETWORK=192.168.2.0
BROADCAST=192.168.2.255
GATEWAY=192.168.2.5
~
~
(simpan file dengan menekan Escape kemudian ketik :x)

Selanjutnya kita restart servicenya dengan cara


[root@admin /root]# service network restart
Shutting down interface eth0
[
Setting network parameters
[
Bringing up interface lo
[
Bringing up interface eth0
[
[root@admin /root]#

OK
OK
OK
OK

]
]
]
]

Langkah selanjutnya kita cek ip yang telah di buat dengan cara sebagai berkut
[root@admin /root]# ifconfig
eth0
Link encap:Ethernet HWaddr 00:03:FF:3D:0D:6C
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:11 Base address:0xec00

Created by Denz Amy email ( [email protected] )

lo

Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

[root@admin /root]#
[root@admin /root]# ping 192.168.2.5
PING 192.168.2.5 (192.168.2.5) from 192.168.2.5 : 56(84) bytes of data.
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=0 ttl=255 time=0.1 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=1 ttl=255 time=0.2 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=2 ttl=255 time=0.1 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=3 ttl=255 time=0.1 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=4 ttl=255 time=0.1 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=5 ttl=255 time=0.1 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=6 ttl=255 time=0.1 ms
64 bytes from 192.168.2.5 (192.168.2.5): icmp_seq=7 ttl=255 time=0.1 ms
--- 192.168.2.5 ping statistics --8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 0.1/0.1/0.2 ms
[root@admin /root]#

Created by Denz Amy email ( [email protected] )

You might also like