You are not logged in.

#1 2012-12-14 11:19:15

decas
Member
Registered: 2012-12-13
Posts: 36

[SOLVED] Internet configuration: dynamic IP problems

Hello Arch Linux community,

After usage of Ubuntu, I decided to move to Arch Linux because of its highly-customizable and flexible operating system. To learn first the installation process, I created a virtual OS in Oracle VM VirtualBox. The installation went well till I encountered the network configuration step. It should be noted that the internet worked fine in terminal when it was not installed and it was used from a disk image. Therefore, my installation ended here and I cannot progress. Tried many ways found on Arch's wiki and googled, but still no Internet found in the Arch Linux.

Firstly, I have a dynamic IP. Judging from ipconfig /all command in Windows cmd at least, since it says that DHCP is enabled. What is interesting is that I found that VirtualBox internet connection does not have it enabled in cmd. However, in the program it says that it is enabled. By googling I managed to turn it on and now it can be seen in cmd that it is on. But it did not fix my problem. When trying to write ping -c 3 www.google.com or ping -c 3 8.8.8.8, I get an error saying that it did not find the host, which according to Wiki means that I cannot establish an Internet connection.

By following this wikipedia section to configure a dynamic IP address, I managed to get rid off certain errors, but the Internet is still not reachable.

Errors

When I write dhcpcd eth0, I get:

dhcpcd[223]: dhcpcd already running on pid 217 (/run/dhcpcd-eth0.pid)

When I write systemctl start dhcpcd@eth0, I do not get anything.

When I write systemctl enable dhcpcd@eth0, I do not get anything.

When I write ping -c 3 www.google.com, I get:

ping: unknown host www.google.com

When I write ping -c 3 8.8.8.8, I get:

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.1.23 icmp_seq=1 Destination Host Unreachable
From 192.168.1.23 icmp_seq=2 Destination Host Unreachable
From 192.168.1.23 icmp_seq=3 Destination Host Unreachable

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2002ms pipe 3

During the installation, I encountered problems with my firewall. Using Eset Smart Security, which is both an antivirus and a firewall. I had gotten a notification from my firewall that it is blocking some kind of IP. Then, I turned the firewall off and the installation went well. However, this does not work when I try to ping in the installed Arch Linux. I do not get any notifications from the firewall both when it is on and off.

System

Arch Linux is installed on HDD, however, I have also a SSD, but it is used by Windows 7.

When I write uname -a, I get this:

Linux localhost 3.6.6-1-ARCH #1 SMP PREEMPT Mon Nov 5 11:57:22 CET 2012 x86_64 GNU/Linux

Windows information:

Windows 7 Ultimate
Service Pack 1

Computer information

Laptop Dell XPS 1640
Inter Core 2 Duo CPU T9400 @ 2.53GHz 2.53GHz
Memory RAM: 4.00 GB
System type: 64-bit OS
Crucial M4 64GB SSD
And an old Seagate HDD 500GB on which Arch Linux is installed.

Last edited by decas (2012-12-16 09:32:09)


Arch Linux + Openbox

Offline

#2 2012-12-14 15:53:54

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

So all your problems are from inside virtualbox? what if you try to boot the cd directly on your pc and access internet there?

If you can do it, then the problem is related with virtualbox


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#3 2012-12-14 17:15:28

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

chris_l wrote:

So all your problems are from inside virtualbox? what if you try to boot the cd directly on your pc and access internet there?

If you can do it, then the problem is related with virtualbox

Yes they are, but I would not think that it is the source of the problem. As I mentioned earlier, the Internet worked during the installation, which took place also inside VirtualBox.

To try it outside VB would be a problem, because I only have free space on the HDD, which would need to be partitioned and etc. Also, an unsuccessful installation could influence system boot, which I do not want to happen, because I have to use this computer daily.

Last edited by decas (2012-12-14 17:17:48)


Arch Linux + Openbox

Offline

#4 2012-12-14 17:20:52

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

No, I didn't mean to install it right away: you can boot the live cd and only configure internet on the live environment, without installing anything or messing with partitions. (your system will remain unchanged)

The porpouse is just to discard virtualbox as source of problem wink


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#5 2012-12-14 18:37:03

p0x8
Member
Registered: 2012-09-20
Posts: 70

Re: [SOLVED] Internet configuration: dynamic IP problems

Information that could be useful towards debugging the issue:

- type of network adapter you configured in the virtual machine (bridged, NAT, host-only)

- output of the commands 'ip link' and 'ip addr'

- can you still access the internet when you boot the virtual machine using the installation ISO?*


* I ask this because you seem to have changed the VirtualBox network adapters settings in Windows, something I would strongly advise against unless you know what you are doing - which is obviously not the case.

Offline

#6 2012-12-14 19:37:07

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

p0x8 wrote:

- type of network adapter you configured in the virtual machine (bridged, NAT, host-only)

NAT (default)

p0x8 wrote:

- output of the commands 'ip link' and 'ip addr'

ip link
v7ry9j.png

ip addr
3583qmv.png
I hidden some addresses that might be needed to be kept private. Grey colour is a MAC address, red (only a part hidden) is an ip address, and pink do not know what is (looks like written in hex numbers).

p0x8 wrote:

- can you still access the internet when you boot the virtual machine using the installation ISO?*

* I ask this because you seem to have changed the VirtualBox network adapters settings in Windows, something I would strongly advise against unless you know what you are doing - which is obviously not the case.

Yes (3 packets sent, 1 lost, 2 received).

chris_l wrote:

No, I didn't mean to install it right away: you can boot the live cd and only configure internet on the live environment, without installing anything or messing with partitions. (your system will remain unchanged)

The porpouse is just to discard virtualbox as source of problem wink

I can access the Internet when I boot the live CD. However, I am not sure what you do mean saying to boot live cd without VB (it is probably, because you think the Internet is down also when the live CD is booted?).

----------------------

It struck my mind that the provided Internet is controlled by a MAC address by my ISP. Wrote ipconfig /all to find out VB's internet connection, and added a second physical address to the list of MAC addresses on my ISP website. Did not help.

Last edited by decas (2012-12-14 20:05:38)


Arch Linux + Openbox

Offline

#7 2012-12-14 20:18:34

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

decas wrote:

However, I am not sure what you do mean saying to boot live cd without VB (it is probably, because you think the Internet is down also when the live CD is booted?

I mean, you take a real, physical CD with the iso burned on it, reboot your real machine, and boot from this cd.

The lastest live cd should have dhcpcd started by default, so after the boot process is over, just enter:

ping 8.8.8.8

and check if it works
also, check your ip: (is after inet, not inet6)

ip addr show dev eth0

then reboot:

reboot

Nothing was changed on your hard disk by doing this.


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#8 2012-12-14 20:23:34

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

chris_l wrote:
decas wrote:

However, I am not sure what you do mean saying to boot live cd without VB (it is probably, because you think the Internet is down also when the live CD is booted?

I mean, you take a real, physical CD with the iso burned on it, reboot your real machine, and boot from this cd.

The lastest live cd should have dhcpcd started by default, so after the boot process is over, just enter:

ping 8.8.8.8

and check if it works
also, check your ip: (is after inet, not inet6)

ip addr show dev eth0

then reboot:

reboot

Nothing was changed on your hard disk by doing this.

Thank you for your answer. Sorry, but I do not understand the reason behind this. The Internet works when I boot the live cd in VB, why wouldn't it work if I boot it on my whole system? If the Internet wouldn't work in VB when I boot the live cd, then I understand your point. Also, if it works there, what would I get from it to help to solve the issue?


Arch Linux + Openbox

Offline

#9 2012-12-14 20:33:23

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

decas wrote:

The Internet works when I boot the live cd in VB

Ahh, I was missing that part.

decas wrote:

Also, if it works there, what would I get from it to help to solve the issue?

If didn't worked on VB, but worked correctly on the real machine, that would mean a problem on VB. But, since internet from the  live cd under VB works correctly, then is not a problem of VB...

However

decas wrote:
p0x8 wrote:

- can you still access the internet when you boot the virtual machine using the installation ISO?*
* I ask this because you seem to have changed the VirtualBox network adapters settings in Windows, something I would strongly advise against unless you know what you are doing - which is obviously not the case.

Yes (3 packets sent, 1 lost, 2 received).

there shouldn't be any lost there if there are no problems on VB. (unless you are on wireless on the real machine, that could explain that one lost package)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#10 2012-12-14 20:40:06

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

chris_l wrote:

However

decas wrote:
p0x8 wrote:

- can you still access the internet when you boot the virtual machine using the installation ISO?*
* I ask this because you seem to have changed the VirtualBox network adapters settings in Windows, something I would strongly advise against unless you know what you are doing - which is obviously not the case.

Yes (3 packets sent, 1 lost, 2 received).

there shouldn't be any lost there if there are no problems on VB. (unless you are on wireless on the real machine, that could explain that one lost package)

I agree, but it might have something to do with my internet connection (i am not on wireless). It looks like that sometimes I get some packages lost. Here is a log of multiple times me trying to ping www.google.com:

5 sent, 4 received, 1 lost
3 sent, 3 received, 0 lost
3 sent, 3 received, 0 lost
4 sent, 4 received, 0 lost
10 sent, 10 received, 0 lost

Last edited by decas (2012-12-14 20:41:38)


Arch Linux + Openbox

Offline

#11 2012-12-15 16:02:39

p0x8
Member
Registered: 2012-09-20
Posts: 70

Re: [SOLVED] Internet configuration: dynamic IP problems

You have two IPv4 addresses on the eth0 interface. The 192.168.1.23/24 address is expected, the other is not. But then again, you did mess with the VB network adapter settings in Windows, so who knows?

Anyway, try deleting the extra IP address:

# ip addr del X.Y.Z.15/24 dev eth0

If you still can't ping 8.8.8.8, check and fix your routing table and try again:

# ip route
# ip route add default via 192.168.1.1 dev eth0
# ping 192.168.1.1
# ping 8.8.8.8

No need to hide MAC and private IP addresses. It makes helping you harder and has no privacy benefits.

Offline

#12 2012-12-15 17:00:14

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

p0x8 wrote:

You have two IPv4 addresses on the eth0 interface. The 192.168.1.23/24 address is expected, the other is not. But then again, you did mess with the VB network adapter settings in Windows, so who knows?

Anyway, try deleting the extra IP address:

# ip addr del X.Y.Z.15/24 dev eth0

The second IP address's line is:

inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0

I deleted it, but it did not help. I am still getting the same errors.

p0x8 wrote:

If you still can't ping 8.8.8.8, check and fix your routing table and try again:

# ip route
# ip route add default via 192.168.1.1 dev eth0
# ping 192.168.1.1
# ping 8.8.8.8

ip route gives me:
2ymbm6t.png
When I try to write ip route add default via 192.168.1.1 dev eth0, I obviously get an error saying that this line exists, since it is seen in the above picture.

Pinging is the same as before - does not work.

Last edited by decas (2012-12-15 17:30:10)


Arch Linux + Openbox

Offline

#13 2012-12-15 18:10:34

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

you don't need to add that route, instead, you need to delete the other route.

# ip route del default via 10.0.2.2 dev eth0

However, I don't know under VB, but under qemu, the ip you get is 10.0.2.15 and the correct route is 10.0.2.2, unless you use something like a bridge with tap to get an address from your router.

So, if it does not work, try to delete the 192.168.1.0/24 route and its ip address instead.


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#14 2012-12-15 18:57:33

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

chris_l wrote:

you don't need to add that route, instead, you need to delete the other route.

# ip route del default via 10.0.2.2 dev eth0

However, I don't know under VB, but under qemu, the ip you get is 10.0.2.15 and the correct route is 10.0.2.2, unless you use something like a bridge with tap to get an address from your router.

So, if it does not work, try to delete the 192.168.1.0/24 route and its ip address instead.

Thank you for your reply. I am not sure whether I did the same you wanted me to do, but I deleted the IP 192... from both ip addr and ip route. I can ping if I ping 8.8.8.8 and I am getting responses. Here is my log:

10 sent, 10 received, 0 lost
6 sent, 1 received, 5 lost
5 sent, 4 received, 1 lost
3 sent, 3 received, 0 lost
7 sent, 6 received, 1 lost

Again, maybe it is my Internet that is causing packages losses. However, when I write ping -c 3 www.google.com, I get an error saying "unknown host: www.google.com".


Arch Linux + Openbox

Offline

#15 2012-12-15 21:20:20

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

decas wrote:

However, when I write ping -c 3 www.google.com, I get an error saying "unknown host: www.google.com".

ok then, now add a nameserver

echo nameserver 8.8.8.8>>/etc/resolv.conf

EDIT: I just noticed...
ping google.com, not www.google.com. But still add the nameserver

Last edited by chris_l (2012-12-15 21:22:14)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#16 2012-12-15 22:02:17

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

chris_l wrote:
decas wrote:

However, when I write ping -c 3 www.google.com, I get an error saying "unknown host: www.google.com".

ok then, now add a nameserver

echo nameserver 8.8.8.8>>/etc/resolv.conf

EDIT: I just noticed...
ping google.com, not www.google.com. But still add the nameserver

Great... Now it works.

I would like to know answers to these questions:

Why do I need to remove the IP starting with 192... from ip addr and ip route? The fellow that also helped me in this thread suggested to remove the 10... IP. What is the reason behind that?
Why pinging google.com works without adding a nameserver, but www.google.com does not? (it works once I added a nameserver)
How to delete the IP and add a nameserver, so that it would be permanent, since it reverts to old settings once I reboot the system?

Bonus question: I did not change any settings in VB or Windows (at least from what I remember), and suddenly my network settings in VB changed, so that now I can enter a MAC address (before there was no such field). I changed it to the MAC address that I entered on my Internet provider's website, but do not have a clue how it did suddenly appear. Any comments?

Last edited by decas (2012-12-15 22:37:33)


Arch Linux + Openbox

Offline

#17 2012-12-16 01:36:39

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: [SOLVED] Internet configuration: dynamic IP problems

1.- Because you are using VB network in NAT mode, no bridge mode (google for it)
2.- probably you had a dns by default, that resolved google.com but not www.google.com. dunno.
3.- Thats pretty much another topic. It should give you 10... by default. I don't know why you are getting a 192... on the first place (maybe related to those "changes" to your VB networking settings?)
4.- I use qemu-kvm, not VB (and much less VB under windows big_smile ),  so dunno. Google it on your own ^_^

Good luck. If is resolved, don't forget to mark it as [SOLVED]

Last edited by chris_l (2012-12-16 01:58:33)


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#18 2012-12-16 07:04:51

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

chris_l wrote:

3.- Thats pretty much another topic. It should give you 10... by default. I don't know why you are getting a 192... on the first place (maybe related to those "changes" to your VB networking settings?)

I reinstalled VB and now the settings are default. When I write ipconfig /all in cmd, I get that DHCP is disabled (as it is by default). However, it is enabled in VB, which is also a default setting.

It works the same as it worked before - if I delete the 192... IP. I tracked that this is the IP VB uses by default and I am able to change it. Do you know how to get rid off it?

Attaching related pictures:
5bzns1_th.png mm4z9i_th.png


Arch Linux + Openbox

Offline

#19 2012-12-16 07:09:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,609

Re: [SOLVED] Internet configuration: dynamic IP problems

Well there's you're problem, you've got it set as a host only network adapter. That means it will only reach the host, not beyond.

Online

#20 2012-12-16 07:21:16

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

Scimmia wrote:

Well there's you're problem, you've got it set as a host only network adapter. That means it will only reach the host, not beyond.

Okay, but I can only add host-only adapters there. How can I make it connect beyond the host?

By the way, these settings are VB general settings. When I access the Arch Linux settings in VB, it is set to NAT, noy to a host only network adapter.
5fi05v_th.png

Last edited by decas (2012-12-16 07:25:40)


Arch Linux + Openbox

Offline

#21 2012-12-16 07:41:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,609

Re: [SOLVED] Internet configuration: dynamic IP problems

Ditch the host only network completely. It's used if you want a network between multiple virtual machines. Maybe that's where the 192 addr is coming from, VB NAT uses 10.x.x.x

Oh, and change the MAC address, too. You said you changed it to the one you entered on your ISP's site, which is a bad thing. You need that MAC to be unique.

Last edited by Scimmia (2012-12-16 07:46:28)

Online

#22 2012-12-16 07:52:59

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

I removed the host-only adapter. Now, there are no host-only adapters in the list. Did not help, I still have the 192 IP.

I do not use the same MAC address for Windows OS and Arch. There are two different MACs on my Internet provider's website. However, I made the VB's MAC random as you told. Did not help.

Last edited by decas (2012-12-16 07:55:47)


Arch Linux + Openbox

Offline

#23 2012-12-16 08:06:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,609

Re: [SOLVED] Internet configuration: dynamic IP problems

You only have the one network adapter set up in VB, right? The Adapter 2-4 tabs should all be unchecked. Shouldn't matter, but I'm kinda grasping at straws here.

Online

#24 2012-12-16 08:09:09

decas
Member
Registered: 2012-12-13
Posts: 36

Re: [SOLVED] Internet configuration: dynamic IP problems

Yes. It is getting the host-only IP still.


Arch Linux + Openbox

Offline

#25 2012-12-16 08:12:29

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,609

Re: [SOLVED] Internet configuration: dynamic IP problems

OK, I'm not sure about the windows host, but with my linux host, I right click on the VM and Show Log. If you can do that, hit find and search for DHCP.

Online

Board footer

Powered by FluxBB