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
0 komentar:
Posting Komentar