This is because your network interface has not been configured.
run the following to get it working.
dhclient
Assuming your network card gets a DHCP lease you should now be able to perform your yum command.
To ensure that your server boots correctly in future edit:
/etc/sysconfig/networking/ifcfg-eth0
Where eth0 is your default NIC and ensure that
ONBOOT=yes
and
BOOTPROTO=dhcp.