diff --git a/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino b/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino index 1c7ec4cabd8..958d46b4a3d 100644 --- a/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino +++ b/libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino @@ -30,6 +30,7 @@ byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192, 168, 1, 177); +IPAddress myDns(192, 168, 1, 1); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 0, 0); @@ -41,7 +42,7 @@ EthernetClient clients[4]; void setup() { // initialize the ethernet device - Ethernet.begin(mac, ip, gateway, subnet); + Ethernet.begin(mac, ip, myDns, gateway, subnet); // start listening for clients server.begin(); // Open serial communications and wait for port to open: diff --git a/libraries/Ethernet/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino b/libraries/Ethernet/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino index f7439a039c3..c0a3298a9f2 100644 --- a/libraries/Ethernet/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino +++ b/libraries/Ethernet/examples/BarometricPressureWebServer/BarometricPressureWebServer.ino @@ -33,8 +33,6 @@ byte mac[] = { }; // assign an IP address for the controller: IPAddress ip(192, 168, 1, 20); -IPAddress gateway(192, 168, 1, 1); -IPAddress subnet(255, 255, 255, 0); // Initialize the Ethernet server library diff --git a/libraries/Ethernet/examples/ChatServer/ChatServer.ino b/libraries/Ethernet/examples/ChatServer/ChatServer.ino index 927a60e1be2..74fb50a6983 100644 --- a/libraries/Ethernet/examples/ChatServer/ChatServer.ino +++ b/libraries/Ethernet/examples/ChatServer/ChatServer.ino @@ -27,6 +27,7 @@ byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192, 168, 1, 177); +IPAddress myDns(192,168,1, 1); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 0, 0); @@ -37,7 +38,7 @@ boolean alreadyConnected = false; // whether or not the client was connected pre void setup() { // initialize the ethernet device - Ethernet.begin(mac, ip, gateway, subnet); + Ethernet.begin(mac, ip, myDns, gateway, subnet); // start listening for clients server.begin(); // Open serial communications and wait for port to open: diff --git a/libraries/Ethernet/examples/DhcpChatServer/DhcpChatServer.ino b/libraries/Ethernet/examples/DhcpChatServer/DhcpChatServer.ino index 32e35789af4..e81d1e8ee5c 100644 --- a/libraries/Ethernet/examples/DhcpChatServer/DhcpChatServer.ino +++ b/libraries/Ethernet/examples/DhcpChatServer/DhcpChatServer.ino @@ -30,6 +30,7 @@ byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 }; IPAddress ip(192, 168, 1, 177); +IPAddress myDns(192,168,1, 1); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 0, 0); @@ -51,7 +52,7 @@ void setup() { if (Ethernet.begin(mac) == 0) { Serial.println("Failed to configure Ethernet using DHCP"); // initialize the ethernet device not using DHCP: - Ethernet.begin(mac, ip, gateway, subnet); + Ethernet.begin(mac, ip, myDns, gateway, subnet); } // print your local IP address: Serial.print("My IP address: ");