Re: [gPXE] GPXE How boot target with "user name" and"TARGET SECRET "

Shao Miller <[email protected]> Mon, 15 Mar 2010 18:09:09 -0400
Newsgroups gmane.network.etherboot.user
Message-ID <[email protected]>
lsq726 wrote:
> ...PLEASE HELP ME

An alternative approach to "yelling" might be to acknowledge that you
received a response and explain that it didn't help you.

You could also try e-mailing the _gPXE_ general discussion list instead
of the _Etherboot_ list, like I gave a link for.

> I already have a successful boot with the GPXE ISCSI [NO password
> validation OR NO TARGET SECRET]。
>
> If the ISCSI has the password authentication [password validation
> ORTARGET SECRET],THEN Change how to set up the DHCP or somewhere else?
>

I'm sorry that I missed your authentication needs in your first e-mail.
Please see the attachment to this e-mail. It is a NETSH script which
demonstrates how to set up reservations that include iSCSI
authentication credentials for clients by using gPXE encapsulated
options with your Windows DHCP server.

You can edit the reservation's options manually by double-clicking the
option 175 inside the reservation, then editing the username and
password, then correcting the option length field for both username and
password.

In the attached example, both the username and password fields are 8
characters long, so you see that the field for each one has 0x08.

- Shao Miller

-----

# Example network layout

# 192.168.0.2 : DHCP server
# 192.168.0.30 : iSCSI target SAN server
# 192.168.0.100 : Reservation for client A
# 192.168.0.101 : Reservation for client B
# 192.168.0.102 : Reservation for client C

# To backup your DHCP server's configuration, use the following command:
#
# netsh dhcp server 192.168.0.2 dump > dhcp_backup.netsh
#
# To import such a backup, use the following command:
#
# netsh -f dhcp_backup.netsh
#
# This file you are reading is an example DHCP backup file

# Add gPXE encapsulated options

Dhcp Server 192.168.0.2 Add Optiondef 175 "gPXE_Options" ENCAPSULATED 0
comment="gPXE_Options"

# Add scope

Dhcp Server 192.168.0.2 add scope 192.168.0.0 255.255.255.0 "MyScope"
"MyScope"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set state 1

# Add pool

Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add iprange 192.168.0.100
192.168.0.253

# Add boot server and boot file options

Dhcp Server 192.168.0.2 Scope 192.168.0.0 set optionvalue 66 STRING
"192.168.0.3"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set optionvalue 67 STRING
"undionly.kkpxe"

# Remember you will also want to configure DNS options

# Add reservations for SAN clients

# Client A
Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add reservedip 192.168.0.100
0011223344aa "ClientA" "ClientA" "BOTH"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue
192.168.0.100 17 STRING "iscsi:192.168.0.30::::sans:clienta"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue
192.168.0.100 175 ENCAPSULATED "be08757365726e616d65bf0870617373776f7264ff"

# Client B
Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add reservedip 192.168.0.101
0011223344bb "ClientB" "ClientB" "BOTH"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue
192.168.0.101 17 STRING "iscsi:192.168.0.30::::sans:clientb"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue
192.168.0.101 175 ENCAPSULATED "be08757365726e616d65bf0870617373776f7264ff"

# Client C
Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add reservedip 192.168.0.102
0011223344cc "ClientC" "ClientC" "BOTH"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue
192.168.0.102 17 STRING "iscsi:192.168.0.30::::sans:clientc"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue
192.168.0.102 175 ENCAPSULATED "be08757365726e616d65bf0870617373776f7264ff"

# gPXE Encapsulated Options example break-down

# 0xBE : Username option
# 0x08 : Username is 8 bytes
# 0x75 0x73 0x65 0x72 0x6e 0x61 0x6d 0x65 : "username"
# 0xBF : Password option
# 0x08 : Password is 8 bytes
# 0x70 0x61 0x73 0x73 0x77 0x6f 0x72 0x64 : "password"
# 0xFF : End encapsulated options

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Etherboot-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/etherboot-discuss
dhcp_sans.netsh (text/plain, 2.7 KB)
# Example network layout

# 192.168.0.2  : DHCP server
# 192.168.0.30 : iSCSI target SAN server
# 192.168.0.100 : Reservation for client A
# 192.168.0.101 : Reservation for client B
# 192.168.0.102 : Reservation for client C

# To backup your DHCP server's configuration, use the following command:
#
# netsh dhcp server 192.168.0.2 dump > dhcp_backup.netsh
#
# To import such a backup, use the following command:
#
# netsh -f dhcp_backup.netsh
#
# This file you are reading is an example DHCP backup file

# Add gPXE encapsulated options

Dhcp Server 192.168.0.2 Add Optiondef 175 "gPXE_Options" ENCAPSULATED 0 comment="gPXE_Options"

# Add scope

Dhcp Server 192.168.0.2 add scope 192.168.0.0 255.255.255.0 "MyScope" "MyScope"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set state 1

# Add pool

Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add iprange 192.168.0.100 192.168.0.253 

# Add boot server and boot file options

Dhcp Server 192.168.0.2 Scope 192.168.0.0 set optionvalue 66 STRING "192.168.0.3" 
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set optionvalue 67 STRING "undionly.kkpxe" 

# Remember you will also want to configure DNS options

# Add reservations for SAN clients

# Client A
Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add reservedip 192.168.0.100 0011223344aa "ClientA" "ClientA" "BOTH"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue 192.168.0.100 17 STRING "iscsi:192.168.0.30::::sans:clienta" 
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue 192.168.0.100 175 ENCAPSULATED "be08757365726e616d65bf0870617373776f7264ff" 

# Client B
Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add reservedip 192.168.0.101 0011223344bb "ClientB" "ClientB" "BOTH"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue 192.168.0.101 17 STRING "iscsi:192.168.0.30::::sans:clientb" 
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue 192.168.0.101 175 ENCAPSULATED "be08757365726e616d65bf0870617373776f7264ff" 

# Client C
Dhcp Server 192.168.0.2 Scope 192.168.0.0 Add reservedip 192.168.0.102 0011223344cc "ClientC" "ClientC" "BOTH"
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue 192.168.0.102 17 STRING "iscsi:192.168.0.30::::sans:clientc" 
Dhcp Server 192.168.0.2 Scope 192.168.0.0 set reservedoptionvalue 192.168.0.102 175 ENCAPSULATED "be08757365726e616d65bf0870617373776f7264ff" 

# gPXE Encapsulated Options example break-down

# 0xBE : Username option
# 0x08 : Username is 8 bytes
# 0x75 0x73 0x65 0x72 0x6e 0x61 0x6d 0x65 : "username"
# 0xBF : Password option
# 0x08 : Password is 8 bytes
# 0x70 0x61 0x73 0x73 0x77 0x6f 0x72 0x64 : "password"
# 0xFF : End encapsulated options