*****SPAM***** [Skyeye-developer] how to add route information on uClinux running on skyeye?

Peter Chubb peterc at gelato.unsw.edu.au
Mon May 28 07:54:01 CST 2007


>>>>> "GBK" == GBK  <GBK> writes:

GBK> Hello,every,i want to add route information on
GBK> uClinux,so it can comunicates with linux host, and comunicates
GBK> with other computer in my lan .  But i have tried a lot ,I have
GBK> not added it successfully.I konw a little about network .Can
GBK> someone tell me the right route command ,my linux host'ip is
GBK> 59.65.224.253,vnet0's ip is 10.0.0.1 and uClinux'ip is 10.0.0.2.
GBK> Thanks a lot! 


Try 
	route add default gw  10.0.0.1

inside the ucLinux instance.

You'll also need to set up your hosts firewall rules to do NAT
translation.

Something like:

	extiface=eth0
	network=10.0.0.0

        iptables -F
        iptables -F -t nat
        iptables -A INPUT -j ACCEPT
        iptables -A OUTPUT -j ACCEPT
        iptables -A FORWARD -i ${extiface} -o tap+ -m state \
            --state ESTABLISHED,RELATED -j ACCEPT
        iptables -A FORWARD -s ${network}/24 -o ${extiface} -j ACCEPT
	iptables -t nat -A POSTROUTING -o ${extiface} -j MASQUERADE
        echo 1 > /proc/sys/net/ipv4/ip_forward

(This assumes you're using the tap ethernet interface)

--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia



More information about the Skyeye-developer mailing list