Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: Matt_H on May 14, 2003, 10:37:43 PM
-
I've got my Amiga, PC, and 2 other boxes connected to the internet through a DHCP router. In order to share devices, hostnames and IP addresses need to match up to the right machine. Since the hostnames are dynamic, whenver I go online, I have to manually check them through the router's configuration utility and then update them in the MiamiDX hosts database.
It works, but it's annoying. Is there an automatic or easier way to do this? I'm using Samba under OS3.9.2.
-
Not the most helpful of answers, but...
...unless you're having trouble with some sort of WINS/domain-controller setup, Samba should be able to look up the hosts' *NetBIOS* names irrespective of IP. That's how the usual peer-to-peer mode of the protocol works- not to say that it's particularly reliable. To run in the P2P mode, which actually has some other official name I forget, use the 'bcast' parameter at the right place in smb.conf (http://us1.samba.org/samba/docs/man/smb.conf.5.html#NAMERESOLVEORDER). I forget how the bootstrap procedure for Samba works/doesn't work, but this involves nmbd (http://us1.samba.org/samba/docs/man/nmbd.8.html) - so if it doesn't start it itself, you'll have to figure out how. Alternatively, you could run nmbd on a Linux box as a WINS server, or figure out how to use a real Windows box for the task.
That takes care of Samba. If you want to ssh, ftp, or http around your local LAN without managing hosts files, you need DNS- and that don't come easy. Basically, you could replace the router (Linksys? Knowing the model would help..) with a better one - I am forever in love with 2Wire's Homeportals because they do DDNS ("Dynamic DNS") based on each machine's DHCP hostname field, or a Linux/BSD box works as well - or keep the router, turn off its DHCP server, and "augment' it with a DHCP/DDNS-server combo running on a 'real computer.' As long as it assigns addresses in the local subnet the router uses, (probably 192.168.1.0 with a subnet mask of 255.255.255.0.. or maybe something lamer, like 255.255.255.248?), and avoids the 'DMZ' address, everything should work.
That's a total pain in the ***, though, not that entirely rolling your own with *NIX is any easier- just more flexible once you get the hang of it.
-
:-? Isn’t the router supposed to have two IP addresses? One fixed, for the other machines on your LAN to use, and the other one dynamic, to be assigned by the ISP?
At least, that’s the way I always understood it…
-
So your saying like: Every time you boot your LAN
up, all the machines have a new hostname.. What about the IP?
Turn off the DHCP-mode in the router (and set
your machines up manually) if you can do that
or make a perl/Arexx script to configure the
MiamiDx host database automatically. A fine
chanse to learn some scripting. :-D If only your
hostnames are dynamic, it should be possible to
retrive hostname using smbclient .
-
Quixote wrote:
:-? Isn’t the router supposed to have two IP addresses? One fixed, for the other machines on your LAN to use, and the other one dynamic, to be assigned by the ISP?
At least, that’s the way I always understood it…
That's how it works... though you can have a static address from your ISP, and still require NAT if you want to use more than one host with it.
I assume he meant the 'hosts' file commonly used in lieu of a local DNS- DNS being what allows "http://www.amiga.org" to point to whatever IP it points to- and something like "http://www.home" to point to whatever machine on your network is named 'www.' (Or if the machine is named 'bob,' and runs a telnet server, you could 'telnet bob.')
The mess of protocols born of Windows, OS/2, and *much* earlier products were born of a software API- called - bing! - NetBIOS- designed to allow IBM PCs to throw bits on the wire. Not only did that wire not carry Internet Protocol, it wasn't even ethernet or Token Ring. Seems like a lot of sites are finally covering the history; (http://jcifs.samba.org/netbiosnames.html) a year ago, I could only find one good document. Anyhow, in absence of any of the nifty IP services you take for granted today, they rolled their own everything, which became something of the de-facto standard for Wintel LANs (mostly concerned with file and printer sharing).
When IP took over, they made a valiant, if somewhat braindead effort to port the "standard" to it, leading to what IBM called "TCPBEUI" and MS named "NetBIOS over TCP/IP." See, depending who you believe, the NetBIOS Extended User Interface is the framing protocol (IBM), or the wire transport (Microsoft). Thus, on OS/2, the choice was something like NetBEUI over NetBIOS (raw-on-the-wire), or TCPBEUI over TCP/IP (IP encapsulated)... In Windows, they *used* to say NetBIOS over NetBEUI (raw-on-the-wire), or NetBIOS over TCP/IP (IP encapsulated). This also begat extensions like WINS, and weirder things, to allow the normally broadcast-oriented protocol to hop segments and subnets and generally be at all useful to moderately-sized networks. Edit: Samba, and IIRC most Windows incarnations, can *also* access machines using the IP encapsulation by DNS address, rather than NetBIOS/NetBEUI name, if it's not confusing enough. Technically, you're *supposed* to be using the NetBIOS/NetBEUI or WINS resolver; that's what Network Neighborhood uses to produce its list. Oh yeah, and the whole whatever-over-TCP/IP mess is supposed to be called "CIFS," so you can pretend it's a nicely standard "Common Internet FileSystem" instead of 10lbs. in a 5lb. bag.
This is why MCSEs are often seen carrying around 900 page books and looking haggard. (Actually, as of 2000 or so, the guide I flipped through simply said something like "Select NetBIOS over TCP/IP; in case of failure, the Microsoft Certified technician shall perform a reinstallation of the operating system." Surprising how many pages they spent on issues that ended in 'perform a reinstallation of the operating system.' No word on interoperability with others' products, because... well, why would anyone be using non-Microsoft products?)
-
Guess I misunderstood the question.... so I remove my comment (apparently I cant delete it)
-
tormedhammaren wrote:
Turn off the DHCP-mode in the router (and set
your machines up manually) if you can do that
:-o
I knew I'd forgotten something obvious! Thanks for the save!
That'd be DHCP for the *local network,* not for the *Internet* side of the router, which should stay configured to whatever the ISP requires to connect.
Of course, you'll probably also have to set important info- like your ISP's DNS server addresses- manually on each machine. That's one of the reasons I *heart* DHCP.
-
I wrote that you get machine X's hostname by typing smbclient -L , you get X's netbios
name offcourse. Actually the whole networks netbios names and the shares of machine X. Sorry.. But the netbios name is what you need for using samba!
-
This a very vague discription of a problem. What is the actual problem. Your Router will always have a dynamic realworld IP address and hostname which is assigned to you by your ISP when you connect. It should always have a static LAN address.
You should never share IP's or hostnames on static LAN. If you are adding or removing machines all the time DHCP is great. But if you are not there is no real benifit. You should statically assign IP address and always keep the same hostname assigned to the same IP.
You haven't really explained why you need to change the host configuration and for what you are changing the configuration.. Your problem really doesn't make any sense. It sounds like it is all broken because you are doing it wrong.
Matt_H wrote:
I've got my Amiga, PC, and 2 other boxes connected to the internet through a DHCP router. In order to share devices, hostnames and IP addresses need to match up to the right machine. Since the hostnames are dynamic, whenver I go online, I have to manually check them through the router's configuration utility and then update them in the MiamiDX hosts database.
It works, but it's annoying. Is there an automatic or easier way to do this? I'm using Samba under OS3.9.2.
-
I'm not sure either what you mean, because all my machines at home have static hostnames, they don't change (I don't even know how that would be possible). I also have a DHCP router (D-link) which, in its default configuration, gave my machines a new IP every time I booted them up. It was easily fixed by turning on "MAC caching" in the router so that it will always give the same IP to the same MAC address (I needed it that way so I could run port forwarding to my FTP server). It was very easy to do in the router, you just selected the MAC address of a network card connected to the router in a dropdown box and typed in the last digits of the IP in a box.
-
blimey, i think what all that meant is
windows boxes prefer NetBios ( NetBEUI ) for file and printer sharing using the windows workgroup name (default "MSHOME")
windows boxes need TCP/IP for internet sharing
for best results turn off the DHCP client on the router/acces point and assign all your computers static addresses in thier network setup thus:
router/acces point: 192.168.0.1 (internet software looks for this address first to try to connect to the outside world)
windows 1: 192.168.0.2
.0.3
.0.4
etc.
subnet mask of 255.255.255.0
and it should all work perfectly.... probably. :-D
edit: do you mean that internet host names change? in which case you need to point your amiga's DNS at 192.168.0.1 (the acces point) and make sure your access point has DNS forwading enabled
-
for best results turn off the DHCP client on the router/acces point and assign all your computers static addresses in thier network setup
I don't think that'll work (somebody correct me if I'm wrong). I think that the router needs to use DHCP to assign IPs so that it knows which computer to forward the internet traffic to. It isn't even possible to turn off DHCP on my router.
-
No - absolutely not.
The address translation does not care about DHCP/Static addressing on the private side.
Just give everything a static IP address (make sure you use the right network!)
Eg. If DHCP gives you;
IP Addr 192.168.1.5
Mask 255.255.255.0
Gateway 192.168.1.1
Then use 192.168.1.[say 10 - 254] for the address and leave everything else the same.
Check with your ISP for the DNS servers and statically asign those as well. For your internal nodes just put everything in the hosts file. This should work fine.
-
Thanks for the responses, all. I'll look into them. Time to dig out the Samba manuals. :-)
-
Your not completly wrong. DHCP is needed to allocate IPs ti the local LAN. The point is that he doesn't need a DHCP server to simply share an internet connection. All you need to do is on each machine on the LAN assisgn ips , default gateway and DNS. The deafult gateway is the router. End of story.
If you need to assign hostnames to each machine then your hostname section in miami will need to be changed once only. Since the IP's don't change for the machine, the host name will always be assigned to the same IP and hence the same machine.
If you use MAC caching your defeating the purpose of DHCP on a static LAN any how because it is efectivly the same as assigning static IP's. MAC caching, or IP leasing, ensures that the same NIC/PC gets the same IP when it connects to the LAN for a defined amount of time.
The only time that laziness could ever justify using DHCP is when you just want plug a machine in to the network, and use the shared network. If you want to set up servers on your lan then you need to think a bit harder.
Casper is right. Turn off DHCP if you want to do any serious networking.
Casper wrote:
for best results turn off the DHCP client on the router/acces point and assign all your computers static addresses in thier network setup
I don't think that'll work (somebody correct me if I'm wrong). I think that the router needs to use DHCP to assign IPs so that it knows which computer to forward the internet traffic to. It isn't even possible to turn off DHCP on my router.
-
Casper is right. Turn off DHCP if you want to do any serious networking.
that was MY idea :-)
just yesterday i networked someone's Xbox to their pc via a hub so they could do xbox live via their PC's broadband connection ... it really was plug and play ... it just went. .. we need networking like THAT on amigaNG!
-
ronybeck wrote:
The only time that laziness could ever justify using DHCP is when you just want plug a machine in to the network, and use the shared network. If you want to set up servers on your lan then you need to think a bit harder.
DHCP is flexible. (http://www.isc.org/products/DHCP/) It's just that the simple implementations in most routers are not, though 2Wire wins by practically providing a Network-In-a-Box, and it sounds like D-Link's at least trying with the 'MAC caching,' here. (Static address assignment can be/*is* a feature of DHCP- and if all hosts use DHCP, the problem of address conflicts can be avoided, at least until someone starts up a rogue DHCP server on your LAN. Not a big deal at home, but there's a reason 'campus' situations dig it, and it's really pretty easy to set up.)
So do *all* the cheapo routers offer static DHCP by MAC now, or is D-Link more specialer than Linksys in this regard?