Jump to content











Photo
- - - - -

help on dhcp diskless boot over lan

dhcp iscsi lan diskless

  • Please log in to reply
9 replies to this topic

#1 tinoy69

tinoy69

    Newbie

  • Members
  • 24 posts
  •  
    Philippines

Posted 10 June 2016 - 09:49 AM

first of all here is my server config and client config to diskless boot

 

server:

2 lan nics (1 connected directly to modem, 1 as static 192.168.0.100, 255.255.255.0, no gateway)

running a virtualized pfsense server (bridge to the 2 nics, lan ip is 192.168.1.1, dhcp off in pfsense)

running opendhcp server (dhcp listens on 192.168.0.100)

running opentftpserver (listens on 192.168.0.100)

running both opendhcp and opentftpserver is just my little preference...

iscsi boot by gpxelinux (bootfile gpxelinux.0)

win7x64

 

dhcp settings on 192.168.0.100

range-192.168.0.200-192.168.0.250

subnet=255.255.255.0

router=192.168.0.1

nextserver=192.168.0.100

tftpserver=192.168.0.100

bootfilename=gpxelinux.0

(no static leases)

 

client

iscsi boot from 192.168.0.100

win7x86

 

my problem is this

although it is ok booting into windows, it does not have internet, because i need to have ip address

from pfsense virtual (192.168.1.x) but my dhcp boot leases ip address 192.168.0.x in order to boot from iscsi

now if i set my pfsense ip to 192.168.0.2 for example, my client wont be able to diskless boot, (on windows logo only)

 

once i have booted into windows and changing the ip manually to (192.168.1.x, gateway 192.168.1.1) it will

have internet connection, i need to automate this (see question 1)

 

ive research into the problem and guessing i have to learn relay agent, proxydhcp (which is i think is missing

from my setup) now here are my questions

 

1) how to configure dhcpserver to get bootp info from 192.168.0.x range (initial ip lease, router ip, from 192.168.0.x, BUT on normal ip lease gets ip from pfsense ip range (192.168.1.x)

 

2) do i need a relay agent? to route dhcp from 192.169.0.x and 192.168.1.x and vice versa?

 

3) do i need proxydhcp (no idea what it is, is it the same as the relay agent)?

 

4) do i need to have 2 dhcp running? (one from 192.168.0.1) and the other from pfsense virtualized?

 

please help...


Edited by tinoy69, 10 June 2016 - 09:50 AM.


#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 June 2016 - 01:01 PM

You do not *need* to change the IP, you can add one (if I get right your question) and of course add a gateway.

 

You can use netsh for this.

https://www.petri.co...tcp_ip_from_cmd

https://technet.micr...y/bb490943.aspx

https://technet.micr...2(v=ws.10).aspx

 

Something *like*

netsh interface ip add address "local area connection" addr=192.168.1.200 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=2

 

Should do. :unsure:

 

:duff:
Wonko



#3 tinoy69

tinoy69

    Newbie

  • Members
  • 24 posts
  •  
    Philippines

Posted 10 June 2016 - 02:16 PM

thanks for the reply wonko...

 

will try...

 

edit:

although my target is to understand "relay agents" and "proxydhcp"...as this confuses me...

 

also, after doing what you suggest...i really like to find a solution that just modifies

the opendhcp settings achieving the same effect...if possible...so as to not modify

the iscsi image (.vhd file)...

 

but still thank you...


Edited by tinoy69, 10 June 2016 - 02:23 PM.


#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 June 2016 - 03:36 PM

The proxydhcp concept seems to me clear enough:
https://en.wikipedia...ent#Integration

 

It doesn't seem to me applicable in your setup :dubbio:, the generic idea is that you have an already working DHCP server and instead of changing it or its setup you add another server that runs as a proxyDHCP server for PXE booting requests only, but not really within my knowledge/experience :w00t: :ph34r:, though at first sight I cannot see the reason for having such a complex setup...

 

I mean you are trying to have a PXE booting without the server be used as gateway? :unsure:

 

:duff:

Wonko



#5 tinoy69

tinoy69

    Newbie

  • Members
  • 24 posts
  •  
    Philippines

Posted 10 June 2016 - 06:48 PM

hmmm...didn't work the netsh thingy...

 

BUT...

 

i added another nic card on the server and set ip add to 192.168.1.x, after that

the client had an internet connection...but why?

 

also, besides the netsh add ip, you also have to set the dns address (else it will

also not have internet)

 

but i'm intrigued...why adding another nic and setting ip add to range of the

virtualized pfsense was the client able to have an internet connection?!

without the nic connected there also was no internet...



#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 June 2016 - 06:53 PM

The "something *like* " was intentional, but "didn't work the netsh thingy" means NOTHING.

 

Which EXACT command did you run?

What was the output of IPCONFIG /ALL before running that command?

What was the output of the IPCONFIG /ALL after running that command?

 

:duff:

Wonko



#7 tinoy69

tinoy69

    Newbie

  • Members
  • 24 posts
  •  
    Philippines

Posted 10 June 2016 - 07:05 PM

the command you previously gave...

 

it correctly changed the ip address, but you also have to change the dns via the netsh command also

i just added those to my startup script (via startup folder), without touching the original vhd

 

netsh interface ip add dnsservers ...

 

it doesn't work initially, but i added another nic to the server, giving it an ip on the range of the virtual

pfsense, then after that, magically the client connected to the internet...

 

but i wonder why the extra added nic gave the client internet?!

 

edit:

what i meant that it did not work, is that after changing both ip and dns, the client still has no internet

but it correctly changed the ip add and dns on the client (which is the one i'm after), but to my surprise

the client still has no internet...

 

and i have a spare nic, plugged it to the server...and just gave it an ip address on the range of the virtual

pfsense, and to my surprise, after refreshing the browser on the client, it now has internet...

 

what i want to say, the command you gave previously, the netsh thingy, did work...sorry for that


Edited by tinoy69, 10 June 2016 - 07:18 PM.


#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 11 June 2016 - 09:20 AM

We are failing to communicate :(.

 

There is no reason why you shouldn't be able to connect to the internet with that nic (without the additional one).

The DNS is only needed if you try accessing a URL.

But you should be able to (say) Ping google DNS at 4.4.4.4 without any DNS configured.

If you provide actual feedback (as asked the EXACT commands you give and the EXACT output) it should be possible to find the reason why.

 

I have seen cases where the IP address of the network needs to be the "first one" as an example, or you might need to issue an ipconfig /renew, etc.

 

:duff:

Wonko



#9 tinoy69

tinoy69

    Newbie

  • Members
  • 24 posts
  •  
    Philippines

Posted 14 June 2016 - 09:17 AM

i really have to apologize wonko...

 

it is now working...the problem was (after getting a hint from your last reply)...is that of the wrong virtualbox settings on the bridge adaptor

i was using the new nic i've inserted (which is disconnected and its ip is 192.168.1.x, NOT on the nic which has ip 192.168.0.100)

 

ive corrected the virtualbox lan settings and now its working ok (without the new nic plugged in)

 

very sorry wonko, and really thank you for helping...

 

the reason why i'm researching this proxydhcp is that, most commercial diskless software i've studied, is that they have proxydhcp (port 4011)

in their software (aside from dhcp), and i'm assuming this takes care of the ip addressing, gateway in the dhcp level as opposed to 

changing ip address via netsh (which i could be also be wrong) on windows startup...

 

thank you very much wonko, i would still find answers to the proxydhcp i'm researching, but for the meantime your solution works...

 

i'm gonna update this just in case i made the proxydhcp to work in my setup...again, thank you wonko...



#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 June 2016 - 09:44 AM

You are welcome, I am sure :)

 

:duff:

Wonko







Also tagged with one or more of these keywords: dhcp, iscsi, lan, diskless

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users