ironic pxe

[root@bogon ironic]# grep pxe_bootfile_name_by_arch -rn *
ironic.conf:4075:pxe_bootfile_name_by_arch = =aarch64:grubaa64.efi
[root@bogon ironic]# grep pxe_config_template_by_arch  -rn *
ironic.conf:4040:pxe_config_template_by_arch = aarch64:/tftpboot/pxe_grub_config.template


 

 抓包

[root@bogon ~]# tcpdump -i enahisic2i3 udp and port 67 or port 68 or port 69 and  ether src ac:8d:34:d2:f9:f0 
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enahisic2i3, link-type EN10MB (Ethernet), capture size 262144 bytes
13:15:43.466699 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 347
13:15:46.813071 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 359
13:15:46.818719 IP 172.16.100.101.bmc_patroldb > bogon.tftp:  54 RRQ "bootx64.efi" octet tsize 0 blksize 1468 windowsize 4
13:18:07.233199 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 347
13:18:10.815064 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 359
13:18:10.820525 IP 172.16.100.101.pdps > bogon.tftp:  54 RRQ "bootx64.efi" octet tsize 0 blksize 1468 windowsize 4
13:24:14.429007 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 347
13:24:17.720392 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 359
13:24:17.726269 IP 172.16.100.101.jwalkserver > bogon.tftp:  54 RRQ "bootx64.efi" octet tsize 0 blksize 1468 windowsize 4
13:24:17.752169 IP 172.16.100.101.winjaserver > bogon.tftp:  46 RRQ "bootx64.efi" octet blksize 1468 windowsize 4
13:24:18.083128 IP 172.16.100.101.25300 > bogon.tftp:  60 RRQ "/grub.cfg-01-ac-8d-34-d2-f9-f0" octet blksize 1024 tsize 0
13:24:18.084378 IP 172.16.100.101.25301 > bogon.tftp:  48 RRQ "/grub.cfg-AC106465" octet blksize 1024 tsize 0
13:24:18.085658 IP 172.16.100.101.25302 > bogon.tftp:  47 RRQ "/grub.cfg-AC10646" octet blksize 1024 tsize 0
13:24:18.086710 IP 172.16.100.101.25303 > bogon.tftp:  46 RRQ "/grub.cfg-AC1064" octet blksize 1024 tsize 0
13:24:18.087776 IP 172.16.100.101.25304 > bogon.tftp:  45 RRQ "/grub.cfg-AC106" octet blksize 1024 tsize 0
13:24:18.088753 IP 172.16.100.101.25305 > bogon.tftp:  44 RRQ "/grub.cfg-AC10" octet blksize 1024 tsize 0
13:24:18.089661 IP 172.16.100.101.25306 > bogon.tftp:  43 RRQ "/grub.cfg-AC1" octet blksize 1024 tsize 0
13:24:18.090741 IP 172.16.100.101.25307 > bogon.tftp:  42 RRQ "/grub.cfg-AC" octet blksize 1024 tsize 0
13:24:18.092014 IP 172.16.100.101.25308 > bogon.tftp:  41 RRQ "/grub.cfg-A" octet blksize 1024 tsize 0
13:24:18.093023 IP 172.16.100.101.25309 > bogon.tftp:  39 RRQ "/grub.cfg" octet blksize 1024 tsize 0
13:24:18.094078 IP 172.16.100.101.25310 > bogon.tftp:  71 RRQ "/EFI/centos/grub.cfg-01-ac-8d-34-d2-f9-f0" octet blksize 1024 tsize 0
13:24:18.095291 IP 172.16.100.101.25311 > bogon.tftp:  59 RRQ "/EFI/centos/grub.cfg-AC106465" octet blksize 1024 tsize 0
13:24:18.096275 IP 172.16.100.101.25312 > bogon.tftp:  58 RRQ "/EFI/centos/grub.cfg-AC10646" octet blksize 1024 tsize 0
13:24:18.097296 IP 172.16.100.101.25313 > bogon.tftp:  57 RRQ "/EFI/centos/grub.cfg-AC1064" octet blksize 1024 tsize 0
13:24:18.098296 IP 172.16.100.101.25314 > bogon.tftp:  56 RRQ "/EFI/centos/grub.cfg-AC106" octet blksize 1024 tsize 0
13:24:18.099355 IP 172.16.100.101.25315 > bogon.tftp:  55 RRQ "/EFI/centos/grub.cfg-AC10" octet blksize 1024 tsize 0
13:24:18.100333 IP 172.16.100.101.25316 > bogon.tftp:  54 RRQ "/EFI/centos/grub.cfg-AC1" octet blksize 1024 tsize 0
13:24:18.101383 IP 172.16.100.101.25317 > bogon.tftp:  53 RRQ "/EFI/centos/grub.cfg-AC" octet blksize 1024 tsize 0
13:24:18.102394 IP 172.16.100.101.25318 > bogon.tftp:  52 RRQ "/EFI/centos/grub.cfg-A" octet blksize 1024 tsize 0
13:24:18.103414 IP 172.16.100.101.25319 > bogon.tftp:  50 RRQ "/EFI/centos/grub.cfg" octet blksize 1024 tsize 0
13:24:18.104587 IP 172.16.100.101.25320 > bogon.tftp:  63 RRQ "/EFI/centos/arm64-efi/command.lst" octet blksize 1024 tsize 0
13:24:18.105631 IP 172.16.100.101.25321 > bogon.tftp:  58 RRQ "/EFI/centos/arm64-efi/fs.lst" octet blksize 1024 tsize 0
13:24:18.106752 IP 172.16.100.101.25322 > bogon.tftp:  62 RRQ "/EFI/centos/arm64-efi/crypto.lst" octet blksize 1024 tsize 0
13:24:18.107750 IP 172.16.100.101.25323 > bogon.tftp:  64 RRQ "/EFI/centos/arm64-efi/terminal.lst" octet blksize 1024 tsize 0
13:24:18.108693 IP 172.16.100.101.25324 > bogon.tftp:  50 RRQ "/EFI/centos/grub.cfg" octet blksize 1024 tsize 0
13:24:23.501076 IP 172.16.100.101.25325 > bogon.tftp:  59 RRQ "/tftpboot/172.16.100.101.conf" octet blksize 1024 tsize 0
13:24:26.058345 IP 172.16.100.101.25326 > bogon.tftp:  80 RRQ "1e3726d6-3dfc-46c5-8fd1-47dd30e21664/deploy_kernel" octet blksize 1024 tsize 0
13:24:26.391574 IP 172.16.100.101.25327 > bogon.tftp:  80 RRQ "1e3726d6-3dfc-46c5-8fd1-47dd30e21664/deploy_kernel" octet blksize 1024 tsize 0
13:24:26.918393 IP 172.16.100.101.25328 > bogon.tftp:  81 RRQ "1e3726d6-3dfc-46c5-8fd1-47dd30e21664/deploy_ramdisk" octet blksize 1024 tsize 0
13:25:16.190981 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 276
13:25:16.191576 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from ac:8d:34:d2:f9:f0 (oui Unknown), length 288

arpping
用于检测ip地址是否冲突,分配ip时常用(grep dns & arping)

arping -I eth1 -c 3 -f -D 172.x.x.x

Received 0 response(s)     说明这个IP地址没有被局域网占用

Received 1 response(s)     已被占用

[root@bogon ~]# tftp 172.16.100.99
tftp> get grubaa64.efi
tftp> 

 

                         |
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up        | True                                                                                                                           |
| allowed_address_pairs |                                                                                                                                |
| binding:host_id       | fb3d9543-f0ab-4117-9486-239f2222d3f2                                                                                           |
| binding:profile       | {"local_link_information": [{"switch_info": "JG05-SA-01-CE8850", "port_id": "100GE1/0/12", "switch_id": "30:e9:8e:e0:0e:21"}]} |
| binding:vif_details   | {}                                                                                                                             |
| binding:vif_type      | other                                                                                                                          |
| binding:vnic_type     | baremetal                                                                                                                      |
| created_at            | 2020-06-10T02:19:38Z                                                                                                           |
| description           |                                                                                                                                |
| device_id             | 61608d15-1b0c-43df-8ec8-ded9dc038db3                                                                                           |
| device_owner          | baremetal:none                                                                                                                 |
| extra_dhcp_opts       | {"opt_value": "172.16.100.99", "ip_version": 4, "opt_name": "150"}                                                             |
|                       | {"opt_value": "172.16.100.99", "ip_version": 4, "opt_name": "66"}                                                              |
|                       | {"opt_value": "bootx64.efi", "ip_version": 4, "opt_name": "67"}                                                                |
|                       | {"opt_value": "/tftpboot/", "ip_version": 4, "opt_name": "210"}                                                                |
|                       | {"opt_value": "172.16.100.99", "ip_version": 4, "opt_name": "server-ip-address"}                                               |
| fixed_ips             | {"subnet_id": "cf718c83-6dca-4559-a49f-232478ec7823", "ip_address": "172.16.100.115"}                                          |
| id                    | e8410040-83b2-456e-a5f4-c3d264d179fd                                                                                           |
| mac_address           | ac:8d:34:89:ae:ec                                                                                                              |
| name                  |                                                                                                                                |
| network_id            | 7955186c-17c5-4bbb-ba7f-c6d63203ce37                                                                                           |
| port_security_enabled | True                                                                                                                           |
| project_id            | 42272601916748e2ba64d8a1c5413ba4                                                                                               |
| revision_number       | 14                                                                                                                             |
| security_groups       | 3d9150b8-1d58-4d16-8066-33908ec3b910                                                                                           |
| status                | ACTIVE                                                                                                                         |
| tags                  |                                                                                                                                |
| tenant_id             | 42272601916748e2ba64d8a1c5413ba4                                                                                               |
| updated_at            | 2020-06-10T02:19:40Z                                                                                                           |
+-----------------------+--------------------------------------------------------------------------------------------------------------------------------+
[root@bogon ~]# 

 

 原来是端口的网络有问题,physnet-vlan是vlan网络,将部署网络改成vlan网络可以了

原文地址:https://www.cnblogs.com/dream397/p/13083186.html