WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Terminal Server no DHCP  (Read 8949 times)

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Terminal Server no DHCP
« on: September 20, 2012, 05:00:56 AM »
Hello im trying to make my first Terminal Server and pretty much just filled in /dev/sda1 the rest i just took default values (192.168.0.30-60) leaving out gw and dns, its just two computers in a dumb switch, but i dont see any dhcpd running and no port 68 in my netstat I do though see a port 69 for my tftp pxe boot.
Server has static ip 192.168.0.1
When i give the client static ip 192.168.0.2 they can communicate so physical net and protocol stack seems alright.
I can see in the tc service program that dhcp is running, think that must be client right?
The instructions kinda say you dont need anything else but it seems i need a dhcp server? (i mean terminal server script do not control and or load dhcpd if needed? Of course dhcp is needed for the setup thats not my question).
« Last Edit: September 20, 2012, 05:35:26 AM by ananix »

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #1 on: September 20, 2012, 05:33:28 AM »
Ok installed dhcpd and reran the terminal server script overwriting config, now that part works but the pxe boot still does not now its complaining about TFTP
PXE-T01: cant open file
PXE-E3B: TFTP Error - File not found.

Any surgestions?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: Terminal Server no DHCP
« Reply #2 on: September 20, 2012, 05:49:42 AM »
Hi ananix
See if this has any useful information:
http://forum.tinycorelinux.net/index.php?topic=8049.0

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #3 on: September 20, 2012, 05:59:04 AM »
Thanks Ritch diffidently some usefull info i can work with to debug and if it does not solve the problem i have gotten alot smarter from the info there thanks, i cant test now as i have put the dhcp server into a test environment where they needed a dhcp server. When i get it back ill try and get the PXE boot to work again. The PXE was for now just optional.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #4 on: September 20, 2012, 06:59:00 AM »
ok i couldnt help it had to continue with this so i sneaked a wire in and have now been playing around dhcpd.conf nothing worked except changing ips just to see if it even reacted to anything.
I have tryed rewrite the entire conf file and use several different options for the boot file :(
Permissions should be fine and the service is running as root.

Im actualy down to BIOS firmware problem hmmm. I think ill try and find another client to test that.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #5 on: September 20, 2012, 08:08:59 AM »
ok
boot_file pxelinux.0
did the trick im gonna add this to the other post which says /netboot/pxelinux.0 and the original file just sayed pxelinux.0. As it all seemed to really work and really did seem like it could not find the file,  i also added a lease file which it did not use either. Then i started to work a little more on the contradicting path info and wupti there it was :)

Thanks for your help as usual Rich :)

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #6 on: September 20, 2012, 08:13:10 AM »
PS can i assist in making programs? i would like to maintain the terminal server as im gonna make all these changes to my own version of it anyways.
dhcpd check
dhcpd install (after dialog)
new path syntaks
kill all services when terminal service is killed.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: Terminal Server no DHCP
« Reply #7 on: September 20, 2012, 09:25:15 AM »
Hi ananix
Assistance is always welcome. As far as maintaining terminal server, I see Curagas name listed at the top of
that script, so you'll have to wait for his response.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10961
Re: Terminal Server no DHCP
« Reply #8 on: September 20, 2012, 10:00:25 AM »
I'm not sure what was the issue here, as last I tested it worked fine. It uses the busybox udhcpd server, no need to install any extensions.

Patches welcome of course, but let's try to find the issue first ;)
The only barriers that can stop you are the ones you create yourself.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #9 on: September 20, 2012, 10:30:14 AM »
:)) love to spare about it and contribuate what ever we agree :) most importen to me is the sparing :))

I can only say what i experienced and what i would change in my edition (for my spin)
I have not check the scripts so this is pure user experience:
Server
Static IP 192.168.0.1 on eth0
"Terminal Server" in cpanel.
Added /dev/sda1
default value for the rest
left it hanging...

Client
PXE boot error no DHCP server on network
Boot windows
No dhcp
Static ip 192.168.0.2
Ping success between 192.168.0.1 and 2

Server
netstat -na | grep LISTEN reveals only port 69
ps aux | grep dhcp revieals nothing
Services in cpanel only reveals dhcp (client is my guess)
Then is start looking for some dhcp with common sense and find but nothing.
Through apps browser i install dhcpd
SIGINT terminal server
Run terminal server

Reboot client
Now i cant remeber if it worked in first try or if it was right about here i found out that SIGINT did not kill everything in terminal server, and from that point on i did it everytime i restartet terminal server i cant remember or maybe i did not test at the right time to know if it had any difference but anything i think it should die along with the rest.
PXE boot dhcp receiving 192.168.0.20
PXE File not found

Server
Now i see alot of info in udhcp.conf file not being as exspected forinstance the default values from terminal server script is not pressent but i still got interface descriped 0.20 so i start to wonder if server it using the file.
change the dhcp adresse to start 50 end 60

Reboot client and see changes reflected but still PXE no file

Server
Fitle about several options in udhcp.conf end up with four lines one being "boot_file pxelinux.0" and that does the trick and makes me a happy panda :))

In short to me it sums up like this
dhcpd check
dhcpd install after dialog
new path syntaks in udhcp.conf
kill all related services when terminal service is killed.

I can see others had same problem (though solved with different relativation of path) and i dont think adding the "patch" and "xtra features" would do anything bad for those of whom its already working but do alot for those where it dosnt. But its easy to test since it works out of the box for you if the new version works on both it should be an improvement *GG

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11220
Re: Terminal Server no DHCP
« Reply #10 on: September 20, 2012, 10:38:00 AM »
hI ananix
If you wish to examine the script, look in  /usr/bin/tc-terminal-server

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10961
Re: Terminal Server no DHCP
« Reply #11 on: September 20, 2012, 10:47:18 AM »
The script is not the most user-friendly one, in that it doesn't check for every possible error. There are no defaults, if you just press enter to a question, that value is left empty.

Many of the values are valid as empty, some are not. Some improved checks could certainly be added, perhaps I'll take a look this weekend. Or if you get to it before me, please send patches as usual (unified diffs, both inline in a forum post and downloadable).


I just tested with TC 4.6.1, worked ok:
qemu -cdrom TinyCore-4.6.1.iso -net nic -net socket,listen=:6668 # This is the server
qemu -net nic,model=virtio -net socket,connect=:6668 # This is the client, started up after terminal server is configured
The only barriers that can stop you are the ones you create yourself.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #12 on: September 20, 2012, 01:02:49 PM »
He he i get it now it was just an "example" text *GGG i just ran it with your info in mind it was a "coincidence" it all "fitted" my setup.
Also i did not understand it as dns and gw had default values i just did not need them :)
i must say in this case i think less is more in terms of info and understanding but really the dialog was not and issue in my case and i dont think in any case because if you did need otherwise than "default" you WOULD type it in.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10961
Re: Terminal Server no DHCP
« Reply #13 on: September 21, 2012, 06:27:20 AM »
OK, so it worked?

I'll let you know when there's an improved script to test, if you'd like.
The only barriers that can stop you are the ones you create yourself.

Offline ananix

  • Full Member
  • ***
  • Posts: 174
Re: Terminal Server no DHCP
« Reply #14 on: September 21, 2012, 06:39:02 AM »
Im not following you whats working? *GG

The syntaks for udhcp.conf did not work for me, neither did dhcp, its all described in prior post :)

Another thing i would add was the option to seperate dhcp and pxe as one might have another dhcp server.