~ubuntu-manual/ubuntu-manual/xenial

« back to all changes in this revision

Viewing changes to working-with-ubuntu/gettingonline.tex

  • Committer: Kevin M. Godby
  • Date: 2016-02-12 08:15:11 UTC
  • Revision ID: kevin@godby.org-20160212081511-ki6wpqkcoufy527t
Initial commit. Copied from trusty-e2 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%Edited by Chris Woollard (2012-06-03) 
 
2
%Correction made by Hannie, 2012-09-27
 
3
 
 
4
\section{Getting online}\label{sec:getting-online}
 
5
 
 
6
\credit{editor}{David Pires}{13.10}
 
7
\credit{author}{Mehmet Kani}{14.04}
 
8
\credit{editor}{Mehmet Kani}{14.04}
 
9
\credit{editor}{Sylvie Gallet}{14.04}
 
10
 
 
11
\status{13.10}{2013-09-15}{review}
 
12
\status{13.10}{2013-09-18}{candidate}
 
13
 
 
14
This section of the manual will help you to check your connection to the Internet and help you configure it where needed. Ubuntu can connect to the Internet using a wired, wireless, or dialup connection. Ubuntu also supports more advanced connection methods, which will be briefly discussed at the end of this section.
 
15
 
 
16
A \gls{wired connection} is when your computer connects to the Internet using an Ethernet cable. This is usually connected to a wall socket or a networking device \dash like a switch or a \gls{router}. 
 
17
 
 
18
A \gls{wireless connection} is when your computer connects to the Internet using a wireless radio network \dash usually known as Wi-Fi. Most routers now come with wireless capability, as do most laptops and netbooks. Because of this, Wi-Fi is the most common connection type for these types of devices. Wireless connectivity makes laptops and netbooks more portable when moving to different rooms of a house and while travelling.
 
19
 
 
20
A \gls{dialup connection} is when your computer uses a \emph{modem} to connect to the Internet through a telephone line.
 
21
 
 
22
\indexstart{Internet!connecting}
 
23
\index{NetworkManager}
 
24
\subsection{NetworkManager}
 
25
 
 
26
 
 
27
In order to connect to the Internet using Ubuntu, you need to use the \application{NetworkManager} utility. \application{NetworkManager} allows you to turn network connections on or off, manage wired and wireless networks, and make other network connections, such as dialup, mobile broadband, and \acronym{VPN}s.
 
28
 
 
29
\begin{marginfigure}
 
30
  \centering
 
31
  \begin{tabular}{ccc}
 
32
    \includegraphics[width=2em]{graphics/network-disconnected} &
 
33
    \includegraphics[width=2em]{graphics/network-wired} &
 
34
    \includegraphics[width=2em]{graphics/network-wireless} \\
 
35
    (a) & (b) & (c)
 
36
  \end{tabular}
 
37
  \caption{The network connection states: (a) disconnected, (b) wired, and (c) wireless.}
 
38
  \label{ss:connection-states-icons}
 
39
\end{marginfigure}
 
40
 
 
41
You can access \application{NetworkManager} by using its icon found in the top panel. This icon may look different depending on your current connection state. Clicking this icon will reveal a list of available network connections. The current connection (if any) will have the word ``disconnect'' underneath it. You can click on ``disconnect'' to manually disconnect from that network.
 
42
 
 
43
This menu also allows you to view technical details about your current connection or edit all connection settings. \marginscreenshot{03-active-connection.png}{ss:active-connection}{Here you can see the currently active connection is ``Wired connection 1.''} In the image to the right, you will see a check mark next to ``Enable Networking.'' Deselect ``Enable Networking'' to disable all network connections. Select ``Enable Networking'' to enable networking again. This can be very useful when you are required to turn off all wireless communications, like in an airplane.
 
44
 
 
45
\subsection{Establishing a wired connection}
 
46
If you are already online at this point as indicated by the NetworkManager icon in the top panel showing a connection, then you may have successfully connected during the Ubuntu setup process. You can also simply open a browser and see if you have access to the Internet. If so, you do not need to do anything for the rest of this section. If not, then continue reading.
 
47
 
 
48
If you have an \emph{Ethernet} cable running from a wall socket or networking device, such as a switch or router, then you will want to setup a wired connection in Ubuntu.
 
49
 
 
50
In order to connect to the Internet with a wired connection, you need to know whether your network supports \gls{DHCP} \emph{(Dynamic Host Configuration Protocol)}. \acronym{DHCP} is a way for your computer to automatically be configured to access your network and/or Internet connection. \acronym{DHCP} is usually automatically configured on your router. This is usually the quickest and easiest way of establishing a connection to the Internet. If you are unsure whether your router is setup to use \acronym{DHCP}, you may wish to contact your \gls{ISP}'s \emph{(Internet Service Provider)} customer service line to check. If your router isn't configured to use \acronym{DHCP} then they will also be able to tell you what configuration settings you need in order to get online.
 
51
 
 
52
\subsubsection{Automatic connections with DHCP}
 
53
\screenshot{03-connection-information.png}{ss:connection-information}{This window displays your \acronym{IP} address and other connection information.}
 
54
If your network supports \acronym{DHCP}, then you may already be set up for online access. To check this, click on the NetworkManager icon. There should be an ``Ethernet Network'' heading in the menu. If ``Wired connection~1'' appears directly underneath, then your machine is currently connected and probably setup for \acronym{DHCP}. If ``Disconnected'' appears in gray underneath the wired network section, look below to see if an option labeled ``Wired connection 1'' appears in the list. If so, click on it to attempt to establish a wired connection.
 
55
 
 
56
\marginnote{An \acronym{IP} (Internet Protocol) address is a unique number assigned to your machine so that your router can identify you on the network. Think of it like a phone number for your computer. Having this unique address allows the router to speak to your computer, and therefore send/receive data.
 
57
 
 
58
If you are still not online after following these steps, you may need to try setting up your network connection manually using a static \acronym{IP} address.} To check if you are online, click on the NetworkManager icon in the top panel and select the Connection Information option. You should see a window showing details of your connection. If your \acronym{IP} address is displayed as 0.0.0.0 or starts with 169.254, then your computer was not successfully assigned connection information through \acronym{DHCP}. If it shows another address (\eg, 192.168.219.133), then it is likely that your \acronym{DHCP} connection to the router was successful. To test your Internet connection, you may want to open the Firefox web browser to try loading a web page. More information on using Firefox can be found later in this chapter. 
 
59
 
 
60
% Another method which may be included is to open up Terminal and ping a site for example 'ping www.google.co.uk'. Using this method can also provide information that you are or not connected to the router/web. This method can be included here or within the troubleshooting chapter if required. Mehmet Kani
 
61
 
 
62
\subsubsection{Manual configuration with static address}
 
63
If your network does not support \acronym{DHCP}, then you need to know a few items of information before you can get online. If you do not know any of this information, then you call your \acronym{ISP}.
 
64
 
 
65
\begin{itemize}
 
66
\item An \define{\acronym{IP} address} \dash This is a unique address used for identifying your computer on the network. An \acronym{IP} address is always given in four numbered groups, separated by dots, for example, 192.168.100.10. When connecting using \acronym{DHCP}, this address will periodically change (hence, the name ``dynamic''). However, if you have configured a static \acronym{IP} address, your \acronym{IP} address will never change.
 
67
\item A \define{network mask} \dash This tells your computer the size of the network to which it is being connected. It is formatted the same way as the \acronym{IP} address, but usually looks something like 255.255.255.0.
 
68
\item A \define{gateway} \dash This is the \acronym{IP} address of the device that your machine looks to for access to the Internet. Usually, this will be the router's \acronym{IP} address. 
 
69
\item \define{\acronym{DNS} server} \dash This is the \acronym{IP} address of the \acronym{DNS} \emph{(Domain Name Service)} server. \acronym{DNS} is what your computer uses to resolve \acronym{IP} addresses to domain names. For example \url{http://www.ubuntu.com} resolves to 91.189.94.156. This is the \acronym{IP} address of the Ubuntu website on the Internet. \acronym{DNS} is used so you don't have to remember \acronym{IP} addresses. Domain names (like \url{ubuntu.com}) are much easier to remember. You will need at least one \acronym{DNS} server address but you can enter up to three addresses in case one server is unavailable. If you do not know your \acronym{ISP}'s \acronym{DNS} server addresses, Google has \acronym{DNS} servers that anyone in the world can use for free. The addresses of these servers are: Primary \dash 8.8.8.8 Secondary \dash 8.8.4.4.
 
70
\end{itemize}
 
71
 
 
72
To manually configure a wired connection, click on the \application{NetworkManager} icon and select \menu{Edit Connections}. Make sure you are looking at the \tab{Wired} tab inside the \window{Network Connections} window. The list may already have an entry, such as ``Wired connection 1'' or a similar name. If a connection is listed, select it and click the \button{Edit} button. If no connection is listed, click the \button{Add} button.
 
73
 
 
74
If you are adding a connection, you need to provide a name for the connection. This will distinguish the connection being added from any other connections added in future. In the ``Connection Name'' field, choose a name such as ``Wired Home.''
 
75
 
 
76
\screenshot{03-editing-ipv4.png}{ss:connection-editing-window}{In this window you can manually edit a connection.}
 
77
 
 
78
To setup the connection:
 
79
 
 
80
\begin{enumerate}
 
81
  \item Make sure that the \checkbox{Connect automatically} option is selected under the connection name.
 
82
  \item Switch to the \button{\acronym{IP}v4 Settings} tab.
 
83
  \item Change the \dropdown{Method} to ``Manual.''
 
84
  \item Click on the \button{Add} button next to the empty list of addresses.
 
85
  \item Enter your \acronym{IP} address in the field below the \textfield{Address} header.
 
86
  \item Click to the right of the \acronym{IP} address, directly below the \textfield{Netmask} header and enter your network mask. If you are unsure, ``255.255.255.0'' is the most common.
 
87
  \item Click on the right of the network mask directly below the \textfield{Gateway} header and enter the address of your gateway.
 
88
  \item In the \textfield{\acronym{DNS} Servers} field below, enter the address of your \acronym{DNS} server(s). If you are entering more than one, separate them with commas \dash for example, ``8.8.8.8, 8.8.4.4''.
 
89
  \item Click \button{Save} to save your changes.
 
90
\end{enumerate}
 
91
 
 
92
\advanced{A \acronym{MAC} address is a hardware address for your computer's network card. Entering this information is sometimes important when using a cable modem connection. If you know the \acronym{MAC} address of your network card, this can be entered in the appropriate text field in the \button{Wired} tab of the editing window. To find the \acronym{MAC} addresses for all installed networking devices, open a terminal window, and at the command line prompt, type \userinput{ifconfig}. This will display a lot of information about each of the network devices installed on the computer. The wired devices will be labeled as \textfield{LAN0}, \textfield{LAN1}, etc. The wireless devices will appear as \textfield{WLAN0}, \textfield{WLAN1}, etc.}
 
93
 
 
94
When you have returned to the \application{Network Connections} screen, your newly added connection should now be listed. Click \button{Close} to return to the desktop. If your connection was configured correctly, the \application{NetworkManager} icon should have changed to show an active wired connection. To test if your connection is properly set up, simply open a web browser. If you can access the Internet, then you are connected!
 
95
 
 
96
\subsection{Wireless}
 
97
\index{Internet!wireless}
 
98
\index{Wi-Fi}
 
99
 
 
100
If your computer is equipped with a wireless (Wi-Fi) card and you have a wireless network nearby, you should be able to set up a wireless connection in Ubuntu.
 
101
 
 
102
\subsubsection{Connecting to a wireless network for the first time}
 
103
 
 
104
If your computer has a wireless network card, you can connect to a wireless network. Most laptops and netbooks have a built-in wireless networking card.
 
105
 
 
106
Ubuntu is usually able to detect any wireless network in range of your computer. To see a list of wireless networks, click on the \application{NetworkManager} icon. Under the ``Wireless Networks'' heading you should see a list of available wireless networks. Each network will be shown by its name and a signal meter to the left showing its relative signal strength. The signal meter looks like a set of bars similar to what is seen when viewing signal strength of a cell phone. Simply put, the more bars, the stronger the signal. To improve speed and reliability of your wireless connection, try moving closer to your router or wireless access point.
 
107
 
 
108
A wireless network can be open to anyone, or it can be protected with a password. A small padlock will be displayed alongside the signal bar if any wireless networks within range are password-protected. You will need to know the correct password in order to connect to these secured wireless networks.
 
109
 
 
110
To connect to a wireless network, select the desired network by clicking on its name within the list. This will be the name that was used during the installation of the wireless router or access point. Most \glspl{ISP} provide pre-configured routers with a sticker on them detailing the current wireless network name and password. Most publicly accessible wireless networks will be easily identifiable by the name used for the wireless network \dash for example ``Starbucks-Wireless.''
 
111
 
 
112
If the network is unprotected (\ie, the signal meter does not show a padlock), a connection should be established within a few seconds\dash and without a password required. The \application{NetworkManager} icon in the top panel will animate as Ubuntu attempts to connect to the network. If the connection is successful, the icon will change to display a signal meter. An on-screen notification message will also appear informing you that the connection was successful.
 
113
 
 
114
If the network is password-protected, Ubuntu will display a window called \window{Wireless Network Authentication Required} as it tries to make a connection. This means that a valid password is required to make a connection. This is what the screen should look like:
 
115
 
 
116
\screenshot{03-wireless-authentication.png}{ss:wireless-authentication}{Enter your wireless network password.}
 
117
 
 
118
If you know the password, enter it in the \textfield{Password} field and then click on the \button{Connect} button. As you type the password, it will be obscured from view to prevent others from reading the password as you type it. To verify the characters you are entering for the password, you can view the password by selecting the \checkbox{Show Password} check box. Then, you can make the password obscure again by deselecting the \checkbox{Show password} check box. Once the password is entered, click on the \button{Connect} button. The \application{NetworkManager} icon in the top panel will animate as Ubuntu attempts to connect to the network. If the connection is successful, the icon will change to display a signal meter. An on-screen notification message will also appear informing you that the connection was successful.
 
119
 
 
120
If you entered the password incorrectly, or if it doesn't match the correct password (for example if it has recently been changed and you have forgotten), \application{NetworkManager} will make another attempt to connect to the network, and the \window{Wireless Network Authentication Required} window will re-appear so that you can re-type the password. You can hit the \button{Cancel} button to abort the connection. If you do not know the correct password, you may need to call your \acronym{ISP}'s customer support line or contact your network administrator.
 
121
 
 
122
Once you have successfully established a wireless connection, Ubuntu will store these settings (including the password) to make it easier to connect to this same wireless network in the future. You may also be prompted to select a \emph{keyring} password here. The keyring stores passwords in one place so you can access them all in the future by remembering just the keyring password.
 
123
 
 
124
\subsubsection{Connecting to a saved wireless network}
 
125
 
 
126
Ubuntu will automatically try to connect to a wireless network in range if it has the settings saved. This works on both open and secure wireless networks.
 
127
 
 
128
If you have numerous wireless networks in range that are saved on your computer, Ubuntu may choose to connect to one network while you may want to connect to another network. To remedy this action, click on the \application{NetworkManager} icon. A list of wireless networks will appear along with their signal meters. Simply click on the network to which you wish to connect, and Ubuntu will disconnect from the current network and attempt to connect to the one you have selected.
 
129
 
 
130
If the network is secure and Ubuntu has the details for this network saved, Ubuntu will automatically connect. If the details for this network connection are not saved, are incorrect, or have changed, then you will be prompted to enter the network password again. If the network is open (no password required), all of this will happen automatically and the connection will be established.
 
131
 
 
132
\subsubsection{Connecting to a hidden wireless network}
 
133
In some environments, you may need to connect to a hidden wireless network. These hidden networks do not broadcast their names, and, therefore, their names will not appear in the list of available wireless networks even if they are in range. In order to connect to a hidden wireless network, you will need to get its name and security details from your network administrator or \acronym{ISP}.
 
134
 
 
135
To connect to a hidden wireless network:
 
136
 
 
137
\begin{enumerate}
 
138
  \item Click on \application{NetworkManager} in the top panel.
 
139
  \item Select \menu{Connect to a hidden wireless network}. Ubuntu will then open the \window{Connect to Hidden Wireless Network} window.
 
140
  \item In the \textfield{Network name} field, enter the name of the network. This is also known as the \emph{\acronym{SSID}} \emph{(Service Set Identifier)}. You must enter the name exactly how it was given to you. For example, if the name is ``Ubuntu-Wireless,'' entering ``ubuntu-wireless'' will not work as the ``U'' and ``W'' are both uppercase in the correct name.
 
141
  \item In the \dropdown{Wireless security} field, select one of the options. If the network is an open network, leave the field set to ``None.'' If you do not know the correct setting for the field, you will not be able to connect to the hidden network.
 
142
  \item Click the \button{Connect} button. If the network is secure, you will be prompted for the password. Provided you have entered all of the details correctly, the network should then connect, and you will receive an on-screen notification informing you that the connection was a success.
 
143
\end{enumerate}
 
144
 
 
145
As is the case with visible wireless networks, hidden wireless network settings will be saved once a connection is made, and the wireless network will then appear in the list of saved connections.
 
146
 
 
147
\subsubsection{Disabling and enabling your wireless card}
 
148
 
 
149
By default, wireless access is enabled if you have a wireless card installed in your computer. In certain environments (like on airplanes), you may need to temporarily disable your wireless card. 
 
150
 
 
151
To disable your wireless card, click on the \application{NetworkManager} icon and deselect the \menu{Enable Wireless} option. Your wireless radio will now be turned off, and your computer will no longer search for wireless networks. 
 
152
 
 
153
To reactivate your wireless card, simply select the \menu{Enable Wireless} option. Ubuntu will then begin to search for wireless networks automatically. If you are in range of a saved network, you will automatically be connected.
 
154
 
 
155
Many modern laptops also have a physical switch/button built into the chassis that provides a way to quickly enable/disable the wireless card.
 
156
 
 
157
\subsubsection{Changing an existing wireless network}
 
158
 
 
159
At times you may want to change the settings of a saved wireless network\dash for example, when the wireless password gets changed.
 
160
 
 
161
To edit a saved wireless network connection:
 
162
 
 
163
\begin{enumerate}
 
164
  \item Click on the \application{NetworkManager} icon and select \menu{Edit Connections\ldots}
 
165
  \item A \window{Network Connections} window will open. Click on the \tab{Wireless} tab.
 
166
  \item By default, saved networks are in chronological order with the most recently connected at the top. Find the network you want to edit, select it, and click on the \button{Edit} button.
 
167
  \item Ubuntu will now open a window called \window{Editing \variable{connection name}}, where \variable{connection name} is the name of the connection you are editing. This window will display a number of tabs.
 
168
  \item Above the tabs, there is a field called \textfield{Connection name} where you can change the name of the connection to give it a more recognizable name.
 
169
  \item If the \checkbox{Connect automatically} option is not selected, Ubuntu will detect the wireless network but will not attempt a connection until it is selected from the \application{NetworkManager} menu. Select or deselect this option as needed.
 
170
  \item On the \tab{Wireless} tab, you may need to edit the \textfield{\acronym{SSID}} field. A \acronym{SSID} is the wireless connection's network name. If this field isn't set correctly, Ubuntu will not be able to connect to the wireless network in question.
 
171
  \item Below the \acronym{SSID} is a \textfield{Mode} field. The ``Infrastructure'' mode means that you would be connecting to a wireless router or \gls{Access Point}. The ``ad-hoc'' mode is for a computer-to-computer connection (where one computer shares another's connection) and is often only used in advanced cases.
 
172
  \item On the \tab{Wireless Security} tab, you can change the \textfield{Security} field. A selection of ``None'' means that you are using an open network that doesn't require a password. Other selections in this tab may require additional information:
 
173
  \begin{description}
 
174
    \item [\acronym{WEP} 40/128-bit Key] is an older security setting still in use by some older wireless devices. If your network uses this method of security, you will need to enter a key in the \textfield{Key} field that will appear when this mode is selected.
 
175
    \item [\acronym{WEP} 128-bit Passphrase] is the same older security as above. However, instead of having a key, your network administrator should have provided you with a passphrase to connect to the network.
 
176
    \item [\acronym{WPA} \& \acronym{WPA2} Personal] is the most common security mode for wireless networking. Once you select this mode, you will need to enter a password in the \textfield{Password} field.
 
177
    \item If your network administrator requires \acronym{LEAP}, Dynamic \acronym{WEP} or \acronym{WPA} \& \acronym{WPA2} Enterprise then you will need to have the administrator help you with those modes.
 
178
  \end{description}
 
179
  \item In the \tab{\acronym{IP}v4 Settings} tab, you can change the \textfield{Method} field from ``Automatic (\acronym{DHCP})'' to ``Manual'' or one of the other methods. For setting up manual settings (also known as a static address), please see the section above on manual setup for wired network connections.
 
180
  \item When you finish making changes to the connection, click \button{Apply} to save your changes and close the window. You can click \button{Cancel} at any time to close the window without saving any changes.
 
181
  \item Finally, click \button{Close} on the \window{Network Connections} window to return to the desktop.
 
182
\end{enumerate}
 
183
 
 
184
After clicking \button{Apply}, any changes made to the network connection will take effect immediately.
 
185
 
 
186
\subsection{Other connection methods}
 
187
 
 
188
There are other ways to get connected with Ubuntu:
 
189
 
 
190
\begin{itemize}
 
191
 \item With \application{NetworkManager}, you can configure mobile broadband connections to connect to the Internet through your cellular data carrier.
 
192
 \item You can connect to digital subscriber line (\acronym{DSL}) networks, a method of connecting to the Internet through your phone line via a modem.
 
193
 \item It is also possible for \application{NetworkManager} to establish a virtual private network (\acronym{VPN}) connection. These are most commonly used to create a secure connection to a workplace network.
 
194
\end{itemize}
 
195
 
 
196
The instructions for making connections using mobile broadband, \acronym{DSL}, or \acronym{VPN} are beyond the scope of this guide.
 
197
 
 
198
\indexend{Internet!connecting}
 
199