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.
I currently have Samba working properly using the eth0 interface on my notebook computer. More importantly, I can browse the network and see the shares set up in Samba. If I disconnect and go wireless using the wlan0 interface I can no longer browse the shares on Samba via name. I can however browse via IP address of the wlan0 interface. How can I make it so that Samba is accessible by name when I switch between interfaces?
Code:
[global]
workgroup = startrek
server string = NCC-1701 Enterprise
bind interfaces only = yes
interfaces = lo 192.168.4.0/255.255.255.0
hosts allow = 192.168.4.0/255.255.255.0 127.0.0.1
printcap name = /etc/printcap
load printers = yes
printing = lprng
log file = /var/log/samba/%m.log
max log size = 50
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
username map = /etc/samba/smbusers
map to guest = Bad User
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no
# netbios name = enterprise-e
local master = no
domain master = no
preferred master = no
wins proxy = yes
name resolve order = lmhosts, host, wins, bcast
# Samba now defaults to denying symlinks found in exported shares per
# http://www.samba.org/samba/news/symlink_attack.html
# To allow symlinks to be followed in Windows clients, the below three are needed
follow symlinks = yes
wide links = yes
unix extensions = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0600
directory mode = 0700
Do your eth0 and wlan0 have different IP-addresses?
Try to ping your Samba-server from another PC by hostname. What IP do you see?
The hostname is associated with that IP. If you use a DNS server in your LAN, you have to edit the config file and add the second IP address to the Samba server hostname.
Yes, my eth0 has 192.168.4.10 while my wlan0 gets 192.168.4.11. When I ping this Samba-server from another machine, the resulting IP address is 192.168.4.10. Say I don't have a DNS server on my network, which means I would have to accomplish this using the hosts file on each Windows machine that I would like to connect to this Samba-server. Would the correct hosts file be as follows:
Whoa, that worked! Well browsing the Samba-server worked using the name, but if I were to ping enterprise-e I see that's it reaching 192.168.4.10 and times out. I wonder if there are anything drawbacks to assigning 2 IP addresses to one hostname...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.