SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ive been testing around Slackware 14.1 in a VM as preparing to move my server from CentOS to Slackware (thank god CentOS/RHEL don't touch upstream configuration...unlike other distros such as debian...transitioning is very easy because of this). Anyway, I am not entirely sure I can properly test a bridged interface in Virtualbox so I am looking for someone to provide me an example of briding the eth0 interface. The way I do it in CentOS 6.6 is as such (maybe it is similar?)
/etc/sysconfig/network-scripts/ifcfg-eth0
Code:
DEVICE="eth0"
BOOTPROTO=none
BRIDGE="br0"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="UUIDHERE"
# Do not assign IP here when br0 is active
#IPADDR=192.168.1.10
PREFIX=24
GATEWAY=192.168.1.12
DNS1=104.237.144.172
DNS2=107.170.95.180
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="eth0"
LAST_CONNECT=1419879599
I don't use IPV6, I don't know what most of the non-obvious parameters are either.
/etc/sysconfig/network-scripts/ifcfg-br0 (this is my bridged interface)
Obviously network configuration is different in Slackware, its in /etc/rc.d/rc.inet1 for Slackware I believe. I am just giving an example of how I do it in CentOS 6
I believe you would want to edit /etc/rc.d/rc.local and create the bridge there at boot using the bridge-utils package. You use brctl command for this.
I would like to set following in /etc/rc.d/rc.inet1.conf
Code:
IFNAME[0]="eth0"
IPADDR[0]="PUBLICADDRESS"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for br0:
IFNAME[1]="br0"
BRNICS[1]="none"
IPADDR[1]="192.168.1.1"
NETMASK[1]="255.255.255.0"
GATEWAY="GATEWAY"
BRNICS[1]="none" is not supportet, but i want a bridge with seperate subnet, as i have a(only one) public ip-address on eth0.
Another solution could be to add a second address to br0, like
ip addr add 192.168.1.1/24 dev br0
But this also seems not to be supportet by /etc/rc.d/rc.inet1.conf
Perhaps the first thing you need to to is draw your network topology, because I do not believe you have both a public IP on eth0 and an internal network segment attached at the same time. What is it that you want to bridge? You need two network devices for a working bridge.
Ive been testing around Slackware 14.1 in a VM as preparing to move my server from CentOS to Slackware (thank god CentOS/RHEL don't touch upstream configuration...unlike other distros such as debian...transitioning is very easy because of this). Anyway, I am not entirely sure I can properly test a bridged interface in Virtualbox so I am looking for someone to provide me an example of briding the eth0 interface. The way I do it in CentOS 6.6 is as such (maybe it is similar?)
Bridging works fine in VirtualBox. Just configure your VM with Networking > Bridged and use your guest as any real host in the LAN.
On the other hand, if you use KVM, you'll have to define a bridge on your host system. Here's how I do it in rc.inet1.conf:
Code:
# Config information for br0::
IFNAME[0]="br0"
BRNICS[0]="eth0"
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# Config information for eth0:
#IPADDR[0]=""
#NETMASK[0]=""
#USE_DHCP[0]="yes"
#DHCP_HOSTNAME[0]=""
Perhaps the first thing you need to to is draw your network topology, because I do not believe you have both a public IP on eth0 and an internal network segment attached at the same time. What is it that you want to bridge? You need two network devices for a working bridge.
# Config information for br0::
IFNAME[0]="br0"
BRNICS[0]="eth0"
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
This is fine if your in a lan, and the vm's are all in the same lan/subnet.
But i have to deal with *one* public ip-address, and have to create the lan within my host for the lxc-containers.
This setup works, i'm posting because it seems it's not the way configured it should be.
Have a look at ponce's old article on Linux Containers, it has good information on connecting your containers using bridging. The way you do it, is not correct, and I think it works by sheer luck.
Have a look at ponce's old article on Linux Containers, it has good information on connecting your containers using bridging. The way you do it, is not correct, and I think it works by sheer luck.
I did follow Ponce's advices:
Quote:
containers on a natted private network
In this case the script to bring up the private network is this
I have the same setup, there is no eth0 assigned to br0, it's all working fine.
But, i can't find a way to accomplish this with rc.inet1.conf(in a correct way).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.