This Is Your Brain On Informatics: Network: Difference between revisions

Tikenn (talk | contribs)
Tikenn (talk | contribs)
No edit summary
Line 1: Line 1:
Possibly the most important aspect to computers: the internet (or more broadly, the network).  Here are some guidelines to setting up networks on Linux machines with special sections for the virtual machine controlled by [https://www.virtualbox.org/ VirtualBox].
Possibly the most important aspect to computers: the internet (or more broadly, the network).  Here are some guidelines to setting up networks on Linux machines with special sections for the virtual machine controlled by [https://www.virtualbox.org/ VirtualBox].


==Getting Started==
== Getting Started==


This first item of note is the location of the file that names the network connections in Linux.  This file can be found [[This Is Your Brain On Informatics: Common Pathnames|here]] under the network section.  Upon being opened the file should show something similar to this (# indicates a comment):
This first item of note is the location of the file that names the network connections in Linux.  This file can be found [[This Is Your Brain On Informatics: Common Pathnames|here]] under the network section.  Upon being opened the file should show something similar to this (# indicates a comment):
Line 9: Line 9:
auto lo
auto lo
iface lo inet loopback
iface lo inet loopback
 
=
# The primary network interface
# The primary network interface
auto eth0
auto eth0
Line 16: Line 16:


The networks shown here are the basic networks that will allow the machine to connect to the internet.  If this is a regular computer (not a virtual machine), this file should be similar to what is above meaning that it is already completely setup for internet connection and ssh purposes.
The networks shown here are the basic networks that will allow the machine to connect to the internet.  If this is a regular computer (not a virtual machine), this file should be similar to what is above meaning that it is already completely setup for internet connection and ssh purposes.


Notice here that the eth0 network has "dhcp" (dynamic host configuration protocol) at the end of the final line.  This causes the IP address of this network to be dynamically acquired (meaning that the IP address will be changed frequently) rather than statically set.  Below is a discussion of how to set up each.   
Notice here that the eth0 network has "dhcp" (dynamic host configuration protocol) at the end of the final line.  This causes the IP address of this network to be dynamically acquired (meaning that the IP address will be changed frequently) rather than statically set.  Below is a discussion of how to set up each.   


==Adding a network==
==Adding a network==
This step should be taken care of if it is a regular computer; however it is very necessary for a virtual machine.
This step should be taken care of if it is a regular computer; however it is very necessary for a virtual machine.


===Using a Dynamically Acquired IP===
===Using a Dynamically Acquired IP===
This method will cause the network to randomly (within reason of course) select an IP address each time the virtual box is disconnected from an ISP (Internet Service Provider) or another virtual machine is created.
This method will cause the network to randomly (within reason of course) select an IP address each time the virtual box is disconnected from an ISP (Internet Service Provider) or another virtual machine is created.