Skip to content

Jaringan Komputer part 2

July 29, 2007

SUbnetting
==========

Merampingkan jaringan yang besar menjadi jaringan yang lebih kecil.
mis.
anda adlaah network engineer PT. IB. anda dimintai oleh bos untuk memisssahkan jaringan yang ada menjadi 2 buah jaringan yang terpisah yang dihubungkan dengan router.
IP yang digunakan 192.168.200.x, berapa ip maskin yang digunakan, ip network, ip broadcast & range host tiap jaringan ?

+++++++++++++++++                    +++++++++++++++++
+                    +        +
+                    +        +
R1    +++++++++++++ Router/GW ++++++++++++++++   R2        +
+                    +        +
+                    +        +
+++++++++++++++++                    +++++++++++++++++

1. dibagi 2     =>    256:2    = 128
2. Ip Masking    =>    256-128    = 128  => 255.255.255.1218
3. Tabel
=========================================================
Ruang    IP Network    IP Broadcst    Range Host
=========================================================
1    192.168.1.0    192.168.1.127    192.168.1.1-126
2    192.168.1.128    192.168.1.255    192.168.1.129-254
=========================================================

Konfigurasi Jaringan di LINUX
==============================

a. Setting IP address
~ ifconfig
syntax     : ifconfig device ip_address netmask
mis    : ifconfig eth0 192.168.1.20
sifatnya sementara
~ edit file /etc/sysconfig/network-scipts/ifcfg-eth
device=eth0
bootpro=static (bisa static atau DHCP)
ipaddress=192.168.1.20
netmassk=255.255.255.0
gateway=192.168.1.1
onboot=yes

contoh lain :

DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.1.13
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes
METRIC=10
MII_NOT_SUPPORTED=no
USERCTL=no
MS_DNS1=202.134.2.5
MS_DNS2=192.168.1.1
RESOLV_MODS=yes
IPV6INIT=no
IPV6TO4INIT=no

~ mcc/drakconf

b.setting gateway
~ route (temporaary)
melihat routing
route -n
konfigurasi routing default gateway
syntax    : route add default gw ip_gateway
misal    : route add default gw 192.168.1.1
route del default gw 192.168.1.1 (untuk mengahapus)

~ edit file /etc/sysconfig/network
gateway=192.168.1.1
~ mcc/drakconf

menjalankan network
service network  start
/etc/init.d/network start
mematikan network
service network stop
me-restart network
service network restart

c. Setting default DNS
~ edit file /etc/resolv.conf
nameserver 192.168.1.1
nameserver 202.134.2.5
~ mcc / drackconf

Sharing internet via Modem dial-up
====================================

—-modem dial——- PC eth0 192.168.2.1/24 kosongkan gw dan dns ——– LAN 192.168.2.x/24

A. Setting Server

~ Mendeteksi modem
a. wvdial

wvdialconf /etc/wvdial.conf >>> query modem
edit file /etc/wvdial.cof

PROVIDER=telkomnet
PHONENUMBER=080989999
USERNAME=telkomnet@instant
PASSWORD=telkom

menjalankan
ketik # wvdial

– setting ip forward
edit file /etc/sysctl.conf
ubah menjadi
net.ipv4.ip_forward=1
simpan
jalankan
sysctl -p

– setting masquerade
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j masquerade -o ppp0

SHARING INTERNET VIA ETHERNET
=============================

—– modem adsl 192.168.1.1 ———– eth0 192.168.1.2 PC eth 192.168.200.1 ——- LAN 192.168.200.x/24 gw:192.168.200.1 dns:202.153.31.18

pada konsepnya sama
– setting ip forward
edit file /etc/sysctl.conf
ubah menjadi
net.ipv4.ip_forward=1
simpan
jalankan
sysctl -p

– setting masquerade
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j masquerade -o eth0

From → Linux

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: