Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
03-14-2012, 11:28 AM
#1
Member
Registered: Nov 2008
Posts: 489
Rep:
eth0 could not connect internet
My box is scientific linux 6.1 x86 on virtualbox. After reinstalling vritualbox, I could not connect internet.
The file "/etc/sysconfig/network-scripts/ifcfg-eth0" is this.
Code:
DEVICE=eth0
BOOTPROTO=dhcp
NM_CONTROLLED=yes
ONBOOT=no
TYPE=Ethernet
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=08:00:27:d3:08:db
PEERDNS=yes
PEERROUTES=yes
DNS2=168.126.63.2
DNS1=168.126.63.1
USERCTL=no
Any helpful comment would be appreciated.
Thanks inadvance.
03-14-2012, 12:40 PM
#2
LQ Newbie
Registered: Mar 2012
Posts: 18
Rep:
have you tried releasing ip address?
Quote:
$ sudo dhclient -r
$ sudo dhclient
you could always try restarting the network service; I have no experience with scientific Linux so you would have to find out the method of doing such.
also ONBOOT=no try changing that to yes
plus make sure the networking service is running.
Try this
Last edited by evilputty; 03-14-2012 at 12:48 PM .
1 members found this post helpful.
03-14-2012, 10:32 PM
#3
Member
Registered: Nov 2008
Posts: 489
Original Poster
Rep:
evilputty/
I did as you instructed.
PHP Code:
[ root @ localhost Documents ] # dhclient -r [ root @ localhost Documents ] # dhclient [ root @ localhost Documents ] # ifconfig eth0 Link encap : Ethernet HWaddr 08 : 00 : 27 : D3 : 08 : DB inet addr : 192.168.56.101 Bcast : 192.168.56.255 Mask : 255.255.255.0 inet6 addr : fe80 :: a00 : 27ff : fed3 : 8db / 64 Scope : Link UP BROADCAST RUNNING MULTICAST MTU : 1500 Metric : 1 RX packets : 3 errors : 0 dropped : 0 overruns : 0 frame : 0 TX packets : 228 errors : 0 dropped : 0 overruns : 0 carrier : 0 collisions : 0 txqueuelen : 1000 RX bytes : 1423 ( 1.3 KiB ) TX bytes : 19376 ( 18.9 KiB ) lo Link encap : Local Loopback inet addr : 127.0.0.1 Mask : 255.0.0.0 inet6 addr : :: 1 / 128 Scope : Host UP LOOPBACK RUNNING MTU : 16436 Metric : 1 RX packets : 287 errors : 0 dropped : 0 overruns : 0 frame : 0 TX packets : 287 errors : 0 dropped : 0 overruns : 0 carrier : 0 collisions : 0 txqueuelen : 0 RX bytes : 86664 ( 84.6 KiB ) TX bytes : 86664 ( 84.6 KiB ) [ root @ localhost Documents ] # chkconfig --list network network 0 : off 1 : off 2 : on 3 : on 4 : on 5 : on 6 : off
And changed ip address from 192.168.0.4 to 192.168.56.101.
Please make ip address 192.168.0.4. So I tried to edit "/etc/sysconfig/network-scripts/ifcfg-eth0" as this.
Code:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
DNS2=168.126.63.2
DNS1=168.126.63.1
USERCTL=no
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.4
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
HWADDR=08:00:27:D3:08:DB
PREFIX=24
DEFROUTE=yes
03-14-2012, 10:36 PM
#4
Member
Registered: Nov 2008
Posts: 489
Original Poster
Rep:
And I checked ipaddress as attached photo.
As you can see, the ip addresses are different between "ifconfig" and "system eth0".
Last edited by windstory; 03-14-2012 at 10:38 PM .
03-14-2012, 10:51 PM
#5
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
have you restarted the network after making changes in the eth0 file?
check the type of network connection between virtual machine and your host machine
If you are trying to get ip from dhcp then it should be bridged connection
1 members found this post helpful.
03-14-2012, 11:37 PM
#6
Member
Registered: Nov 2008
Posts: 489
Original Poster
Rep:
deep27ak/
I restart computer with vm. And I've changed to bridged connection. But still same states.
Now ipconfig and connection information of system eth0 is same ip, but still browse any internet site.
After "dhclient -r" and "dhclient" commands, "inet addr" was disappeared.
Code:
[root@localhost Documents]# dhclient -r
[root@localhost Documents]# dhclient
[root@localhost Documents]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:D3:08:DB
inet6 addr: fe80::a00:27ff:fed3:8db/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:268 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:16599 (16.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:266 errors:0 dropped:0 overruns:0 frame:0
TX packets:266 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22168 (21.6 KiB) TX bytes:22168 (21.6 KiB)
Last edited by windstory; 03-14-2012 at 11:39 PM .
03-15-2012, 12:01 AM
#7
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Instead of dhcp why don't you try giving a static IP address
can you ping to the host IP?
what is the IP range of your host and what is the dhcp range you have assigned to dhcp server?
Are you sure your dhcp server is working properly?
03-15-2012, 12:19 AM
#8
Member
Registered: Nov 2008
Posts: 489
Original Poster
Rep:
deep27ak/
The result of ping is here.
Quote:
[root@localhost Documents]# ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
From 192.168.0.4 icmp_seq=2 Destination Host Unreachable
From 192.168.0.4 icmp_seq=3 Destination Host Unreachable
From 192.168.0.4 icmp_seq=4 Destination Host Unreachable
From 192.168.0.4 icmp_seq=6 Destination Host Unreachable
From 192.168.0.4 icmp_seq=7 Destination Host Unreachable
The dhcp range of host is "192.168.0.2 ~ 192.168.0.254", and about "what is the dhcp range you have assigned to dhcp server" I could not know.
About dhcpd,
Quote:
[root@localhost Documents]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
03-15-2012, 01:10 AM
#9
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
so it seems you are not even connected to your local network
check your virtual box network setting is it same as the one I have attached?
and as I said try with a static IP in eth0 file
and one thing which surprises me is you have used bootproto 2 times in your config file?
Code:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
DNS2=168.126.63.2
DNS1=168.126.63.1
USERCTL=no
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.4
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
HWADDR=08:00:27:D3:08:DB
PREFIX=24
DEFROUTE=yes
take a backup of current eth0 file and remove one bootproto
Code:
bootproto=none
IPADDR=(give any static IP)
and if you are using dhcp server for your eth0 then the bootproto should be dhcp
Last edited by deep27ak; 03-15-2012 at 01:13 AM .
03-15-2012, 08:23 AM
#10
LQ Newbie
Registered: Mar 2012
Posts: 18
Rep:
please do
on your host machine and post the information here.
Also, why did you need to reinstall virtualbox in the first place? Maybe a little more information about the host will help us out.
also how many network interfaces are on your virtual machine?
1 members found this post helpful.
03-15-2012, 08:53 PM
#11
Member
Registered: Nov 2008
Posts: 489
Original Poster
Rep:
1. The resut of "ipconfig /all".
Quote:
C: \ Users \ Administrator> ipconfig / all
Windows IP Configuration
Host name. . . . . . . . : WIN-BHF9RKQMPUS
The primary DNS suffix. . . . . . . :
Node types. . . . . . . . . : Hybrid
IP routing is enabled. . . . . . . : No
Using WINS proxy. . . . . . : No
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Co
ntroller # 2
Physical address. . . . . . . . : E0-CB-4E-92-76-75
Using DHCP. . . . . . . . . : Yes
Use automatic configuration. . . . . . . : Yes
IPv4 address. . . . . . . . . : 192.168.0.2 (the default setting)
Subnet mask. . . . . . . : 255.255.255.0
Lease start date. . . . . . . : March 16, 2012 10:12:36 AM
The lease expiration date. . . . . . . : March 26, 2012 10:12:36 AM
Default gateway. . . . . . : 192.168.0.1
DHCP server. . . . . . . . . : 192.168.0.1
DNS server. . . . . . . . . . : 168.126.63.1
168.126.63.2
Over Tcpip NetBIOS. . . . : Use
Ethernet adapter Local Area Connection:
Media status. . . . . . . . : Media Disconnected
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Co
ntroller
Physical address. . . . . . . . : E0-CB-4E-92-7D-CE
Using DHCP. . . . . . . . . : Yes
Use automatic configuration. . . . . . . : Yes
Ethernet adapter, VirtualBox Host-Only Network:
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical address. . . . . . . . : 08-00-27-00-FC-EA
Using DHCP. . . . . . . . . : No
Use automatic configuration. . . . . . . : Yes
Link-local IPv6 address. . . . : Fe80 :: e1dc: 59e6: b0cf: 36df% 19 (default setting)
IPv4 address. . . . . . . . . : 192.168.56.1 (the default setting)
Subnet mask. . . . . . . : 255.255.255.0
Default gateway. . . . . . :
DHCPv6 IAID. . . . . . . . : 520618023
DHCPv6 Client DUID. . . : 00-01-00-01-16-50-0F-0E-E0-CB-4E-92-76-75
DNS server. . . . . . . . . . : Fec0: 0:0: ffff :: 1% 1
fec0: 0:0: ffff :: 2% 1
fec0: 0:0: ffff :: 3% 1
Over Tcpip NetBIOS. . . . : Use
Tunnel adapter isatap. {1C29A021-D5C6-4539-96A9-815128DE91D4}:
Media status. . . . . . . . : Media Disconnected
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : Microsoft ISATAP Adapter # 3
Physical address. . . . . . . . : 00-00-00-00-00-00-00-E0
Using DHCP. . . . . . . . . : No
Use automatic configuration. . . . . . . : Yes
Tunnel adapter isatap. {3C33DE68-2130-4354-B5F5-FFF2FC019490}:
Media status. . . . . . . . : Media Disconnected
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : Microsoft ISATAP Adapter # 2
Physical address. . . . . . . . : 00-00-00-00-00-00-00-E0
Using DHCP. . . . . . . . . : No
Use automatic configuration. . . . . . . : Yes
Tunnel adapter Local Area Connection * 12:
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical address. . . . . . . . : 00-00-00-00-00-00-00-E0
Using DHCP. . . . . . . . . : No
Use automatic configuration. . . . . . . : Yes
IPv6 address. . . . . . . . . : 2001:0:4137:9 e76: 2c75: 3e52: 8668: c234 (default setting)
Link-local IPv6 address. . . . : Fe80 :: 2c75: 3e52: 8668: c234% 13 (default setting)
Default gateway. . . . . . :::
Over Tcpip NetBIOS. . . . : Disabled
Tunnel adapter isatap. {2063792A-48FF-4919-B95F-1C65DFF2B20B}:
Media status. . . . . . . . : Media Disconnected
Connection-specific DNS Suffix. . . . :
Description. . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical address. . . . . . . . : 00-00-00-00-00-00-00-E0
Using DHCP. . . . . . . . . : No
Use automatic configuration. . . . . . . : Yes
2. About reinstallation, I thought the reinstallation of virualbox will fix this network problem. But not worked.
3. There is one network interfaces on scientific linux VM.
4. And the attached photo is file list of "/etc/sysconfig/network-scripts"
Last edited by windstory; 03-15-2012 at 09:52 PM .
03-16-2012, 01:26 AM
#12
Member
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292
Rep:
If you are making static ip address then the following steps should be involved as,
1. ipconfig eth0 <x.x.x.x> netmask <x.x.x.x> up
2. edit /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
IPADDR=<static ip address>
NETMASK=<netmask address>
GATEWAY=<Gateway ip address>
HWADDR=<Lan hardware address>
3. Check your proxy server setting if any
4. Restart the network as service network restart
5. also, chkconfig --level 2345 network on
6. check, ifconfig eth0
If you are making dhcp ip address then the following steps should be involved as,
1. edit /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
HWADDR=<Lan hardware address>
2. Restart the network as service network restart
3. Also, chkconfig --level 2345 network on
4. run, dhclient
5. check, ifconfig eth0
Now check your internet connection.
1 members found this post helpful.
03-16-2012, 01:51 AM
#13
Member
Registered: Nov 2008
Posts: 489
Original Poster
Rep:
smilemukul/ I followed second tip, but the result of ping is this.
Quote:
[root@localhost Documents]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.102 icmp_seq=2 Destination Host Unreachable
From 192.168.0.102 icmp_seq=3 Destination Host Unreachable
"192.168.0.1" is gateway.
03-16-2012, 02:07 AM
#14
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Quote:
Originally Posted by
windstory
smilemukul/ I followed second tip, but the result of ping is this.
"192.168.0.1" is gateway.
I don't get the point of using bootproto twice. I am not sure if it is used twice in scientific linux but in RHEL it goes like this
Code:
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
HWADDR
Code:
#vi /etc/sysconfig/network
NETWORKING=yes
Code:
#service network restart
1 members found this post helpful.
03-16-2012, 02:08 AM
#15
Member
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292
Rep:
Can you paste the output of /etc/sysconfig/network-scripts/ifcfg-eth0 & ifconfig eth0
also to which interface "192.168.0.102" ip is allocated ? & you are trying to ping from which machine (windows or linux) ?
1 members found this post helpful.
All times are GMT -5. The time now is 03:40 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News