LPI Linux Certification in a Nutshell Part 37

You’re reading novel LPI Linux Certification in a Nutshell Part 37 online at LightNovelFree.com. Please use the follow button to get notification about the latest chapter next time when you visit LightNovelFree.com. Use F11 button to read novel in full-screen(PC only). Drop by anytime you want to read free – fast – latest novel. It’s great if you could leave a comment, share your opinion about the new chapters, new novel with others on the internet. We’ll do our best to bring you the finest, latest novel everyday. Enjoy!

ftp>lsmyfile 200PORTcommandsuccessful.

150OpeningASCIImodedataconnectionfor/bin/ls.

-rw-r--r--1jdeanjdean29Jan2401:28myfile 226Transfercomplete.

ftp>binary 200TypesettoI.

ftp>getmyfile local:myfileremote:myfile 200PORTcommandsuccessful.

150OpeningBINARYmodedataconnectionformyfile (29bytes).

226Transfercomplete.

29bytesreceivedin0.000176secs(1.6e+02Kbytes/sec) ftp>quit 221-Youhavetransferred29bytesin1files.

221-Totaltrafficforthissessionwas773bytesin3transfers.

221-ThankyouforusingtheFTPserviceonsmp.

221Goodbye.

Example 2 Many FTP servers are set up to receive requests from nonauthenticated users. Such public access is said to be anonymous. Anonymous FTP is established just like any other FTP connection, except that anonymous anonymous is used as the username. An email address is commonly used as a pa.s.sword to let the system owner know who is transferring files: is used as the username. An email address is commonly used as a pa.s.sword to let the system owner know who is transferring files: #ftp-vsmp Connectedtosmp.

220smpFTPserver(Versionwu-2.4.2-VR17(1) MonApr1909:21:53EDT1999)ready.

Name(smp:root):anonymous 331GuestloginOK,sendyourcompletee-mailaddressaspa.s.sword.

Pa.s.sword:[email protected] 230GuestloginOK,accessrestrictionsapply.

RemotesystemtypeisUNIX.

Usingbinarymodetotransferfiles.

ftp>

Name ping Syntax pinghostname Description The ping ping command is used to send an ICMP echo request to a host and report on how long it takes to receive a corresponding ICMP echo reply. Much as sonar systems send a pulse (or "ping") to a target and measure transit time, command is used to send an ICMP echo request to a host and report on how long it takes to receive a corresponding ICMP echo reply. Much as sonar systems send a pulse (or "ping") to a target and measure transit time, ping ping sends a network packet to test the availability of a network node. This technique is often used as a basic debugging technique when network problems arise. sends a network packet to test the availability of a network node. This technique is often used as a basic debugging technique when network problems arise.

Frequently used options -c count count Send and receive count count packets. packets.

-q Quiet output. Display only summary lines when ping ping starts and finishes. starts and finishes.

Example Ping a remote host and terminate using Ctrl-C after five packets are transmitted: $pinglpi.org PINGlpi.org(24.215.7.162)56(84)bytesofdata.

64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=1ttl=52time=68.2ms 64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=2ttl=52time=65.8ms 64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=3ttl=52time=63.2ms 64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=4ttl=52time=65.8ms 64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=5ttl=52time=65.8ms 64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=6ttl=52time=63.6ms 64bytesfromclark.lpi.org(24.215.7.162):icmp_seq=7ttl=52time=56.8ms

---lpi.orgpingstatistics--- 7packetstransmitted,7received,0%packetloss,time6016ms rttmin/avg/max/mdev=56.894/64.230/68.202/3.374ms

Name telnet Syntax telnet[host][port]

Description Establish a connection to a host host (either a system name or IP address) using (either a system name or IP address) using port port. If a specific port is omitted, the default port of 23 is a.s.sumed. If host host is omitted, is omitted, telnet telnet goes into an interactive mode similar to FTP. goes into an interactive mode similar to FTP.

Name traceroute Syntax traceroutehostname Description Attempt to display the route over which packets must travel to reach a destination hostname hostname. It is included here because it is mentioned in this Objective, but Objective 3 also requires traceroute traceroute. See Chapter21 Chapter21 for more information. for more information.

Name whois Syntax whoistarget[@server]

Description p.r.o.nounced, "who is," whois whois is a query/response protocol used to determine information about Internet resources. The information returned includes contact information, domain names, IP addresses, and DNS servers. Note that many websites are available for is a query/response protocol used to determine information about Internet resources. The information returned includes contact information, domain names, IP addresses, and DNS servers. Note that many websites are available for whois whois searches as well, particularly for checking on domain name availability. searches as well, particularly for checking on domain name availability.

Example $whoislpi.org NOTICE:Accessto.ORGWHOISinformationisprovidedtoa.s.sistpersonsin determiningthecontentsofadomainnameregistrationrecordinthe PublicInterestRegistryregistrydatabase.Thedatainthisrecordisprovided byPublicInterestRegistryforinformationalpurposesonly,andPublicInterest Registrydoesnotguaranteeitsaccuracy.Thisserviceisintendedonlyfor query-basedaccess.Youagreethatyouwillusethisdataonlyforlawful purposesandthat,undernocirc.u.mstancesw.i.l.l.youusethisdatato: (a)allow,enable,orotherwisesupportthetransmiss...o...b..e-mail,telephone, orfacsimileofma.s.sunsolicited,commercialadvertisingorsolicitationsto ent.i.tiesotherthanthedatarecipient'sownexistingcustomers;or(b)enable highvolume,automated,electronicprocessesthatsendqueriesordatato thesystemsofRegistryOperatororanyICANN-AccreditedRegistrar, exceptasreasonablynecessarytoregisterdomainnamesormodifyexisting registrations.Allrightsreserved.PublicInterestRegistryreservestheright tomodifythesetermsatanytime.Bysubmittingthisquery,youagree toabidebythispolicy.

DomainID:D3725290-LROR DomainName:LPI.ORG CreatedOn:18-Feb-199905:00:00UTC LastUpdatedOn:31-Oct-200817:00:45UTC ExpirationDate:18-Feb-201105:00:00UTC SponsoringRegistrar:TucowsInc.(R11-LROR) Status:CLIENTTRANSFERPROHIBITED Status:CLIENTUPDATEPROHIBITED RegistrantID:tuIqxUrdqeRMHH1m RegistrantName:DNSAdmin RegistrantOrganization:LinuxProfessionalInst.i.tuteInc.

RegistrantStreet1:161BayStreet,27thFloor RegistrantStreet2: RegistrantStreet3: RegistrantCity:Toronto RegistrantState/Province:ON RegistrantPostalCode:M5J2S1 RegistrantCountry:CA RegistrantPhone:+1.9163576625 RegistrantPhoneExt.: RegistrantFAX: RegistrantFAXExt.: RegistrantEmail:[email protected] AdminID:tujWL5NRmQ4MqjwW AdminName:DNSAdmin AdminOrganization:LinuxProfessionalInst.i.tuteInc.

AdminStreet1:161BayStreet,27thFloor AdminStreet2: AdminStreet3: AdminCity:Toronto AdminState/Province:ON AdminPostalCode:M5J2S1 AdminCountry:CA AdminPhone:+1.9163576625 AdminPhoneExt.: AdminFAX: AdminFAXExt.: AdminEmail:[email protected] TechID:tursNOD6OBDmUsSl TechName:DNSAdmin TechOrganization:LinuxProfessionalInst.i.tuteInc.

TechStreet1:161BayStreet,27thFloor TechStreet2: TechStreet3: TechCity:Toronto TechState/Province:ON TechPostalCode:M5J2S1 TechCountry:CA TechPhone:+1.9163576625 TechPhoneExt.: TechFAX: TechFAXExt.: TechEmail:[email protected] NameServer:NS.STARNIX.COM NameServer:SERVER1.MOONGROUP.COM

Chapter20.Basic Network Configuration (Topics 109.2 and 109.4)

A Linux system that is not connected to a network is a rare sight. Configuring a system for network access is one of the first things done within the normal installation process. This chapter covers the following Objectives: Objective 2: Basic Network Configuration Candidates should be able to view, change, and verify configuration settings and operational status for various network interfaces. This Objective includes manual and automatic configuration of interfaces and routing tables. This would include steps to add, start, stop, restart, delete, or reconfigure network interfaces by modifying the appropriate configuration files. It also means to change, view, or configure the routing table and to correct an improperly set default route manually. Candidates should be able to configure Linux as a DHCP client and a TCP/IP host and to debug problems a.s.sociated with the network configuration. Weight: 4.

Objective 4: Configuring Client Side DNS Candidates should be able to configure DNS on a client host. Weight: 2.

Objective 2: Basic Network Configuration and Objective 4: Configuring Client Side DNS Linux distributions offer various automation and startup techniques for networks, but most of the essential commands and concepts are not distribution-dependent. The exam tests fundamental concepts and their relations.h.i.+ps to one another as well as to system problems. These Objectives cover the configuration of IPv4 TCP/IP on common network interfaces, such as Ethernet.

On the ExamOne of the reasons Linux is so popular as a server operating system is its ability to operate on many different kinds of networks utilizing many different kinds of interfaces. Protocols such as AppleTalk, IPX, and even NetBEUI are available to Linux machines, as well as interfaces such as Token Ring, FDDI, and many others. However, the LPI exams focus on the TCP/IP protocol on Ethernet interfaces, so in-depth knowledge of the other networking options is not necessary in order to become LPI certified.

Network Interfaces A computer must contain at least one network interface network interface to be considered part of a network. The network interface provides a communications link between the computer and external network hardware. This could mean typical network adapters such as Ethernet or Token Ring, point-to-point dial-up connections, parallel ports, wireless, or other networking forms. to be considered part of a network. The network interface provides a communications link between the computer and external network hardware. This could mean typical network adapters such as Ethernet or Token Ring, point-to-point dial-up connections, parallel ports, wireless, or other networking forms.

Configuration files The following files contain important information about your system's network configuration: /etc/hosts This file contains simple mappings between IP addresses and names and is used for name resolution. For very small private networks, /etc/hosts /etc/hosts may be sufficient for basic name resolution. For example, this file a.s.sociates the local address 192.168.1.30 with the system may be sufficient for basic name resolution. For example, this file a.s.sociates the local address 192.168.1.30 with the system smp smp and also with and also with smp.mydomain.com smp.mydomain.com:127.0.0.1localhostlocalhost.localdomain 192.168.1.1gate 192.168.1.30smpsmp.mydomain.com /etc/nsswitch.conf This file controls the sources used by various system library lookup functions, such as name resolution. It allows the administrator to configure the use of traditional local files (/etc/hosts, /etc/pa.s.swd /etc/pa.s.swd), an NIS server, or DNS. nsswitch.conf nsswitch.conf directly affects network configuration (among other things) by controlling how hostnames and other network parameters are resolved. For example, this fragment shows that local files are used for pa.s.sword, shadow pa.s.sword, group, and hostname resolution; for hostnames, DNS is used if a search of local files doesn't yield a result: directly affects network configuration (among other things) by controlling how hostnames and other network parameters are resolved. For example, this fragment shows that local files are used for pa.s.sword, shadow pa.s.sword, group, and hostname resolution; for hostnames, DNS is used if a search of local files doesn't yield a result:pa.s.swd:filesnisplusnis shadow:filesnisplusnis group:filesnisplusnis hosts:filesdnsnisplusnisFor more information, view the manpage with man 5 nsswitch man 5 nsswitch. The nsswitch.conf nsswitch.conf file supersedes file supersedes host.conf host.conf. In the majority of setups, this file does not need to be modified, as the defaults are usually sufficient.

/etc/host.conf This file controls name resolution sources for pre-glibc2 systems. It should contain: systems. It should contain:orderhosts,bind multionThis configuration has the resolver checking /etc/hosts /etc/hosts first for name resolution, then DNS. first for name resolution, then DNS. multi on multi on enables multiple IP addresses for hosts. Newer Linux system libraries use enables multiple IP addresses for hosts. Newer Linux system libraries use /etc/nsswitch.conf /etc/nsswitch.conf instead of instead of /etc/host.conf /etc/host.conf.

/etc/resolv.conf This file controls the client-side portions of the DNS system, which is implemented in system library functions used by all programs to resolve system names. In particular, /etc/resolv.conf /etc/resolv.conf specifies the IP addresses of DNS servers. For example: specifies the IP addresses of DNS servers. For example:nameserver192.168.1.5 nameserver192.168.250.2Additional parameters are also available. For more information, view the manpage with man 5 resolver man 5 resolver.

/etc/networks Like /etc/hosts /etc/hosts, this file sets up equivalence between addresses and names, but here the addresses represent entire networks (and thus must be valid network addresses, ending in 0). The result is that you can use a symbolic name to refer to a network just as you would a specific host. This may be convenient (though not required) in NFS or routing configuration, for example, and will be shown in commands such as netstat netstat. For example:loopback127.0.0.0 mylan192.168.1.0It's not unusual for /etc/networks /etc/networks to be left blank. to be left blank.

You'll notice most of the previous configuration files concern themselves with mapping an IP address to aliases or names. This is not required for most network-enabled applications to work, as the operating system and network-enabled applications are really only concerned with the IP address for this level of data communication. The name lookups are there for us humans, who find it easier to remember names rather than numbers. Here is an example of what is going on "behind the scenes" when a web browser requests a web page from a remote server: 1. A user types http://www.oreilly.com http://www.oreilly.com into the browser address bar and hits Enter. into the browser address bar and hits Enter.

2. The system needs to resolve this hostname to an IP address in order to make the request. The file /etc/nsswitch.conf /etc/nsswitch.conf ( (/etc/host.conf in pre-glibc2 systems) is consulted to determine what subsystems to ask and in what order to resolve this hostname. The default entry for hosts in in pre-glibc2 systems) is consulted to determine what subsystems to ask and in what order to resolve this hostname. The default entry for hosts in /etc/nsswitch.conf /etc/nsswitch.conf is usually: is usually:hosts:filesdns This tells the system to first look in files (/etc/hosts) and then query DNS.

3. If there is an entry in the file /etc/hosts /etc/hosts for for www.oreilly.com www.oreilly.com, that IP address will be used to make this HTTP request. If not, then the second option is to query DNS.

4. The file /etc/resolv.conf /etc/resolv.conf is consulted to determine the primary DNS to query. A DNS request is made to the primary DNS server. If a response is received (in the form of an IP address), that IP address is used to make the HTTP request. If a response is not received (either because the DNS server did not have an entry for that hostname or the DNS server did not respond to the request), then the next name server listed in is consulted to determine the primary DNS to query. A DNS request is made to the primary DNS server. If a response is received (in the form of an IP address), that IP address is used to make the HTTP request. If a response is not received (either because the DNS server did not have an entry for that hostname or the DNS server did not respond to the request), then the next name server listed in /etc/resolv.conf /etc/resolv.conf is queried. This process repeats until all name servers have been queried. is queried. This process repeats until all name servers have been queried.

5. If all attempts at name resolution fail, the web browser will return an error.

As you can see, something as simple to the end user as typing a hostname into a web browser requires a number of steps behind the scenes. It's important to understand these steps and the order in which they occur for troubleshooting situations. It's an all too common occurrence for an end user to report, "The network is down!" when it's really just a matter of a bad entry in /etc/hosts /etc/hosts or a misconfigured DNS server. or a misconfigured DNS server.

On the ExamBe familiar with all the files listed in this section; each contains specific information important for network setup. Watch for questions on /etc/host.conf /etc/host.conf, which is not used in newer glibc2 glibc2 libraries. libraries.

Configuration commands The commands listed in this section are used to establish, monitor, and troubleshoot a network configuration under Linux.

DHCP The Dynamic Host Configuration Protocol (DHCP) is a protocol extension of the BOOTP protocol, which provides automated IP address a.s.signment (among other things) to client systems on a network. It handles IP address allocation in one of three ways: Dynamic allocation In this scheme, a DHCP server maintains a preset list of IP addresses designated by the system administrator. IP addresses are a.s.signed as clients request an address from the available addresses in the pool. The address can be used, or leased leased, for a limited period of time. The client must continually renegotiate the lease with the server to maintain use of the address beyond the allotted period. When the lease expires, the IP address is placed back into the pool for use by other requesting clients and a new IP address is a.s.signed.

Manual allocation The system administrator may wish to designate specific IP addresses to specific network interfaces (for example, to an Ethernet MAC address) while still using DHCP to deliver the address to the client. This allows the convenience of automated address setup and a.s.sures the same address each time.

Automatic allocation This method a.s.signs a permanent address to a client. Typically DHCP is used to a.s.sign a temporary address (either dynamically or statically a.s.signed) to a client, but a DHCP server can allow an infinite lease time.

DHCP can be configured to a.s.sign not only the IP address to the client but also such things as name servers, gateways, and architecture-specific parameters. Here's an overview of how it works: 1. A DHCP client sends a broadcast message to the network to discover a DHCP server.

2. One or more DHCP servers respond to the request via their own broadcast messages, offering an IP address to the client.

3. The client chooses one of the servers and broadcasts an acknowledgment, requesting the chosen server's ident.i.ty.

4. The selected server logs the connection with the client and responds with an acknowledgment and possibly additional information. All of the other servers do nothing, because the client declined their offer.

Subnets and relays Because DHCP communications are initiated using broadcasts, they are normally confined to a single subnet. To accommodate DHCP clients and servers separated by one or more routers, a DHCP relay relay system can be established on subnets without DHCP servers. A relay system listens for DHCP client broadcasts, forwards them to a DHCP server on another subnet, and returns DHCP traffic back to the client. This configuration can centralize DHCP management in a large routed environment. system can be established on subnets without DHCP servers. A relay system listens for DHCP client broadcasts, forwards them to a DHCP server on another subnet, and returns DHCP traffic back to the client. This configuration can centralize DHCP management in a large routed environment.

Leases As already mentioned, when a client receives a dynamically a.s.signed IP address from a DHCP server, the address is said to be leased leased for a finite duration. The length of a DHCP lease is configurable by the system administrator and typically lasts for one or more days. Shorter leases allow for faster turnover of addresses and are useful when the number of available addresses is small or when many transient systems (such as laptops) are being served. Longer leases reduce DHCP activity, thus reducing broadcast traffic on the network. for a finite duration. The length of a DHCP lease is configurable by the system administrator and typically lasts for one or more days. Shorter leases allow for faster turnover of addresses and are useful when the number of available addresses is small or when many transient systems (such as laptops) are being served. Longer leases reduce DHCP activity, thus reducing broadcast traffic on the network.

When a lease expires without being renegotiated by the client, it as a.s.sumed that the client system is unavailable, and the address is put back into the free pool of addresses. A lease may also be terminated by a client that no longer needs the IP address, in which case it is released released. When this occurs, the DHCP server immediately places the IP address back in the free pool.

dhcpd The DHCP server process is called dhcpd dhcpd. It is typically started at boot time and listens for incoming DHCP request broadcasts. dhcpd dhcpd can serve multiple subnets via multiple interfaces, serving a different pool of IP addresses to each. can serve multiple subnets via multiple interfaces, serving a different pool of IP addresses to each.

dhcpd is configured using the text configuration file is configured using the text configuration file /etc/dhcpd.conf /etc/dhcpd.conf, which contains one or more subnet declarations. These are text lines of the following form: subnetnetwork-addressnetmasksubnet-mask{ parameter...

parameter...

} Each subnet declaration encloses parameters for each subnet between curly braces. Parameters include one or more ranges of IP addresses to serve, lease times, and optional items such as gateways (routers), DNS servers, and so forth. Each parameter line is terminated with a semicolon. For example: subnet192.168.1.0netmask255.255.255.0{ range192.168.1.200192.168.1.204; default-lease-time600; optionsubnet-mask255.255.255.0; optionbroadcast-address192.168.1.255; optionrouters192.168.1.1; optiondomain-name-servers192.168.1.25; } In this example, the private cla.s.s C network 192.168.1.0 is served five IP addresses, 200 through 204. The default DHCP lease is 600 seconds (10 minutes). Options are also set for the subnet mask, broadcast address, router (or gateway), and DNS server. For full information on dhcpd.conf dhcpd.conf, see related manpages for dhcpd(8) dhcpd(8) and and dhcpd.conf(5) dhcpd.conf(5).

The preceding option lines are not required to create a minimal DHCP setup that simply serves IP addresses. Details on the daemon follow.

A Standard Linux Network Configuration A very common setup for a Linux system is to have a single Ethernet interface and be a member of a network, as either a client, a server, or both. Here are the network settings that must be configured in order for a Linux system to communicate via TCP/IP over an Ethernet network: A compatible Ethernet card must be installed and recognized by the kernel. See information about the commands lsmod, lspci lsmod, lspci, and dmesg dmesg in previous chapters for more information about hardware troubleshooting. in previous chapters for more information about hardware troubleshooting.

An IP address and subnet mask must be a.s.signed to the Ethernet interface (eth0). These can be a.s.signed manually (static values saved in a configuration file) or a.s.signed from a DHCP server on the local subnet. On RPM-based systems such as CentOS, Red Hat, and Fedora Linux, the network configuration file is /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0. Values from this file are read by the startup script /etc/init.d/network /etc/init.d/network, which in turn calls the command ifconfig ifconfig with the appropriate values. with the appropriate values.

In order to communicate with other subnets, a default gateway route must be configured. This is the IP address of the device on the local network that will send your packets on to other networks. This may be a dedicated device, such as a router, or it may be a general-purpose computer (with multiple Ethernet cards) running routing software. A lower-end PC running Linux is often a good choice for a router in this instance. The default gateway route is defined in the file /etc/sysconfig/network. /etc/sysconfig/network. This value is read by the startup script This value is read by the startup script /etc/init.d/network /etc/init.d/network, which in turn calls the route route command to set this as the default gateway route. command to set this as the default gateway route.

Finally, a default nameserver should be configured so applications can successfully resolve hostnames to IP addresses. As stated previously, this is defined in the file /etc/resolv.conf /etc/resolv.conf.

If all of these settings are in place, your Linux system should be able to communicate successfully with other computers over a TCP/IP network.

Name ifconfig Syntax ifconfiginterfaceparameters Description Configure network interfaces. ifconfig ifconfig is used to create and configure network interfaces and their parameters, usually at boot time. Without parameters, the interface and its configuration are displayed. If is used to create and configure network interfaces and their parameters, usually at boot time. Without parameters, the interface and its configuration are displayed. If interface interface is also omitted, a list of all active interfaces and their configurations is displayed. is also omitted, a list of all active interfaces and their configurations is displayed.

Frequently used parameters address The interface's IP address.

netmask mask mask The interface's subnet mask.

up Activate an interface (implied if address address is specified). is specified).

down Shut down the interface.

Example 1 Display all interfaces: #ifconfig eth0Linkencap:EthernetHWaddr00:A0:24:D3:C7:21 inetaddr:192.168.1.30Bcast:192.168.1.255Mask:255.255.255.0 UPBROADCASTRUNNINGMULTICASTMTU:1500Metric:1 RXpackets:1521805errors:37dropped:0overruns:0frame:37 TXpackets:715468errors:0dropped:0overruns:0carrier:0 collisions:1955txqueuelen:100 Interrupt:10Baseaddress:0xef00 loLinkencap:LocalLoopback inetaddr:127.0.0.1Mask:255.0.0.0 UPLOOPBACKRUNNINGMTU:3924Metric:1 RXpackets:366567errors:0dropped:0overruns:0frame:0 TXpackets:366567errors:0dropped:0overruns:0carrier:0 collisions:0txqueuelen:0 Example 2 Shut down eth0 eth0: #ifconfigeth0down #ifconfigeth0 eth0Linkencap:EthernetHWaddr00:A0:24:D3:C7:21 inetaddr:192.168.1.30Bcast:192.168.1.255Mask:255.255.255.0 BROADCASTMULTICASTMTU:1500Metric:1 RXpackets:1521901errors:37dropped:0overruns:0frame:37 TXpackets:715476errors:0dropped:0overruns:0carrier:0 collisions:1955txqueuelen:100 Interrupt:10Baseaddress:0xef00 Note in the emphasized line the lack of the UP UP indicator, which is present in Example 1. The missing indicator, which is present in Example 1. The missing UP UP indicates that the interface is down. indicates that the interface is down.

Example 3 Configure eth0 eth0 from scratch: from scratch: #ifconfigeth0192.168.1.100netmask255.255.255.0broadcast192.168.1.25 Although this is a perfectly valid command, network interfaces on Linux are rarely configured directly this way from the command line. It is much more common to store the network configuration options in a configuration file (often in the directory /etc/sysconfig/network-scripts /etc/sysconfig/network-scripts) and use a script file in /etc/init.d /etc/init.d to control the network interfaces. For example, on RPM-based systems such as CentOS, RedHat, or Fedora Linux, the configuration settings for to control the network interfaces. For example, on RPM-based systems such as CentOS, RedHat, or Fedora Linux, the configuration settings for eth0 eth0 are stored in are stored in /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0 and the status of the network interfaces is changed by calling the script and the status of the network interfaces is changed by calling the script /etc/init.d/network /etc/init.d/network. The command ifconfig ifconfig is most often used with no arguments to list information about the available network interfaces. However, it is useful to know this syntax, especially when you're working with different Linux distributions that store network configurations in different places. is most often used with no arguments to list information about the available network interfaces. However, it is useful to know this syntax, especially when you're working with different Linux distributions that store network configurations in different places.

Name ping Syntax ping[options]destination Description Send an ICMP ECHO_REQUEST ECHO_REQUEST datagram to datagram to destination destination, expecting an ICMP ECHO_RESPONSE ECHO_RESPONSE. ping ping is frequently used to test basic network connectivity. See is frequently used to test basic network connectivity. See Chapter19 Chapter19 for a more complete description. for a more complete description.

Name route Syntax route[options]

routeadd[optionsandkeywords]target routedel[optionsandkeywords]target Description In the first form, display the IP routing table. In the second and third forms, respectively, add or delete routes to target target from the table. from the table. target target can be a numeric IP address, a resolvable name, or the keyword can be a numeric IP address, a resolvable name, or the keyword default default. The route route program is typically used to establish static routes to specific networks or hosts (such as the default gateway) after an interface is configured. On systems acting as routers, a potentially complex routing scheme can be established initially, but this is beyond the scope of the LPIC Level 1 Exams. program is typically used to establish static routes to specific networks or hosts (such as the default gateway) after an interface is configured. On systems acting as routers, a potentially complex routing scheme can be established initially, but this is beyond the scope of the LPIC Level 1 Exams.

Frequently used options and keywords -h Display a usage message.

-n Numeric mode; don't resolve hostnames.

-v Verbose output.

-C Display the kernel routing cache.

LPI Linux Certification in a Nutshell Part 37

You're reading novel LPI Linux Certification in a Nutshell Part 37 online at LightNovelFree.com. You can use the follow function to bookmark your favorite novel ( Only for registered users ). If you find any errors ( broken links, can't load photos, etc.. ), Please let us know so we can fix it as soon as possible. And when you start a conversation or debate about a certain topic with other people, please do not offend them just because you don't like their opinions.


LPI Linux Certification in a Nutshell Part 37 summary

You're reading LPI Linux Certification in a Nutshell Part 37. This novel has been translated by Updating. Author: Adam Haeder already has 825 views.

It's great if you read and follow any novel on our website. We promise you that we'll bring you the latest, hottest novel everyday and FREE.

LightNovelFree.com is a most smartest website for reading novel online, it can automatic resize images to fit your pc screen, even on your mobile. Experience now by using your smartphone and access to LightNovelFree.com

RECENTLY UPDATED NOVEL