LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2004, 06:15 PM   #1
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Rep: Reputation: 15
Question How to browse Shared Samba Resourses across router/bridge


I have a PC running Red Hat9 acting as router, bridge, dhcp server, and DNS server. It has 3 nics configured like this:
1- DSL IP stuff
2- 192.168.0.1 netmask 255.255.255.0 (10Mbs) --LAN #1
3- 192.168.1.1 netmask 255.255.255.0 (100Mbs VG) --LAN #2

LANs 1 & 2 have a mixture of Windows 2000, Windows NT, and RedHat9 PCs.

I have followed the How-to's at tldq.org to first configure a router that shares the DSL connection to both LANs.

The DHCP server configures the clients on LAN 1 while the clients on LAN 2 have their TCP/IP settings hard-coded. Both LANs use the Red Hat box as their DNS server.

I also followed the Mini How-to in order to bridge LAN 1 & 2 so the clients can access each others' resources. One change I did not make was to eliminate the IP addresses of Nics 2 & 3 since that would mess up my NAT, DHCP, etc.

I am to the point where all the clients can access the Internet and can ping each other but with this exception: clients in LAN 1 can only ping clients in LAN 2 if the IP address is entered (and vice versa) whereas within a LAN, clients can ping each other by using the hostname.

Here are my questions:
1.) How can I setup the Red Hat box so it will translate host names to IP addresses between the two LANs?

2.) Is it possible to use Windows' Network Neighborhood to browse the PCs on both LANs instead of just those on the same LAN? (Note: I can already access network shares from the opposite LAN but I have to use the IP address of the host to view the shares.)

Thank you!
 
Old 09-23-2004, 01:33 AM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
If you setup a WINS Server on the router(ie the RH9 box) and configure the Windows and Linux clients on 2 LANs to use it, both problems will be solved.

Otherwise for the first problem you'll need to host a DNS zone on the router, then configure the clients to query the domain when they need to resolve a hostname(of course these records needs to exist on the DNS server, either entered by hand or dynamically)
As for the second probem the router needs to be configured to forward broadcast packets (which kinda defeats the purpose of cutting your network in 2 segments using a router though) and possibly do a little NAT.

Last edited by Demonbane; 09-23-2004 at 01:36 AM.
 
Old 09-23-2004, 11:23 AM   #3
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Original Poster
Rep: Reputation: 15
Demonbane,

Thanks for the response! It appears that you think the WINS server is the best way to go. Is that assumption correct?
 
Old 09-23-2004, 12:48 PM   #4
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Thanks for the response! It appears that you think the WINS server is the best way to go. Is that assumption correct?

Microsoft developed WINS to solve the very problem you are having with browsing across network segments.

BTW: If (when) you get around to configuring your bridge with 1 IP address for both interfaces, another option available would be to change your netmask to 255.255.254.0? Then hosts on either the 10 or 100 segments (separated by the bridge) use the same broadcast address and default gateway. Makes configuring your firewall rules easier too.

Anyway, just another option if it meets your requirements.
 
Old 09-23-2004, 01:26 PM   #5
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Original Poster
Rep: Reputation: 15
I have noticed that after having the RedHat server up for a few days now, most if not all of the clients are able to view all of the clients of both LANs. The only problem is that when I try to navigate to one of the clients on the opposite LAN, I get a "Network path was not found" error. I assume this has to do with not being able to find the IP address.

Where is some good information on setting up WINS on the RedHat box so it will make the translation from hostnames to IPs?

Remember that I already have RedHat configured as a DNS caching server running (named).
 
Old 09-23-2004, 04:00 PM   #6
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Original Poster
Rep: Reputation: 15
I have everything working as I had wanted. For the record, here is what I did:

To run a WINS server, I need to put this line in my smb.conf
wins support = yes

Then I directed all the clients to point to the RedHat router as their WINS primary server. I added this line to my dhcpd.conf
option netbios-name-servers 192.168.0.1;

In case anyone is interested, here is my /etc/sysconfig/iptables file

# Generated by iptables-save v1.2.7a on Tue Sep 21 14:04:21 2004
*mangle
:PREROUTING ACCEPT [23325:7720817]
:INPUT ACCEPT [11782:694003]
:FORWARD ACCEPT [11543:7026814]
:OUTPUT ACCEPT [2958:392800]
:POSTROUTING ACCEPT [14501:7419614]
COMMIT
# Completed on Tue Sep 21 14:04:21 2004
# Generated by iptables-save v1.2.7a on Tue Sep 21 14:04:21 2004
*nat
:PREROUTING ACCEPT [9210:424264]
:POSTROUTING ACCEPT [48:3865]
:OUTPUT ACCEPT [70:5869]
-A POSTROUTING -o eth2 -j SNAT --to-source xx.xx.xx.xx #eth2 is the nic connected to my DSL modem and the source IP is my static IP
COMMIT
# Completed on Tue Sep 21 14:04:21 2004
# Generated by iptables-save v1.2.7a on Tue Sep 21 14:04:21 2004
*filter
:INPUT DROP [8537:351054]
:FORWARD ACCEPT [11543:7026814]
:OUTPUT ACCEPT [5070:582091]
:RH-Lokkit-0-50-INPUT - [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i ! eth2 -m state --state NEW -j ACCEPT
COMMIT
# Completed on Tue Sep 21 14:04:21 2004
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adsl modem/router in bridge krayz1e Linux - Networking 5 03-04-2006 10:44 AM
AP, Bridge or Router? bigearsbilly Linux - Wireless Networking 10 02-15-2005 09:05 AM
Help, after setting up bridge I can only ping my router. Royle Linux - Networking 0 11-11-2004 09:04 AM
Cannot bridge networks on FC2/VPC, yet NAT(Shared) works fine quinthar Linux - Networking 1 09-24-2004 08:46 PM
DSL modem as bridge/router why is one right/wrong ? websinger Linux - Networking 2 12-01-2003 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration