LFS Version 9.1, Chapter 7.5.1 Creating Network Interface Configuration Files
Hello Users!
I'm currently on chapter 7.5.1, and i am confused how to edit the ifconfig.eth0 file. I am a beginner in linux. When i use the command Code:
cat /etc/udev/rules.d/70-persistent-net.rules Code:
# net device r8169 also i edited the IFACE to enp8s0. but i dont know what to do about IP and GATEWAY. on using ifconfig on host. This is what i get Code:
enp8s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 i am getting the gateway from this command Code:
route -n | egrep "Gateway|UG" i am building lfs on my usb. Sorry if i my question confuses you, i am a beginner. Please help!! |
I think this has nothing to do with LFS, you just configure the ethernet as you need, what's the issue? If eth and wifi are on the same router with the same subnet then I'm not sure which interface would be used by the system, but it's something you'd want to avoid with some tools or scripts.
In this particular case you need to either use dhclient or dhcpcd or whatever you want to get your dynamic DHCP-issued configuration for ethernet OR configure it manually with ifconfig or ip, whichever you prefer. |
Sir, Can you please explain it to me clearly, i cant understand what you are saying. I am not using ethernet, i am using wifi.
if i configure it with the ip of wlp10s0f0 and make the file named ifconfig.wlp10s0f0 , but the book said to keep the value of name obtained by the persistent rule(i.e., enp8s0 ). Will it work then? and also how do i check if its working? or should i continue building lfs first? Thank You. |
Wait, ifconfig output and your udev file clearly show ethernet device. If you're not planning on using that, just ignore it then?
What's your question again? What are you trying to achieve? I thought you're trying to set up both wifi and ether at the same time. |
i just want network connectivity in my lfs, and i dont know what to enter in the ifconfig.xyz file.
As book stated that Quote:
But inside the file( ifconfig.eth0 ), what ip is it asking for? and which network card? |
Clearly your interface name isn't eth0, and again, if you're not intending to use it, why create it? It says "for each interface to be configured", if you don't want to "configure"(that is, use) it then why create it in the first place?
IMO LFS is for advanced users. It takes some extensive knowledge to successfully operate it and as I see it, it's intended for people who don't want their systems do something they've not been told to. Personally never used that "LFS book", just built a couple of bare systems in the past. Exactly for this very purpose. Sometimes you want to tweak things in a quick and single-use way, this is where these bare systems or basic tools like ip come in handy. Clearly it's not for a daily use for most people. |
Hi
1st thing do you want to use eth0 cable? 2nd, ip addr of router then post output of Code:
ip link all from LFS. |
Hello Sir,
I want to use enp8s0 Router IP: 192.168.0.1 Code:
(lfs chroot) root:/# ip link Code:
(lfs chroot) root:/# ifconfig |
ok have you created the /etc/sysconfig/ifconfig.enp8s0 file?
If so post it, if not ok we will create 1 |
Yes Sir, i have created it.
Code:
(lfs chroot) root:/etc/sysconfig# cat ifconfig.enp8s0 |
change ip to 192.168.0.9
change IFACE=eth0 IFACE=enp8s0 Then go on and create /etc/resolv.conf nameserver 192.168.0.1 nameserver 8.8.8.8 |
Sir done,
And what about gateway? while chroot, the command Code:
route -n | egrep "Gateway|UG" Quote:
Code:
$ route -n | egrep "Gateway|UG" |
whats the ip addr on host?
you gave router ip Quote:
|
on the host machine, it is
Quote:
but i access the router admin page through 192.168.0.1 which is inturn connected to modem which i access through 192.168.1.1 |
so change all to 192.168.1.?
ip=192.168.1.10 GATEWAY=192.168.1.1 PREFIX=24 In chroot you are using host network device. You would need to boot lfs to use that 1 |
All times are GMT -5. The time now is 01:38 AM. |