How to browse Shared Samba Resourses across router/bridge
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
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.)
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.
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.
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).
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.