How to set up first router in bridge mode so the second router also gets a public IP?

Hi all,
I have currently the following set up:
internet >> modem >> router 1 >> router 2
My modem has only 1 port which is connected to the WAN port of router 1. Router 2 is connected to LAN port 1 of router 1 with a static protocol.

My router 1 gets a public IP but is it possible to have the router 2 get the same public IP?

I have tried to change the protocol of the interface of LAN port 1 to DHCP client or PPPoE (same protocol as my WAN port) but I couldn't get internet from router 2.

Sure, by removing the 1st router.

Seeing from the internet, it kind of has, if you do som port forwards, and open the firewall.

1 Like

Not unless you turn router 1 into a switch - but no, both devices cannot possess the same IP assigned to its interface.

The previous replies are correct.

But what is your goal? Maybe you can achieve what you are looking to do without needing 2 routers with public IPs.

1 Like

Thanks all for your quick feedbacks.

To answer @psherman I have a device called DPN (decentralized VPN) which has to be set up between the modem and the router in order for all the computers connected to that router to benefit from the DPN network. However it doesn't work with ipv6 so it blocks all connection to ipv6 downwards.
So to avoid that issue, I have my computer connected to router 1 with ipv6 and have the DPN device connected to a LAN port of router 1 and a router 2 connected to that device to share the DPN to other computers/devices connected to that router 2. And when I need DPN on my main computer I switch it to router 2.
The problem is that for the DPN device to work well so I can see and connect to several tunnels over the world it needs to have a public IP address but with that option it only gets a private IP address.
So that is why I am trying to get a public IP address for that router 2.

@lleachii I was wondering if it was possible to keep router 1 as a router device for LAN ports 2-3-4, and have it like a switch/bridge for LAN port 1 where the router 2 would be connected to and have both public IP for then router 1 and router 2 (as I don't have a switch available to try)

Which device is OpenWrt?

You can disable IPv4/DHCPv4 client on WAN on the offending device and make a second port for WAN on router 1..(or vice versa)...the configs for another device I wouldn't know.

...but why do you want your location, etc. via IPv6 to be established if you're using a VPN?

router 1 has openwrt, router 2 is too old and is not supported.
So you mean I should disable IPv4/DHCPv4 client on WAN of the router 2 and make a second WAN on router 1?
How do I create a second WAN port on router 1? Should I simply go in interface and change the protocol of the port to PPPoE protocol? So I have 2 PPPoE WAN interfaces?

I need ipv6 for gaming as with ipv4 I get too much latency during peak hours... Else I would be happy using ipv4 the whole time :frowning:

It could be usefull if you can post the modelname of router 1...

Just speculating that Router 1 has a integrated switch which is managable by OpenWrt, the solution is extremly simple!

Remove one switch port on the LAN vlan and add it to the WAN vlan, than connect router 2 to the second WAN port on router 1 you just created. You can let all other settings default.

Sorry, I was under the assumption that you could get multiple public IP's from your ISP in first place but this is not possible. With my solution both routers their DHCP client would just fight for a single public IP!

Generally, no, it is not possible. However, you can ask your ISP if they have any such options (this will almost certainly cost you extra money). Business accounts often have this as a feature or add-on, residential accounts much less likely, but again, might be possible if you ask (and are willing to pay for it).

The model is this one : Buffalo WSR-2533DHPL
I think it has an integrated switch as described in the link though I never saw the "switch" option when I go in network (see picture).

How do I add the port 1 to the WAN?
Would that be as follows:
1- go in devices and create a bridge with port 4 (in fact it's 4 that I want to link but it doesn't matter much) and wan as described below:
2- go in interfaces of wan and change the device of the interface from wan to the bridge I created in 1

And the above 2 steps would make the trick?
Though it would depends if the ISP would give me 2 different public IP is that correct?

Most ISPs do not give a second IP. Did you ask your ISP?

What you've done there should, in theory work, but only if multiple IPs are provided. We'd have to see your complete config to know if you'd done it right... but it is all moot unless you get multiple IPs from your ISP.

I guess your router is using the newer DSA switch integration, therefor it may require an extra step to move ports between bridged interface group. Your first part is correct about enabling disabling port within a bridge group "br-lan + br-minig?", but I think you also have to set and or correct the vlan part of that port group "bridge vlan filtering". See wiki so that the tagged/untagged ports will not overlap between them:

@walterav @psherman
Thanks a lot both of you for your help!
It worked like a charm. The steps I did above in my last post worked out. I am getting 2 different public IP address from my ISP. I don't know it that is normal or if I am simply lucky but with a single and same PPPoE identifying I am now having both routers with 2 different public IP addresses :slight_smile:

Very interesting so you even run 1 single PPPoE account on each device, maybe its only authenticating on one and the other does dhcpclient only?

In the past I had access to an ISP that did 802.11x wired authentication and if one client did authenicate, all other routers/virtualmachine with own mac address on same switch/bridging could just do dhcp-client for their own public ip.

Maybe for your own testing purpose or insight, could you add a 3rd port to your wan-switch/bridge group. Than directly connect your PC on that with dhcp-client or PPPoE and see if you get a 3rd public IP?

I'm glad that you have a working solution, but I wonder if you are not overcomplicating things a bit?
It seems to me that the original problem is that the DPN (distributed VPN client) on router 2 blocks IPv6, which causes unacceptable latency (because any gaming traffic over IPv4 is going over the DPN?).
So if we could solve THAT problem, the additional router and WAN bridging, second PPPoE IP address from the ISP, etc could all be avoided.
It seems like there could be two approaches to this. Either identify the IPv4 traffic that is used for gaming, and exclude that from going over the DPN, or else figure out why the IPv6 traffic is being blocked. In order to do so, you would need to provide more information about the game (and the servers that it wants to talk to, the protocol that is used - primarily the ports in use, etc).

Thank Rogan for your message.
I believe the game is only using ipv4 addresses for the servers and my big bet for the issues I am having is I think that the new ISP I changed to doesn't have much servers with ipv4 addresses available which at the end probably reroutes me and I am getting a high ping out of it. Using now my router in cross pass (ipv4 over ipv6) I am getting a much better ping even in time of congestion since I am using ipv6 between my ISP server and my home. So at the end the only solution to have a good ping for me now is to use ipv6 for that game.

@walterav I did got a 3rd public IP by the way.

1 Like

Ok, so if the problem is needing to use IPv6 for specific traffic rather than IPv4, why not try figure out why router1 is blocking IPv6?

Router 1 is not blocking ipv6 but the VPN device is (which is not configurable).
So I had to set it up after router 1 before another router 2. So now I connect to router 1 for gaming and router 2 when I need to access VPN. And I needed to get an public IP for router 2 which worked out setting one router 1 port as bridge.

Ah, if the VPN device is not configurable, then you need to come up with creative solutions. Sounds like you have already done that, so congratulations. I was just wondering if there was a way to do it without the additional router, but it appears not!