Repository :
http://git.fedorahosted.org/cgit/docs/fedora-cookbook.git
On branch : master
---------------------------------------------------------------
commit bd2585e3f56f2ec41c2564bba6a3a075ab5e77ea
Author: Glen Rundblom <grundblom(a)fedoraproject.org>
Date: Wed Nov 11 16:27:55 2015 -0600
Added content about manual IP assignment in the command line in the Networking.xml
file, publican fails to build, but I think that is because I am trying under F23,
---------------------------------------------------------------
en-US/Networking.xml | 119 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 115 insertions(+), 4 deletions(-)
diff --git a/en-US/Networking.xml b/en-US/Networking.xml
index b38cbff..c25b6b0 100644
--- a/en-US/Networking.xml
+++ b/en-US/Networking.xml
@@ -8,14 +8,125 @@
<section id="DHCP_Static">
<title>DHCP VS Static IP assignment</title>
<para>
- DHCP: Dynamic Host protocol: The DHCP server assigns an IP address to the computer.
This can be random within the DHCP server's address pool.
+ <emphasis>DHCP:</emphasis> Dynamic Host protocol: The DHCP server
assigns an IP address to the computer. This can be random within the DHCP server's
address pool.
Or it can be a reservation. Having a reservation for a client can effectively mimic
a static IP. This will give the client the same IP address over and over, without having
to manually configure the IP manually on the host.
- The advantage to this is less manual configuration on the host
+ The advantage to this is less manual configuration on the host.
</para>
+ <para>
+ <warning> While having a DHCP reservation mimics a static IP, you will be reliant
on the DHCP service to be running for your host to keep getting the same IP
address.</warning>
+ </para>
<para>
- Static: This way is when you manually assign an IP address into the computer. You
may need to do this on a network that has no DHCP server, or the DHCP server will not
allow you to have reservations for your computer.
- Manually assigning a static IP address has the benifit of making some configurations
easier. Especially when configuring a server because in server configuration files
+ <emphasis>Static:</emphasis> This way is when you manually assign an IP
address into the computer. You may need to do this on a network that has no DHCP server,
or the DHCP server will not allow you to have reservations for your computer.
+ Manually assigning a static IP address has the benefit of making some configurations
easier. Especially when configuring a server because in server configuration files
you can specify the IP address of the server, that you know will be the same every
time. An example if configuring MySQL to answer on a specific IP address you have
configured on the server.
</para>
+ <para>
+ If you want to setup your machine with a static IP address there are a few items you
need to know:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The IP address you want to use
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The sub-net mask of your network sub-net
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The Gateway/Router IP of your sub-net
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ DNS servers you will want to use
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Try to make the static address outside of the pool of addresses that the DHCP
server assigns
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
</section>
+ <section id="How_to_static_command_line">
+ <title>How to set up a static IP assignment via the command line </title>
+ <para>
+ To setup manual an IP address manually, you must first find which network interface,
or network card you will be assigning the IP
+ address to.
+ </para>
+ <para>
+ <procedure>
+ <title>Find_Your_Interface</title>
+ <step>
+ <para>
+ list the contents of directory /etc/sysconfig/network-scripts: <command>ls
-l /etc/sysconfig/network-scripts</command>
+ </para>
+ </step>
+ <step>
+ <para>
+ You should see items that start with ifcfg-INTERFACENAME, so usually it is
ifcfg-eth0, sometimes it could be something like: ifcfg-enp1s0
+ This is the interface file you will <emphasis>probably</emphasis> be
editing
+ </para>
+ </step>
+ <step>
+ <para>
+ open the interface with your text editor of choice, <command> sudo vim
/etc/sysconfig/ifcfg-eth0 </command>
+ </para>
+ </step>
+ <step>
+ <para>
+ edit the file with the information you have collected:
+ <programlisting>
+HWADDR=AA:BB:CC:DD:AA:BB #Required
+TYPE=Ethernet #Required
+BOOTPROTO=static #Required
+DEFROUTE=yes #Required
+IPADDR=192.168.1.65 #Required
+NETMASK=255.255.255.0 #Required
+GATEWAY=192.168.1.1 #Required
+IPV4_FAILURE_FATAL=no
+IPV6INIT=no
+IPV6_AUTOCONF=no
+IPV6_DEFROUTE=no
+IPV6_FAILURE_FATAL=no
+NAME=eth0
+UUID=
+ONBOOT=yes #Required
+DNS1=8.8.8.8 #Required
+DNS2=8.8.4.4
+PEERDNS=yes
+PEERROUTES=yes
+IPV6_PEERDNS=no
+IPV6_PEERROUTES=no
+</programlisting>
+ In this example, there is a lot of extra lines because this file was auto-created
by the system. I marked
+ lines that are mandatory with #Required.
+ What is neat in the newer versions of Fedora, is you can set the DNS and Gateway
per interface. Please do not have the #Required comments in your config file
+ </para>
+ <para>
+ <note>
+ What is nice about specifying the gateway and DNS at the
<emphasis>interface</emphasis> level instead of the
<emphasis>system</emphasis> level is so you can have multiple interfaces on a
computer
+ attached to different networks/routes. This is nice especially for a laptop when
you want the wired interface to have a special configuration but have the wireless
+ as general DHCP that attaches to many different networks.
+ </note>
+ </para>
+ </step>
+ <step>
+ <para>
+ Save the file
+ </para>
+ </step>
+ <step>
+ <para>
+ Now you need to restart network manager service <command>sudo systemctl
restart NetworkManager</command>
+ </para>
+ </step>
+ </procedure>
+ </para>
+ </section>
</chapter>