How to set up new bridged interfaces on SuSE 11.4?

Hi all,

I need to set up 3 extra bridged interfaces on a SuSE 11.4 machine. It is very easy in Ubuntu 11.04 - I just add the relevant entries in /etc/network/interfaces.

For instance, an interface called public, IP (addresses obfuscated to 1xx)…

iface public inet static
 address 1xx.18.1.1
 netmask 255.255.255.0
 pre-up brctl addbr public
 post-up brctl setfd public 5 && echo 1 > /proc/sys/net/ipv4/ip_forward && iptables -t nat -A POSTROUTING -s 1xx.18.1.0/24 -j MASQUERADE
 post-down brctl delbr public && iptables -t nat -D POSTROUTING -s 1xx.18.1.0/24 -j MASQUERADE

On Ubuntu, I add the above code to the interfaces file and add an auto entry (auto lo eth0 public management ) so it starts at boot, run “ifup public”, and the work is done.

I cannot find a way to do this OpenSuSE at all. There is no /etc/network/interfaces file, and the structure is totally different from Ubuntu. I have installed the bridge utilities. Can anyone tell me how to make it work in SuSE?

Thanks,

Paul

On 27.10.2011 15:16, phands wrote:
>
> Hi all,
>
> I need to set up 3 extra bridged interfaces on a SuSE 11.4 machine.
>
> I cannot find a way to do this OopenSuSE at all.

Go YaST >Network Devices > Network Settings.

Vahis

http://waxborg.servepics.com
openSUSE 11.4 (x86_64) 2.6.37.6-0.7-default main host
openSUSE 12.1 RC 1 (x86_64) 3.1.0-rc9-1-desktop in VirtualBox
openSUSE 11.4 (i586) 3.0.7-45-desktop “Tumbleweed” in EeePC 900

Hi Vahis,

Thanks for the reply, but I couldn’t get it to work in YaST…that’s why I was trying to find out what the details are.

Paul

On 27.10.2011 19:16, phands wrote:
>
> Hi Vahis,
>
> Thanks for the reply, but I couldn’t get it to work in YaST.

What do you mean by “couldn’t get it to work in YaST”?

What did you do?
What did you see?
What did not work?

If you have operational wired NICs attached to your machine I’m sure
YaST cab configure them.

You obviously need to something with the Firewall also but that another
thing.

Vahis

http://waxborg.servepics.com
openSUSE 11.4 (x86_64) 2.6.37.6-0.7-default main host
openSUSE 12.1 RC 1 (x86_64) 3.1.0-rc9-1-desktop in VirtualBox
openSUSE 11.4 (i586) 3.0.7-45-desktop “Tumbleweed” in EeePC 900

Hi again,

I’m in yast2 network devices right now, and I don’t even know where to begin, I’m sorry to say. I can add a new device, of type bridge, but after that, I’m lost. I can’t even see how to give it a name, like “public”, instead of br0.
Firewall is off, so that isn’t an issue.

Well … you can install vmscripts, as described at the top of this thread: Running Linux live CDs in disk-less virtual machines under VirtualBox, then as root type

nat2bridge

without argument, to create a bridge on the default network interface. To remove the bridge, type:

bridge2nat

These scripts are intended to convert kvm virtual machines from nat to bridge and back, but they can be used to create and destroy bridges. Although I guess this is not the answer you expected, but it should create a bridge if that’s all you want.

  • Oh sorry, I didn’t read the question again. You actually have a bridge. Why would you change the name of the bridge? I’m not sure it’s possible.

Hmmm. … If you install vmscripts, you’ll find the file /usr/bin/vm-bridge (nat2bridge and bridge2nat are actually hardlinks of this file). Open /usr/bin/vm-bridge as root with a text editor and change the value of DEFAULT_BRIDGE to whatever you like (‘public’ in the example above).

# variables you may change
# DEFAULT_BRIDGE=br0 		# default bridge
DEFAULT_BRIDGE=public	        # default bridge
DEFAULT_ETH=eth0 	        # default nic

Save this file and type

nat2bridge

Now you should have a bridge called ‘public’.