Network Configuration Noob, Having trouble with ch. 7.5
I finally finished Chapter 6 of the LFS book :party:
Now I'm into Chapter 7. And I need to set up network configuration. I'm being told to do this: Code:
cd /etc/sysconfig/ I ran bash /lib/udev/init-net-rules.sh on the previous page along with cat /etc/udev/rules.d/70-persistent-net.rules To which the output was: Code:
# This file was automatically generated by the /lib/udev/write_net_rules Anyways, I'm not sure what to input for ANY of the other options here, and I'm feeling a bit overwhelmed. What do I put in for SERVICE? Or GATEWAY or IP? Or BROADCAST? If I scroll down I see this: Code:
cat > /etc/resolv.conf << "EOF" |
That would depend on how you connect to the network. With a router/gateway? You'd need to know what IP address range it assigns (e.g. 192.168.0.x or 192.168.1.x or whatever it is) and if configuring statically, you would need to choose an IP address that's outside of its DHCP scope for automatically assigning addresses, and choose an address that's not already in use by another device. LIKELY addresses below .50 would be fine, but you'd have to check your router's configuration.
So, if configuring statically, the SERVICE variable would indeed be ipv4-static If we assume the router uses 192.168.1.x as in the example ONBOOT=yes IFACE=eth0 <--- change that to enp2s0f1 if that's what you want to use. SERVICE=ipv4-static IP=192.168.1.2 <--- change that if not appropriate GATEWAY=192.168.1.1 PREFIX=24 BROADCAST=192.168.1.255 If you want your interface to be eth0 (or eth1 or whatever is appropriate if there is more than one adapter in the machine), change your udev rule accordingly, for example: Code:
# net device r8169 http://www.linuxfromscratch.org/blfs...et/dhcpcd.html Then you'd change the SERVICE to dhcpcd as in the example. P.S. If configuring statically, most routers will allow you to use the router's IP address as a nameserver. Otherwise, use your ISP's nameservers, or OpenDNS's or something. If configuring dynamically, DHCP would take care of that. |
hi
The ifconfig.eth0 file only you can set this for Your network as they are set differently. In "ip, gateway, broadcast" you need the ip address of your router, ( obtain from host) ie 192.168.X.X where X might be differenet to the book i,e 192.168.0.X "0" will be subnet the last X for ip will be the ip address for your machine. Gatway will be the same subnet as ip "0"(you can get that from router "noramlly 1") Broadcast again subnet the same 0 but will end 255. Using ifconfig on host will help with most of addresses. service is stating you are using a static ip addresss /etc/resolv.conf nameserver I use 8.8.8.8 which is google and 8.8.4.4 as well google again. nameserver=8.8.8.8 nameserver=8.8.4.4 they are for dns address lookup Sorry if not explained to well but will help. |
I'm trying my best to understand all the new terms being thrown at me. Networking is NOT a field I'm experienced in AT ALL. I've never touched it until today.
What I've understood so far is (and correct me if I'm wrong): - IP is my router IP address, not anything to do with my computer network card - Gateway is the router IP address but with a 1 instead of a 0 - Broadcast is router IP address but with 255 instead of 0 - I have IFACE right but I can change it to eth0 (for ease I assume?) Everything else kind of came out as jargon to me (sorry TheRealGrogan). I seem to just have more networking questions now. What does it mean for it to be static? What's DHCP? What does it mean for it to be dynamic? I never use a wired network, is that what all this is for, configuring wired network? Or network in general? If it's for wired is there a way for me to setup wireless instead? I'm running this on a laptop (all I have), so it'd be more efficient. What exactly IS a nameserver? Sorry for the plethora of questions, like I said this is my first time encountering networking and I want to make sure I understand it properly before continuing with anything. Understanding comes before getting this thing booted in my opinion. |
Update: I ran ifconfig on my host system and got this output:
Code:
enp2s0f1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 |
IP address is not your router's IP address, but the IP address you want to assign to your network card.
GATEWAY is your router's IP address. Static means a fixed IP address, not automatically (dynamically) assigned by the router. Sorry, I don't know what else to tell you. You should probably read up on basic networking concepts. You might want to skip networking until later, until you have WiFi drivers and related machinery. Once you get X and a graphical environment built (Desktop Environment) you can use Network Manager. |
So I can just skip this part for now and use Network Manager when I have a desktop environment set up?
|
If you don't want to plug in with ethernet temporarily, yes.
|
All times are GMT -5. The time now is 07:47 AM. |