Difference between revisions of "BIRD: Static Routing Sederhana"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 42: | Line 42: | ||
router id 172.16.1.1; | router id 172.16.1.1; | ||
− | + | # | |
protocol direct { | protocol direct { | ||
interface "-eth*", "*"; # Restrict network interfaces it works with | interface "-eth*", "*"; # Restrict network interfaces it works with | ||
} | } | ||
− | + | # | |
protocol static { | protocol static { | ||
route 192.168.2.0/24 via 172.16.1.2; | route 192.168.2.0/24 via 172.16.1.2; | ||
Line 59: | Line 59: | ||
router id 172.16.1.2; | router id 172.16.1.2; | ||
− | + | # | |
protocol direct { | protocol direct { | ||
interface "-eth*", "*"; # Restrict network interfaces it works with | interface "-eth*", "*"; # Restrict network interfaces it works with | ||
} | } | ||
− | + | # | |
protocol static { | protocol static { | ||
route 192.168.1.0/24 via 172.16.1.1; | route 192.168.1.0/24 via 172.16.1.1; |
Revision as of 11:57, 15 January 2019
Topologi
R1 e1 --> CLOUD nat0 e2 --> R2 e1 e3 --> LAN 192.168.1.1/24
R2 e1 --> R1 e2 e2 --> LAN 192.168.2.1/24
Jalankan BIRD di GNS3 di PC
sudo chown root:onno /dev/kvm
Konfigurasi Shell
R1:
sudo ifconfig eth1 192.168.122.100 netmask 255.255.255.0 sudo ifconfig eth2 172.16.1.1 netmask 255.255.255.252 sudo ifconfig eth3 192.168.1.1 netmask 255.255.255.0
R2:
sudo ifconfig eth1 172.16.1.2 netmask 255.255.255.252 sudo ifconfig eth2 192.168.2.1 netmask 255.255.255.0
Routing
R1:
vi /usr/local/etc/bird6.conf
edit
router id 172.16.1.1; # protocol direct { interface "-eth*", "*"; # Restrict network interfaces it works with } # protocol static { route 192.168.2.0/24 via 172.16.1.2; }
R2:
vi /usr/local/etc/bird6.conf
edit
router id 172.16.1.2; # protocol direct { interface "-eth*", "*"; # Restrict network interfaces it works with } # protocol static { route 192.168.1.0/24 via 172.16.1.1; }
Test
R1:
ping 172.16.1.2 ping 192.168.2.1
R2:
ping 172.16.1.1 ping 192.168.1.1
Tambahan Kalau Membutuhkan NAT
Router1:
/ip firewall nat add chain=srcnat out-interface=ether1 action=masquareade /ip firewall nat print
Setting Client
LAN 1 Client:
ip 192.168.1.2 gw 192.168.1.1
LAN 2 Client:
ip 192.168.2.2 gw 192.168.2.1
Referensi