Service Management and Networking Commands
16 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What command activates a specific network connection using NetworkManager?

  • nmcli connection up (correct)
  • nmcli activate connection
  • nmcli connection down
  • nmcli connection start
  • Which command is used to deactivate a specific network interface?

  • ip link down interface
  • systemctl deactivate interface
  • nmcli connection down interface (correct)
  • ip interface down
  • In the configuration for a static IP, what does the parameter 'BOOTPROTO=none' indicate?

  • No IP address will be assigned dynamically (correct)
  • Network interface will use a static IP
  • Interface will accept DNS from DHCP
  • System boot protocol is automatic
  • Which file is used for static hostname resolution?

    <p>/etc/hosts</p> Signup and view all the answers

    What does the 'PEERDNS=yes' setting in a dynamic IP configuration do?

    <p>Accepts DNS servers provided by the DHCP server</p> Signup and view all the answers

    Where are the network settings for interfaces typically stored?

    <p>/etc/sysconfig/network-scripts/</p> Signup and view all the answers

    Which command would you use to bring the network interface 'eth0' up?

    <p>ip link set interface eth0 up</p> Signup and view all the answers

    If you need to specify a custom DNS server for an interface, which option should you use?

    <p>PEERDNS=no and specify DNS1 and DNS2</p> Signup and view all the answers

    What is the primary use of the 'ip link' command in network management?

    <p>To manage and configure network interfaces</p> Signup and view all the answers

    In a dynamic IP configuration, what does the parameter 'ONBOOT=yes' signify?

    <p>The interface will activate automatically at boot</p> Signup and view all the answers

    What happens when 'PEERDNS=no' is set in an interface configuration?

    <p>The user must manually configure DNS servers for the interface</p> Signup and view all the answers

    Which directory typically contains dynamic network configuration files?

    <p>/etc/resolv.conf/</p> Signup and view all the answers

    What is the effect of the 'BOOTPROTO=dhcp' setting in an interface configuration?

    <p>It allows the interface to acquire an IP address from a DHCP server.</p> Signup and view all the answers

    Which command is primarily used to activate a specific network interface after configuration changes?

    <p>ip link set interface up</p> Signup and view all the answers

    When using the '/etc/sysconfig/network-scripts/' directory, which file type is typically used for interface configuration?

    <p>ifcfg-interface</p> Signup and view all the answers

    Which command would you use to deactivate a specific network interface on a system?

    <p>nmcli connection down</p> Signup and view all the answers

    Study Notes

    Service Management and Networking Commands

    • MCLI stands for Managed Command Line Interface, used for managing networks.
    • NetworkManager service can be controlled using the systemctl command.

    Network Activation and Deactivation

    • nmcli connection up <connection_name> activates a specific network connection.
    • nmcli connection down <interface> deactivates a specific network connection linked to an interface.

    Managing Network Interfaces

    • ip link set <interface> up: Activates a network interface.
      • ip link: Tool to manage network interfaces.
      • set: Command for changing settings.
      • <interface>: Placeholder for the network interface name (e.g., eth0, wlan0).

    Configuration File Paths

    • Network settings are stored in /etc/sysconfig/network-scripts/ for network scripts.
    • Network connection settings can also be found in /etc/NetworkManager/system-connections/.

    Interface Configuration

    • Dynamic IP configuration example:

      • DEVICE=ens160 specifies the network device name.
      • TYPE=Ethernet defines the connection type.
      • ONBOOT=yes indicates the interface should activate on boot.
      • BOOTPROTO=dhcp configures obtaining an IP address via DHCP.
      • PEERDNS=yes allows acceptance of DNS from the DHCP server.
      • DEFROUTE=yes indicates acceptance of the gateway from the DHCP server.
    • Static IP configuration example:

      • DEVICE=ens224 designates the Ethernet connection name.
      • BOOTPROTO=none specifies no dynamic IP assigned.
      • IPADDR=172.16.30.167 assigns a fixed IP address.
      • NETMASK=255.255.0.0 defines the subnet mask.
      • NETWORK=172.16.0.0 sets the associated network.

    Hostname Resolution

    • Static hostname resolution uses /etc/hosts for server name and local settings.
    • Dynamic hostname resolution relies on /etc/resolv.conf for DNS server entries.
      • Updated by local DHCP client or manually configured.
      • Controlled by PEERDNS option in interface configuration.
      • Two DNS servers can be specified in the configuration with PEERDNS=no to update resolv.conf.

    Viewing Routing Information

    • Local routing table can be viewed using the command ip route.
    • Outputs indicate the default route, next-hop IP address, and the exit interface.

    Device and IP Configuration Commands

    • Device setup commands:

      • ip link: Replaces ifconfig to manage network interfaces.
      • lspci [-v]: Displays information about PCI devices.
    • IP configuration commands:

      • ip addr: Replaces ifconfig for viewing IP addresses.
      • ip route: Replaces route for routing information.
      • ip neigh: Replaces arp for neighbor discovery.
      • ping: Tests connectivity to networked devices.

    Hostname Management Commands

    • hostnamectl: Used to set or view the system hostname.
    • getent hosts: Retrieves entries from the host database.
    • ping: Also used to check hostname resolution and connectivity.

    CLI Interface for Network Management

    • MCLI: Command Line Interface for managing network settings efficiently.
    • Network services managed via systemctl NetworkManager.

    Network Interface Management

    • Use nmcli connection up <connection-name> to activate a specific network.
    • Use nmcli connection down <connection-name> to deactivate a specific network.
    • Command ip link set <interface> up enables a network interface.
    • ip link: Tool for managing network interfaces, allows viewing and modifying settings.
    • <interface> indicates the specific network interface (e.g., eth0 for Ethernet, wlan0 for Wi-Fi).

    Network Configuration Files

    • Configuration files are located in:
      • /etc/sysconfig/network-scripts/: Stores network settings.
      • /etc/NetworkManager/system-connections: Used by NetworkManager to manage connections.

    Interface Configuration

    • Dynamic IP configuration:

      • DEVICE=ens160, TYPE=Ethernet, ONBOOT=yes, BOOTPROTO=dhcp (for DHCP).
      • PEERDNS=yes allows DNS servers to be accepted from the DHCP server.
      • DEFROUTE=yes sets the gateway from the DHCP server.
    • Static IP configuration:

      • DEVICE=ens224, TYPE=Ethernet, ONBOOT=yes, BOOTPROTO=none (fixed IP).
      • IPADDR=172.16.30.167, NETMASK=255.255.0.0.

    Hostname Resolution

    • Static resolution via /etc/hosts:

      • Includes localhost and server name entries.
    • Dynamic resolution via /etc/resolv.conf:

      • Contains a list of name servers, automatically updated by DHCP or manually.
      • Controlled by PEERDNS option.
      • Additional DNS configuration can be set in interface files as DNS1, DNS2 with PEERDNS=no.

    Viewing Routing Table

    • Use ip route to display the local routing table.
    • Output details the default route, the IP of the next-hop router, and the exit interface.

    Commands for Device Setup

    • Use ip link (replaces ifconfig) to inspect and manage interfaces.
    • Use lspci [-v] to list PCI devices with optional verbose output.

    IP Configuration Commands

    • ip addr: Replaces ifconfig to deal with IP addresses.
    • ip route: Replaces traditional route command for routing.
    • ip neigh: Replaces arp for neighbor discovery.
    • ping: Utility to test network connectivity.

    Hostname Configuration and Resolution Commands

    • hostnamectl for setting and getting system hostname.
    • getent hosts for querying hosts or DNS information.
    • ping for testing connectivity to hostnames.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    This quiz focuses on service management and command-line interface (CLI) tools for network management, particularly using MCLI and nmcli commands. You'll explore how to activate and deactivate specific network connections and manage interfaces with ip link commands. Test your knowledge on essential networking commands and their functions.

    More Like This

    Network Management Quiz
    10 questions
    Network Management Model Quiz
    16 questions
    Network Management Quiz 3
    22 questions
    Use Quizgecko on...
    Browser
    Browser