Koozali.org: home of the SME Server

Stupid question

JoeyR

Stupid question
« on: May 16, 2005, 05:17:56 AM »
Can SME server get ITS IP address from an existing DHCP server?

I have two machines on my local network already that go out to the Internet.  Each one has a DHCP assigned address [the dhcp server belongs to my ISP].  With all other server setups including Linux, I had the option to grab an IP via DHCP... with SME it doesn't look like I can do that.

I don't want the SME server to PROVIDE DHCP addresses; only to GET one.  If I can set up the server to get its IP FROM an existing DHCP server, then how do I check what IP address I do have.

Please help,
Joe

JoeyR

Stupid question
« Reply #1 on: May 16, 2005, 06:36:16 AM »
Okay,

Had a brain lapse, and found that I could see my IP address with IFCONFIG; but sill... the IP address shown is the one *I* put into the server config; how do I tell SME to get ITS address via DHCP?

jriemens

Stupid question
« Reply #2 on: May 16, 2005, 08:44:04 AM »
I'm not sure I understand your "problem" right but in the SME setup you can select dynamic IP. (check page 34 in the manual) Use a dynamic IP service and connect your other computer(s) to your SME server... (with SME to provide DHCP to your other computers)

Although I'm a relative beginner, hope this helps!

regards,  Jaap.

JoeyR

Stupid question
« Reply #3 on: May 16, 2005, 01:50:23 PM »
Hi,

Thanks for the reply.

Perhaps it helps to clarify that I am using SME version 6.01, not the 6.5 release candidate; so the configurations for third-party DNS services are non existent... anyway, my problem involves getting the IP address that the server will use to broadcast OUT to the Internet.  In other words, the LOCAL IP ADDRESS of my server SHOULD be a public, routable IP address, and that is only properly configured via DHCP.  I don't want the SME server to act as a DHCP server or router, and give addresses out to my local network, because I am already allowed 5 public IPs with my cable ISP, and have no need for the non-routable 192.168.x.x addresses or 10.6.x.x addresses.

Using SME Server on a test box, I fooled around a bit more, and found the network config script in the ETC directory... but it plainly states DO NOT MODIFY because the settings will be overwritten at each boot by the SME settings done in the config screens.

I also "faked it" and used a public IP address similar to one that would have been given out by my ISP's DHCP server, and I could see my server/shares/website locally but I could not connect to that IP from any computer outside my network.  I am assuming because the IP wasn't "officially" assigned, it is not being routed properly.  So again, how do I get SME Server to act as a plain old DHCP CLIENT and request an unused IP address from my ISP?  

Once I have THAT info, I can use a dynamic DNS service and point a "domain" to that assigned/public IP address.

Regards,
Joe

Offline dmac

  • ****
  • 143
  • +0/-0
    • http://www.rylar.ca
Stupid question
« Reply #4 on: May 16, 2005, 05:51:28 PM »
Perhaps a diagram of your intended setup is needed.

By default, if you connect the SME server between your network and the internet, the SME server will usd NAT to translate your internal request to the external IP.  If your ISP supplies DHCP IP address then there is no configuration needed as SME will use DHCP to retrieve an IP address from you ISP.

-Client- <--> -Hub- <--> -SME Server- <--> Internet                      


Based on what you have indicated, you should not use the SME server as a DHCP server, and you should move the SME server behind your hub and run in Server mode.  This will allow your ISP to supply the IP address on all the machine.  You can then configure your Dynamic DNS to point to the SME or other boxes.

-SME Server- <--> -Hub- <--> Internet
-Client- <----------^

In my option, this is not the best use of the SME server, as you are bypassing the best part, the Gateway (Firewall) portion of the server.

HTH

Darin
"In a world without Fences, why do we need Gates and Windows"

JoeyR

Stupid question
« Reply #5 on: May 16, 2005, 07:13:27 PM »
Hi Darin,

I eventually have plans to make SME server my firewall/gateway, so I understand the concept of giving SME server a non-routable LOCAL IP address, and then letting IT manage the traffic between my local network and the Internet.  This would also require two NICs.

Right now, however, I want the computer running SME to look like any other client computer so I can host webpages on it and set its public IP to use a DNS service.

MODEM > 8-PORT SWITCH > SME SERVER

Thanks to my ISP, I can connect any 5 machines to that switch, and each one is supposed to get a DHCP address.  Two other windows machines are connected in this way (to the switch), and grab their IP addresses via DHCP.

I AM running SME in "server only" mode and using a domain name of LOCAL.   But, upon initial configuration (after selecting your NIC), SME server right away wants to give the server a NON-ROUTABLE IP ADDRESS starting with 192.168.x.x  Since I want this server to be "public" as my other two are, the server address should be DHCP-assigned.

The ideal solution would be to call my ISP and reserve a static public IP address in the same subnet as my existing DHCP-assigned addresses, (that would have the added benefit of being able to see all my computers via NETWORK PLACES) but I do not want to pay those costs since I am supposed to get 5 "DHCP-but-acts-like-static" addresses (the two Windows machines have had the same IP's since March of last year).

Again, SME is assuming that IT will be the firewall and gateway, where I do not WANT it to be yet.   only have ONE NIC and want this to be a PUBLIC machine, shouldn't the server's ONLY IP ADDRESS be generated by DHCP [public] and NOT entered manually?

The more I think about it, the more I am realizing that SME is not what I want for simple workgroup and webpage/hosting duties.  If it insists on being a firewall/router FIRST [even if you are given the option later to turn that feature off], it won't work for me.

If you have any more info, I'll gladly take it!

Joe

Offline dmac

  • ****
  • 143
  • +0/-0
    • http://www.rylar.ca
Stupid question
« Reply #6 on: May 16, 2005, 08:39:50 PM »
OK. I see where your problem is.

With the single NIC card, SME server defaults to the Server only mode.  Does your ISP use the MAC address for controlling the DHCP leases?  Could you use the IP address that has been given to one of your Windows boxes as the static IP addrss of the SME Server?  This might work as long as the MAC address is not used to determine the DHCP lease.

Other than adding a second NIC Card and Setting up the SME Server in the Gateway Server mode I can't think of another way at this time to get your setting you want.

I'll have a look at the templates later today and see if there is a way to redirect the Local NIC to accept a DHCP address.

Does your Switch have a built in Firewall?  Can you set the SME box in the DMZ zone of the Swtich?

SME was built as a designated Web Server and Mail server.  But most of the deployments are as the Gateway level or as a Server behind an existing Firewall.
"In a world without Fences, why do we need Gates and Windows"

JoeyR

Stupid question
« Reply #7 on: May 16, 2005, 10:04:50 PM »
Quote
Other than adding a second NIC Card and Setting up the SME Server in the Gateway Server mode I can't think of another way at this time to get your setting you want.


Do you HAVE to have a second NIC in order to use server/gateway mode?  I just thought of something, after looking at the manual pages again, noting the info about "two network cards with the same driver" in Chapter 5, and your latest response... could I configure for server/gateway -  DEDICATED, and then set my one and only NIC (ETH0) to external, and the non-existant ETH1 to local?

I'm going to check back here in a few hours... even if I don't hear from you, that's exactly what I plan to try.  I'll post tomorrow with the results.

Thanks,
Joe

JoeyR

Stupid question
« Reply #8 on: May 17, 2005, 02:06:14 PM »
Hi Darrin and all,

My experiment worked :idea:

To answer your question about my cable ISP's DHCP lease... yes the NIC's MAC address is used in determining the DHCP lease and IP address assigned, so I cannot use an existing IP address as the static address in SME.  However, going with my previous post:

* I reconfigured SME server using a non-routable static IP.  
* I chose server and gateway mode even though I only had one NIC.  SME still asked about ETH0 and ETH1, so I made ETH0 external, and ETH1 internal.
* Upon reboot of the server, I logged in as ROOT and typed IFCONFIG to see my IP address assignments.  My single NIC was now assigned a DHCP address, and the local loopback 127.0.0.1 was still available as well.

I am going to try a few more reboots of the server over the next few days, just to ensure the IP address "holds" for a while - then I'll configure my dynamic DNS.  The way it's working now, it should be set for when I DO in fact add my second NIC; it will then assign internal IP addresses to the rest of my LAN.

Best wishes,
Joe (who needs a cold one right now) :pint: