Aug 8, 2009

How To Share Network with Beagleboard through USB

1) Follow this link to setup network connection between Beagleboard and Host
2) Setup ip forwarding in the Host (linux)
echo "Remove any previous NAT setup"
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain

echo "Setup NAT to forward packets from usb0 <---> eth0"
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface usb0 -j ACCEPT

echo "Enable packet forwarding in the kernel"
echo 1 >> /proc/sys/net/ipv4/ip_forward

3) In the board add route to the host
route add default gw

4) In the board set the DNS search to be same as the host so that it can resolve host to name
cat /etc/resolve.conf

That's all :-)
Post a Comment