BIRD: Static Routing Sederhana: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
No edit summary
Onnowpurbo (talk | contribs)
No edit summary
Line 3: Line 3:




==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
Jalankan BIRD di GNS3 di PC
Line 9: Line 19:




Router1:
==Konfigurasi Shell==
 
/ip address
add address=10.1.1.2 interface=ether1 # ether1 kemungkinan dapat DHCP dari gateway Internet
add address=172.16.1.1/30 interface=ether2
add address=192.168.1.1/24 interface=ether3


/ip route
R1:
add gateway=10.1.1.1
add dst-address=192.168.2.0/24 gateway=172.16.1.2


Router2:
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


/ip address
R2:
add address=172.16.1.2/30 interface=ether1
add address=192.168.2.1/24 interface=ether2


  /ip route
  sudo ifconfig eth1 172.16.1.2 netmask 255.255.255.252
add gateway=172.16.1.1
sudo ifconfig eth2 192.168.2.1 netmask 255.255.255.0


Test
==Test==


Router1:
R1:


  ping 192.168.2.1
  ping 192.168.2.1


Router2:
R2:


  ping 192.168.1.1
  ping 192.168.1.1

Revision as of 04:19, 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

Test

R1:

ping 192.168.2.1

R2:

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


Pranala Menarik