Lantronix EDS2100 Linux SDK - User Guide - Page 49

µClinux Networking, Introduction, Static Address Configuration

Page 49 highlights

8. µClinux Networking Introduction µClinux supports a full TCP/IP networking stack. Several networking protocols are supported through the kernel and various shell utilities. Networking is initialized on the target through the /etc/netstart script. DHCP The target can obtain an IP address automatically through the DHCP protocol. Two DHCP clients are supported, udhcpc and dhcpcd. Udhcpc is included as part of busybox and takes up less flash and RAM space. Dhcpcd is a standalone program with more options than udhcpc. The /etc/netstart script will attempt to start whichever one is present, starting with udhcpc. Select the client that best suits your needs. Static Address Configuration By default Linux will attempt to get an IP address through DHCP. To set a static address, perform the following steps on the target: 1. Use the vi text editor to create and edit /etc/netcfg. Note that by default etc/netcfg is a symlink to /usr/local/etc/netcfg. You can either delete this symlink and create /etc/netcfg, or make sure that the path to /usr/local/etc/netcfg exists. 2. Add lines to /etc/netcfg as follows: IPADDR= NETMASK= GATEWAY= 3. Reboot the target for the changes to take effect. NOTE: The static address in the dBUG configuration will also be updated during the reboot. DNS The target supports name resolution via the DNS protocol. The DNS configuration is found in /etc/resolv.conf. Linux Software Developers Kit (SDK) User Guide 49

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76

Linux Software Developers Kit (SDK) User Guide
49
8. μClinux Networking
Introduction
µClinux supports a full TCP/IP networking stack. Several networking protocols are supported
through the kernel and various shell utilities. Networking is initialized on the target through the
/etc/netstart script.
DHCP
The target can obtain an IP address automatically through the DHCP protocol. Two DHCP clients
are supported, udhcpc and dhcpcd. Udhcpc is included as part of busybox and takes up less
flash and RAM space. Dhcpcd is a standalone program with more options than udhcpc. The
/etc/netstart script will attempt to start whichever one is present, starting with udhcpc. Select the
client that best suits your needs.
Static Address Configuration
By default Linux will attempt to get an IP address through DHCP. To set a static address, perform
the following steps on the target:
1.
Use the vi text editor to create and edit
/etc/netcfg
. Note that by default
etc/netcfg
is a
symlink to
/usr/local/etc/netcfg
. You can either delete this symlink and create
/etc/netcfg
, or
make sure that the path to
/usr/local/etc/netcfg
exists.
2.
Add lines to /etc/netcfg as follows:
IPADDR=<target_ip>
NETMASK=<target_netmask>
GATEWAY=<target_gateway>
3.
Reboot the target for the changes to take effect.
NOTE:
The static address in the dBUG configuration will also be updated during the reboot.
DNS
The target supports name resolution via the DNS protocol. The DNS configuration is found in
/etc/resolv.conf
.