Samba and PPP

Ulf Bertilsson ulf.bertilsson at adcomdata.no
Wed Feb 19 07:11:24 GMT 2003


>  Hello!
> 
>  Could anyone of you tell me, how to configure my Samba 
> server to work with
> PPP interfaces?
>  I have an Amiga machine running Samba v2.0.7. And a Windoze95 PC
> connected to it via null-modem cable.
>  The problem is: Samba ignores all non-broadcast interfaces. 
> So smbd and
> nmbd just do not sit on ppp0 interface, so PC can't connect 
> to Samba. Also
> smbclient can't find my PC by name (i have to specify an -I 
> option), because
> it ignores ppp0 too.
>  After examining a source code, i found the following procedure:
>  --- cut ---
> static void add_interface(struct in_addr ip, struct in_addr nmask)
> {
>     struct interface *iface;
>     if (iface_find(ip)) {
>         DEBUG(3,("not adding duplicate interface 
> %s\n",inet_ntoa(ip)));
>         return;
>     }
> 
>     if (ip_equal(nmask, allones_ip)) {
>         DEBUG(3,("not adding non-broadcast interface 
> %s\n",inet_ntoa(ip)));
>         return;
>     }
> 
>     iface = (struct interface *)malloc(sizeof(*iface));
>     if (!iface) return;
>     
>     ZERO_STRUCTPN(iface);
> 
>     iface->ip = ip;
>     iface->nmask = nmask;
>     iface->bcast.s_addr = MKBCADDR(iface->ip.s_addr, 
> iface->nmask.s_addr);
> 
>     DLIST_ADD(local_interfaces, iface);
> 
>     DEBUG(2,("added interface ip=%s ",inet_ntoa(iface->ip)));
>     DEBUG(2,("bcast=%s ",inet_ntoa(iface->bcast)));
>     DEBUG(2,("nmask=%s\n",inet_ntoa(iface->nmask)));         
> }
>  --- cut ---
>  My interfaces are:
>  --- cut ---
> 16.System:> ifconfig
> lo0: flags=C9<UP,LOOPBACK,RUNNING,NOARP> MTU=1536
>         inet 127.0.0.1 netmask FF000000 
>         Hardware type: Loopback
> 
> eth0: 
> flags=4863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,SANA> MTU=1500
>         inet 10.4.20.98 netmask FFFFFFFC broadcast 10.4.20.99
>         Hardware type: Ethernet, address: 0:80:ad:c6:be:75
> 
> ppp0: 
> flags=40F1<UP,POINTOPOINT,NOTRAILERS,RUNNING,NOARP,SANA> MTU=1500
>         inet 192.168.255.254 --> 192.168.255.253 netmask FFFFFFFF 
>         Hardware type: PPP
> 
> Use "ifconfig -h" for usage.
> 16.System:> 
>  --- cut ---
>  PC has IP 192.168.255.253.
>  When i try to specify a 255.255.255.252 (FFFFFFFC) netmask 
> for ppp0, Samba
> adds ppp0 to the list of interfaces, but the interface just 
> does not pass
> broadcasts.
>  What's wrong? How to solve my problem?

Pavel,

I had this running on my A1200 some years ago.

I think you could solve this problem with simple stuff as adding an
"lmhost" file spesifying all host in your "lan".

Broadcast are not in theory needed for operation.

There is also further mechanisms such an WINS that might help you with this issue.

Using IP based resolution should also work.

Are you sure your nmbd is running fine.
The old versions (on aminet) have some issues.

Try get the newest gcc based ports by Olaf (2.2.5 available also), nmbd is more stable here.

Best of luck Pavel.

--
Ulf


More information about the samba-technical mailing list