Chapter 2
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
Chapter 2
Configure the Network Manually
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Objectives
Understand Linux Network Terms
Set Up Network Devices with the ip Tools
Save Device Settings to a Configuration File
Set Up Routing with the ip Tool
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Objectives (continued)
Save Routing Settings to a Configuration File
Configure Host Name and Name Resolution
Test the Network Connection with Command-Line Tools
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand Linux Network Terms
Device
Network adapter built into the system
Link
Used by command-line tool ip to refer to the connection of a device to the network
Address
IP address assigned to a device
Broadcast
Refers to the
oadcast address of a network
Route
Path IP packet takes from source to destination host
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Set Up Network Devices with the ip Tool
Command-line ip tool
Changes the network card configuration
Used to perform the following tasks
Display the Cu
ent Network Configuration
Change the Cu
ent Network Configuration
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Display the Cu
ent Network Configuration
IP address setup
Syntax
ip address show
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Display the Cu
ent Network Configuration (continued)
Device attributes
Syntax
ip link show
Possible attributes
UP, LOOPBACK
BROADCAST, POINTOPOINT
MULTICAST, PROMISC
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Display the Cu
ent Network Configuration (continued)
Device statistics
Syntax
ip –s link show eth0
Information displayed
Bytes, packets, e
ors
Dropped, ove
un, mcast
Ca
ier, collsns, compressed
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Change the Cu
ent Network Configuration
Assign an IP address to a device
ip address add XXXXXXXXXX/24
d + dev eth0
Verify assigned IP address
ip address show dev eth0
Delete the IP address from a device
ip address del XXXXXXXXXXdev eth0
Change device attributes
ip link set device attribute
Enable/Disable a network device
ip link set eth0 up/down
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Save Device Settings to a Configuration File
Changes made with ip are temporary
Network device configuration files
Stored in directory /etc/sysconfig/network
Filenames consist of ifcfg-eth-id-and the hardware address of the device (on OpenSUSE file names consist of ifcfg-eth-id)
Set up a device with YaST first
Then make changes in the configuration file
ip link show
Displays hardware address for each Ethernet device
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Configure a Device Statically
Content of a configuration file example
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Configure a Device Dynamically with DHCP
Set the BOOTPROTO option to dhcp
BOOTPROTO=‘dhcp’
You don’t need to set any other options
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Start and Stop Configured Devices
Disable device eth0
ifdown eth0
Enable device eth0
ifup eth0
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Set Up Routing with the ip Tool
Use ip tool to
View the Routing Table
Add Routes to the Routing Table
Delete Routes from the Routing Table
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
View the Routing Table
Syntax
ip route show
Routing table content varies
Depending on the setup of your machine
You have at least two entries
One route to the local network to which the system is connected
One route to the default gateway for all other packets
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Add Routes to the Routing Table
Set a route to the locally connected network
ip route add XXXXXXXXXX/24 dev eth0
Set a route to a different network
ip route add XXXXXXXXXX/24 via XXXXXXXXXX
Set a default route
ip route add default via XXXXXXXXXX
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Delete Routes from the Routing Table
Syntax
ip route delete XXXXXXXXXX/24 dev eth0
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Save Routing Settings to a Configuration File
Routing settings made with the ip tool are temporary
Routes configuration file
/etc/sysconfig/network
outes
Typical configuration file example
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Configure Host Name and Name Resolution
Objectives
Set the Host and Domain Name
Configure Name Resolution
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Set the Host and Domain Name
Host name is configured in the file /etc/HOSTNAME
The content of the file is similar to the following:
da2.digitalairlines.com
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Configure Name Resolution
Name resolution is configured in the file /etc
esolv.conf
Content of the file is similar to the following:
search digitalairlines.com
nameserver XXXXXXXXXX
nameserver XXXXXXXXXX
nameserver XXXXXXXXXX
File contains two types of entries
search
nameserve
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Test the Network Connection with Command-Line Tools
Test network connection by doing the following:
Use ping to Test Network Connections
Use traceroute to Trace Network Packets
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Use ping to Test Network Connections
Tool ping
Checks network connections between two hosts
Syntax
ping XXXXXXXXXX
Information displayed
The size of an ICMP datagram
The IP address of the target system
The sequence number of each datagram
The TTL (time to live) of the datagram
The Round Trip Time
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Use ping to Test Network Connections (continued)
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Use traceroute to Trace Network Packets
Diagnosis tool traceroute
Checks the routing between different networks
Sends packets with an increasing TTL value to the destination host
Syntax
traceroute pluto.example.com
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Exercise 2-1 Configure the Network Connection Manually
In this exercise, you will do the following:
Part I: Note the Cu
ent Network Configuration
Part II: Delete the Cu
ent Network Setup with YaST
Part III: Configure the Network Manually
Part IV: Save the Network Connection to Interface and Hardware Configuration Files
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Summary
Hosts use network devices linked to the network
To communicate with other computers
Each network device has at least one IP address
That may be configured using the ip command
Network interface and IP information is stored in the /etc/sysconfig/network directory
Different IP networks are connected via routers
Each host contains a hostname
Stored in the /etc/HOSTNAME file
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Summary (continued)
Connect to network resources by name
A host contains the addresses of up to three name servers in the /etc
esolv.conf file
The ping and traceroute commands
Use datagrams to test network communication and routing
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Chapter 3
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
Chapter 3
Configure Network Services
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Objectives
Configure a DNS Server Using BIND
Configure an Apache Web Serve
Configure a Samba Server as a File Server
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Configure a DNS Server Using BIND
Objectives
Understand the Domain Name System
Install and Configure the BIND Server Software
Configure a Caching-Only DNS serve
Configure a Master Server for Your Domain
Configure One or More Slave Servers
Configure the Client Computers to Use the DNS Serve
Use Command-Line Tools to Query DNS Servers
Find More Information About DNS
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System
How name resolution worked in the early days of the Internet
Computers communicate using IP addresses
For humans it is simpler to use a computer name
Requires some kind of conversion
File at the Network Information Centre (NIC) of the Stanford Research Institute in California
Provided exactly this conversion
In 1984, Paul Mockapetris created the Domain Name System (DNS)
Guarantees unique computer names worldwide
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System (continued)
The Internet Domain Concept
DNS consists of several domains that can be divided into subdomains
Top level of this structure is the root domain
There are over 13 computers worldwide
That act as root name servers
First layer beneath root domain contains the top level domains (TLDs)
Fully qualified domain name (FQDN)
Made from the actual computer name, the domain name, and the name of the TLD
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System (continued)
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System (continued)
How Name Servers work
Domains are administered locally
Instead of using a global authority
For each domain there is one DNS serve
Known as the master serve
Slave servers
Distribute the load and serve as backups
Keep a copy of the information on the master server
Update this information at regular intervals
This update is called zone transfe
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System (continued)
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System (continued)
How to query DNS
Resolve
Makes a request to a DNS serve
Interprets the answe
Sends back this information to the program that called it up
DNS server receives a request from a resolve
DNS server provides the required information to the resolve
DNS server queries the responsible authority
The data is stored in the cache of the DNS serve
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Understand the Domain Name System (continued)
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Advanced SUSE Linux Enterprise Server Administration (Course 3038)
*
Install and Configure the BIND Server Software
Install the following packages:
bind
bind-utils
Start the serve
rcnamed start
Stop a running serve
rcnamed stop
Have DNS server start automatically
insserv named
Advanced