-2

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.

2 Answers 2

0

Try NAT instead of Bridged! For me that works.

6
  • Thanks for your prompt reply. I would use NAT but the VM guest to be accessible, hence it needs an IP address. If I understand correctly, you have to use Bridge.
    – AJsStack
    Apr 24, 2013 at 14:18
  • If you're connected to a router or have a DHCP server working, your VM will get an IP from that DHCP server, one that is in the same network as the host. Then you can ping. It's like the VM is another computer in the network, and you can't tell the difference from the outside.
    – SPRBRN
    Apr 24, 2013 at 15:22
  • ...is the above true for using NAT?
    – AJsStack
    Apr 24, 2013 at 15:49
  • Yes that's what I mean. Have you tried? All it takes is to stop the vm, change the setting, restart and test. If it doesn't work you can undo it. Takes maybe 5 minutes.
    – SPRBRN
    Apr 25, 2013 at 8:31
  • I would mind trying that but the only problem is I need to be access the machine from the LAN which, according to the the VirtualBox documentation (virtualbox.org/manual/ch06.html#nat) NAT doesn't support.
    – AJsStack
    Apr 25, 2013 at 10:42
0

look at: ( guest )

BROADCAST=10.167.176.1 ##Default Gateway

I doubt that this is what you want in the BROADCAST

example:

BROADCAST=10.0.1.255
NETWORK=10.0.1.0
NETMASK=255.255.255.0

1
  • I changed the Broadcast to 10.167.191.255 using subnet-calculator.com/subnet.php?net_class=A and still having the same problem :( Due to me limited networking knowledge, is there a way to configuring the linux guest by using the results from the ipconfig /all command from the windows? As its using the same network
    – AJsStack
    Apr 25, 2013 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .