1On platforms running AMI BMC firmware (Habanero and Firestone at the moment),
2the 'Get/Set' System Boot Options' command has been extended to allow overrides
3to the network configuration to be specified.
4In Petitboot this will cause any existing network configuration to be overridden
5by the specified configuration. The format of each IPMI request is similar to
6that of the usual boot options request, with a slightly different payload.
7
8The start of the request is similar to a usual boot option override, but
9specifies the fields of interest differently, ie;
10
11Specify 'chassis bootdev', field 96, data1
120x00 0x08 0x61 0x80
13
14The rest of request format is defined by Petitboot as:
15    - 4 byte cookie value (always 0x21 0x70 0x62 0x21)
16    - 2 byte version value (always 0x00 0x01)
17    - 1 byte hardware address size (eg. 0x06 for MAC address)
18    - 1 byte IP address size (eg. 0x04 for IPv4)
19    - Hardware (MAC) address
20    - 1 byte flags for 'ignore' and 'method', where method = 0 is DHCP
21      and method = 1 is Static.
22And for static configs:
23    - IP Address
24    - 1 byte subnet value
25    - Gateway address
26
27Describing each field in more detail:
28
29Specify 'chassis bootdev', field 96, data1
300x00 0x08 0x61 0x80
31
32Set a special cookie that Petitboot will recognise:
330x21 0x70 0x62 0x21
34
35Specify the version (only 1 at the moment)
360x00 0x01
37
38Specify the size of the MAC address and IP address. This is used to
39differentiate between IPv4 and IPv6 addresses, or potential future support for
40Infiniband/etc.
410x06 0x04   (6-byte MAC address, IPv4 IP address)
42
43Set the hardware address of the interface you want to override, eg:
440xf4 0x52 0x14 0xf3 0x01 0xdf
45
46Specify 'ignore' or 'static/dynamic' flags. The second byte specifies to use
47either DHCP or static IP configuration (0 for DHCP).
480x00 0x01
49
50The below fields are required if setting a static configuration:
51
52Set the IP address you want to use, eg:
530x0a 0x3d 0xa1 0x42
54
55Set the subnet mask (short notation), eg '16':
560x10
57
58Set the gateway address, eg:
590x0a 0x3d 0x2 0x1
60
61All together this should look like:
620x00 0x08 0x61 0x80 0x21 0x70 0x62 0x21
630x00 0x01 0x06 0x04 0xf4 0x52 0x14 0xf3
640x01 0xdf 0x00 0x01 0x0a 0x3d 0xa1 0x42
650x10 0x0a 0x3d 0x2 0x1
66
67To clear a network override, it is sufficient to clear out the request, or set
68a zero-cookie which Petitboot will reject. Eg:
690x00 0x08 0x61 0x80 0x00 0x00 0x00 0x00
70
71You can 'Get' the override back with
720x00 0x09 0x61 0x80 0x00
73which should return whatever is currently set.
74
75