Promo

 


Pertama-tama kita login sebagai user kemudian ketikan perintah sebagai berikut.

pico /etc/network/interfaces , lalu edit

Apabila menggunakan 1 interface saja.

contoh :

auto eth0
iface eth0 inet static
address 172.26.78.11
netmask 255.255.255.224
gateway 172.26.78.1

up route add -net 172.26.78.0 netmask 255.255.255.224 gw 172.26.78.1 down route del -net 172.26.78.0 netmask 255.255.255.0 gw 172.26.78.1

Apabila menggunakan 2 interface

contoh :

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.26.78.11
netmask 255.255.255.224
network 172.26.78.1
broadcast 172.26.78.31

post-up route add -net 172.26.78.0 netmask 255.255.255.224 gw 172.26.78.1

pre-down route del -net 172.26.78.0 netmask 255.255.255.224 gw 172.26.78.1
auto eth1
iface eth1 inet static
address 10.10.1.2
netmask 255.255.255.0
network 10.10.1.0
broadcast 10.10.1.224
gateway 10.10.1.1
save dengan menekan ctrl+o, reboot
 
Top