On 10/29/2013 01:31 PM, Gui Iribarren wrote:
I'm trying to get a macvlan interface brought up by netifd
on last week openwrt trunk
BARRIER BREAKER (Bleeding Edge, r38505)
with netifd - 2013-10-19-566af724dad393fa127e07469dcc9ade62bd3a75

and i'm probably missing something very silly, but i'm not getting any
reaction or error whatsoever. The whole network.lm_anygw=device  is ignored

root@48cf6b:~# uci show network
network.loopback=interface
network.loopback.ifname=lo
network.loopback.proto=static
network.loopback.ipaddr=127.0.0.1
network.loopback.netmask=255.0.0.0
network.lan=interface
network.lan.type=bridge
network.lan.proto=static
network.lan.netmask=255.255.255.0
network.lan.ip6addr=2A00:1508:1:F820:0:0:48:CF6B/64
network.lan.ipaddr=192.168.11.107
network.lan.ifname=eth0
network.wan=interface
network.wan.proto=dhcp
network.wan6=interface
network.wan6.ifname=@wan
network.wan6.proto=dhcpv6
network.@switch[0]=switch
network.@switch[0].name=switch0
network.@switch[0].reset=1
network.@switch[0].enable_vlan=1
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device=switch0
network.@switch_vlan[0].vlan=1
network.@switch_vlan[0].ports=0 1 2 3 4
network.lm_anygw=device
network.lm_anygw.type=macvlan
network.lm_anygw.name=anygw
network.lm_anygw.ifname=eth1
network.lm_anygw.macaddr=aa:aa:aa:40:28:b5

root@48cf6b:~# ubus list
log
network
network.device
network.interface
network.interface.lan
network.interface.loopback
network.interface.wan
network.interface.wan6
service
system

ah! i'm getting *somewhere*, although not sure where

root@48cf6b:~# ubus call network.device status '{ "name": "anygw" }'
{
        "external": false,
        "present": true,
        "type": "MAC VLAN",
        "up": false,
        "parent": "eth1",
        "statistics": {
                
        }
}

so it seems it is actually recognizing the config section, but not bringing the device up for some reason?

right, i was missing a 'config interface' that would actually reference the new device
i.e.

network.if_anygw=interface
network.if_anygw.ifname=anygw
network.if_anygw.proto=static
network.if_anygw.ip6addr=2A00:1508:1:F820:0:0::1/64

now..

root@48cf6b:~# ip a s anygw
8: anygw@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default
    link/ether aa:aa:aa:40:28:b5 brd ff:ff:ff:ff:ff:ff
    inet6 2a00:1508:1:f820::1/64 scope global tentative
       valid_lft forever preferred_lft forever

nice!

thanks a lot jow/nbd for the code, and the help!

cheers,

gui




i even tried the following, with same result (nothing)
network.wan.ifname=eth1
network.lm_anygw.ifname=@wan

no new / error messages in logread, nothing.
daemon.notice netifd: Interface 'lan' is now up
daemon.notice netifd: Interface 'loopback' is now up

and i couldn't find how to turn netifd into something more verbose...

any further help will be greatly appreciated, and i promise updating the
wiki in return :)

cheers!
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to