Reply
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

how to bridge eth2 to eth0

i have all my settings set up on my lan so eth0 is the lan port.

i want to bridge the eth2 port to it.


i just spent about 2 hours playing with it before i posted.


created alot of problems. if i had 5 ports would probably be easier but i only have 3 and i need connection to hold on 2 ports while i do this. 1 for wan 1 for lan. theoretically i just switch my WAN to lan temporaririly but i dont wanna and this will be last resort.

any suggestions on how to easily bridge eth2 to eth0. remember i need to keep my connection on eth0 the entire time to apply the settings. so i can't just bridge them with a simple setting because it will say eth0 is in use....

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 569
Registered: ‎04-18-2013
Kudos: 338
Solutions: 45

Re: how to bridge eth2 to eth0

You will need to remove the IP address from the eth0 interface, then add the address to a bridge interface (along with whatever settings you need for it) and add eth0 and eth2 into the bridge.. Something like this:

#remove address from eth0
delete interfaces ethernet eth0 address 192.168.1.1/24
#add address to br0
set interfaces bridge br0 address 192.168.1.1/24
#bind eth0 and eth2 to br0
set interfaces ethernet eth0 bridge-group bridge br0
set interfaces ethernet eth2 bridge-group bridge br0
commit

 

 

Established Member
Posts: 1,043
Registered: ‎02-17-2014
Kudos: 385
Solutions: 40

Re: how to bridge eth2 to eth0

After entering 'commit', you may lose connection to the router briefly.  If so, you should be able to log back in after a few seconds.

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: how to bridge eth2 to eth0

id like to try thrca's suggestion but i can't because i can't take the risk it doesnt work. how do i know everything will just work perfect?

T1200 - ERX - UAP - R7000 - WEB6000Q
Established Member
Posts: 871
Registered: ‎12-10-2009
Kudos: 186
Solutions: 16

Re: how to bridge eth2 to eth0

Well nothing is guaranteed.

But the commands given are correct and should work.

Dont do a save after the commit and if it fails a quick reboot of the router will get you back to where you were.

If everything is ok after the commit then you can issue the save.

 

Mark

Previous Employee
Posts: 10,504
Registered: ‎06-09-2011
Kudos: 3113
Solutions: 945
Contributions: 16

Re: how to bridge eth2 to eth0


ConnorM wrote:

id like to try thrca's suggestion but i can't because i can't take the risk it doesnt work. how do i know everything will just work perfect?


For changes like this where you might get cut off, you could try using "commit-confirm".

stig@EdgeOS-room# commit-confirm 3
commit-confirm will automatically reboot in 3 minutes unless confirmed
Proceed? [confirm]

 If the commit is ok then you type "confirm" and your done.  If you can't type "confirm" before the deadline it will reboot with the last config.

EdgeMAX Router Software Development
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: how to bridge eth2 to eth0

[ Edited ]

didnt work. IMO there should be a simple way to do something like this

i believe i need to commit this command "delete interfaces ethernet eth0 address 192.168.1.1/24"

before commiting the other commands. instead of at the same time.......

Welcome to EdgeOS
admin@ERL:~$ configure
[edit]
admin@ERL# delete interfaces ethernet eth0 address 192.168.1.1/24
[edit]
admin@ERL# set interfaces bridge br0 address 192.168.1.1/24
[edit]
admin@ERL# set interfaces ethernet eth0 bridge-group bridge br0
[edit]
admin@ERL# set interfaces ethernet eth2 bridge-group bridge br0
[edit]
admin@ERL# commit-confirm 3
commit-confirm will automatically reboot in 3 minutes unless confirmed
Proceed? [confirm][y]
[ interfaces ethernet eth0 ]
Cannot configure address on bridged interface

[ interfaces ethernet eth2 bridge-group ]
Adding interface eth2 to bridge br0

Commit failed
[edit]
admin@ERL#
Broadcast message from root@ERL (Mon Jun  2 14:43:03 2014):

The system is going down for reboot NOW!

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: how to bridge eth2 to eth0

[ Edited ]

ok i was able to solve this for the most part but i still have 1 question about the firewall config

what i did to get it to work was

1.set eth2 to 192.168.2.1/24, commit.

set my laptop to 192.168.2.100, 255.255.255.0, 192.168.2.1 default gateway

logged into the router via webui and telnet on 192.168.2.1 @eth2 

delete eth0 config.

create bridge and add eth0

commit

switch back to eth0 with default settings. then i was able to add eth2

now i am having some odd issues with throughput but they are not major.

T1200 - ERX - UAP - R7000 - WEB6000Q
Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: how to bridge eth2 to eth0

[ Edited ]

nvm

T1200 - ERX - UAP - R7000 - WEB6000Q
Emerging Member
Posts: 63
Registered: ‎02-02-2015
Kudos: 20

Re: how to bridge eth2 to eth0

Old thread, but I'm having the same issue with the latest firmware (1.9.7+4):

I need a way to remove the management IP from eth0 and apply it to the bridge while adding eth0 to said bridge.

# delete interfaces ethernet eth0 address 192.168.1.1/24
# set interfaces bridge br0 address 192.168.1.1/24
# set interfaces ethernet eth0 bridge-group bridge br0
# commit
[ interfaces ethernet eth0 ]
Cannot configure address on bridged interface

 

Emerging Member
Posts: 63
Registered: ‎02-02-2015
Kudos: 20

Re: how to bridge eth2 to eth0

Figured this out too! If you commit from the edit interface level, it runs the commands in the right order. Might be a better way of doing this, but I can't find anything inthe EdgeMax or VyOS docs.

 

configure
set system offload hwnat enable # For hardware that supports it
set interfaces bridge br0 address 192.168.1.1/24
delete interfaces ethernet eth0 address 192.168.1.1/24
edit interfaces ethernet eth0
set bridge-group bridge br0
commit
exit
set interfaces ethernet eth1 bridge-group bridge br0
set interfaces ethernet eth2 bridge-group bridge br0
set interfaces ethernet eth3 bridge-group bridge br0
set interfaces ethernet eth4 bridge-group bridge br0
set interfaces ethernet eth5 bridge-group bridge br0
commit
save
exit
Established Member
Posts: 816
Registered: ‎09-24-2017
Kudos: 159
Solutions: 65

Re: how to bridge eth2 to eth0

On the ER-X, you can actually use the swtich chip and VLANs to perform the same function as a bridge, but without any CPU overhead. The non-switch based devices obviously require a bridge.

Reply