Lembar Analisa-9
Kita akan membuat router pc dengan 2 pc client dimana a memiliki ip 192.168.0.1 dan b memiliki ip 10.0.0.1 .
Jika a adalah a.itpolnes.com dan b adalah b.itpolnes.com maka pada router ns-nya adalah itpolnes.com.
- Pertama – tama kita atur ip pada router sesuai dengan ip pc client yang terhubung pada pc router kemudian ping untuk menguji koneksi
root@lab-2-desktop:/home/lab-2# ifconfig eth1 10.255.255.255
root@lab-2-desktop:/home/lab-2# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.131 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.112 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.130 ms
root@lab-2-desktop:/home/lab-2# ifconfig eth3 192.168.0.254
root@lab-2-desktop:/home/lab-2# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.815 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.111 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.100 ms
- Pada router kita cek gateway yang telah ditambahkan oleh client
root@lab-2-desktop:/home/lab-2# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1
- Kita forward antar pc client agar pc client dapat saling berhubungan
root@lab-2-desktop:/home/lab-2# sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
- Kita install BIND9 pada router
root@lab-2-desktop:/home/lab-2# sudo apt-get update
root@lab-2-desktop:/home/lab-2# sudo apt-get install bind9
- Setelah itu kita konfigurasi BIND9
root@lab-2-desktop:/home/lab-2# sudo nano /etc/bind/named.conf.local
Kita atur seperti dibawah ini.
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918″;
zone “itpolnes.com” {
type master;
file “/etc/bind/db.itpolnes.com”;
};
- Kemudian kita restart
root@lab-2-desktop:/home/lab-2# sudo /etc/init.d/bind9 restart
- Kita konfigurasi lagi /etc/bind/named.conf.local
tambahkan :
zone “254.0.168.192.in-addr.arpa” {
type master;
notify no;
file “/etc/bind/db.192″;
};
- Kita konfigurasi /etc/bind/db.itpolnes.com
root@lab-2-desktop:/home/lab-2# sudo nano /etc/bind/db.itpolnes.com
GNU nano 2.0.7 File: /etc/bind/db.itpolnes.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.itpolnes.com. root.itpolnes.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.itpolnes.com.
@ IN A 192.168.0.254
@ IN A 10.255.255.254
a IN A 192.168.0.1
router IN A 192.168.0.254
- Kita konfigurasi /etc/bind/db.192.com
root@lab-2-desktop:/home/lab-2# sudo nano /etc/bind/db.192
GNU nano 2.0.7 File: /etc/bind/db.192
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.itpolnes.com. root.itpolnes.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
254 IN PTR ns.itpolnes.com.
254 IN PTR router.itpolnes.com.
1 IN PTR a.itpolnes.com.
- Kita ping itpolnes.com
root@lab-2-desktop:/home/lab-2# ping itpolnes.com
PING itpolnes.com (192.168.0.254) 56(84) bytes of data.
64 bytes from router.itpolnes.com (192.168.0.254): icmp_seq=1 ttl=64 time=0.025 ms
64 bytes from ns.itpolnes.com (192.168.0.254): icmp_seq=2 ttl=64 time=0.018 ms
64 bytes from router.itpolnes.com (192.168.0.254): icmp_seq=3 ttl=64 time=0.024 ms
- Kita ping juga itpolnes.com dari pc client a, jika tidak bisa maka lakukan perintah berikut
root@lab-2-desktop:/home/lab-2# sudo nano /etc/resolv.conf
ketikkan : server 192.168.0.254
- Copy db.192 ke db.10
root@lab-2-desktop:/home/lab-2# sudo cp /etc/bind/db.192 /etc/bind/db.10
- Konfigurasi db.10
root@lab-2-desktop:/home/lab-2# sudo nano /etc/bind/db.10
GNU nano 2.0.7 File: /etc/bind/db.10
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.itpolnes.com. root.itpolnes.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
254 IN PTR ns.itpolnes.com.
254 IN PTR router.itpolnes.com.
1 IN PTR b.itpolnes.com.
- Sedangkan pada db.itpolnes.com ditambahkan
b IN A 10.0.0.1
- Restart
root@lab-2-desktop:/home/lab-2# sudo /etc/init.d/bind9 restart
- Cek koneksi
root@lab-2-desktop:/home/lab-2# nslookup
> ns.itpolnes.com
Server: 192.168.0.254
Address: 192.168.0.254#53
** server can’t find ns.itpolnes.com: NXDOMAIN
> b.itpolnes.com
Server: 192.168.0.254
Address: 192.168.0.254#53
Name: b.itpolnes.com
Address: 10.0.0.1
> router.itpolnes.com
Server: 192.168.0.254
Address: 192.168.0.254#53
Name: router.itpolnes.com
Address: 192.168.0.254
> exit
0 komentar:
Posting Komentar