setting ip address debian squeeze
DESCRIPTION
Setting IP address debian squeezeTRANSCRIPT
Debian 6.0.5 Squeeze Konfigurasi Debian Server
Teknik Komputer dan Jaringan
©Jihad_Irhaby Page 2
MengaktifkanMengaktifkanMengaktifkanMengaktifkan Ethernet & Setting IP AddressEthernet & Setting IP AddressEthernet & Setting IP AddressEthernet & Setting IP Address
* Aktifkan Ethernet 2 yang terpasang, karena pada tutorial ini saya memakai 2 Ethernet.
root@lappet:~# ifconfig eth1 up
* Tambahkan konfigurasi IP untuk Ethernet 2 pada file /etc/network/interfaces.
root@lappet:~# nano /etc/network/interfaces
* Setting nama hosts pada Debian.
root@lappet:~# nano /etc/hosts
root@lappet:~# /bin/hostname -F /etc/hostname
* Setting DNS pada file /etc/resolv.conf . Di dalam file ini lah letak konfigurasi DNS, sqperti DNS
Speedy, atau yang lain nya. Seperti 203.130.196.5, 203.130.193.74.
root@lappet:~# nano /etc/resolv.conf
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.222.111
netmask 255.255.255.0
network 192.168.222.0
broadcast 192.168.222.255
gateway 192.168.222.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.222.1
dns-search lappet-pulut.com
allow-hotplug eth1
iface eth1 inet static
address 192.168.101.254
netmask 255.255.255.0
network 192.168.101.0
broadcast 192.168.101.255
gateway 192.168.222.111
dns-nameservers 192.168.222.111
127.0.0.1 localhost
192.168.222.111 lappet.lappet-pulut.com lappet
search lappet-pulut.com
nameserver 192.168.222.111
nameserver 203.130.196.5
©Jihad_Irhaby Page 3
* Setting IP Forward pada file /etc/sysctl.conf & /proc/sys/net/ipv4/ip_forward.
root@lappet:~# nano /etc/sysctl.conf
root@lappet:~# nano /proc/sys/net/ipv4/ip_forward
* Langkah terakhir, restart debian
root@lappet:~# reboot * Test ping ethernet yang kita aktifkan.
root@lappet:~# ping 192.168.222.111 PING 192.168.222.111 (192.168.222.111) 56(84) bytes of data.
64 bytes from 192.168.222.111: icmp_req=1 ttl=64 time=2.58 ms
64 bytes from 192.168.222.111: icmp_req=2 ttl=64 time=0.211 ms
64 bytes from 192.168.222.111: icmp_req=3 ttl=64 time=0.066 ms
^C
--- 192.168.222.111 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2008ms
rtt min/avg/max/mdev = 0.066/0.954/2.585/1.154 ms
root@lappet:~# ping 192.168.101.254 PING 192.168.101.254 (192.168.101.254) 56(84) bytes of data.
64 bytes from 192.168.101.254: icmp_req=1 ttl=64 time=0.277 ms
64 bytes from 192.168.101.254: icmp_req=2 ttl=64 time=0.060 ms
64 bytes from 192.168.101.254: icmp_req=3 ttl=64 time=0.056 ms
^C
--- 192.168.101.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2007ms
rtt min/avg/max/mdev = 0.056/0.131/0.277/0.103 ms
::SELESAI::
* Hilangkan tanda # pada parameter berikut.
#net.ipv4.ip_forward=1 sehingga menjadi :
net.ipv4.ip_forward=1
1