TS-4900 Network configuration example
From embeddedTS Manuals
Most commonly networks will offer DHCP which can be set up with one command:
# To setup the network for this boot:
udhcpc -i eth0
# Or if you're on a baseboard with a second ethernet port, you can use that as:
udhcpc -i eth1
# To instead manually configure the interface for this boot:
killall udhcpc
# Set IP + subnet mask
ifconfig eth0 192.168.0.50 netmask 255.255.255.0
# Set default gateway, usually your router
route add default gw 192.168.0.1
# Set your DNS server
echo "nameserver 8.8.8.8" > /etc/resolv.conf
To make your network settings take effect on startup in Yocto, edit /etc/network/interfaces:
# We always want the loopback interface. # auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.0.50 netmask 255.255.255.0 gateway 192.168.0.1 auto eth1 iface eth1 inet dhcp