Linux networking
Jump to navigation
Jump to search
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:
- 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.