Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: #1461
    ezaluzec
    Participant

    You can try to update your /etc/network/interfaces file with the following code snippet to enable the wan, lan0, lan1 interface ports. This way you won’t have to re-build for systemd.

    auto lo br0
    iface lo inet loopback
    
    allow-hotplug eth0
    iface eth0 inet manual
    
    allow-hotplug lan0
    iface lan0 inet manual
    
    allow-hotplug eth1
    iface lan1 inet manual
    
    iface br0 inet dhcp
    bridge_ports lan0 lan1 wan

    With my current systemd-networkd configuration, I am able to plug-in an Ethernet cable between the wan, lan0, & lan1 ports and my network connection is retained. When switching ports, I get the following output:

    root@espressobin:~# [  571.902010] dsa dsa@0 wan: Link is Down
    [  571.905604] br0: port 3(wan) entered disabled state
    [  579.018470] dsa dsa@0 lan0: Link is Up - 100Mbps/Full - flow control rx/tx
    [  579.025461] IPv6: ADDRCONF(NETDEV_CHANGE): lan0: link becomes ready
    [  579.039239] br0: port 2(lan0) entered blocking state
    [  579.044227] br0: port 2(lan0) entered forwarding state  

    Since my network ports are bridged with the bridge set to DHCP and all the network interface ports are on the same nic, the IP address is the same when switching between interfaces. I’m able to configure the bridge to a static IP address. There may be a way to set a different static address to the bridge depending on which network interface port is connected, but I am unfamiliar with how to correctly set-up that kind of network configuration. My first thought would be to look at defining a udev rule to handle this, but there may be a better option. Let me know if you are able to get a different ip address for each interface, I’d be interested to see how the network is configured.

    in reply to: #1459
    ezaluzec
    Participant

    Hey @clem_ent,
    I wanted to share the configuration trick that I used to establish a network connection with espressobin.

    First, the Marvell Yocto project is not based off Yocto’s poky distro, but from O.S. Software System’s distro named oel. You can see this under meta-marvell-distro/conf/distro/marvell.conf https://code.ossystems.com.br/gitweb?p=meta-ossystems-base.git;a=blob;f=conf/distro/include/oel.conf;h=a87da9b9cf2958b60f04df8ea96f39ba44f83d27;hb=refs/heads/krogoth

    I mentioned the distro, because it looks like the oel distro uses SysVInit as the start up service for their Linux images. My configuration trick is for Systemd, but the changes can be implemented to /etc/network/interfaces file for SysVInit.

    Under /etc/systemd/network, I added the following network files:

    root@espressobin:/etc/systemd/network# ls -al
    total 32
    drwxr-xr-x    2 root     root          4096 Jan 23 18:14 .
    drwxr-xr-x    5 root     root          4096 Jan  4 21:39 ..
    -rwxr-xr-x    1 root     root            30 Jan  4 21:50 10-br0.netdev
    -rwxr-xr-x    1 root     root            38 Jan  4 21:50 10-br0.network
    -rwxr-xr-x    1 root     root            40 Jan  4 21:50 10-eth0.network
    -rwxr-xr-x    1 root     root            40 Jan  4 21:50 10-lan0.network
    -rwxr-xr-x    1 root     root            40 Jan  4 21:50 10-lan1.network
    -rwxr-xr-x    1 root     root            40 Jan  4 21:50 10-wan.network
    
    10-br0.netdev
    	[NetDev]
    	Name=br0
    	Kind=bridge
    	
    10-br0.network
    	[Match]
    	Name=br0
    
    	[Network]
    	DHCP=ipv4
    
    10-eth0.network	
    	[Match]
    	Name=eth0
    
    	[Network]
    	DHCP=ipv4
    	
    10-lan0.network
    	[Match]
    	Name=lan0
    
    	[Network]
    	Bridge=br0
    
    10-lan1.network
    	[Match]
    	Name=lan1
    
    	[Network]
    	Bridge=br0
    
    10-wan.network
    	[Match]
    	Name=wan
    
    	[Network]
    	Bridge=br0

    Output:

    Poky (Yocto Project Reference Distro) 2.1.2 espressobin ttyMV0
    
    espressobin login: root
    root@espressobin:~# ifconfig
    br0       Link encap:Ethernet  HWaddr 12:51:A9:78:CB:23
              inet addr:10.207.15.91  Bcast:10.207.15.255  Mask:255.255.255.0
              inet6 addr: fe80::1051:a9ff:fe78:cb23%4820736/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:212 errors:0 dropped:4 overruns:0 frame:0
              TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:27150 (26.5 KiB)  TX bytes:2530 (2.4 KiB)
    
    eth0      Link encap:Ethernet  HWaddr 00:51:82:11:22:00
              inet6 addr: fe80::251:82ff:fe11:2200%4820736/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:213 errors:0 dropped:0 overruns:0 frame:0
              TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:532
              RX bytes:32002 (31.2 KiB)  TX bytes:6767 (6.6 KiB)
              Interrupt:105
    
    lan0      Link encap:Ethernet  HWaddr 00:51:82:11:22:00
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    lan1      Link encap:Ethernet  HWaddr 00:51:82:11:22:00
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
             [   33.226842] random: nonblocking pool is initialized
     TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1%4820736/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:172 errors:0 dropped:0 overruns:0 frame:0
              TX packets:172 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1
              RX bytes:13324 (13.0 KiB)  TX bytes:13324 (13.0 KiB)
    
    wan       Link encap:Ethernet  HWaddr 00:51:82:11:22:00
              inet6 addr: fe80::251:82ff:fe11:2200%4820736/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:213 errors:0 dropped:1 overruns:0 frame:0
              TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:27316 (26.6 KiB)  TX bytes:3651 (3.5 KiB)
    
    root@espressobin:~# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8): 56 data bytes
    64 bytes from 8.8.8.8: seq=0 ttl=51 time=34.594 ms
    64 bytes from 8.8.8.8: seq=1 ttl=51 time=31.043 ms
    ^C
    --- 8.8.8.8 ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 31.043/32.818/34.594 ms
    root@espressobin:~#

    Some links to espressobin wiki pages on network configs
    http://wiki.espressobin.net/tiki-index.php?page=Ubuntu+-+initial+network+configuration
    http://wiki.espressobin.net/tiki-index.php?page=OpenWrt+-+initial+network+configuration
    https://github.com/MarvellEmbeddedProcessors/linux-marvell/wiki/Linux-Porting-Guide#ethernet-configuration

    If you’d like to learn how to re-build your Marvell Yocto project with systemd, I can share these build configuration changes but then you may be outside the realm of marvell yocto support.

    Cheers.

Viewing 2 posts - 1 through 2 (of 2 total)
Signup to our newsletter

Technical specification tables can not be displayed on mobile. Please view on desktop