Hi,
I am developing an AP based on the IPQ50xx development kit. This kit includes 1GE integrated Ethernet PHY and 4 x 1 Gbps GE Ethernet LAN ports based on the S17c switch via the SGMII interface.
The Software User Guide mentions that the kit assigns eth0 using the internal PHY as the WAN interface, and eth1 connected to the switch as the LAN interface (the other 3 ports are not used), shown in the picture below.
When reading the (original) uci-defaults/network file, I see that it is set like this:
ucidef_add_switch "switch0"
ucidef_set_interfaces_lan_wan "eth1" "eth0"
ucidef_add_switch "switch1" "1" "0"
I am confused here:
- Are switch0 and switch1 representing the internal port and S17c switch, respectively?
- Does the last line mean that the AP's WAN port will "connect" to port 0 of switch1 and similarly, the LAN port will "connect" to port 1?
- And if the above two are correct, why does the user guide say that the WAN interface is connected to the internal PHY (switch0 in this case)?
- Besides, the AP that I am developing is required that: DO NOT use the internal PHY and USE all 4 channels of the switch (1 of WAN and 3 of LAN interface). Are my settings below correct?
ucidef_add_switch "switch0"
ucidef_set_interfaces_lan_wan "eth3 eth2 eth1" "eth0"
ucidef_add_switch "switch1" "3 2 1" "0"
Sorry if my questions are too basic, I've searched for information about the uci-defaults setting but nothing really clear about ucidef_*.
Any information is highly appreciated. Thanks!