I've given the ISP router a static IP 192.168.2.1 and disabled it's DHCP server.
I've got it working by making LAN port 4 of the Belkin a second WAN port and connecting it to the WAN port of the ISP router, both routers get a different public IP address from my ISP and internet and VOIP works.
Not sure I should be getting two public IP addresses but at the moment it's working at the cost of half my lines speed.
My original idea was to create a new interface with a static IP 192.168.3.1 in the Belkin, a DHCP server on that interface and tag LAN port 4 with id 20 but Openwrt doesn't let you tag two ports with the same VLAN id.
I've tried a few other configs but without success.
You can't do that. The switch considers only the VLAN tag of a packet to decide how to switch it. So you can't have it send some VLAN20 packets out one port and some out another.
Maybe install a USB Ethernet adapter then you can specify eth1.20 for the phone traffic.
can you change the isp's router to ether turn off it's vlan tagging or change it's ID to something other then 20
if so you can get it to work
then you may have to see if the voip side will be effected but double NAT
The simplest way to enable routing between the two VLANs to simply connect an additional port from each VLAN into a Router. The Router doesn't know that it has two connections to the same switch — nor does it need to. The Router operates like normal when routing packets between two networks.
It's not really clear to me what you're trying to accomplish. Would you be able to describe what is on the cable coming from your ISP and what you want to go where?
please make sure that the openwrt router has a different lan subnet to the isp's router
say 192.168.2.x for openwrt & 192.168.1.x for the isp's
if the basic internet works on the isp's router & the phone isn't then
ether the phone interface "ATA" won't work as behind another NAT
or maybe ATA and internet are on different VLANS or something to the internet
My ISP supplies a direct fiber line which goes to their ONT, to the ONT's only port their router/ATA box is connected, my home's phone line goes to the rj12 phone port on the ISP router.
I have to leave in place the ONT which isn't a problem but if I replace the ISP router with my Belkin I lose my home phone line and I wanted to keep it if possible.
So they're both on the same VLAN coming in to your router, yes?
If so, then you'd probably need to be able to distinguish between them at a packet level to be able to "split" them off from one another. Your ISP-supplied device probably does this by having a "listener" there, so it grabs the traffic for the VOIP before routing the rest.
While I can think of ways to sort of do it, it becomes complicated if there are devices in your own network that use similar protocols. Without knowing just what those packets look like, there's a lot of speculation involved.
Ultimately, I think you need a device with the ports that are separate (or separable) from the switch. It is likely that the Belkin unit has all 5 ports on the same switch. This means that any VLANs configured on the switch (which is all ports in this case) are switched, not routed, so if you define VLAN20 to operate on the physical port associated with the WAN and also on the physical port(s) on the LAN, it essentially acts as a pass-through, rather than 2 independent routed networks. In the case of the EdgeRouter configs, the relevant ports are removed from the switch so that each acts as a fully routed port and can have the same VLAN IDs on multiple ports that are actually different networks, rather than a pass-through.
If you have an extra router or smart/managed switch around, a hack would be set the network as untagged out of the Belkin (OpenWrt) and PVID = 20 (i.e. untagged frames associated with VLAN 20) on the second device. On another port on the second device, connect your ultimate target to a port that has been configured with tagged VLAN 20. You might want to configure a separate VLAN (using a different ID than 20, but to be transformed to VLAN 20 via the second device) on your OpenWrt Belkin device and then send that out untagged as described before.
Or you could do a double-NAT config and achieve something similar. Or do this with a device that has individually routed ports accessible at the user level (rather than all via the same switch).