Instalasi dan Konfigurasi Bind

Domain Name System (DNS) adalah sebuah sistem yang berfungsi menerjemahkan alamat IP menjadi nama domain. Misalnya, sebuah komputer/server dengan IP (public) 209.131.36.158 memiliki nama domain www.yahoo.com, sehingga end user tidak perlu mengingat alamat IP dari server tersebut yang pasti lebih sulit untuk diingat. Cukup dulu penjelasan singkat mengenai DNS server, keterangan lebih lanjut silahkan baca di sini.

Step 1: Edit File /etc/apt/sources.list:

sudo nano /etc/apt/sources.list

Repository yang digunakan pada tutorial kali ini adalah :

deb http://archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ dapper main universe restricted multiverse

deb http://security.ubuntu.com/ubuntu/ dapper-security universe main multiverse restricted

deb http://archive.ubuntu.com/ubuntu/ dapper-updates universe main multiverse restricted

deb http://archive.ubuntu.com/ubuntu/ dapper-proposed universe main multiverse restri

Step2: Install bind 9:

sudo apt-get install bind9

Step 3: Konfigurasi Bind. Jika instalasi Bind menggunakan paket source maka file konfigurasi akan terletak pada named.conf. Berbeda dengan Ubuntu yang telah melakukannya untuk kita. Jadi file yang akan kita edit adalah named.conf.local

sudo vi /etc/bind/named.conf.local

Disini kita akan memasukkan zones. Zones adalah suatu nama domain yang me-refer ke DNS server.
Edit file /etc/bind/named.conf.local :

# This is the zone definition. replace example.com with your domain name

zone "example.com" {

type master;

file "/etc/bind/zones/example.com.db";

};


 

# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation - e.g my network address is 192.168.0

zone "0.168.192.in-addr.arpa" {

type master;

file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";

};

Edit file /etc/bind/named.conf.options:

sudo nano /etc/bind/named.conf.options

Kita harus mengubah nilai forwarder. Ketika request tak dapat dipenuhi oleh DNS server kita, maka request tersebut akan di forward ke DNS server berikut.

forwarders {

# Replace the address below with the address of your provider's DNS server

10.14.1.37;

10.14.203.7

};

Kemudian lihat file zones ganti example.com dengan nama domain:

sudo mkdir /etc/bind/zones

sudo vi /etc/bind/zones/example.com.db

File zone berisi padanan ip dengan nama domain yang diberikan, seperti contoh berikut.

// replace example.com with your domain name. do not forget the . after the domain name!// Also, replace ns1 with the name of your DNS server

example.com. IN SOA ns1.example.com. admin.example.com. (

// Do not modify the following lines!

2006081401

28800

3600

604800

38400

)


 

// Replace the following line as necessary:

// ns1 = DNS Server name

// mta = mail server name

// example.com = domain name

example.com. IN NS ns1.example.com.

example.com. IN MX 10 mta.example.com.


 

// Replace the IP address with the right IP addresses.


 

www IN A 192.168.0.2

mta IN A 192.168.0.3

ns1 IN A 192.168.0.1

Kemudian buat file reverse DNS zone:

sudo vi /etc/bind/zones/rev.0.168.192.in-addr.arpa

Copy dan paste teks berikut:

//replace example.com with yoour domain name, ns1 with your DNS server name.

// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 1, as my IP address is 192.168.0.1.

@ IN SOA ns1.example.com. admin.example.com. (

2006081401;

28800;

604800;

604800;

86400

)


 

IN NS ns1.example.com.

1 IN PTR example.com

Selesai, restart DNS server:

sudo /etc/init.d/bind9 restart

Step 4: Edit file resolv.conf seperti berikut:

sudo vi /etc/resolv.conf

masukkan baris berikut:

// replace example.com with your domain name, and 192.168.0.1 with the address of your new DNS server.search example.com

nameserver 192.168.0.1

Test DNS server:

dig example.com


 

Sumber : http://hemaya.wordpress.com

Remote Accsess Dan FTP

FTP (singkatan dari File Transfer Protocol) adalah sebuah protokol Internet yang berjalan di dalam lapisan aplikasi yang merupakan standar untuk pentransferan berkas (file) komputer antar mesin-mesin dalam sebuah internetwork.
FTP merupakan salah satu protokol Internet yang paling awal dikembangkan, dan masih digunakan hingga saat ini untuk melakukan pengunduhan (download) dan penggugahan (upload) berkas-berkas komputer antara klien FTP dan server FTP. Sebuah Klien FTP merupakan aplikasi yang dapat mengeluarkan perintah-perintah FTP ke sebuah server FTP, sementara server FTP adalah sebuah Windows Service atau daemon yang berjalan di atas sebuah komputer yang merespons perintah-perintah dari sebuah klien FTP. Perintah-perintah FTP dapat digunakan untuk mengubah direktori, mengubah modus transfer antara biner dan ASCII, menggugah berkas komputer ke server FTP, serta mengunduh berkas dari server FTP.
Sebuah server FTP diakses dengan menggunakan Universal Resource Identifier (URI) dengan menggunakan format ftp://namaserver. Klien FTP dapat menghubungi server FTP dengan membuka URI tersebut.
Untuk melakukan kegiatan remote ataupun ftp pertama – tama kita harus mengatur ip kita agar dapat terkoneksi dengan server

  • Konfigurasi ip menjadi 192.168.0.111

    root@lab-2-desktop:/home/lab-2# mii-tool
    eth0: no link
    eth1: negotiated 100baseTx-FD flow-control, link ok
    eth2: no link
    root@lab-2-desktop:/home/lab-2# ifconfig eth1 192.168.0.111

  • Coba ping ip sendiri dan server dengan ip 192.168.0.1

    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=1.69 ms
    64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.126 ms
    64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.131 ms
    64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.132 ms
    ^Z
    [23]+ Stopped ping 192.168.0.1
    root@lab-2-desktop:/home/lab-2# ping 192.168.0.111
    PING 192.168.0.111 (192.168.0.111) 56(84) bytes of data.
    64 bytes from 192.168.0.111: icmp_seq=1 ttl=64 time=0.039 ms
    64 bytes from 192.168.0.111: icmp_seq=2 ttl=64 time=0.017 ms
    64 bytes from 192.168.0.111: icmp_seq=3 ttl=64 time=0.014 ms
    ^Z
    [24]+ Stopped ping 192.168.0.111

  • Coba ping ke pc yg lain

    root@lab-2-desktop:/home/lab-2# ping 192.168.0.110
    PING 192.168.0.110 (192.168.0.110) 56(84) bytes of data.
    64 bytes from 192.168.0.110: icmp_seq=1 ttl=64 time=0.152 ms
    64 bytes from 192.168.0.110: icmp_seq=2 ttl=64 time=0.140 ms
    64 bytes from 192.168.0.110: icmp_seq=3 ttl=64 time=0.139 ms
    ^Z
    [26]+ Stopped ping 192.168.0.110
    root@lab-2-desktop:/home/lab-2# ping 192.168.0.109
    PING 192.168.0.109 (192.168.0.109) 56(84) bytes of data.
    64 bytes from 192.168.0.109: icmp_seq=1 ttl=64 time=4.26 ms
    64 bytes from 192.168.0.109: icmp_seq=2 ttl=64 time=0.147 ms
    64 bytes from 192.168.0.109: icmp_seq=3 ttl=64 time=0.142 ms
    64 bytes from 192.168.0.109: icmp_seq=4 ttl=64 time=0.147 ms
    ^Z
    [27]+ Stopped ping 192.168.0.109
    root@lab-2-desktop:/home/lab-2# ping 192.168.0.110
    PING 192.168.0.110 (192.168.0.110) 56(84) bytes of data.
    64 bytes from 192.168.0.110: icmp_seq=1 ttl=64 time=0.155 ms
    64 bytes from 192.168.0.110: icmp_seq=2 ttl=64 time=0.146 ms
    64 bytes from 192.168.0.110: icmp_seq=3 ttl=64 time=0.143 ms
    64 bytes from 192.168.0.110: icmp_seq=4 ttl=64 time=0.144 ms
    ^Z
    [28]+ Stopped ping 192.168.0.110

  • Masuk kedalam editor

root@lab-2-desktop:/home/lab-2# sudo nano /etc/apt/sources.list

  • Edit isi dari editor menjadi

    deb http://security.ubuntu.com/ubuntu intrepid-security main restricted
    deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted
    deb http://security.ubuntu.com/ubuntu intrepid-security universe
    deb-src http://security.ubuntu.com/ubuntu intrepid-security universe
    deb http://security.ubuntu.com/ubuntu intrepid-security multiverse
    deb-src http://security.ubuntu.com/ubuntu intrepid-security multivers
    deb ftp://192.168.0.1/repo ./

  • Update apt

    Pastikan terdapat :
    Get:1 ftp://192.168.0.1 ./ Release.gpg
    Ign ftp://192.168.0.1 ./ Release.gpg
    Get:2 ftp://192.168.0.1 ./ Translation-en_US
    Ign ftp://192.168.0.1 ./ Translation-en_US
    Get:3 ftp://192.168.0.1 ./ Release
    Ign ftp://192.168.0.1 ./ Release
    Get:4 ftp://192.168.0.1 ./ Packages
    Ign ftp://192.168.0.1 ./ Packages
    Get:5 ftp://192.168.0.1 ./ Packages [4475kB]

  • Install openssh

root@lab-2-desktop:/home/lab-2# sudo apt-get install openssh-server

  • Setelah itu coba untuk melakukan remote pada pc teman


    root@lab-2-desktop:/home/lab-2# sudo ssh 192.168.0.110
    root@192.168.0.110's password:
    Linux lab-2-desktop 2.6.27-7-generic #1 SMP Fri Oct 24 06:42:44 UTC 2008 i686

    The programs included with the Ubuntu system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
    applicable law.

    To access official Ubuntu documentation, please visit:
    http://help.ubuntu.com/
    root@lab-2-desktop:~# eject
    root@lab-2-desktop:~# exit
    logout
    Connection to 192.168.0.110 closed.
    ** Perintah eject digunakan untuk mengeluarkan tray disk pc yang kita remote dan perintah exit untuk keluar dari aplikasi remote
    Setelah itu kita akan melalukan ftp antar pc dan juga server

  • Install ftp

root@lab-2-desktop:/home/lab-2# sudo apt-get install vsftpd

  • Coba lakukan ftp pada pc sendiri

    root@lab-2-desktop:/home/lab-2# ftp 192.168.0.111
    Connected to 192.168.0.111.
    220 (vsFTPd 2.0.7)
    Name (192.168.0.111:lab-2): anonymous
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    200 PORT command successful. Consider using PASV.
    150 Here comes the directory listing.
    226 Directory send OK.
    ftp> exit
    221 Goodbye.

  • Edit editor ftp untuk menentukan file yang akan dibuka

root@lab-2-desktop:/home/lab-2# sudo nano /etc/vsftpd.conf

  • Editor ftp

    # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
    anonymous_enable=YES
    anon_root=/home/ftp

  • Restart

    root@lab-2-desktop:/home/lab-2# sudo /etc/init.d/vsftpd restart
    * Stopping FTP server: vsftpd [ OK ]
    Starting FTP server: vsftpd [ OK ]

Pengertian TCP dan UDP

Definisi TCP/IP

TCP/IP (Transmission Control Protocol/Internet Protocol) Adalah standar komunikasi data yang digunakan oleh komunitas internet dalam proses tukar-menukar data dari satu komputer ke komputer lain di dalam jaringan Internet. Protokol ini tidaklah dapat berdiri sendiri, karena memang protokol ini berupa kumpulan protokol (protocol suite). Protokol ini juga merupakan protokol yang paling banyak digunakan saat ini. Data tersebut diimplementasikan dalam bentuk perangkat lunak (software) di sistem operasi.

Keunggulan TCP/IP adalah sebagai berikut:

1. Open Protocol Standard

2. Independen dari physical network hardware.

3. Skema pengalamatan yang umum menyebabkan device yang menggunakan TCP/IP dapat menghubungi alamat device-device lain di seluruh network, bahkan Internet sekalipun.

5. High level protocol standar

4. TCP/IP memiliki fasilitas routing dan jenis-jenis layanan lainnya yang memungkinkan

diterapkan pada internetwork.

Model Arsitektur TCP/IP

Karena tidak ada perjanjian umum tentang bagaimana melukiskan TCP/IP dengan model layer, biasanya TCP/IP didefinisikan dalam 3-5 level fungsi dalam arsitektur protokol. Berikut merupakan bagan dari 5 layer dalam TCP/IP.

a) Application Layer

Pada sisi paling atas dari arsitektur protokol TCP/IP adalah Application Layer. Layer ini termasuk seluruh proses yang menggunakan transport layer untuk mengirimkan data. Banyak sekali application protocol yang digunakan saat ini. Beberapa diantaranya adalah :

  • HyperText Transfer Protocol (HTTP).
  • File Transfer Protocol (FTP).
  • Simple Mail Transfer Protocol (SMTP).
  • Telnet.
  • Domain Name System (DNS).
  • Simple Network Management Protocol (SNMP).

b) Transport Layer

Dua protokol utama pada layer ini adalah Transmission Control Protocol (TCP) dan User Datagram Protocol (UDP). TCP menyediakan layanan pengiriman data handal dengan end-to-end deteksi dan koreksi kesalahan. TCP menyediakan layanan penuh lapisan transpor untuk aplikasi, TCP juga dikatakan protokol transpor untuk stream yang reliabel. Dalam konteks ini artinya TCP bermakna connectionoriented, dengan kata lain: koneksi end-to-end harus dibangun dulu di kedua ujung terminal sebelum kedua ujung terminal mengirimkan data. UDP menyediakan layanan pengiriman datagram tanpa koneksi (connectionless) dan low-overhead. Kedua protokol ini mengirmkan data diantara Application Layer dan Internet Layer.

Sifat- sifat yag terdapat di TCP sebagai berikut:

  • Connection-orientedSuatu arsitektur/mekanisme komunikasi data di mana dua perangkat yang akan saling berkomunikasi diharuskan untuk membuat sebuah sesi (session) terlebih dahulu.
  • Reliabel (Keandalan) yang dimiliki oleh protokol ini disebabkan karena beberapa mekanisme. Berikut mekanisme tersebut:

    1. Checksum.
    2. Duplicate Data Detection:
    3. Retransmisson.
    4. Sequencing.
    5. Timers.

  • Stream data transfer

TCP akan mengelompokkan byte-byte yang sebelumnya tidak terstruktur ke dalam bentuk segmen untuk kemudian

dikirimkan ke IP. Layanan ini memberikan keuntungan bagi aplikasi-aplikasi karena mereka tidak perlu lagi membuat blok-

blok data.

  • Efficient flow control

Ketika mengirim ulang acknowledgement ke alamat asal, proses TCP yang menerima mengindikasikan nomor urutan yang

bisa diterimanya tanpa harus meng-over flow buffer internal miliknya.

  • Full-duplex operation

TCP bisa mengirim dan menerima dalam waktu yang bersamaan.

  • Multiplexing

Komunikasi antar upper-layer yang terjadi secara simultan bisa dimultiplexikan melalui satu koneksi tunggal

c) Internet Layer

Diatas Network Access Layer adalah Internet Layer. Internet Protocol adalah jantung dari TCP/IP dan protokol paling penting pada Internet Layer (RFC 791).

d) Network Access Layer

Protokol pada layer ini menyediakan media bagi system untuk mengirimkan data ke device lain yang terhubung secara langsung.

Fungsi dalam layer ini adalah mengubah IP datagram ke frame yang ditransmisikan oleh network, dan memetakan IP Address ke physical address yang digunakan dalam jaringan. IP Address ini harus diubah ke alamat apapun yang diperlukan untuk physical layer untuk mentransmisikan datagram. IP merupakan protokol pada network layer yang bersifat :

  • Connectionless, yakni setiap paket data yang dikirim pada suatu saat akan melalui rute secara independen.
  • Unreliable atau ketidakandalan yakni Protokol IP tidak menjamin datagram yang dikirim pasti sampai ke tempat tujuan.

e) Physical Layer

Physical layer mendefinisikan karakteristik yang dibutuhkan hardware untuk membawa sinyal data transmisi. Hal hal seperti level tegangan, nomor dan lokasi pin interface, didefinisikan pada layer ini.


Pengertian UDP (User Datagram Protocol)

User Datagram Protocol (UDP) adalah salah satu protokol lapisan transpor TCP/IP yang mendukung komunikasi yang tidak andal (unreliable), tanpa koneksi (connectionless) antara host-host dalam jaringan yang menggunakan TCP/IP. UDP memiliki karakteristik-karakteristik berikut:

  • Connectionless (tanpa koneksi): Pesan-pesan UDP akan dikirimkan tanpa harus dilakukan proses negosiasi koneksi antara dua host yang hendak berukar informasi.
  • Unreliable (tidak andal): Pesan-pesan UDP akan dikirimkan sebagai datagram tanpa adanya nomor urut atau pesan acknowledgment. Protokol lapisan aplikasi yang berjalan di atas UDP harus melakukan pemulihan terhadap pesan-pesan yang hilang selama transmisi. Umumnya, protokol lapisan aplikasi yang berjalan di atas UDP mengimplementasikan layanan keandalan mereka masing-masing, atau mengirim pesan secara periodik atau dengan menggunakan waktu yang telah didefinisikan.
  • UDP menyediakan mekanisme untuk mengirim pesan-pesan ke sebuah protokol lapisan aplikasi atau proses tertentu di dalam sebuah host dalam jaringan yang menggunakan TCP/IP. Header UDP berisi field Source Process Identification dan Destination ProcessIdentification.
  • UDP menyediakan penghitungan checksum berukuran 16-bit terhadap keseluruhan pesan UDP.

Fungsi UDP sebagai berikut:

  • Protokol yang "ringan" (lightweight): Untuk menghemat sumber daya memori dan prosesor, beberapa protokol lapisan aplikasi membutuhkan penggunaan protokol yang ringan yang dapat melakukan fungsi-fungsi spesifik dengan saling bertukar pesan. Contoh dariprotokol yang ringan adalah fungsi query nama dalam protokol lapisan aplikasi Domain Name System.
  • Protokol lapisan aplikasi yang mengimplementasikan layanan keandalan: Jika protokol lapisan aplikasi menyediakan layanan transfer data yang andal, maka kebutuhan terhadap keandalan yang ditawarkan oleh TCP pun menjadi tidak ada. Contoh dari protokol seperti ini adalah Trivial File Transfer Protocol (TFTP) dan Network File System (NFS)
  • Protokol yang tidak membutuhkan keandalan. Contoh protokol ini adalah protokol Routing Information Protocol (RIP).
  • Transmisi broadcast: Karena UDP merupakan protokol yang tidak perlu membuat koneksi terlebih dahulu dengan sebuah host tertentu, maka transmisi broadcast pun dimungkinkan. Sebuah protokol lapisan aplikasi dapat mengirimkan paket data ke beberapa tujuan dengan menggunakan alamat multicast atau broadcast. Hal ini kontras dengan protokol TCP yang hanya dapat mengirimkan transmisi one-to-one. Contoh: query nama dalam protokol NetBIOS Name Service.


Sumber :

http://condetcom.wordpress.com/2010/03/17/mengenal-protokol-internet-tcpip/

LINUX ROUTER DENGAN 2 CLIENT

Tanggal Praktikum : 27 April 2010


lab2@lab2-desktop:~$ sudo su

[sudo] password for lab2:

root@lab2-desktop:/home/lab2# lspci

00:00.0 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.1 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.2 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.3 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.4 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.5 PIC: VIA Technologies, Inc. P4M890 I/O APIC Interrupt Controller

00:00.6 Host bridge: VIA Technologies, Inc. P4M890 Security Device

00:00.7 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:01.0 PCI bridge: VIA Technologies, Inc. VT8237/VX700 PCI Bridge

00:02.0 PCI bridge: VIA Technologies, Inc. P4M890 PCI to PCI Bridge Controller

00:03.0 PCI bridge: VIA Technologies, Inc. P4M890 PCI to PCI Bridge Controller

00:0f.0 IDE interface: VIA Technologies, Inc. Device 5337 (rev 80)

00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 07)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237A PCI to ISA Bridge

00:11.7 Host bridge: VIA Technologies, Inc. VT8251 Ultra VLINK Controller

00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 7c)

00:13.0 Host bridge: VIA Technologies, Inc. VT8237A Host Bridge

00:13.1 PCI bridge: VIA Technologies, Inc. VT8237A PCI to PCI Bridge

01:00.0 VGA compatible controller: VIA Technologies, Inc. P4M890 [S3 UniChrome Pro] (rev 01)

04:03.0 Ethernet controller: 3Com Corporation 3c905B 100BaseTX [Cyclone]

80:01.0 Audio device: VIA Technologies, Inc. VT1708/A [Azalia HDAC] (VIA High Definition Audio Controller) (rev 10)

root@lab2-desktop:/home/lab2# ifconfig eth0 192.168.0.254

root@lab2-desktop:/home/lab2# ifconfig eth1 10.255.255.254

root@lab2-desktop:/home/lab2# ifconfig

eth0 Link encap:Ethernet HWaddr 00:e0:4d:3d:8c:c2

inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0

UP BROADCAST 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:1000

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Interrupt:23 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:10:4b:66:ca:49

inet addr:10.255.255.254 Bcast:10.255.255.255 Mask:255.0.0.0

UP BROADCAST 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:1000

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Interrupt:16 Base address:0x8000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:254 errors:0 dropped:0 overruns:0 frame:0

TX packets:254 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:18016 (18.0 KB) TX bytes:18016 (18.0 KB)

root@lab2-desktop:/home/lab2# mii-tool

eth0: no link

eth1: no link

root@lab2-desktop:/home/lab2# 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.898 ms

64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.097 ms

64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.107 ms

64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.105 ms

64 bytes from 10.0.0.1: icmp_seq=5 ttl=64 time=0.098 ms

64 bytes from 10.0.0.1: icmp_seq=6 ttl=64 time=0.091 ms

^C

--- 10.0.0.1 ping statistics ---

6 packets transmitted, 6 received, 0% packet loss, time 5004ms

rtt min/avg/max/mdev = 0.091/0.232/0.898/0.298 ms

root@lab2-desktop:/home/lab2# 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=3.92 ms

64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.098 ms

64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.093 ms

64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.100 ms

^C

--- 192.168.0.1 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 3007ms

rtt min/avg/max/mdev = 0.093/1.053/3.921/1.655 ms

root@lab2-desktop:/home/lab2# 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 eth0

root@lab2-desktop:/home/lab2# ifconfig

eth0 Link encap:Ethernet HWaddr 00:e0:4d:3d:8c:c2

inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80::2e0:4dff:fe3d:8cc2/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:23 errors:0 dropped:0 overruns:0 frame:0

TX packets:28 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:3462 (3.4 KB) TX bytes:3558 (3.5 KB)

Interrupt:23 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:10:4b:66:ca:49

inet6 addr: fe80::210:4bff:fe66:ca49/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:76 errors:0 dropped:0 overruns:0 frame:0

TX packets:54 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:10944 (10.9 KB) TX bytes:8897 (8.8 KB)

Interrupt:16 Base address:0x8000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:254 errors:0 dropped:0 overruns:0 frame:0

TX packets:254 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:18016 (18.0 KB) TX bytes:18016 (18.0 KB)

root@lab2-desktop:/home/lab2# ifconfig eth1 10.255.255.254

root@lab2-desktop:/home/lab2# ifconfig

eth0 Link encap:Ethernet HWaddr 00:e0:4d:3d:8c:c2

inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80::2e0:4dff:fe3d:8cc2/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:25 errors:0 dropped:0 overruns:0 frame:0

TX packets:31 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:4146 (4.1 KB) TX bytes:4584 (4.5 KB)

Interrupt:23 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:10:4b:66:ca:49

inet addr:10.255.255.254 Bcast:10.255.255.255 Mask:255.0.0.0

inet6 addr: fe80::210:4bff:fe66:ca49/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:76 errors:0 dropped:0 overruns:0 frame:0

TX packets:62 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:10944 (10.9 KB) TX bytes:11117 (11.1 KB)

Interrupt:16 Base address:0x8000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:254 errors:0 dropped:0 overruns:0 frame:0

TX packets:254 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:18016 (18.0 KB) TX bytes:18016 (18.0 KB)

root@lab2-desktop:/home/lab2# 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.123 ms

64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.099 ms

64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.120 ms

64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.119 ms

^C

--- 10.0.0.1 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2997ms

rtt min/avg/max/mdev = 0.099/0.115/0.123/0.012 ms

root@lab2-desktop:/home/lab2# 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.506 ms

64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.098 ms

64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.097 ms

64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.091 ms

64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.100 ms

64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=0.082 ms

64 bytes from 192.168.0.1: icmp_seq=7 ttl=64 time=0.098 ms

64 bytes from 192.168.0.1: icmp_seq=8 ttl=64 time=0.100 ms

64 bytes from 192.168.0.1: icmp_seq=9 ttl=64 time=0.099 ms

64 bytes from 192.168.0.1: icmp_seq=10 ttl=64 time=0.094 ms

64 bytes from 192.168.0.1: icmp_seq=11 ttl=64 time=0.113 ms

^C

--- 192.168.0.1 ping statistics ---

11 packets transmitted, 11 received, 0% packet loss, time 10000ms

rtt min/avg/max/mdev = 0.082/0.134/0.506/0.118 ms

root@lab2-desktop:/home/lab2# mii-tool

eth0: negotiated 100baseTx-FD, link ok

eth1: negotiated 100baseTx-FD, link ok

root@lab2-desktop:/home/lab2# route add default gw 192.168.254

root@lab2-desktop:/home/lab2# route add default gw 192.168.0.254

SIOCADDRT: File exists

root@lab2-desktop:/home/lab2# route add default gw 10.255.255.254

root@lab2-desktop:/home/lab2# 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 eth0

10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1

0.0.0.0 10.255.255.254 0.0.0.0 UG 0 0 0 eth1

0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0

root@lab2-desktop:/home/lab2# sysctl -w net.ipv4.ip_forward=1

net.ipv4.ip_forward = 1

root@lab2-desktop:/home/lab2# iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -d 0/0 -j MASQUERADE

root@lab2-desktop:/home/lab2# iptables -L

Chain INPUT (policy ACCEPT)

target prot opt source destination

Chain FORWARD (policy ACCEPT)

target prot opt source destination

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

root@lab2-desktop:/home/lab2# 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=2.69 ms

64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.142 ms

64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.134 ms

64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.138 ms

64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.136 ms

64 bytes from 192.168.0.1: icmp_seq=6 ttl=64 time=0.116 ms

64 bytes from 192.168.0.1: icmp_seq=7 ttl=64 time=0.134 ms

^C

--- 192.168.0.1 ping statistics ---

7 packets transmitted, 7 received, 0% packet loss, time 6006ms

rtt min/avg/max/mdev = 0.116/0.498/2.692/0.895 ms

root@lab2-desktop:/home/lab2# 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=5.43 ms

64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.138 ms

64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.136 ms

64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.135 ms

64 bytes from 10.0.0.1: icmp_seq=5 ttl=64 time=0.137 ms

64 bytes from 10.0.0.1: icmp_seq=6 ttl=64 time=0.123 ms

^C

--- 10.0.0.1 ping statistics ---

6 packets transmitted, 6 received, 0% packet loss, time 5005ms

rtt min/avg/max/mdev = 0.123/1.017/5.433/1.974 ms

root@lab2-desktop:/home/lab2# ifconfig

eth0 Link encap:Ethernet HWaddr 00:e0:4d:3d:8c:c2

inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80::2e0:4dff:fe3d:8cc2/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:61 errors:0 dropped:0 overruns:0 frame:0

TX packets:65 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:10938 (10.9 KB) TX bytes:10620 (10.6 KB)

Interrupt:23 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:10:4b:66:ca:49

inet addr:10.255.255.254 Bcast:10.255.255.255 Mask:255.0.0.0

inet6 addr: fe80::210:4bff:fe66:ca49/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:114 errors:0 dropped:0 overruns:0 frame:0

TX packets:86 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:18664 (18.6 KB) TX bytes:13692 (13.6 KB)

Interrupt:16 Base address:0x8000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:254 errors:0 dropped:0 overruns:0 frame:0

TX packets:254 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:18016 (18.0 KB) TX bytes:18016 (18.0 KB)

root@lab2-desktop:/home/lab2# mii-tool

eth0: negotiated 100baseTx-FD, link ok

eth1: negotiated 100baseTx-FD, link ok

root@lab2-desktop:/home/lab2# 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 eth0

10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1

0.0.0.0 10.255.255.254 0.0.0.0 UG 0 0 0 eth1

0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0

root@lab2-desktop:/home/lab2# ifconfig

eth0 Link encap:Ethernet HWaddr 00:e0:4d:3d:8c:c2

inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80::2e0:4dff:fe3d:8cc2/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:70 errors:0 dropped:0 overruns:0 frame:0

TX packets:83 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:14016 (14.0 KB) TX bytes:16776 (16.7 KB)

Interrupt:23 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:10:4b:66:ca:49

inet addr:10.255.255.254 Bcast:10.255.255.255 Mask:255.0.0.0

inet6 addr: fe80::210:4bff:fe66:ca49/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:146 errors:0 dropped:0 overruns:0 frame:0

TX packets:105 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:24896 (24.8 KB) TX bytes:15478 (15.4 KB)

Interrupt:16 Base address:0x8000

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:254 errors:0 dropped:0 overruns:0 frame:0

TX packets:254 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:18016 (18.0 KB) TX bytes:18016 (18.0 KB)

LINUX ROUTER DENGAN 3 CLIENT

Tanggal Praktikum : 4 Mei 2010


PC ROUTER

lab-2@lab-2-desktop:~$ sudo su

[sudo] password for lab2:

root@lab-2-desktop:/home/lab-2# lspci

00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)

00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)

00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)

00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) SATA IDE Controller (rev 01)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

04:00.0 Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)

04:01.0 Ethernet controller: D-Link System Inc Gigabit Ethernet Adapter (rev 11)

04:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 01)

root@lab-2-desktop:/home/lab-2# ifconfig eth0 192.168.0.254

root@lab-2-desktop:/home/lab-2# ifconfig eth1 10.255.255.254

root@lab-2-desktop:/home/lab-2# ifconfig eth2 172.16.255.254

root@lab-2-desktop:/home/lab-2# ifconfig

eth0 Link encap:Ethernet HWaddr 00:17:9a:3a:1c:90

inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80::217:9aff:fe3a:1c90/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:58 errors:0 dropped:0 overruns:0 frame:0

TX packets:138 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:8197 (8.1 KB) TX bytes:22898 (22.8 KB)

Interrupt:21 Base address:0x1100

eth1 Link encap:Ethernet HWaddr 00:19:d1:18:dd:b0

inet addr:10.255.255.254 Bcast:10.255.255.255 Mask:255.0.0.0

inet6 addr: fe80::219:d1ff:fe18:ddb0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:56 errors:0 dropped:0 overruns:0 frame:0

TX packets:87 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:12906 (12.9 KB) TX bytes:16379 (16.3 KB)

eth2 Link encap:Ethernet HWaddr 00:11:95:c7:09:e0

inet addr:172.16.255.254 Bcast:172.16.255.255 Mask:255.255.0.0

inet6 addr: fe80::211:95ff:fec7:9e0/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:57 errors:0 dropped:0 overruns:0 frame:0

TX packets:125 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:9383 (9.3 KB) TX bytes:27622 (27.6 KB)

Interrupt:22

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:436 errors:0 dropped:0 overruns:0 frame:0

TX packets:436 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:35176 (35.1 KB) TX bytes:35176 (35.1 KB)

root@lab-2-desktop:/home/lab-2# mii-tool

eth0: negotiated 100baseTx-FD, link ok

eth1: negotiated 100baseTx-FD flow-control, link ok

eth2: negotiated 100baseTx-FD, link ok

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=3.19 ms

64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.110 ms

64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.105 ms

^C

--- 192.168.0.1 ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2006ms

rtt min/avg/max/mdev = 0.105/1.136/3.193/1.454 ms

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=3.53 ms

64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.126 ms

64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.124 ms

64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.120 ms

^C

--- 10.0.0.1 ping statistics ---

7 packets transmitted, 4 received, 42% packet loss, time 6006ms

rtt min/avg/max/mdev = 0.120/0.975/3.532/1.476 ms

root@lab-2-desktop:/home/lab-2# ping 172.16.0.1

PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.

64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=1.42 ms

64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=0.107 ms

64 bytes from 172.16.0.1: icmp_seq=3 ttl=64 time=0.099 ms

64 bytes from 172.16.0.1: icmp_seq=4 ttl=64 time=0.123 ms

^C

--- 172.16.0.1 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 3004ms

rtt min/avg/max/mdev = 0.099/0.438/1.423/0.568 ms

root@lab-2-desktop:/home/lab-2# route add default gw 192.168.0.254

root@lab-2-desktop:/home/lab-2# route add default gw 10.255.255.254

root@lab-2-desktop:/home/lab-2# route add default gw 172.16.255.254

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 eth0

172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2

10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1

0.0.0.0 172.16.255.254 0.0.0.0 UG 0 0 0 eth2

0.0.0.0 10.255.255.254 0.0.0.0 UG 0 0 0 eth1

0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0

root@lab-2-desktop:/home/lab-2# sysctl -w net.ipv4.ip_forward=1

net.ipv4.ip_forward = 1

root@lab-2-desktop:/home/lab-2# iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -d 0/0 -j MASQUERADE


PC CLIENT 1

lab-2@lab-2-desktop:~$ sudo su

[sudo] password for lab2:

root@lab-2-desktop:/home/lab-2# ifconfig eth0 192.168.0.1

root@lab-2-desktop:/home/lab-2# route add default gw 192.168.0.254

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=3.53 ms

64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.126 ms

64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.124 ms

64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=0.120 ms

^C

--- 10.0.0.1 ping statistics ---

7 packets transmitted, 4 received, 42% packet loss, time 6006ms

rtt min/avg/max/mdev = 0.120/0.975/3.532/1.476 ms


PC CLIENT 2

lab-2@lab-2-desktop:~$ sudo su

[sudo] password for lab2:

root@lab-2-desktop:/home/lab-2# ifconfig eth0 10.0.0.1

root@lab-2-desktop:/home/lab-2# route add default gw 10.255.255.254

root@lab-2-desktop:/home/lab-2# ping 172.16.0.1

PING 172.16.0.1 (172.16.0.1) 56(84) bytes of data.

64 bytes from 172.16.0.1: icmp_seq=1 ttl=64 time=1.42 ms

64 bytes from 172.16.0.1: icmp_seq=2 ttl=64 time=0.107 ms

64 bytes from 172.16.0.1: icmp_seq=3 ttl=64 time=0.099 ms

64 bytes from 172.16.0.1: icmp_seq=4 ttl=64 time=0.123 ms

^C

--- 172.16.0.1 ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 3004ms

rtt min/avg/max/mdev = 0.099/0.438/1.423/0.568 ms


PC CLIENT 3

lab-2@lab-2-desktop:~$ sudo su

[sudo] password for lab2:

root@lab-2-desktop:/home/lab-2# ifconfig eth0 172.16.0.1

root@lab-2-desktop:/home/lab-2# route add default gw 172.16.255.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=3.19 ms

64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.110 ms

64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.105 ms

^C

--- 192.168.0.1 ping statistics ---

3 packets transmitted, 3 received, 0% packet loss, time 2006ms

rtt min/avg/max/mdev = 0.105/1.136/3.193/1.454 ms