OpenWRT: Setup OVA supaya eth0 WAN sisanya LAN

From OnnoWiki
Jump to navigation Jump to search

Edit

board.d/01_leds:
  ucidef_set_led_netdev "wan" "WAN" "apu2:green:led3" "eth0"
  ucidef_set_led_netdev "wan" "WAN" "apu2:green:led3" "eth0"

Edit

board.d/02_network:
  ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
  ucidef_set_interface_lan "eth1 eth2"
  macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null


board.d/99_default_network
  ucidef_set_interface_lan 'eth1'
  [ -d /sys/class/net/eth0 ] && ucidef_set_interface_wan 'eth0'


Edit

board.json:
{
        "model": {
                "id": "innotek-gmbh-virtualbox",
                "name": "innotek GmbH VirtualBox"
        },
        "network": {
                "lan": {
                        "ifname": "eth1",
                        "protocol": "static"
                },
                "wan": {
                        "ifname": "eth0",
                        "protocol": "dhcp"
                }
        }
}


Edit

config/network:
config interface 'lan'                         
        option type 'bridge'                   
        option ifname 'eth1 eth2 eth3'
        option proto 'static'         
        option ipaddr '192.168.1.1'   
        option netmask '255.255.255.0'
        option ip6assign '60'         
                                      
config interface 'wan'                
        option ifname 'eth0' 
        option proto 'dhcp' 
                            
config interface 'wan6'     
        option ifname 'eth0'
        option proto 'dhcpv6'


Reboot

reboot


Pranala Menarik