4th and following
                BOOTP requests:         delay 0 ... 8 sec
 
+- DHCP Advanced Options:
+               CONFIG_BOOTP_MASK
+
+               You can fine tune the DHCP functionality by adding
+               these flags to the CONFIG_BOOTP_MASK define:
+
+               CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS
+               serverip from a DHCP server, it is possible that more
+               than one DNS serverip is offered to the client.
+               If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS
+               serverip will be stored in the additional environment
+               variable "dnsip2". The first DNS serverip is always
+               stored in the variable "dnsip", when CONFIG_BOOTP_DNS
+               is added to the CONFIG_BOOTP_MASK.
+
+               CONFIG_BOOTP_SEND_HOSTNAME - Some DHCP servers are capable
+               to do a dynamic update of a DNS server. To do this, they
+               need the hostname of the DHCP requester.
+               If CONFIG_BOOP_SEND_HOSTNAME is added to the
+               CONFIG_BOOTP_MASK, the content of the "hostname"
+               environment variable is passed as option 12 to
+               the DHCP server.
+
 - Status LED:  CONFIG_STATUS_LED
 
                Several configurations allow to display the current
 
   bootfile     - see above
   dnsip                - IP address of your Domain Name Server
+  dnsip2       - IP address of your secondary Domain Name Server
   gatewayip    - IP address of the Gateway (Router) to use
   hostname     - Target hostname
   ipaddr       - see above
 
        setenv("dnsip", tmp);
     }
 
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
+    if (NetOurDNS2IP) {
+           ip_to_string (NetOurDNS2IP, tmp);
+           setenv("dnsip2", tmp);
+    }
+#endif
+
     if (NetOurNISDomain[0])
        setenv("domain", NetOurNISDomain);
 
 
 #define CONFIG_BOOTP_BOOTPATH          0x00000010
 #define CONFIG_BOOTP_BOOTFILESIZE      0x00000020
 #define CONFIG_BOOTP_DNS               0x00000040
+#define CONFIG_BOOTP_DNS2              0x00000080
+#define CONFIG_BOOTP_SEND_HOSTNAME      0x00000100
 
 #define CONFIG_BOOTP_VENDOREX          0x80000000
 
 
 #define CONFIG_MII             1       /* MII PHY management           */
 #define        CONFIG_PHY_ADDR         0       /* PHY address                  */
 
-#if 0 /* test-only */
-#define CONFIG_BOOTP_MASK      (CONFIG_BOOTP_DEFAULT |  \
-                                CONFIG_BOOTP_VENDOREX)
-#else
-#define CONFIG_BOOTP_MASK       (CONFIG_BOOTP_DEFAULT)
-#endif
+#define CONFIG_BOOTP_MASK       (CONFIG_BOOTP_DEFAULT | \
+                                CONFIG_BOOTP_DNS | \
+                                CONFIG_BOOTP_DNS2 | \
+                                CONFIG_BOOTP_SEND_HOSTNAME )
 
 #define CONFIG_COMMANDS              ( CONFIG_CMD_DFL  | \
                                CFG_CMD_DHCP    | \
 
 
 #define CONFIG_RTC_M48T35A     1               /* ST Electronics M48 timekeeper */
 
-#if 0 /* test-only */
-#define CONFIG_BOOTP_MASK      (CONFIG_BOOTP_DEFAULT |  \
-                                CONFIG_BOOTP_VENDOREX)
-#else
-#define CONFIG_BOOTP_MASK       (CONFIG_BOOTP_DEFAULT)
-#endif
+#define CONFIG_BOOTP_MASK       (CONFIG_BOOTP_DEFAULT | \
+                                CONFIG_BOOTP_DNS | \
+                                CONFIG_BOOTP_DNS2 | \
+                                CONFIG_BOOTP_SEND_HOSTNAME )
 
 #define CONFIG_COMMANDS              ( CONFIG_CMD_DFL  | \
                                CFG_CMD_DHCP    | \
 
 
 #define CONFIG_RTC_M48T35A     1               /* ST Electronics M48 timekeeper */
 
-#define CONFIG_BOOTP_MASK       (CONFIG_BOOTP_DEFAULT)
+#define CONFIG_BOOTP_MASK       (CONFIG_BOOTP_DEFAULT | \
+                                CONFIG_BOOTP_DNS | \
+                                CONFIG_BOOTP_DNS2 | \
+                                CONFIG_BOOTP_SEND_HOSTNAME )
 
 #define CONFIG_COMMANDS              ( CONFIG_CMD_DFL  | \
                                CFG_CMD_DHCP    | \
 
 extern IPaddr_t                NetOurGatewayIP;        /* Our gateway IP addresse      */
 extern IPaddr_t                NetOurSubnetMask;       /* Our subnet mask (0 = unknown)*/
 extern IPaddr_t                NetOurDNSIP;     /* Our Domain Name Server (0 = unknown)*/
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
+extern IPaddr_t                NetOurDNS2IP;    /* Our 2nd Domain Name Server (0 = unknown)*/
+#endif
 extern char            NetOurNISDomain[32];    /* Our NIS domain               */
 extern char            NetOurHostName[32];     /* Our hostname                 */
 extern char            NetOurRootPath[64];     /* Our root path                */
 
                if (NetOurDNSIP == 0) {
                        NetCopyIP(&NetOurDNSIP, (IPaddr_t*)(ext+2));
                }
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
+               if ((NetOurDNS2IP == 0) && (size > 4)) {
+                       NetCopyIP(&NetOurDNS2IP, (IPaddr_t*)(ext+2+4));
+               }
+#endif
                break;
        case 7:         /* Log server - Not yet supported               */
                break;
 #if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_VENDOREX)
     u8 *x;
 #endif
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_SEND_HOSTNAME)
+    uchar *hostname;
+#endif
 
     *e++ =  99;                /* RFC1048 Magic Cookie */
     *e++ = 130;
            *e++ = tmp & 0xff;
     }
 
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_SEND_HOSTNAME)
+    if ( (hostname = getenv("hostname")) ) {
+           int hostnamelen = strlen(hostname);
+           *e++ = 12;        /* Hostname */
+           *e++ = hostnamelen;
+           memcpy(e,hostname,hostnamelen);
+           e += hostnamelen;
+    }
+#endif
+
 #if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_VENDOREX)
     if ((x = dhcp_vendorex_prep (e)))
        return x - start ;
                                break;
                        case  6:
                                NetCopyIP(&NetOurDNSIP, (popt+2));
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
+                               if ( *(popt+1) > 4 ) {
+                                       NetCopyIP(&NetOurDNS2IP, (popt+2+4));
+                               }
+#endif
                                break;
                        case 12:
                                size = truncate_sz ("Host Name",
 
 IPaddr_t       NetOurSubnetMask=0;             /* Our subnet mask (0=unknown)  */
 IPaddr_t       NetOurGatewayIP=0;              /* Our gateways IP address      */
 IPaddr_t       NetOurDNSIP=0;                  /* Our DNS IP address           */
+#if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_DNS2)
+IPaddr_t       NetOurDNS2IP=0;                 /* Our 2nd DNS IP address       */
+#endif
 char           NetOurNISDomain[32]={0,};       /* Our NIS domain               */
 char           NetOurHostName[32]={0,};        /* Our hostname                 */
 char           NetOurRootPath[64]={0,};        /* Our bootpath                 */