How to setup default gateway/route for ethernet?

1,247 views
Skip to first unread message

Sap

unread,
Dec 17, 2011, 5:24:14 PM12/17/11
to Android-x86
It doesn't setup default route from Ethernet settings options menu
(the "gateway" option seems to be ignored). How can I make it be
setup-ed automatically at every boot?
Of course, I can specify it manually in console at every boot like
"route add default gw 192.168.2.2 dev eth0"
But it's monkey-job. Does anyone have any ideas how to automate it
(without dhcp)?
Or may be only I have that bug?
Message has been deleted
Message has been deleted

Sap

unread,
Dec 20, 2011, 1:36:23 AM12/20/11
to Android-x86
Yes, It works with DHCP but it isn't very useful sometimes.
Most DHCP servers (like in your case) assign new IP for every reboot.
And not every of them allows to specify fixed static MAC-IP table.
Moreover that way requires additional hardware or very specific
crouches to make it work on Windows under virtual machine (like
configurable DHCP server for Windows).
It would be great to have a static IP for automated debugging and
testing purposes.
I've tried to use startup scripts in "Android-XXX/scripts" to
configure interfaces for static IP but it resets them when GUI starts.
So now I am meditating about using second ethernet interface with miss-
configured first one, or making a script with delayed start, or
patching system init.rc scripts runtime, or doing something else.
Reply all
Reply to author
Forward
0 new messages