• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to set Static IP for Ethernet connection?

  • Thread starter Thread starter Android Question
  • Start date Start date
A

Android Question

Guest
Hi, I want to hard-wire my 20" Android 'all-in-one' device to my network. It already has an Ethernet jack, but my network doesn't have a router, just a switch, so I need to configure the device to have a Static IP address.
The problem is that under WiFi settings I have a menu to switch to Static from DHCP but a similar menu does nott exist for the Ethernet settings menu.
Is there another way to set up my device with a Static IP?

Thanks!
 
1) If you have no router, you have only a single IP address available on your network. That means that you can have only 1 device running on it. (A switch connected to a non-routing modem does not a network make.) If you connect 2 TCP-IP devices to a "network" wiyh a single IP address (IOW, the cable coming into your house from the street) without a router, you won't have 2 devices connected to the internet, you'll have a mess. And if you assign them some arbitrary static IP address, it won't work,

(An IP address is like your house address. For mail to get to your house, it has to be addressed to the actual location of the actual house. If you live in New York and "assign" a California address to your house, you're not going to get any mail. It has to get "assigned" the "real" address it "lives" at.)

2) If you can't disable the DHCP client for the Ethernet adapter, you can't give it a static IP.

I can't even guess why you want to give the device a static IP address, but if you plug in the Ethernet cable (to both ends, the Android and the switch) does the Android get an IP address? If it does, then you do have a router in your network. Somewhere. In your house, in your provider's office - somewhere. Switches don't assign IP addresses.

The question is whether your "network" is coming from your router or your provider's router. If it's coming from your provider's router, then you get ONE IP address. That's it. You can assign all the static IP addresses you want to all the devices connected to your switch, but only the one with the IP address assigned by the provider's router is going to work.

If it's coming from your router then, whether you see a box that looks to you like a router or not, you have a router. (You may have a modem/router with a single Ethernet jack, which is connected to an external switch, to allow you to plug in multiple devices, but that's just putting the pieces in different boxes. What you're used to seeing is a modem connected to a "router" that has multiple Ethernet jacks (a switch) and an antenna (a wireless access point.) What you may be looking at is a modem/router connected to an external switch, and no wireless access point.

Bottom line. If you have no router between the street and your switch, you can run only 1 device. It has to get a dynamic IP address (unless you're buying a static IP address from your provider, which is a waste unless you're running a publicly-accessible server), because the provider assigns it an IP address every time you turn it on.

If you do have a router, you have no problem.

The only other possibility is that you want the Android to have a fixed IP address, so you can tell other devices what address it has (to send things to it, etc.) Easy solution - turn off all your other devices - computers, cellphones, etc. Plug the Android into the switch. Turn it on. It'll get an IP address - the first one your DHCP server leases. (And it always leases that one first.) If you have to switch things off, change wires, etc., do the same thing - the Android gets set up first, so it still gets that "first" IP address.

Hope I didn't give you more of a course in TCP-IP topology than you wanted.
 
Thanks for the response--I always appreciate a free course!

In my situation, I have created a closed 'network' using 192.168.50.xxx. I have various RS-232 to Ethernet converters connected into a switch (I'll call these device 'A'). Each of those points their data transmission to a device 'C' that has a static IP.
Each device 'A' comes from the factory with a static IP address of 192.168.127.254. Each device A has a web-based configuration server. In order to configure those to a static IP address, I must change the IP address of my browsing device (I'll call it device 'B' (formerly used a PC, now hopefully Android) to 192.168.127.xxx Once I configure the 'A's', I have to switch my B device back to 192.168.50.xxx
Device 'C' runs a small web server that allows me to simultaneously view all data coming in from all the A's. I assign this device 'C' a static IP of 192.168.50.100, to which I must browse to using Chrome, etc on my B device. I use a crossover cable to connect device B to device C.

This setup works perfectly using a PC where I can change the IPv4 address to a static one to 1)configure each A & C device and then 2)browse to the C device.

Unfortunately on my Android, I cannot connect to any device and it just keeps "Obtaining IP address'

So basically the 'architecture' is proven when using a PC, but I would really like to be able to make it work with Android.
Any ideas?

Cheers!
 
Back
Top Bottom