Difference between revisions of "Linux networking"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(→‎Related Pages: resolv.conf)
(→‎Related Pages: wireless)
 
(4 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
This is a general guide to [[Linux networking]], mostly as a collection point for links to relevant articles.
 
This is a general guide to [[Linux networking]], mostly as a collection point for links to relevant articles.
 
==Related Pages==
 
==Related Pages==
 +
* [[wireless network cards in Linux]]
 +
===commands and files===
 
* [[dhclient]] (a.k.a. [[dhcpcd]]) is the Linux program which manages the conversation with a [[DHCP]] server and thereby sets the client's [[IP address]] and other related settings.
 
* [[dhclient]] (a.k.a. [[dhcpcd]]) is the Linux program which manages the conversation with a [[DHCP]] server and thereby sets the client's [[IP address]] and other related settings.
 
* [[dnsmasq]] is a [[daemon]] for providing [[DNS]] and [[DHCP]] services on a [[Linux]] server. It can be used to replace those services typically provided by residential router/gateway hardware, but with much more flexibility (and without having to lose the network connection whenever a change is made).
 
* [[dnsmasq]] is a [[daemon]] for providing [[DNS]] and [[DHCP]] services on a [[Linux]] server. It can be used to replace those services typically provided by residential router/gateway hardware, but with much more flexibility (and without having to lose the network connection whenever a change is made).
* [[nsswitch.conf]] tells [[Linux]]'s [[domain name resolver]] what methods to use for resolving [[domain name]]s both within the local network (if any) and on the internet. Among the choices are DNS (best for internet domain names) and WINS (often used for [[Windows (Microsoft)|Windows]])
+
** '''/var/lib/misc/dnsmasq.leases''' is where [[dnsmasq]] keeps its list of assigned addresses (including machine names, where known).
* [[resolv.conf]] is the [[domain name resolver]] configuration file
+
* [[nsswitch.conf]] tells [[Linux]]'s [[domain name resolver]] what methods to use for resolving [[domain name]]s both within the local network (if any) and on the internet. Among the choices are DNS (best for internet domain names) and WINS (often used for [[Windows (Microsoft)|Windows]]); these can be combined so that it looks up local machine names using WINS but falls back to DNS for domain names.
 +
* [[resolv.conf]] is the [[domain name resolver]] configuration file; it can be edited by hand, but if the network connection is being managed by DHCP (typically using [[dhclient]]), manual changes will be overwritten.
 
* [[Samba]]: when communication with [[Windows (Microsoft)|Windows]] is part of the picture, the configuration of Samba may be relevant.
 
* [[Samba]]: when communication with [[Windows (Microsoft)|Windows]] is part of the picture, the configuration of Samba may be relevant.
 
* [[WINS]] is the protocol used to convert [[Windows (Microsoft)|Windows]] SMB names into (usually [[local IP address|local]]) IP addresses
 
* [[WINS]] is the protocol used to convert [[Windows (Microsoft)|Windows]] SMB names into (usually [[local IP address|local]]) IP addresses
 +
* Commands for resolving domain names (and machine names) to IP addresses:
 +
** {{linuxcmd|net}} is intended for use with Samba machine names, but works with domain names
 +
** [[nslookup]]
 +
** {{linuxcmd|dig}} is more flexible than [[nslookup]], though it lacks an interactive mode
 +
* [[ifconfig]] tells how your network interfaces (cards) are currently configured.
 +
 +
==Notes==
 +
* When you run "/etc/init.d/networking restart", it only invokes [[dhclient]] for interfaces (network cards) which have the "dhcp" attribute. If you invoke dhclient manually on a card with a static IP address signed, it will use DHCP to assign the card an address (usually not the same one). Running "/etc/init.d/networking restart" again will revert to the static IP.

Latest revision as of 22:41, 9 June 2007

Navigation

computing: software: operating systems: Linux: networking

Overview

This is a general guide to Linux networking, mostly as a collection point for links to relevant articles.

Related Pages

commands and files

  • dhclient (a.k.a. dhcpcd) is the Linux program which manages the conversation with a DHCP server and thereby sets the client's IP address and other related settings.
  • dnsmasq is a daemon for providing DNS and DHCP services on a Linux server. It can be used to replace those services typically provided by residential router/gateway hardware, but with much more flexibility (and without having to lose the network connection whenever a change is made).
    • /var/lib/misc/dnsmasq.leases is where dnsmasq keeps its list of assigned addresses (including machine names, where known).
  • nsswitch.conf tells Linux's domain name resolver what methods to use for resolving domain names both within the local network (if any) and on the internet. Among the choices are DNS (best for internet domain names) and WINS (often used for Windows); these can be combined so that it looks up local machine names using WINS but falls back to DNS for domain names.
  • resolv.conf is the domain name resolver configuration file; it can be edited by hand, but if the network connection is being managed by DHCP (typically using dhclient), manual changes will be overwritten.
  • Samba: when communication with Windows is part of the picture, the configuration of Samba may be relevant.
  • WINS is the protocol used to convert Windows SMB names into (usually local) IP addresses
  • Commands for resolving domain names (and machine names) to IP addresses:
    • net is intended for use with Samba machine names, but works with domain names
    • nslookup
    • dig is more flexible than nslookup, though it lacks an interactive mode
  • ifconfig tells how your network interfaces (cards) are currently configured.

Notes

  • When you run "/etc/init.d/networking restart", it only invokes dhclient for interfaces (network cards) which have the "dhcp" attribute. If you invoke dhclient manually on a card with a static IP address signed, it will use DHCP to assign the card an address (usually not the same one). Running "/etc/init.d/networking restart" again will revert to the static IP.