Powering Arduino Uno using AA batteries

I'm planning on powering my arduino uno with 4AA batteries.
The Vin value for my circuit is 5V (Its powered through the 5V pin)
Will this work? What kind of batteries should i buy ideally?

I am also looking into Power over ethernet. Would it be possible for me to send power from the mains to the arduino and upload data from the arduino to the internet at the same time?

You'll need a very low dropout regulator, but you'll still lose a lot of battery capacity. Or you can run an Arduino on less than 5V, although you may need to run it at a slower clock speed.

A buck-boost switching regulator could take the 4 to 6V coming from the batteries and regulate it to 5V, or either a buck switching regulator or a low dropout linear regulator could regulate the 4 to 6V down to 3.3V.

Yes, PoE can supply power and send data at the same time.

NiMh batteries? Four of them will give you 5V. Zinc-Alkaline? No, too much voltage, use three to give you 4.5V.

It makes no sense to use a battery supply through a regulator - unless perhaps you use a switchmode regulator. In which case, you want to use six AA batteries and regulate it to 5V which you feed to Vcc on the UNO.

In general, a battery supply indicates you are not going to use USB, so you use a Pro Mini instead of a UNO. On the other hand, if you are going to use an Ethernet shield, this implies you will have access to mains power, so you do not need to use batteries anyway (and you would have no usable battery life if running Ethernet in any case).

PoE uses "spare" pairs in the Cat 5/ Cat 6 cable; it is axiomatic that this has no relation whatsoever to whether or not you are sending data.

The Atmel chip will take a wide range of voltages, but you have to consider what else is connected and how tight those voltage tolerances are, too.

I built a little robot, I just powered it from four NiMH cells, as Paul suggests. About 4.5 to 5V, no problem running the Arduino and servos.

If you must have 5V coming into the Arduino you might try using a switching mode regulator much like this one.

Its tiny, cheap, and it can accept a huge range of inputs and turn them into 5V. Pololu has other options if you need more current or a different input range and they even have built part this into battery holders. Any of these options give you exactly the voltage you need AND good battery life.