| < Day Day Up > |
System ShutdownWhat does it mean to shut down the system? Well, in its simplest form, a shutdown of the system simply means issuing the /sbin/shutdown command. The shutdown command terminates all processing. It has many options, including the following:
If you issue a shutdown -h , the halt command is called by shutdown . You can also call halt directly if you want. (Note that if halt or reboot is called when the system is not in runlevel 0 or 6 (when its running normally), shutdown will be invoked. For more information, see the shutdown or halt man pages.) Here are some of the things your system does when you issue the shutdown -h or halt command:
To shut down and automatically reboot the system, you would type
$
shutdown -r now
To halt the system, you would type
$
shutdown -h now
To shut down the system in two minutes, type
$
shutdown -h 120
You do have ways other than shutdown to bring down the system. You can issue halt , which was already mentioned, reboot, or poweroff . If you want to bring down your system, I strongly recommend using shutdown because it provides a secure smooth transition to differing run levels, or to power down the system. |
| < Day Day Up > |
| < Day Day Up > |
Chapter 7. Networking Background
This chapter provides a background for Linux networking. The next chapter covers networking configuration and using networking commands. If you don't have a good background in Linux and TCP/IP networking, you'll want to review this chapter before moving on to the next one. If you have a good networking background and want to know how to set up Linux networking and use networking commands, you can jump directly to the
This chapter covers the following:
|
| < Day Day Up > |
| < Day Day Up > |
An Overview of IEEE 802.3, TCP/IP
To understand how the networking on your Linux system works, you first need to understand the
Figure 7-1. ISO/OSI Network Layer Functions
In what
The top layers are the ones that most Linux system administrators
This is the International Standards Organization Open Systems Inter-connection (ISO/OSI) model. It is helpful to visualize the way in which networking layers interact. We'll start with the bottom layer (Layer 1- Physical) and work our way up. Physical Layer (Layer 1)
At the bottom of the model is the physical interconnection between the systems on your network. Without the physical layer, you can't communicate between systems, and all the great functionality you would like to implement is not possible. The physical layer converts the data you would like to transmit to the analog signals that travel along the wire. The information traveling into a network interface is taken off the wire and prepared for use by the
Link Layer (Layer 2)
To connect to other systems local to your system, you use the link layer. The link layer establishes a connection to all the other systems on your local segment (
The data link layer is divided into two
The link layer supports either IEEE 802.3 or Ethernet frames. Your Linux system may support both of these "encapsulation"
Figure 7-2 lists the components of an Ethernet encapsulation and makes comments about IEEE802.3 encapsulation where appropriate. Figure 7-2. Ethernet Encapsulation
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}
One interesting item to note is the difference in the maximum data
Keep in mind that Ethernet and IEEE 802.3 will run on the same physical connection, but there are indeed differences between the two encapsulation methods. With your Linux systems, you don't have to spend much, if any, time setting up your network interface for encapsulation.
Note that MAC address is short for Media Access Control address, a hardware address that uniquely identifies each node of a network. The MAC layer interfaces directly with the network media. Consequently, each different type of network media requires a different MAC layer. On a Local Area Network (LAN) or other network, the MAC address is your computer's unique hardware number. (On an Ethernet LAN, it's the same as your Ethernet address.) When you're connected to the Internet from your computer (or host as the Internet protocol thinks of it), a correspondence table
Network Layer (Layer 3)
The network layer on Linux systems is synonymous with the Internet Protocol (IP). Data at this layer is transported as
datagrams
. This is the layer that handles the routing of data around the network. Data that gets routed with IP sometimes encounters an error of some type, which is
Unfortunately, the information that IP uses does not conveniently fit inside an Ethernet frame, so you end up with
IP handles routing in a simple fashion. If data is sent to a destination connected directly to your system, the data is sent directly to that system. If, on the other hand, the destination is not connected directly to your system, the data is sent to the default router. The default router then has the responsibility of getting the data to its destination. This routing can be a little tricky to understand, so I'll cover it in detail shortly (see the upcoming "Subnet Mask section"). Transport Layer (Layer 4)The transport layer is the next level up from the network layer. It communicates with ports . TCP is the most common protocol found at this level, and it forms packets that are sent from port to port. The port used by a program is usually defined in /etc/services , along with the protocol (such as TCP). These ports are used by network programs, such as telnet, rlogin, ftp, http , and so on. You can see that these programs, associated with ports, are the highest level we have covered while analyzing the layer diagram. Ports are covered later in this chapter. |
| < Day Day Up > |