LFS 7.3 Chapter 7.2.2 Creating Network Interface Configuration Files
Hello LFSers!
I'm currently on chapter 7, and have got to create the network interface configuration files. The question is, how can I get the variables needed to create the ifconfig files? I'm using a virtualbox running Debian. When I use the command Code:
cat /etc/udev/rules.d/70-persistent-net.rules Code:
net device e1000 Now, as I was confused on the IP address and such I went to the host system and typed ifconfic and got the following output. Code:
eth2 Link encap:Ethernet HWaddr 08:00:27:b9:55:5a Code:
Windows IP Configuration Code:
cd /etc/sysconfig/ |
I doubt that your ifconfig.eth1 file is correct.
If I understand correctly you run a virtual machine from windows. This VM is running Debian and it is being used to build LFS. The Windows IP Configuration isn't of any concern, virtualbox will give the host (Debian/LFS) unique network settings which are unrelated to the windows network configuration (not entirely true, but lets keep this as simple as possible). Looking at the ifconfig command (the one executed from Debian) I see that your VM has set 10.0.2.X to be used as IP range and 10.0.2.15 is your hosts ip. You mention that your host has 1 network interface. What I find strange is that I see 2 HW addresses and mention of eth2 and eth1. This might be due to the following: When copying/cloning VM's the assigned HW address changes, which in turn changes the eth designation (eth0 -> eth1 -> eth2 -> ...). Did you clone/copy the VM running Debian while working on LFS? Can you post the following information after a reboot (post all the generated output): From windows: - ipconfig From Debian (as root): - dmesg | egrep -i "eth|e1000" - cat /etc/network/interfaces - ifconfig - cat /etc/udev/rules.d/70-persistent-net.rules - cat $LFS/etc/udev/rules.d/70-persistent-net.rules Edit: just noticed something interesting: Both you and AN28 use the exact same blog to note down your experiences (ChillPil) ..... One and the same person? |
Quote:
I'll post the details later as I'm not on my host machine at the moment. However, have to make a small clarification. No, we are not the same person. I do not see the point of having two separate usernames. We are team-members of the same project, building our LFS systems separately. |
Quote:
Code:
H:\>ipconfig |
Here's the output when on the host system Debian:
Code:
root@Dee:/home# dmesg | egrep -i "eth|e1000" |
Looking at the LFS 70-persistent-net.rules that was created the network interface is on eth1 with hardware address 08:00:27:1f:76:9b and looking at the Debian output I see that the interface is on eth2 with hardware address 08:00:27:b9:55:5a (HW address 08:00:27:1f:76:9b is mentioned on Debian, but is on eth1 and not used).
Did you make a clone after the LFS 70-persistent-net.rules was created? You could try the following (the LFS side of things): - Add the following to the $LFS/etc/udev/rules.d/70-persistent-net.rules: Code:
# net device e1000 - Create the ifconfig file assosiated with the above rule: Code:
cd /etc/sysconfig/ Code:
route -n | egrep "Gateway|UG" I'm not familiar with virtualbox and how you have set up networking. If the gateway setting doesn't work you could try either of these 2 IP's: - 10.17.58.1 - 10.0.2.1 I hope you do know by now that every time you clone your VM the HW Address changes and as a result you need to change configuration settings to make things work again. |
Just a small doubt guys, what is the best way to find what the primary/secondary nameserver is ??
we need to specify it when creating the /etc/resolv.conf file Code:
cat > /etc/resolv.conf << "EOF" I tried the following commands but they weren't too helpful: Code:
root@Dee:/# cat /etc/resolv.con Code:
root@Dee:/# dig -t ns xxxxx.xxxx.com |
@AN28: First of all: Please start your own thread next time! You're not the OP and this isn't related to the original problem.
About the nameservers: Check which DNS your ISP (or network administrator) told you to use (as stated in the LFS book). BTW: It is /etc/resolv.conf and not /etc/resolv.con |
There are also a number of free nameservers out there ( googles is 8.8.8.8 for instance ) just google it.
|
Thank you for the information found the nameservers
@Drunna sorry about that but it is with reference to the successive section after which was being discussed here. That is why I posted the comment on this thread. Anyway next time I shall use a new one :) |
Quote:
Just a small question to gain knowledge regarding the ifconfig file name. The original .rules file is for eth1 while the Debian output gives eth2. The modified file uses eth0. So are we trying to make the configuration the same as the host computer upone which the VM is running? Is there a way to check if all is correct before running the completed LFS system? Again, thank you so much for the great help. |
If you only have one networkcard, the original name of it is eth0.
Then was created a persistant network rule so that the mac-adress of that device always has the name eth0. When you clone your vm (or move the harddrive to another computer) the mac-adress for the networkcard is changed, and then udev creates a new rule for it, and gives it the name eth1. In some distros this happen automatic, but in other you need to manually change the udev rule, if you move the system to new hardware. |
Quote:
I had successfully cloned the LFS build on virtualbox in the same computer. I recently tried copying my LFS virtualbox file to a virtualbox on another computer. I've changed the IP addresses etc. as well as the MAC address in the 70-persistent-rules file. But still I cannot connect to the Internet. A small nudge on how to manually change the udev rule is very much appreciated. Thank you :) |
Quote:
Quote:
Quote:
|
Quote:
Code:
Bringing up the eth0 interface... Cannot find device eth0 [FAIL] Quote:
What other information would be required? Thank you very much :) |
All times are GMT -5. The time now is 02:39 AM. |