Example Static Route CentOS 5


References:
http://www.ehowstuff.com/how-to-add-persistent-static-routes-in-centos-5-6/
http://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-networkscripts-static-routes.html

Skenario:
-Membuat LAN kecil(30 user) untuk user hotspot PC training dan hotspot untuk tamu.

Topologi (existing):
Proxy Squid Gateway CentOS 5:eth0:192.168.0.254 — 192.168.0.240:eth1:Mikrotik RB750:eth2:192.168.88.1 — LAN Training & Hotspot

Eksekusi:
I. Menambahkan static route di CentOS 5 Proxy Gateway:
# ip route add 192.168.88.0/27 via 192.168.0.240 dev eth0

Command diatas tidak akan running jika server/network direstart, agar running at startup edit /etc/sysconfig/network-scripts/route-eth0

# vi /etc/sysconfig/network-scripts/route-eth0

192.168.88.0/27 via 192.168.0.240 dev eth0

# service network restart

-Cek Tabel Routing:
# netstat -rn
or
# route -n

-Edit squid.conf,untuk memperbolehkan network mikrotik di squid(biar LAN mikrotik bisa akses internet):
# vi /etc/squid/squid.conf

acl training src 192.168.88.0/27
http_access allow training

# squid -k reconfigure

II. Setup hotspot di Mikrotik


Done..

Leave a Reply

Your email address will not be published. Required fields are marked *