You are not logged in.
Pages: 1
Hello everyone,
I'm trying to set up a network bridge between the on-board network adapter and a network card I put in the PCI slot. Both adapters are recognized by slitaz, but I do not know how to bridge them. I am trying to use the computer as a server/router WAN in from the modem in one adapter, and out to LAN in the other, and visa versa. I've searched around the web for solutions, but I could not find one that works for me. From what I understood, there's a tool called bridge-utils. I got the impression that if the computer reboots for whatever reason, I would have to run bridge-utils manually again, but I didn't even bother looking that far because I couldn't make it run once from the command line successfully. There was some alternative that was supposed to automatically bridge the networks if I created a config file called /etc/network/interfaces but considering that the /etc/network folder did not even exist, I fail to see how that could have worked. I did try a little copy pasting action to no avail just in case though. Last but not least, someone here set up a network bridge by renaming an eth0 interface to br0 in the udev rulse and apparently magic happened and everything worked. However, when I tried to find more details, all I could find was "simply rename it". The problem is that I searched all the udev rule files, and not one of them has the pattern "eth0" in them, so I fail to see what I would be renaming, if there is nothing to rename. I also fail to see how renaming an interface ends up reconfiguring the way two interfaces act by default. If anyone could shed some light on the topic, I would greatly appreciate all the help I can get.
build-tools and /etc/network/inferfaces:
http://wiki.debian.org/BridgeNetworkConnections
udev rules:
http://forum.slitaz.org/topic/networking-bridging-br0
PS Sorry, I'm a little rusty on my BB-code tags so I don't recall how to link the URLs I pasted above.
Offline
Seems to me from http://wiki.debian.org/BridgeNetworkConnections
As the root user :-
# brctl addbr br0
# brctl addif br0 eth0 eth1
# ifup br0
And to make it persist :-
To make your bridge a little more permanent, you’re gonna need to edit /etc/network/interfaces. Using our example names, make it look like this and you’re set (if you want to use DHCP):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo br0
iface lo inet loopback
# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
iface eth1 inet manual
# Bridge setup
iface br0 inet dhcp
bridge_ports eth0 eth1
HTH
I'm sorry, not to be rude, but copy pasting just the command lines from a link I've already read thoroughly isn't very helpful.
I already tried everything in that link and it doesn't work. I didn't try too hard with the one-off variation because I'm not trying to bridge the networks just once, I want to make it persistent, and the persistent part of that link just doesn't do anything on my system. It has the same effect of putting a configuration file where it will never be viewed, read, or opened. I must be missing something, that's why I'm here asking.
I think the udev rules is my best chance but I'm just not sure how to make that work, I could not find anything more detailed than, "rename eth0 to br0", but as I've already stated, there is no pattern "eth0" in any of the udev rule files on my Slitaz installation by default.
Offline
The slitaz network script only supports one network adapter.
We use /etc/init.d/local.sh to configure the second adapter for the Internet Connection Sharing Router Tutorial
The user was able to network KVM/libVirt without setting up a bridge:
http://panoskrt.wordpress.com/2011/08/30/ethernet-device-rename/
Rather than trying figuring how a proper bridge interface would work on SliTaz, I thought of renaming eth0 to br0, as the later would be expected by KVM/libVirt.
root@slitaz:/home/tux# grep eth0 /etc/udev/rules.d/*
/etc/udev/rules.d/70-persistent-net.rules:SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:67:8d:36:04", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
If you want more help you need to explain what you want the bridge to do.
Online
Hi mojo,
I went ahead and followed the ICS tutorial you linked to to, to the letter, and it's exactly what I want to do, but it didn't quite work out for me. I can connect to computers on the LAN, but trying to SSH to them usually have a long delay for some reason, and trying to ping google from the LAN fails, "unknown host". Any help would be greatly appreciated!
Offline
Wouldn't it be easier to set up a router instead?
Link: http://blog.noviantech.com/2010/12/22/debian-router-gateway-in-15-minutes/
The software seems to be available. (iproute2.tazpkg)
Unfortunately I have no system with more than one adapter so I cannot test anything.
/emgi
Offline
@mishaparem
trying to ping google from the LAN fails, "unknown host"
Can you open a web browser on the client and go to forum.slitaz.org,tank.slitaz.org,usbkey.slitaz.org ?
If not udhcpd is misconfigured on the gateway computer so the clients are not receiving DNS server address. Without the dns server the clients cannot find the i.p. address of slitaz.org,google.com,yahoo.com,etc...
[c]cat /etc/resolv.conf[/c] should show
nameserver 8.8.8.8
nameserver 8.8.4.4
trying to SSH to them usually have a long delay for some reason
This is beyond the scope of simple ICS.
Give the client running the ssh server a static i.p. address.
Add iptables firewall rules to /etc/init.d/local.sh to allow incoming ssh port 22 and DNAT ssh to i.p. address of client behind the gateway running the ssh server.
Some tutorials say since you can only map port 22 to one i.p. address you can only connect from the internet to a ssh server running on one of the clients.
One workaround would be to designate a different port to use for ssh on each client.
I've never done it and have no way to test out a configuration to give you instructions.
Online
Pages: 1
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]