Configuration and Administration of Networking for Fedora 23
Total Page:16
File Type:pdf, Size:1020Kb
Fedora 23 Networking Guide Configuration and Administration of Networking for Fedora 23 Stephen Wadeley Networking Guide Draft Fedora 23 Networking Guide Configuration and Administration of Networking for Fedora 23 Edition 1.0 Author Stephen Wadeley [email protected] Copyright © 2015 Red Hat, Inc. and others. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. For guidelines on the permitted uses of the Fedora trademarks, refer to https://fedoraproject.org/wiki/ Legal:Trademark_guidelines. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries. All other trademarks are the property of their respective owners. The Networking Guide documents relevant information regarding the configuration and administration of network interfaces, networks and network services in Fedora 23. It is oriented towards system administrators with a basic understanding of Linux and networking. This book is based on the Deployment Guide from Red Hat Enterprise Linux 6. The chapters related to networking were taken from the Deployment Guide to form the foundation for this book. Draft Draft Preface vii 1. Target Audience ............................................................................................................ vii 2. About This Book ............................................................................................................ vii 3. How to Read this Book .................................................................................................. vii 4. Document Conventions ................................................................................................. viii 4.1. Typographic Conventions .................................................................................... viii 4.2. Pull-quote Conventions ......................................................................................... x 4.3. Notes and Warnings ............................................................................................. x 5. Feedback ....................................................................................................................... xi 6. Acknowledgments ........................................................................................................... xi I. Networking 1 1. Introduction to Fedora Networking 3 1.1. How this Book is Structured .................................................................................. 3 1.2. Introduction to NetworkManager ............................................................................ 3 1.3. Installing NetworkManager .................................................................................... 4 1.3.1. The NetworkManager Daemon ................................................................... 4 1.3.2. Interacting with NetworkManager ................................................................ 4 1.4. Network Configuration Using the Command Line Interface (CLI) .............................. 5 1.5. Network Configuration Using NetworkManager's CLI (nmcli) .................................... 5 1.6. NetworkManager and the Network Scripts ............................................................. 5 1.7. Network Configuration Using sysconfig Files .......................................................... 7 1.8. Additional Resources ............................................................................................ 8 1.8.1. Installed Documentation ............................................................................. 8 2. Configure Networking 9 2.1. Static and Dynamic Interface Settings ................................................................... 9 2.1.1. When to Use Static Network Interface Settings ............................................ 9 2.1.2. When to Use Dynamic Interface Settings .................................................... 9 2.1.3. Selecting Network Configuration Methods ................................................... 9 2.2. Using NetworkManager with the GNOME Graphical User Interface ........................ 10 2.2.1. Connecting to a Network Using a GUI ...................................................... 10 2.2.2. Configuring New and Editing Existing Connections ..................................... 10 2.2.3. Connecting to a Network Automatically ..................................................... 11 2.2.4. System-wide and Private Connection Profiles ............................................ 12 2.2.5. Configuring a Wired (Ethernet) Connection ................................................ 13 2.2.6. Configuring a Wi-Fi Connection ................................................................ 14 2.2.7. Establishing a VPN Connection ................................................................ 16 2.2.8. Establishing a Mobile Broadband Connection ............................................ 19 2.2.9. Establishing a DSL Connection ................................................................ 21 2.2.10. Configuring Connection Settings ............................................................. 23 2.3. Using the Command Line Interface (CLI) ............................................................. 30 2.3.1. Configuring a Network Interface Using ifcfg Files ....................................... 30 2.3.2. Configuring a Network Interface Using ip Commands ................................. 31 2.3.3. Static Routes and the Default Gateway ..................................................... 32 2.3.4. Configuring Static Routes in ifcfg files ....................................................... 33 2.3.5. Configuring IPv6 Tokenized Interface Identifiers ......................................... 35 2.4. Using the NetworkManager Command Line Tool, nmcli ......................................... 36 2.4.1. Understanding the nmcli Options .............................................................. 38 2.4.2. Connecting to a Network Using nmcli ........................................................ 39 2.4.3. Configuring Static Routes Using nmcli ....................................................... 44 2.5. Additional Resources .......................................................................................... 45 2.5.1. Installed Documentation ........................................................................... 45 iii Networking Guide Draft 2.5.2. Online Documentation .............................................................................. 45 3. Configure Host Names 47 3.1. Understanding Host Names ................................................................................ 47 3.1.1. Recommended Naming Practices ............................................................. 47 3.2. Configuring Host Names Using hostnamectl ......................................................... 47 3.2.1. View All the Host Names ......................................................................... 47 3.2.2. Set All the Host Names ........................................................................... 48 3.2.3. Set a Particular Host Name ...................................................................... 48 3.2.4. Clear a Particular Host Name ................................................................... 48 3.2.5. Changing Host Names Remotely .............................................................. 48 3.3. Configuring Host Names Using nmcli ................................................................... 48 3.4. Additional Resources .......................................................................................... 49 3.4.1. Installed Documentation ........................................................................... 49 3.4.2. Online Documentation .............................................................................. 49 4. Configure Network Bonding 51 4.1. Understanding the Default Behavior of Master and Slave Interfaces ....................... 51 4.2. Creating a Bond Connection Using a GUI ............................................................ 51 4.2.1. Establishing a Bond Connection ............................................................... 52 4.3. Using the Command Line Interface (CLI) ............................................................. 55 4.3.1. Check if Bonding Kernel Module is Installed .............................................. 55 4.3.2. Create a Channel Bonding Interface ........................................................