ovn-org / ovn

Open Virtual Network
Apache License 2.0
517 stars 254 forks source link

Can OVN DHCP used in PXE? #37

Open M258 opened 4 years ago

M258 commented 4 years ago

I want to use ovn DHCP to set the PXE server by using “ovn-nbctl dhcp-options-set-options [dhcp-option-id] tftp_server=X.X.X.X", but it dose't work. It seems that ovn dosen't set DHCP “next server” as tftp_server. How to resove it?

numansiddique commented 4 years ago

@umago Do you have any comments here

umago commented 4 years ago

Hi,

@M258 are you using an IPv4 address as the value of that option or a hostname ? Because just yesterday I saw a patch that is suppose to fix the data type of that option from "ipv4" to "string" in order to make it support hostnames as well. Maybe you are hitting this limitation, let me know.

You can find the patch fixing it here https://patchwork.ozlabs.org/project/openvswitch/patch/1588874227-59898-1-git-send-email-svc.mail.git@nutanix.com/

M258 commented 4 years ago

Hi,

@M258 are you using an IPv4 address as the value of that option or a hostname ? Because just yesterday I saw a patch that is suppose to fix the data type of that option from "ipv4" to "string" in order to make it support hostnames as well. Maybe you are hitting this limitation, let me know.

You can find the patch fixing it here https://patchwork.ozlabs.org/project/openvswitch/patch/1588874227-59898-1-git-send-email-svc.mail.git@nutanix.com/

Thanks for informing me about this patch,but it's not what I want。I want to use ovn dhcp to set “next server” in dhcp header to use pxe,not “tftp server” in dhcp options.

numansiddique commented 4 years ago

@M258 So you want the OVN dhcp to set dhcp next header to "tftp_server" option ? If this is what RFC says and if we are not following it, we should fix it.

It should be straight forward to fix it.

Feel free to propose a patch. If not, I can look into it, but it has to wait before I clear my backlog.

Thanks

liuyuanfeng06 commented 3 years ago

Has this problem been solved ? I meet the same problem when i start mlx cx6 pxe with ovn dhcp.

liuyuanfeng06 commented 3 years ago

I want to use ovn DHCP to set the PXE server by using “ovn-nbctl dhcp-options-set-options [dhcp-option-id] tftp_server=X.X.X.X", but it dose't work. It seems that ovn dosen't set DHCP “next server” as tftp_server. How to resove it?

mark

numansiddique commented 3 years ago

which version of OVN you're using ?

I thought that we have all the necessart bits in OVN to support PXE.

@umago You've any comments ?

Thanks

liuyuanfeng06 commented 3 years ago

which version of OVN you're using ?

I thought that we have all the necessart bits in OVN to support PXE.

@umago You've any comments ?

Thanks [root@arm01 ~]# ovn-sbctl --version ovn-sbctl 20.12.1 Open vSwitch Library 2.14.90 DB Schema 20.12.0 [root@arm01 ~]# [root@arm01 ~]# [root@arm01 ~]# ovn-nbctl --version ovn-nbctl 20.12.1 Open vSwitch Library 2.14.90 DB Schema 5.28.0

liuyuanfeng06 commented 3 years ago

i catch 2 packets with dnsmasq service and ovn dhcp respectively. i find when i use dnsmasq , next server in dhcp ack has a value and can pxe normally .But when i use ovn dhcp,during pxe i get an error ‘Nothing to boot:No such file ’ ,and No value is assigened to next server in dhcp ack.

liuyuanfeng06 commented 3 years ago

https://docplayer.net/7151917-Preboot-execution-environment-pxe-specification.html

and

https://tools.ietf.org/html/rfc2131

in the first link they can see that siaddr is must in DHCP offer. (page 25)

we can also see it in the second link that siaddr is must in DHCP offer. (page 9)

But now in ovn dhcp offer packet,we do not assign value to siaddr in dhcp head as Next Server。

发件人: numansiddique @.> 发送时间: 2021年3月8日 16:23 收件人: ovn-org/ovn @.> 抄送: Yuanfeng Liu (刘元锋) @.>; Comment @.> 主题: Re: [ovn-org/ovn] Can OVN DHCP used in PXE? (#37)

which version of OVN you're using ?

I thought that we have all the necessart bits in OVN to support PXE.

@umago https://github.com/umago You've any comments ?

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ovn-org/ovn/issues/37#issuecomment-792570103 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AP7SSWSZ7X25R5YKBOSK7OTTCSCQDANCNFSM4LCKH7OQ .

shylou commented 2 years ago

we had fixed it by ourselves, like this: put option 150 to siaddr.