[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
slackbook:network [2012/09/16 20:21 (UTC)] – [Manual Configuration] Added original text and formatting mfillpot | slackbook:network [2012/11/21 02:20 (UTC)] (current) – [Manual Configuration] removed unnecessary tags gerardo.zamudio | ||
---|---|---|---|
Line 201: | Line 201: | ||
nameserver 192.168.1.254</ | nameserver 192.168.1.254</ | ||
- | Many users won't need the < | + | Many users won't need the search line. This is used to map hostnames |
to domain names. Basically, if I attempt to connect to "// | to domain names. Basically, if I attempt to connect to "// | ||
computer knows to look for //" | computer knows to look for //" | ||
- | line. We're mainly interested in the < | + | line. We're mainly interested in the nameserver line. This tells |
Slackware what domain name servers (DNS) to connect to. Generally | Slackware what domain name servers (DNS) to connect to. Generally | ||
speaking, these should always be specified by IP address. If you know | speaking, these should always be specified by IP address. If you know | ||
Line 270: | Line 270: | ||
===== Automatic Configuration with rc.inet1.conf ===== | ===== Automatic Configuration with rc.inet1.conf ===== | ||
- | Manually configuring interfaces is an important skill to have, but it can become tedious. No one wants to manually setup their Internet connection every time the system boots. More importantly, | + | Manually configuring interfaces is an important skill to have, but it |
+ | can become tedious. | ||
+ | connection every time the system boots. | ||
+ | always have physical access to the machine when it boots. | ||
+ | makes it easy to automatically configure ethernet (and wireless) cards | ||
+ | at system startup with '' | ||
+ | For now, we're going to focus on traditional wired ethernet networking; | ||
+ | the next chapter will discuss various wireless options. | ||
- | rc.inet1.conf is an incredibly powerful configuration file, capable of configuring most of your network cards automatically when Slackware is started. The file is filled with useful comments, but there is also a man page that more thoroughly discusses its use. To begin, we're going to look at some of the options used on one of my personal machines. | ||
- | # Config information for eth0: | + | '' |
- | IPADDR[0]=" | + | configuration file, capable of configuring most of your network cards |
- | | + | automatically when Slackware is started. The file is filled with useful |
- | | + | comments, but there is also a man page that more thoroughly discusses |
- | | + | its use. To begin, we're going to look at some of the options used on |
- | # Some lines ommitted. | + | one of my personal machines. |
- | GATEWAY=" | + | |
- | This represents most of the information necessary to configure a static IP address on a single ethernet controller. netconfig will usually fill in these values for a single ethernet device for you. If you have multiple network cards in your machine and need all of them activated automatically at boot time, then you'll need to edit or add additional entries into this file in the same manner as above. First, let me go over some of the basics. | ||
- | As you may have already guessed, | + | < |
+ | # Config information for eth0: | ||
+ | IPADDR[0]="192.168.1.250" | ||
+ | NETMASK[=]" | ||
+ | USE_DHCP[0]="" | ||
+ | DHCP_HOSTNAME[0]="" | ||
+ | # Some lines ommitted. | ||
+ | GATEWAY=" | ||
+ | </ | ||
- | Likewise, NETMASK[n] is the subnet mask to use for the network controller. If these lines are left empty, then static IP addresses will not be automatically assigned to this network controller. The USE_DHCP[n] variable tells Slackware (naturally) to use DHCP to configure the interface. DHCP_HOSTNAME[n] is rarely used, but some DHCP servers may require it. In that case, it must be set to a valid hostname. Finally, we come to the GATEWAY variable. It is actually set lower in the file than it appears in my example, and it controls the default gateway to use. You may be wondering why there is no GATEWAY[n] variable. The answer to that lies in how Internet Protocol works. I won't go into an in-depth discussion on that subject, but suffice it to say that there is only ever one default route that a computer can use no matter how many interfaces are attached to it. | ||
- | If you need to use static IP addressing, you will have to obtain | + | This represents most of the information necessary |
+ | IP address | ||
+ | **// | ||
+ | for a single ethernet device for you. If you have multiple network | ||
+ | cards in your machine and need all of them activated automatically at | ||
+ | boot time, then you'll need to edit or add additional entries | ||
+ | file in the same manner as above. First, let me go over some of the | ||
+ | basics. | ||
- | # Config information for eth1: | ||
- | IPADDR[1]="" | ||
- | NETMASK[1]="" | ||
- | USE_DHCP[1]=" | ||
- | DHCP_HOSTNAME[1]="" | ||
- | Here I am telling Slackware | + | As you may have already guessed, IPADDR[n] is the Internet |
+ | Protocol Address for the **n** network interface card. | ||
+ | Typically, **n** corrosponds | ||
+ | //eth0//, //eth1//, and so on, | ||
+ | but this isn't always the case. You can specify these values | ||
+ | pertain to a different network controller with the IFNAME[n] | ||
+ | variable, but we will reserve that for [[slackbook: | ||
+ | as it more commonly pertains | ||
+ | |||
+ | Likewise, NETMASK[n] is the subnet mask to use for the network | ||
+ | controller. | ||
+ | will not be automatically assigned to this network controller. | ||
+ | **USE_DHCP[n]** variable tells Slackware | ||
+ | (naturally) to use DHCP to configure the interface. | ||
+ | **DHCP_HOSTNAME[n]** is rarely used, but some | ||
+ | DHCP servers may require it. In that case, it must be set to a valid | ||
+ | hostname. Finally, we come to the GATEWAY variable. | ||
+ | set lower in the file than it appears in my example, and it controls | ||
+ | the default gateway to use. You may be wondering why there is no | ||
+ | **GATEWAY[n]** variable. The answer to that | ||
+ | lies in how Internet Protocol works. I won't go into an in-depth | ||
+ | discussion on that subject, but suffice it to say that there is only | ||
+ | ever one default route that a computer can use no matter how many | ||
+ | interfaces are attached to it. | ||
+ | |||
+ | |||
+ | If you need to use static IP addressing, you will have to obtain a | ||
+ | unique static IP address and the subnet mask for the interface, as | ||
+ | well as the default gateway address, and enter those here. There is no | ||
+ | place to enter DNS information in '' | ||
+ | so DNS servers will have to be manually placed into | ||
+ | '' | ||
+ | **// | ||
+ | that program. | ||
+ | computer. | ||
+ | |||
+ | |||
+ | < | ||
+ | # Config information for eth1: | ||
+ | IPADDR[1]="" | ||
+ | NETMASK[1]="" | ||
+ | USE_DHCP[1]=" | ||
+ | DHCP_HOSTNAME[1]="" | ||
+ | </ | ||
+ | |||
+ | |||
+ | Here I am telling Slackware to configure eth1 using DHCP. I do not | ||
+ | need to set the **IPADDR[1]** or | ||
+ | **NETMASK[1]** variables when using DHCP (in | ||
+ | fact, if they are set, they will be ignored). Slackware will happily | ||
+ | contact a DHCP server as soon as the machine begins to boot. | ||
====== Chapter Navigation ====== | ====== Chapter Navigation ====== | ||
Line 303: | Line 366: | ||
**Next Chapter: [[slackbook: | **Next Chapter: [[slackbook: | ||
- | ======Sources====== | + | ====== Sources ====== |
- | + | <!-- If you copy information from another source, then specify that source --> | |
- | * Original source: http:// | + | * Original source: |
+ | <!-- Authors are allowed to give credit to themselves! --> | ||
+ | * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson | ||
+ | <!-- * Contrbutions by [[wiki: | ||
+ | <!-- Please do not modify anything below, except adding new tags.--> | ||
+ | <!-- You must also remove the tag-word " | ||
+ | {{tag> |