Bpi-r3 isolation wan and lan eth

Hy :slight_smile: I do the command ethtool for the two sfp and i have a difference in the result :

Current message level: 0x000000ff (255)
                       drv probe link timer ifdown ifup rx_err tx_err

it appears for sfp wan ( which doesn’t work). Is it an error?

ethtool eth1 
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                1000baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
                                1000baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 22
        Transceiver: external
        MDI-X: Unknown
        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err
        Link detected: no



ethtool lan4
       Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                1000baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                1000baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 10Mb/s
        Duplex: Half
        Auto-negotiation: off
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes


ethtool -i lan4
driver: dsa
version: 6.1.0-rc1-diagbox
firmware-version: N/A
expansion-rom-version:
bus-info: platform
supports-statistics: yes
supports-test: yes
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

# ethtool -i eth1
driver: mtk_soc_eth
version: 6.1.0-rc1-diagbox
firmware-version:
expansion-rom-version:
bus-info: 15100000.ethernet
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

Have you applied the fix for sfp1 properties?

Your autoneg state,speed,duplex for lan-sfp is wrong…

Hy,

Yes i have the patch applied.

For the lsfp lan output, i token the wroong one, without sfp into.

Here the good one, with sfp rj45 :slight_smile:

Settings for lan4:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                1000baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                1000baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Half 1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 22
        Transceiver: external
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes

I i have good understood, every itnerfaces are conencted to mt7531ae except the sfp wan which is directly to mt7986a,isn’t it?

mt7986 have 2 gmac (one to switch-chip, one to wan-sfp)

https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r3:start#network_connections

I tried to put a static address to sfp wan

Here the interface config files :

iface wan inet static <== ETH WAN address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1

iface eth1 inet static <== SFP WAN address 192.168.1.101 netmask 255.255.255.0 gateway 192.168.1.1

iface lan4 inet static <== SFP LAN address 192.168.1.102 netmask 255.255.255.0 gateway 192.168.1.1

For the sfp lan and eth wan, it works. I can ping the gateway and the web (8.8.8.8)

But when i ifup the sfp wan (eth1), i have an error :

ifup eth1

Error: either “local” is duplicate, or “/24” is a garbage. [ 1155.033048] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/sgmii link mode Error: Nexthop has invalid gateway.

[ 1155.272390] mtk_soc_eth 15100000.ethernet eth1: PHY [i2c:sfp-1:16] driver [Marvell 88E1111] (irq=POLL)

Yes because your device does not know where to send out the paket (eth1 or your lan)…every interface needs an own subnet configured…if multiple interfaces need same subnet you have to use a bridge. Everything else is not clean setup. And your current setup is a security mess…lan and wan in same subnet

I forgotten to Say that i ifup one interface at a Time, ro test. Lan will be in a bridge(4 RJ45,sfp lan and 2 wlan).

then you have to set the bridge down (where you have set the ip address), not the lan-interfaces.

how about you ethernet-wan-port which is also same subnet?

and you have an syntax-error somewhere for the eth1 port…

Error: either “local” is duplicate, or “/24” is a garbage.

so please post full config

Hy :slight_smile:

At the boot, i have a script which create the bridge and up all the lan.

brctl addbr br0
brctl addif br0 lan0
brctl addif br0 lan1
brctl addif br0 lan2
brctl addif br0 lan3
brctl addif br0 lan3

ifup lan0
ifup lan1
ifup lan2
ifup lan3
ifup lan4
ifup br0
ifup eth0

Here my full interface conf :

> auto lo
> iface lo inet loopback
> 
> #Lan
> iface br0 inet static
>   address 10.0.0.2
>   netmask 255.255.255.0
> 
> iface eth0 inet manual
>   hwaddress ether 00:00:22:33:44:50
>   
> iface lan0 inet manual
>   hwaddress ether 00:00:22:33:44:50
>   
> iface lan1 inet manual
>   hwaddress ether 00:00:22:33:44:50
>   
> iface lan2 inet manual
>   hwaddress ether 00:00:22:33:44:50
>   
> iface lan3 inet manual
>   hwaddress ether 00:00:22:33:44:50
>   
> iface lan4 inet manual
>   hwaddress ether 00:00:22:33:44:50
> 
>   #Wan
> iface wan inet manual
> 
> iface eth1 inet static
>   address 192.168.1.101
>   netmask 255.255.255.0
>   gateway 192.168.1.1

And i wake up the wan manually :

ifup eth1

lan4 = sfp lan eth1 = sfp wan wan = eth wan

interface file looks right, but somewhere you have “local” and “/24” which causes error above when eth1 is set to up (if-up-script?)

I have deleted and re created my interfaces conf.

Error doesn’t appear :slight_smile:

when i ifup wan i have :

ifup wan

[ 60.167307] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode [ 60.175676] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx [ 60.176391] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode [ 60.195650] mt7530 mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control off

And when i ifup sfp wan

ifup eth1

[ 99.766208] mtk_soc_eth 15100000.ethernet eth1: configuring for inband/2500base-x link mode udhcpc: started, v1.32.0 [ 99.835614] mtk_soc_eth 15100000.ethernet eth1: switched to inband/sgmii link mode udhcpc: sending discover [ 100.022419] mtk_soc_eth 15100000.ethernet eth1: PHY [i2c:sfp-1:16] driver [Marvell 88E1111] (irq=POLL)

driver parsed is okay?

One seperate question :

Can we use the ethernet wan with 2.5gbps, even if we must damn others rj45? Or it is blocked to 1gpbs

switch-user-ports only support 1G, only SFPs (gmac1 + switch port5) supporting 2g5 as they supporting sgmii

Thank you to answer me. :slight_smile:

News about my sfp wan problem :slight_smile:

When i use command line ethtool, i see this lines :

SFP RJ :

        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err


SFP LC nokia :

        Current message level: 0x00000001 (1)
                               drv

SFP LC MRV :

        Current message level: 0x00000001 (1)
                               drv

SFP GPON ONU FS 

        Current message level: 0x000000ff (255)
                               drv probe link timer ifdown ifup rx_err tx_err

is it error ? I haven’t it with sfp lan