Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
First of all you need to tell us how the machines are connected (where is the modem, router, IP subnets etc). If I guess correctly, you need to set IP forwarding between the interfaces with /etc/sysconfig/sysctl option IP_FORWARD="yes" in openSUSE 10.2 (this is probably the default). Depending on the type of traffic you want to route, this may not be enough.
ADSL Modem/Router (192.168.2.1)
|-----------------Various Machines (192.168.2.x - DHCP)
eth1 on Linux Box (192.168.2.99 - static)
eth0 on Linux Box (192.168.0.x - Assigned by DHCP)
Mailserver (192.168.0.10 - static)
I have used his instructions to generate a br0 interface but now need to set the br0 with ifconfig. Do I have to set a static IP address as Paul Dwerryhouse describes? How does this affect the DHCP server on eth0?
I've just noticed that his example has the bridge connecting two networks both on the 10.1.9.x network. Am I on completely the wrong track?
brctl addbr br0
brctl stp br0 off
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up
ifconfig br0 192.168.2.99 netmask 255.255.255.0 up
route add default gw 192.168.2.99
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -P FORWARD DROP
iptables -F FORWARD
iptables -I FORWARD -j ACCEPT
iptables -I FORWARD -j LOG
iptables -I FORWARD -j DROP
iptables -A FORWARD -j DROP
iptables -x -v --line-numbers -L FORWARD
as once the eth1 went down I would lose contact with my (headless) linux box.
I thought that the script would continue to execute and bring up br0 on 192.168.2.99 which would give me a connection again. However, this does not happen and the linux box remains unresponsive until reboot....
How is the DHCP server connected to the internet? Does the ADSL router have 2 NICs? If so, you can simply set the router to route the traffic between the 192.168.0.x and 192.168.2.x networks.
If the ADSL router has one interface and is connected to a switch, to which are also connected the linux box and the 192.168.2.x network machines, then all you need for normal traffic (no broadcasts) is to set the ADSL router to route 192.168.0.x traffic to the linux box (eth1).
I think it would be better if you changed the topology like this: connect the linux box to the router (192.168.1.x network on eth0), connect the 192.168.2.x machines to the linux box on eth1 and add another NIC to connect the 192.168.0.x machines (eth3), and IP_FORWARD=1 will be enough for normal traffic to route between the networks. You can also make the linux box the DHCP server for both networks (192.168.2.x and 192.168.0.x) and firewall this way.
The link you provide works for the case that the linux box is the router, which seems that is not the case here, unless you do what I described above.
Then you can connect the 192.168.2.x machines on the router, as well as the linux box and set the router to allow routing between the 2 networks. eth0 and eth1 should be set to a 192.168.0.x address respectively. This setup will not allow broadcasts to propagate though, be warned.
I have tried as you suggested, but am having mixed results.
The Other network I'm trying to connect to has the IP 192.168.0.x and assigns new connections by DHCP.
My SMC Barricade router has 4 ports, each of which can be set to the default LAN or to a VLAN which is defined with the following parameters:
IP Adress: 192.168.0.58 (I've specified this IP as I am assuming that the DHCP server allocates in a pool starting at 100 - from observation)
Subnet Mask: 255.255.255.0 (no problems there!)
Nat Domain: Private (the other option is 'Public')
IGMP Snooping: Disabled
IGMP Querier: Disabled
The problem is that once I've set this, wired connection with the router drops off and on randomly and periodically.