Difference between revisions of "OpenWRT IPv6: Konfigurasi OLSR 6and4"

From OnnoWiki
Jump to navigation Jump to search
(New page: Sumber: https://dev.openwrt.org/ticket/4803 I'm testing the olsr 6and4 configuration. I'm using OpenWRT 8.09 branch with latest packages as 19/03/09 Looks like there is a bug when the...)
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
  
 +
Agar OLSR dapat beroperasi sekaligus untuk IPv4 & IPv6 kita harus menggunakan IpVersion '6and4'.
 +
Kita dapat mengedit file
  
I'm testing the olsr 6and4 configuration.
+
==/etc/config/olsrd==
  
I'm using OpenWRT 8.09 branch with latest packages as 19/03/09
+
Misalnya, sebagai berikut
  
Looks like there is a bug when the configuration has HNA entries. The
+
config olsrd
problem is that both the generated /var/etc/olsrd.conf and
+
        # uncomment the following line to use a custom config file instead:
/var/etc/olsrd.conf.ipv4 contain hna4 and hna6 entries.
+
        #option config_file '/etc/olsrd.conf'
 +
        option IpVersion '6and4'
 +
        # option IpVersion '4'
 +
        option FIBMetric 'flat'
 +
        option LinkQualityLevel '2'
 +
        option LinkQualityAlgorithm 'etx_ff'
 +
        option OlsrPort '698'
 +
        option Willingness '3'
 +
        option NatThreshold '1.0'
 +
 +
config LoadPlugin
 +
        option library 'olsrd_arprefresh.so.0.1'
 +
 +
config LoadPlugin
 +
        option library 'olsrd_dyn_gw.so.0.5'
 +
 +
config LoadPlugin
 +
        option library 'olsrd_txtinfo.so.0.1'
 +
        option accept '0.0.0.0'
 +
 +
config Interface
 +
        option ignore '0'
 +
        option interface 'MESH'
 +
        option Mode 'mesh'
 +
 +
config InterfaceDefaults
 +
        option Mode 'mesh'
 +
 +
config Hna6
 +
        option netaddr '2001:123:124::'
 +
        option prefix '64'
 +
 +
config Hna6
 +
        option netaddr '2001:123:124::2'
 +
        option prefix '128'
 +
 +
config Hna4
 +
        option netaddr '10.123.124.2'
 +
        option prefix '32'
  
If you have a hna4 entry this will result in the IPv6 olsr daemon not
 
working, with the following error printed:
 
  
IPv4 addresses can only be used if "IpVersion" == 4
+
cocokan dengan kondisi jaringan anda :)
No interfaces configured!
 
Bad configuration!
 
No interfaces detected! This might be intentional, but it also might
 
mean that your configuration is fubar.
 
I will continue after 5 seconds...
 
  
If you have a hna6 entry this will result in the IPv4 olsr daemon not working.
+
==/etc/config/network==
  
IPv6 addresses can only be used if "IpVersion" == 6
+
config interface 'loopback'
No interfaces configured!
+
option ifname 'lo'
Bad configuration!
+
option proto 'static'
No interfaces detected! This might be intentional, but it also might
+
option ipaddr '127.0.0.1'
mean that your configuration is fubar.
+
option netmask '255.0.0.0'
I will continue after 5 seconds...
+
 +
config interface 'lan'
 +
option ifname 'eth0'
 +
option type 'bridge'
 +
option proto 'static'
 +
option ipaddr '192.168.1.1'
 +
option netmask '255.255.255.0'
 +
option ip6assign '60'
 +
option ip6prefix '2001:222:222:2::/64'
 +
option ip6addr '2001:222:222:2::1'
 +
 +
config interface 'wan6'
 +
option ifname '@wan'
 +
option proto 'dhcpv6'
 +
 +
config globals 'globals'
 +
option ula_prefix '2001:222:222:2::/64'
 +
 +
config interface 'MESH'
 +
option proto 'static'
 +
option ipaddr '10.123.123.2'
 +
option netmask '255.0.0.0'
 +
option ip6gw '2001:123:123::2'
 +
option ip6prefix '2001:123:123::/64'
 +
option ip6addr '2001:222:222::2'
  
If you have both hna4 and hna6 entries this will result in both IPv4
+
==/etc/config/network==
and IPv6 olsr not working.
 
  
The not working olsr will keep running but with no interface configured.
+
config interface 'loopback'
 +
        option ifname 'lo'
 +
        option proto 'static'
 +
        option ipaddr '127.0.0.1'
 +
        option netmask '255.0.0.0'
 +
 +
config interface 'lan'
 +
        option ifname 'eth0'
 +
        option type 'bridge'
 +
        option proto 'static'
 +
        option ipaddr '192.168.1.1'
 +
        option netmask '255.255.255.0'
 +
        option ip6addr '2001:123:124::3'
 +
        option ip6assign '64'
 +
        option ip6hint '2001:123:124::'
 +
 +
config interface 'wan6'
 +
        option ifname '@wan'
 +
        option proto 'dhcpv6'
 +
 +
config globals 'globals'
 +
        option ula_prefix '2001:123:124::/64'
 +
 +
config interface 'MESH'
 +
        option _orig_ifname 'wlan0'
 +
        option _orig_bridge 'false'
 +
        option proto 'static'
 +
        option ipaddr '10.123.124.2'
 +
        option netmask '255.0.0.0'
 +
        option ip6addr '2001:123:124::2/128'
  
To solve the problem you should have only hna4 entries in
 
/var/etc/olsrd.conf.ipv4 and only hna6 entries in /var/etc/olsrd.conf
 
  
Here is my uci configuration. Let me know if you can reproduce the bug.
+
==/etc/config/wireless==
  
config olsrd
+
config wifi-device  radio0
      # uncomment the following line to use a custom config file instead:
+
        option type    mac80211
      #option config_file '/etc/olsrd.conf'
+
        option channel  1
 +
        option hwmode  11g
 +
        option path    'platform/ar231x-wmac.0'
 +
        option txpower  '20'
 +
        option htmode  'HT20'
 +
        # REMOVE THIS LINE TO ENABLE WIFI:
 +
        option disabled 0
 +
 +
config wifi-iface
 +
        option device 'radio0'
 +
        option encryption 'none'
 +
        option mode 'adhoc'
 +
        option bssid '02:CA:FF:EE:BA:BE'
 +
        option network 'MESH'
 +
        option ssid 'MESH'
  
      option IpVersion '6and4'
+
==/etc/config/ahcpd==
  
config Interface
+
package ahcpd
      list interface 'ninuxif'
+
config ahcpd
 +
        option 'mode' 'server'
 +
        list 'interface' 'br-lan'
 +
        list 'prefix' '2001:123:124::/64'
  
config 'Hna4'
 
      option 'netaddr' '192.168.1.0'
 
      option 'netmask' '255.255.255.0'
 
  
config 'Hna6'
+
==/etc/rc.local==
      option 'netaddr' '2002::'
 
      option 'prefix' '64'
 
  
 +
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 +
/etc/init.d/olsrd stop
 +
sleep 10
 +
killall olsrd
 +
killall olsrd
 +
/usr/sbin/olsrd -f /var/etc/olsrd.conf.ipv6 -nofork &
 +
/usr/sbin/olsrd -f /var/etc/olsrd.conf.ipv4 -nofork &
 +
 +
==Referensi==
 +
 +
* https://dev.openwrt.org/ticket/4803
 +
 +
 +
==Pranala Menarik==
 +
 +
* [[OpenWRT]]
 +
* [[OpenWRT: Download Firmware yang sudah jadi]]
 +
* [[OpenWRT: Source Repository Download]]
 +
* [[OpenWRT: Melihat Daftar Package]]
 +
* [[OpenWRT: Mengembalikan setting default Config.in]]
 +
 +
===Build Firmware===
 +
 +
* [[OpenWRT: Build Firmware]]
 +
* [[OpenWRT: Build Firmware Download Source Pendukung]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300N]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2]]
 +
* [[Buffalo]]
 +
* [[Buffalo: WZRHPG450H Cara Recovery]]
 +
* [[Buffalo: WZRHPG450H OpenWRT mengaktifkan setelah di flash]]
 +
* '''[[Buffalo: WZRHPG450H Membuat Firmware OpenWRT Sendiri]]''' '''RECOMMENDED'''
 +
* [[Buffalo: WZRHPG450H OpenWRT instalasi aplikasi Pendukung OLSRD]]
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStation2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStationM2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Build Firmware Mikrotik RB433]]
 +
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
 +
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
 +
* [[OpenWRT: Build Firmware untuk IPv6]]
 +
 +
===APRX===
  
  
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
 +
* [[OpenWRT: Setup APRX]]
  
==Referensi==
+
===IPv6===
 +
 
 +
* [[OpenWRT: IPv6]]
 +
* [[OpenWRT: mengaktifkan IPv6]]
 +
* [[OpenWRT IPv6: Build Firmware Linksys WRT160NL]]
 +
* [[OpenWRT IPv6: Build Firmware Linksys WRT160NL Tanpa WebGUI]]
 +
* [[OpenWRT IPv6: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT IPv6: Build Firmware Buffalo WZRHPG300NH2]]
 +
* [[OpenWRT IPv6: Setup tunnel ke tunnelbroker]]
 +
* [[OpenWRT IPv6: Konfigurasi]]
 +
* [[OpenWRT IPv6: Konfigurasi Sederhana]] '''RECOMMENDED'''
 +
* [[OpenWRT IPv6: Konfigurasi WAN6 dengan radvd]]
 +
* [[OpenWRT: Build Firmware untuk IPv6]]
 +
* [[OpenWRT IPv6: Konfigurasi OLSR 6and4]]
 +
 
 +
===Flash Firmware===
 +
 
 +
* [[OpenWRT: Flash Linksys WRT54GL]]
 +
* [[OpenWRT: Flash Linksys WRT160NL]]
 +
* [[OpenWRT: Flash Buffalo WZRHP450H]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Buffalo WZRHP300N]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation Loco M2]]
 +
* [[OpenWRT: Flash UBNT Bullet M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB450]]
 +
 
 +
===Misc===
 +
 
 +
* [[OpenWRT: CLI]]
 +
* [[OpenWRT: Setup WiFi]]
 +
* [[OpenWRT: Setup PPTP VPN Server]]
 +
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
 +
* [[OpenWRT: Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Setup OLSR Sederhana]]
 +
* [[OpenWRT: Setup OLSR via Web]] '''RECOMMENDED'''
 +
* [[OLSR - di OpenWRT]]
 +
* [[OpenWRT: 3G modem]]
 +
* [[OpenWRT: 3G modem dengan usb_modeswitch]]
 +
* [[OpenWRT: Build Firmware dengan 3G Modem Support]]
 +
* [[OpenWRT: Setup Firewall]]
 +
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
 +
* [[OpenWRT: OLSR nameservice plugin]]
 +
* [[OpenWRT: VLAN]]
 +
* [[OpenWRT: Multcast Forwarding]]
 +
 
 +
===UBNT===
  
* https://dev.openwrt.org/ticket/4803
+
* [[UBNT]]
 +
* [[UBNT: Teknik Recovery]]
 +
* [[UBNT: Upload Firmware]]
 +
* [[UBNT: Rebuild Firmware]]
 +
* [[UBNT: firmware dengan OLSR]]25
 +
* [[UBNT: openwrt]]
 +
* [[UBNT: olsr dengan openwrt]]
 +
* [[UBNT: olsr dengan kamikaze openwrt]]
 +
* [[UBNT: olsr dengan backfire openwrt]]
 +
* [[UBNT: UniFi]]
 +
* [[UBNT: UniFi Konfigurasi Awal]]
 +
* [[UBNT: UniFi Manajemen HotSpot]]
 +
* [[UBNT: OLSR Pembuatan Firmware]]
 +
* [[UBNT: OLSR Konfigurasi]]
 +
* [[OLSR - di UBNT]]
 +
* [[OLSR - di Ubuntu]]
 +
* [[OpenWRT]]
 +
* [[OLSR: NAT di UBNT dengan OLSR]]

Latest revision as of 08:19, 21 October 2014

Sumber: https://dev.openwrt.org/ticket/4803


Agar OLSR dapat beroperasi sekaligus untuk IPv4 & IPv6 kita harus menggunakan IpVersion '6and4'. Kita dapat mengedit file

/etc/config/olsrd

Misalnya, sebagai berikut

config olsrd
        # uncomment the following line to use a custom config file instead:
        #option config_file '/etc/olsrd.conf'
        option IpVersion '6and4'
        # option IpVersion '4'
        option FIBMetric 'flat'
        option LinkQualityLevel '2'
        option LinkQualityAlgorithm 'etx_ff'
        option OlsrPort '698'
        option Willingness '3'
        option NatThreshold '1.0'

config LoadPlugin
        option library 'olsrd_arprefresh.so.0.1'

config LoadPlugin
        option library 'olsrd_dyn_gw.so.0.5'

config LoadPlugin
        option library 'olsrd_txtinfo.so.0.1'
        option accept '0.0.0.0'

config Interface
        option ignore '0'
        option interface 'MESH'
        option Mode 'mesh'

config InterfaceDefaults
        option Mode 'mesh'

config Hna6
        option netaddr '2001:123:124::'
        option prefix '64'

config Hna6
        option netaddr '2001:123:124::2'
        option prefix '128'

config Hna4
        option netaddr '10.123.124.2'
        option prefix '32'


cocokan dengan kondisi jaringan anda :)

/etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config interface 'lan'
	option ifname 'eth0'
	option type 'bridge'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ip6prefix '2001:222:222:2::/64'
	option ip6addr '2001:222:222:2::1'

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

config globals 'globals'
	option ula_prefix '2001:222:222:2::/64'

config interface 'MESH'
	option proto 'static'
	option ipaddr '10.123.123.2'
	option netmask '255.0.0.0'
	option ip6gw '2001:123:123::2'
	option ip6prefix '2001:123:123::/64'
	option ip6addr '2001:222:222::2'

/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6addr '2001:123:124::3'
        option ip6assign '64'
        option ip6hint '2001:123:124::'

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

config globals 'globals'
        option ula_prefix '2001:123:124::/64'

config interface 'MESH'
        option _orig_ifname 'wlan0'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr '10.123.124.2'
        option netmask '255.0.0.0'
        option ip6addr '2001:123:124::2/128'


/etc/config/wireless

config wifi-device  radio0
        option type     mac80211
        option channel  1
        option hwmode   11g
        option path     'platform/ar231x-wmac.0'
        option txpower  '20'
        option htmode   'HT20'
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device 'radio0'
        option encryption 'none'
        option mode 'adhoc'
        option bssid '02:CA:FF:EE:BA:BE'
        option network 'MESH'
        option ssid 'MESH'

/etc/config/ahcpd

package ahcpd
config ahcpd
        option 'mode' 'server'
        list 'interface' 'br-lan'
        list 'prefix' '2001:123:124::/64'


/etc/rc.local

iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
/etc/init.d/olsrd stop
sleep 10
killall olsrd
killall olsrd
/usr/sbin/olsrd -f /var/etc/olsrd.conf.ipv6 -nofork &
/usr/sbin/olsrd -f /var/etc/olsrd.conf.ipv4 -nofork &

Referensi


Pranala Menarik

Build Firmware

APRX

IPv6

Flash Firmware

Misc

UBNT