Using the NicheStack TCP/IP Stack - Nios II Edition Tutorial

ID 683574
Date 10/04/2021
Public
Document Table of Contents

1.9.1. Network Connection

If you are using a DHCP server to assign IP addresses, connect your development board to your Ethernet network.

If the development board is connected directly to your PC with a crossover Ethernet cable, or a DHCP server is not available, specify the IP addresses manually in simple_socket_server.h.

The default IP addresses in simple_socket_server.h are set to all zeros so the DHCP server packets can pass through secure routers. If you are not using a DHCP server, specify valid static addresses, such as an IP address of 192.168.1.234, with a gateway of 192.168.1.1 and a subnet mask of 255.255.255.0.

Be sure to turn the enable_dhcp_client setting on or off accordingly on the Software Packages tab of the BSP Editor. For details, refer to the “Configuring the BSP” section.