Linux bridging Question

b3dlam

Active Member
Joined
Sep 2, 2004
Messages
44
Hi there,

new to linux and seed some help.

Got redhat 9 installed on my server with 3 network cards. eth0 (10.0.100.1) and eth1 (10.0.10.1) are connected to two different networks. (1 to a 10mbit hub and the other to a 100bmit hub).

I want to use DHCP to assign ips to each subnet and give access to the net which is connected to mywi on eth2 (10.1.10.1).

i also want the two internal subnets to talk to each other.

i had this setup before: eth0 and eth1 where bridged and DHCP assigning ips to the bridge. Firestarter doin routing between the bridge and eth2 (external interface).

this option worked great for me, but i upgraded my server and reinstalled linux and for the life of me cant find the web page where i found help about setting up a bridge.

if anyone has any info on setting up a bridge or any other solution to my setup, please let me know.

Regards
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
ofcourse you dont need a bridge at all if you set up dhcpd properly it will hand out addies correctly on each subnet ... and the default gw on both will be the linux box
 

b3dlam

Active Member
Joined
Sep 2, 2004
Messages
44
hehe, short and simple answer ;)

just tried that, and i dont have it installed. do i need br-utils ?
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
yeah i have the source here somewhere if you want i can email it ... i remember strugleing to find it
 

b3dlam

Active Member
Joined
Sep 2, 2004
Messages
44
nah tis fine, just got the rpms from rpm.pbone.net

using dhcp, how would you set up the conf file:

subnet 10.0.100.1 netmask 255.255.255.0 {
range 10.0.100.5 10.0.100.99;
#with all the other crap aswell like default gw etc etc
}

subnet 10.0.10.1 netmask 255.255.255.0
{
range 10.0.10.5 10.0.10.99;
#with all the other crap aswell like default gw etc etc
}

now the prob is that dhcp only listens for requests on the one interface not on both, how would i force dhcpd to listen on both the interfaces
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
bellow is my dhcpd.conf duplicate the Internal section for the other subnet and make the
addresses match that subnet ...

doing this you will be a ethernet router not bridge if you need broadcasts [nmb without wins] then you must use a bridge

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
option wpad-url code 252 = text;

option domain-name "networksentry.co.za";
option domain-name-servers 10.10.255.1, 66.18.68.1, 66.18.65.1;
option wpad-url "http://firewall.networksentry.co.za/proxy.pac";

ddns-update-style interim;

default-lease-time 43200;
max-lease-time 86400;

option netbios-name-servers 10.10.255.1;

#Internal
subnet 10.10.255.0 netmask 255.255.255.0 {
authoritative;
range 10.10.255.128 10.10.255.254;
option routers 10.10.255.1;
option subnet-mask 255.255.255.0;
option broadcast-address 10.10.255.255;
}

#ADSL
subnet 192.168.2.0 netmask 255.255.255.252 {
not authoritative;
}

key networksentry.co.za {
algorithm hmac-md5;
secret ****;
};

zone networksentry.co.za. {
primary 10.10.255.1;
key networksentry.co.za;
}

zone 255.10.10.in-addr.arpa. {
primary 10.10.255.1;
key networksentry.co.za;
}
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
 

b3dlam

Active Member
Joined
Sep 2, 2004
Messages
44
how will dhcpd know which subnet requested an ip. cause, AFAIK, by default, dhcpd only listens on eth0.

now if a request comes from eth1 will it assign the write ip if it asigns one at all.
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
it is magic it listens on any subnet defined and knows what addie to assign based on the interface the request came on and is not tied to a specific interface ...

as long as the subnet decleration is there and when you start dhcpd you dont specify a interface it will do what it needs to
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
FYI the wpad is the auto proxy configure script for browsers and the auto config for explorer ...

here is the proxy.pac file ...
-------------
function FindProxyForURL(url, host) {
if (isPlainHostName(host) || dnsDomainIs(host,".networksentry.co.za"))
return "DIRECT";
return "PROXY firewall.networksentry.co.za:3128; DIRECT";
}
------------

you need to make sure the mime type is set as follows for apache ...

AddType application/x-ns-proxy-autoconfig .pac
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
it allows you to auto configure the proxy settings in internet explorer via DHCP ... or by specifiying the above script http://.../proxy.pac ...

when i set up a linux server for a customer the only settings needed on a windows box are incoming/outgoing mail server that are the same everything else is auto setup including the proxy settings in browser ...
 

b3dlam

Active Member
Joined
Sep 2, 2004
Messages
44
nice, at the mo just using mywi and the trans proxy so i cant bypass it (i think), but might be useful for one of my friends who is on adsl. will keep it in mind.

ta

btw, you know what the error means if you boot up a linux distro (redhat 9 in this case) and you get a blue screen with a lightblue message box with 'yes' and 'no' buttons, no text and no error message. (the screen looks like a shell script)
 

b3dlam

Active Member
Joined
Sep 2, 2004
Messages
44
nope it not that, it happens after bootup. i think its when its loading gnome or kde, cause when u answer no, i can still use the box fine, just no gnome or kde.
 

loosecannon

Senior Member
Joined
Jul 27, 2004
Messages
731
ah ok ... try boot up in runlevel 3 ... runlevel 5 is gnome/kde ...

check /etc/inittab the awnswer might be there ...

try run either gdm/kdm once logged in instead of useing the proggie RH runs from initttab ..
 
Top