Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Oracle Enterprise Linux 5 as Guest on VirtualBox running on Windows 7 host using Bridged Network.

I have being trying to configure a static IP on OEL5 VM Guest at work, as previously the VMs were configured to work within my network at home. I found an unused IP (10.167.190.118) by pinging IP address from the windows host machine. I made the following changes on the OEL5 guest:

/etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corporation 82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
BROADCAST=10.167.176.1 ##Default Gateway
HWADDR=08:00:27:DE:AF:6D
IPADDR=10.167.190.118 #IPADDR=192.168.1.149
NETMASK=255.255.240.0 ##Subnet Gateway
#NETWORK=192.168.1.0
ONBOOT=yes

/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
10.167.190.118          oel5-11g.com
# ::1           localhost6.localdomain6 localhost6

/etc/resolv.conf

nameserver 10.167.176.1
search localdomain

Now when I stop/start the network daemon, I can ping 10.167.190.118 from the windows machine and can SSH using Putty. However, I'm unable to connect to the internet within the OEL5 guest.

I updated the /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oel5-11g.com
GATEWAY=10.167.176.1

...but get the error

Bringing up interface eth0: RTNETLINK answers: Invalid argument

when running the network start command.

I have tried googling the issue but have got as far as being able to SSH into OEL5 guest using Putty from host. What changes do I need to make to ensure I can connect to the internet via the OEL5 guest?

Additional information:

ipconfig from host:

Windows IP Configuration

Wireless LAN adapter Wireless Network Connection:

   Media State . . . . . . . . . . . : Media disconnec
   Connection-specific DNS Suffix  . : uk.oracle.com

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : uk.oracle.com
   IPv4 Address. . . . . . . . . . . : 10.167.190.117
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 10.167.176.1

Ethernet adapter VMware Network Adapter VMnet1:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.231.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.233.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

ifconfig from OEL5 guest

eth0      Link encap:Ethernet  HWaddr 08:00:27:DE:AF:6D
          inet addr:10.167.190.118  Bcast:10.167.176.1  Mask:255.255.240.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:193187 errors:0 dropped:14987 overruns:0 frame:0
          TX packets:697 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23047971 (21.9 MiB)  TX bytes:82847 (80.9 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1256 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1256 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3085266 (2.9 MiB)  TX bytes:3085266 (2.9 MiB)

I'm new to Linux and Vitualbox with limited knowledge of networks so, any help would be greatly appreciated.

Many thanks in advance.

share|improve this question

1 Answer 1

10.167.176.1 is not the broadcast address for 10.167.190.118/20.

Use an IP calculator to check: http://jodies.de/ipcalc

You can just remove the BROADCAST line in the ifcfg-file, the system is smart enough to figure out everything with only a valid IP and subnet mask.

(PS: I'll assume you are not the network adminstrator. On his behalf, please either ask for a static IP or get your guest IP via DHCP. Your network admin will not be happy the day he gets an address conflict and has to track it down to a rogue VM running on your workstation.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.