I would like to try getting rid of the usb to ethernet adapter and use port 8 of the switch as my WAN port. (I understand switch need to come up, before openwrt)
With help of AI, I came up with below. If some one can help me validate it.
On my Switch I do below,
configure terminal
! Create WAN VLAN (10)
vlan 10
name "WAN"
untagged 8 <-- ISP modem
tagged 1 <-- Raspberry Pi trunk
exit
! Create LAN VLAN (20)
vlan 20
name "LAN"
untagged 2-7 <-- LAN device ports
tagged 1 <-- Raspberry Pi trunk
exit
! (Optional) Disable default VLAN 1 on trunk port
vlan 1
no untagged 1
exit
! Save configuration
write memory
I attempted this without any success. Last I tried was,
at switch side,
HP-2530-8G-PoEP# show running-config
Running configuration:
aruba-central disable
timesync sntp
sntp unicast
sntp server priority 1 216.239.35.4
ip default-gateway 192.168.0.2
interface 1
name "router"
exit
interface 2
name "ap"
exit
interface 3
name "pinas"
exit
interface 4
name "pi5server"
exit
interface 5
name "mypc"
exit
snmp-server community "public" unrestricted
vlan 1
name "DEFAULT_VLAN"
no untagged 1-5,8
untagged 6-7,9-10
ip address 192.168.0.5 255.255.255.0
exit
vlan 10
name "WAN"
untagged 8
tagged 1
no ip address
exit
vlan 20
name "LAN"
untagged 1-5
no ip address
exit
no tftp server
no dhcp config-file-update
no dhcp image-file-update
no dhcp tr69-acs-url
activate software-update disable
activate provision disable
The first answer was the right way. Use the eth0.N syntax. Do not make bridge-vlans. Do not try to mix tagged and untagged on the same port. In other words once you start with vlans, there should not be a plain eth0 anywhere in the config. The onboard NIC as well as USB adapter drivers have no problem with vlans.
Start up an AP with the built in wifi so you still have a way to log into the Pi if Ethernet breaks.
Configuration of an HPE switch is outside the scope of this forum.
(I know I am told many times switch configuration is outside the scope of this forum, but still if you could advice on overall VLAN plan is good)
Create vlan 10 for WAN with untagged 8 (I want to use port 8 of the switch for WAN) also add tagged 1 (port 1 of switch for raspberry pi 4’s in built eth0)
Create vlan 20 for LAN with untagged 2-7 (port 2 to 7 of switch for all my lan devices) and tagged 1 (port 1 of switch for raspberry pi 4’s in built eth0)
Then at openwrt side, /etc/network/config as below,
It is not necessary to create a new interface. Just change the Device on the existing wan to eth0.200 by typing that name into the bottom of the list, the same as you did for lan.
For that your switch would need an address on wan.
But if only your router handles the wan connection, how on earth should the switch end up with a global reachable ipv4 addresses?
Hopefully your switch only gets address on a management vlan. And IPv6 has the default rule that initially incoming connections are blocked.
Just because he has lots of clicks doesn't make him alright right.