LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-21-2017, 04:31 PM   #1
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Rep: Reputation: Disabled
configure hosts


Hello, I am still pretty new to lfs and I am having some trouble configuring the networking. I attempted all of chapter 7.5. However whenever I run wget (from BLFS) I get an error:
Code:
--2017-01-21 23:29:06-- http://google.com/
Resolving google.com ... failed: Temporary failure in name resolution.
wget: unable to resolve host address
I think this is because the network is not correctly configured but I do not know for sure.

Thanks!
 
Old 01-21-2017, 09:00 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
What happens when you do this:

Code:
ping 8.8.8.8
ping google.com
If you can hit 8.8.8.8, but cannot hit google.com, you have an issue with your DNS. If you can't hit either, post the results here and we'll puzzle it out.
 
Old 01-21-2017, 10:37 PM   #3
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
Nothing happens

here is the output of google:
Code:
ping: unknown host
and here is the output of 8.8.8.8:
Code:
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sending packet: Network is unreachable
Thanks for your reply!
 
Old 01-22-2017, 01:58 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Your not connected to a network. Are you using eth0 or wireless?

Output
Code:
ip link
Post your ifconfig.eth0 or ifconfig.wlan0.
Any other revelent info?
 
Old 01-22-2017, 12:45 PM   #5
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
Here is the output of ifconfig and ip link:
(I am using screenshots because it is in a vm and that is a lot easeyer than having to type everything out. if you want me to type everything out just let me know and I would be happy to).
Click image for larger version

Name:	Screenshot_20170122_103456.png
Views:	84
Size:	10.4 KB
ID:	24032

Thanks!
 
Old 01-22-2017, 01:15 PM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Ok you never said if you were using eth0 or wireless?
wireless is not found eth0 is enp0s3

you should have a "ifconfig.eth0"
from this page http://www.linuxfromscratch.org/lfs/...7/network.html

post that file. If you have a wireless you are trying to use, more needs to be done.

FYI to direct a terminal command to a file you could
Code:
ip link > /home/user/ip-link.txt

Last edited by spiky0011; 01-22-2017 at 01:29 PM.
 
Old 01-22-2017, 03:03 PM   #7
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
I am using eth0. Here is ifconfig.eth0 file:
Code:
ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=192.168.1.2
GATEWAY=192.168.1.1
PREFIX=24
BROADCAST=192.168.1.255
here is the resolv.conf file:
Code:
# Begin /etc/resolv.conf
# domain <Your Domain Name>
nameserver 8.8.8.8
nameserver 8.8.4.4
# End /etc/resolv.conf
and here is the /etc/hosts File:
Code:
# Begin /etc/hosts (network card version)
127.0.0.1 localhost
192.168.1.2 ara.boxjump.xyz ara
# End /etc/hosts (network card version)
thanks for your help!
 
Old 01-22-2017, 03:16 PM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
ok eth0 is called enp0s3, so you need to change the name in your ifconf.eth0
Code:
ONBOOT=yes
IFACE=eth0 to IFACE=enp0s3
SERVICE=ipv4-static
IP=192.168.1.2
GATEWAY=192.168.1.1
PREFIX=24
BROADCAST=192.168.1.255
Also I presume you copied the file from lfs book?
That is an example file.
your ip address might not be the same, You will need to get the details from your host system.

ifconfig will help you with that. Look for the part inet addr and the numbers after it.

Edit the file as necessary

Last edited by spiky0011; 01-22-2017 at 03:22 PM.
 
1 members found this post helpful.
Old 01-22-2017, 05:00 PM   #9
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
Sorry if this question is obvious, but what part do I need to replace?
 
Old 01-22-2017, 05:16 PM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
change the eth0 part as indicated. Ip addr just change the ip addr in the config file to what yours is

example

IP=192.168.1.2 > 192.168.0.10
GATEWAY=192.168.1.1 > 192.168.0.1
BROADCAST=192.168.1.255 > 192.168.0.255
 
1 members found this post helpful.
Old 01-22-2017, 05:52 PM   #11
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
I do not know what is going wrong. I changed the ifconfig for my lfs system. here is my host system ifconfig:

Code:
enxa0cec80353b0 Link encap:Ethernet  HWaddr a0:ce:c8:03:53:b0  
          inet addr:192.168.1.191  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 2601:602:8780:119b:bfbf:35ec:9aa6:eea7/64 Scope:Global
          inet6 addr: fe80::dec1:cf48:9ec2:9bfa/64 Scope:Link
          inet6 addr: fdc4:cc3f:3b42:0:19f9:4097:7536:9f3c/64 Scope:Global
          inet6 addr: 2601:602:8780:119b:1b8:7270:83ec:bb8b/64 Scope:Global
          inet6 addr: fdc4:cc3f:3b42:0:1b8:7270:83ec:bb8b/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:92902 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:53764003 (53.7 MB)  TX bytes:11891931 (11.8 MB)
and here is my lfs system:
Code:
enp0s3 Link encap:Ethernet  HWaddr 08:00:27:56:61:F0
          inet addr:192.168.1.191  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:143 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:130  TX bytes:8824
thanks again for you help!
 
Old 01-23-2017, 02:18 AM   #12
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
So dose it work you didn't say? ip link will show some info
You might have to change the name of the file ifconfig.eth0 > ifconfig.enp0s3 cant remember, but it wont hurt. Just read the note in the book on network page.

can you ping the router ping -c3 192.168.1.2 << presume thats your router ip If not change "GATEWAY=192.168.1.x" to correct

if yes
can you ping google ping -c3 www.google.com or ping -c3 8.8.8.8

When you reply back add any info to what is happening (we cant see)

Last edited by spiky0011; 01-23-2017 at 02:35 AM.
 
Old 01-23-2017, 07:51 PM   #13
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
It does not work. I have given you all the info I have. I will continue to play with it and see if I can get anything working.

Thanks for your help!
 
Old 01-23-2017, 08:56 PM   #14
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
Is it "UP ... RUNNING" like your ..1.191 computer is?
I'm not sure what the ?service? command is to start networking on LFS.
Yes, you *MUST* name the file ifconfig.enp0s3 (NOT .eth0!)

SERVICE=dhcp might be what you want (remove next/last 4 IP# lines)
Another idea: run a NuTyX (it's from LFS), to compare things with.

Last edited by GentleThotSeaMonkey; 01-23-2017 at 09:25 PM.
 
Old 01-24-2017, 09:41 PM   #15
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
Thank you all for your help! I finally got it to work (I was so happy that I actually stood up from my desk and did a victory dance)! The problem was that virtualbox uses 10.0.x.x instead of 192.168.x.x so that was messing it up. thanks again for all of your help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure deny.hosts for opensuse 11.1 sirius57 Linux - Security 1 09-07-2010 09:23 PM
configure multiple smart hosts ahamedoaa Linux - Server 2 03-14-2010 11:46 PM
How to configure /etc/hosts in OpenSolaris chandanbhosle Solaris / OpenSolaris 2 09-24-2008 03:43 PM
configure OpenVPN for two hosts in same LAN Buddhike G Linux - Networking 2 02-05-2008 11:44 PM
Configure virtual hosts in Apache 1.3.26 @ngelot Linux - Software 3 03-10-2005 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration