The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iPXE DHCP got wrong gateway
2017-02-23, 09:16
Post: #1
Star iPXE DHCP got wrong gateway
I installed a Ubuntu 16.04 and isc-dhcp-server 4.3.3-5ubuntu12.6.

The PXE bootrom got correct gateway, but the iPXE didn't.
Screen capture (I couldn't upload attachment for some reason...):
http://pan.baidu.com/s/1jIiFVHO

The DHCP server is 10.210.0.11, and the client is in another VLAN which gateway is 10.211.0.1.

Anything wrong?

I captured ethernet packages.
Code:
15:20:07.562620 IP (tos 0x0, ttl 63, id 65239, offset 0, flags [none], proto UDP (17), length 448)
    10.211.0.1.67 > 10.210.0.11.67: [udp sum ok] BOOTP/DHCP, Request from 00:e0:4c:69:3b:17, length 420, hops 1, xid 0x542d2231, secs 18, Flags [Broadcast] (0x8000)
          Gateway-IP 10.211.0.1
          Client-Ethernet-Address 00:e0:4c:69:3b:17
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: Request
            MSZ Option 57, length 2: 1472
            ARCH Option 93, length 2: 0
            NDI Option 94, length 3: 1.2.1
            Vendor-Class Option 60, length 32: "PXEClient:Arch:00000:UNDI:002001"
            User-Class Option 77, length 4:
              instance#1: ERROR: malformed option
            Parameter-Request Option 55, length 22:
              Subnet-Mask, Default-Gateway, Domain-Name-Server, LOG
              Hostname, Domain-Name, RP, Vendor-Option
              Vendor-Class, TFTP, BF, Option 119
              Option 128, Option 129, Option 130, Option 131
              Option 132, Option 133, Option 134, Option 135
              Option 175, Option 203
            T175 Option 175, length 57: 177.5.1.16.236.129.104.235.3.1.0.0.23.1.1.34.1.1.22.1.1.19.1.1.20.1.1.17.1.1.39.​1.1.25.1.1.41.1.1.16.1.2.33.1.1.21.1.1.24.1.1.38.1.1.18.1.1
            Client-ID Option 61, length 7: ether 00:e0:4c:69:3b:17
            GUID Option 97, length 17: 0.0.2.0.3.0.4.0.5.0.6.0.7.0.8.0.9
            Server-ID Option 54, length 4: 10.210.0.11
            Requested-IP Option 50, length 4: 10.211.0.20
        0x0000:  4500 01c0 fed7 0000 3f11 65a5 0ad3 0001  E.......?.e.....
        0x0010:  0ad2 000b 0043 0043 01ac aa05 0101 0601  .....C.C........
        0x0020:  542d 2231 0012 8000 0000 0000 0000 0000  T-"1............
        0x0030:  0000 0000 0ad3 0001 00e0 4c69 3b17 0000  ..........Li;...
        0x0040:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0050:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0060:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0070:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0080:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0090:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00a0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00b0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00c0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00d0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00e0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00f0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0100:  0000 0000 0000 0000 6382 5363 3501 0339  ........c.Sc5..9
        0x0110:  0205 c05d 0200 005e 0301 0201 3c20 5058  ...]...^....<.PX
        0x0120:  4543 6c69 656e 743a 4172 6368 3a30 3030  EClient:Arch:000
        0x0130:  3030 3a55 4e44 493a 3030 3230 3031 4d04  00:UNDI:002001M.
        0x0140:  6950 5845 3716 0103 0607 0c0f 112b 3c42  iPXE7........+<B
        0x0150:  4377 8081 8283 8485 8687 afcb af39 b105  Cw...........9..
        0x0160:  0110 ec81 68eb 0301 0000 1701 0122 0101  ....h........"..
        0x0170:  1601 0113 0101 1401 0111 0101 2701 0119  ............'...
        0x0180:  0101 2901 0110 0102 2101 0115 0101 1801  ..).....!.......
        0x0190:  0126 0101 1201 013d 0701 00e0 4c69 3b17  .&.....=....Li;.
        0x01a0:  6111 0000 0200 0300 0400 0500 0600 0700  a...............
        0x01b0:  0800 0936 040a d200 0b32 040a d300 14ff  ...6.....2......

15:20:07.562955 IP (tos 0x0, ttl 64, id 55711, offset 0, flags [DF], proto UDP (17), length 328)
    10.210.0.11.67 > 10.211.0.1.67: [bad udp cksum 0x16f6 -> 0xb719!] BOOTP/DHCP, Reply, length 300, hops 1, xid 0x542d2231, secs 18, Flags [Broadcast] (0x8000)
          Your-IP 10.211.0.20
          Server-IP 10.210.0.11
          Gateway-IP 10.211.0.1
          Client-Ethernet-Address 00:e0:4c:69:3b:17
          file "undionly.kkpxe"
          Vendor-rfc1048 Extensions
            Magic Cookie 0x63825363
            DHCP-Message Option 53, length 1: ACK
            Server-ID Option 54, length 4: 10.210.0.11
            Lease-Time Option 51, length 4: 20780
            Subnet-Mask Option 1, length 4: 255.255.255.0
            Default-Gateway Option 3, length 4: 10.210.0.1
            Domain-Name-Server Option 6, length 4: 10.210.0.11
        0x0000:  4500 0148 d99f 4000 4011 4a55 0ad2 000b  E..H..@.@.JU....
        0x0010:  0ad3 0001 0043 0043 0134 16f6 0201 0601  .....C.C.4......
        0x0020:  542d 2231 0012 8000 0000 0000 0ad3 0014  T-"1............
        0x0030:  0ad2 000b 0ad3 0001 00e0 4c69 3b17 0000  ..........Li;...
        0x0040:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0050:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0060:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0070:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0080:  0000 0000 0000 0000 756e 6469 6f6e 6c79  ........undionly
        0x0090:  2e6b 6b70 7865 0000 0000 0000 0000 0000  .kkpxe..........
        0x00a0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00b0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00c0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00d0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00e0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x00f0:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0100:  0000 0000 0000 0000 6382 5363 3501 0536  ........c.Sc5..6
        0x0110:  040a d200 0b33 0400 0051 2c01 04ff ffff  .....3...Q,.....
        0x0120:  0003 040a d200 0106 040a d200 0bff 0000  ................
        0x0130:  0000 0000 0000 0000 0000 0000 0000 0000  ................
        0x0140:  0000 0000 0000 0000                      ........

The DHCP configuration:
Code:
# DHCP Server Configuration file\n#see /usr/share/doc/dhcp*/dhcpd.conf.sample
# This file was created by FOG
#Definition of PXE-specific options
# Code 1: Multicast IP Address of bootfile
# Code 2: UDP Port that client should monitor for MTFTP Responses
# Code 3: UDP Port that MTFTP servers are using to listen for MTFTP requests
# Code 4: Number of seconds a client must listen for activity before trying
#         to start a new MTFTP transfer
# Code 5: Number of seconds a client must listen before trying to restart
#         a MTFTP transfer
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option arch code 93 = unsigned integer 16;
use-host-decl-names on;
ddns-update-style interim;
ignore client-updates;
# Specify subnet of ether device you do NOT want service.
# For systems with two or more ethernet devices.
# subnet 136.165.0.0 netmask 255.255.0.0 {}

subnet 10.210.0.0 netmask 255.255.255.0{
    authoritative;
    option subnet-mask 255.255.255.0;
    range dynamic-bootp 10.210.0.20 10.210.0.200;
    default-lease-time 21600;
    max-lease-time 43200;
    option routers 10.210.0.1;
    option domain-name-servers 10.210.0.11;
    next-server 10.210.0.11;
    class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }
    class "SURFACE-PRO-4" {
        match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:Arch:00007:UNDI:003016";
        filename "ipxe7156.efi";
    }
    class "Apple-Intel-Netboot" {
        match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
        option dhcp-parameter-request-list 1,3,17,43,60;
        if (option dhcp-message-type = 8) {
            option vendor-class-identifier "AAPLBSDPC";
            if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) {
                # BSDP List
                option vendor-encapsulated-options 01:01:01:04:02:80:00:07:04:81:00:05:2a:09:0D:81:00:05:2a:08:69:50:58:45:2d:46:4f​:47;
                filename "ipxe.efi";
            }
        }
    }
}

subnet 10.211.0.0 netmask 255.255.255.0{
    authoritative;
    option subnet-mask 255.255.255.0;
    range dynamic-bootp 10.211.0.20 10.211.0.200;
    default-lease-time 21600;
    max-lease-time 43200;
    option routers 10.211.0.1;
    option domain-name-servers 10.210.0.11;
    next-server 10.210.0.11;
    class "Legacy" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
        filename "undionly.kkpxe";
    }
    class "UEFI-32-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-32-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
        filename "i386-efi/ipxe.efi";
    }
    class "UEFI-64-1" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
        filename "ipxe.efi";
    }
    class "UEFI-64-2" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
        filename "ipxe.efi";
    }
    class "UEFI-64-3" {
        match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
        filename "ipxe.efi";
    }
    class "SURFACE-PRO-4" {
        match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:Arch:00007:UNDI:003016";
        filename "ipxe7156.efi";
    }
    class "Apple-Intel-Netboot" {
        match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
        option dhcp-parameter-request-list 1,3,17,43,60;
        if (option dhcp-message-type = 8) {
            option vendor-class-identifier "AAPLBSDPC";
            if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) {
                # BSDP List
                option vendor-encapsulated-options 01:01:01:04:02:80:00:07:04:81:00:05:2a:09:0D:81:00:05:2a:08:69:50:58:45:2d:46:4f​:47;
                filename "ipxe.efi";
            }
        }
    }
}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
iPXE DHCP got wrong gateway - maorui2k - 2017-02-23 09:16



User(s) browsing this thread: 4 Guest(s)