Jordan Ch. 14

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

If you enter route without options, it simply displays the current routing table, as shown in this example: (omitted) Note that the default gateway is 10.0.0.1 because it is listed under the Gateway setting, and

the "G" is shown under Flags (the "U" means that the connection is "up").

ifconfig: Notice in Figure 14-7 that two network interfaces are displayed: ens32 and lo. The ens32 interface is

the Ethernet network interface installed in the system.

EXAM TIP: ifconfig lists multiple interfaces, not just one. The extra interface labeled "lo" is

the loopback interface and is usually assigned a special IP address of 127.0.0.1. This is a virtual interface, not an actual hardware interface. It is used for network testing, internal communications, diagnostics, and so on.

Netstat option with description: ( Displays statistics for your network interfaces)

-i

If the system DHCP leases are too short from the DHCP server, at the DHCP server, modify the __ file.

/etc/dhcpd.conf

In the old days, basic hostname-to-IP-address resolution was performed by the __ file, which contains IP-address-to-hostname mappings.

/etc/hosts

Use the __ file to define the order in which services will be used for name resolution.

/etc/nsswitch.conf (name service switch)

DNS: Therefore, to make this system work, the administrator must provide the system with the IP address of the DNS server to use. This is configured in the __ file.

/etc/resolv.conf

The Domain Information Groper, or dig, utility performs DNS lookups on the network and displays detailed information about the hostname being resolved from the DNS server, as configured in the __ file.

/etc/resolv.conf

To configure the default router address on a Red Hat class system, update the __ file with the GATEWAY parameter, as shown here: (omitted)

/etc/sysconfig/network-scripts/ifcfg-<interface>

If the BOOTPROTO option is defined as DHCP, and the DHCP server happens to be down when a request for an IP address is made, it is not necessary to reboot. Simply run __ at the shell prompt after the DHCP server is available.

dhclient

If the BOOTPROTO option is defined as DHCP, and the DHCP server happens to be down when a request for an IP address is made, it is not necessary to reboot. Simply run dhclient at the shell prompt after the DHCP server is available. To acquire an address for a specific interface enter (syntax)

dhclient <interface>. For example, dhclient ens32 specifies that the interface get its IP address from the DHCP server.

EXAM TIP: The __ command allows administrators to list and alter the hardware settings of the network card.

ethtool

ip addr show Output: Parameter with description: ( The IPv4 address/mask assigned to the interface. )

inet

ip addr show Output: Parameter with description: ( The IPv6 address/mask assigned to the interface. )

inet6

(other than route) The (general command)__ command can also be used to manage routing.

ip

The ip command can also be used to manage routing. For example, to view the routing table, enter __ or __ at the shell prompt

ip route show; ip route

ip addr show Output: Parameter with description: ( The MAC address of the network board. )

link

nc command to open listening socket on port 2388

nc -l 2388

In the following example, the listening socket is enabled using the "dash el" option using port 2388: "nc -l 2388". nc command to connect to this device whose IP address is 10.0.0.83:

nc 10.0.0.83 2388

nmcli: To determine the IP address of the ens32 connection: (sample command)

nmcli con show ens32 | grep IP4.ADDRESS

The ip command can also disable and enable a network interface. To disable an interface, enter ip link set <interface> down at the shell prompt. To bring a disabled interface back online, enter ip link set <interface> up at the shell prompt. Also, (general command) __ can restart the network interface.

systemctl

The host command...

resolves hostnames. Whereas the dig command provides extensive name resolution information, host provides simple, quick information. The syntax is similar to that of dig. Enter host <hostname> at the shell prompt.

For the CompTIA Linux+ exam, you need be familiar with how to manage routes with the (general command)__ command at the shell prompt. Use the __ command to display or modify the routing table on the Linux host.

route

make it persistent, configure the file /etc/sysconfig/network-scripts/ifcfg-ens32on this CentOS system. Sample parameters for this interface are shown here: Option with Description: (Assigns an IP address of 192.168.1.0)

IPADDR="192.168.1.81"

ip addr show Output: Description of parameter: inet6

The IPv6 address/mask assigned to the interface.

ip addr show Output: Description of parameter: inet

The IPv4 address/mask assigned to the interface.

ip addr show Output: Description of parameter: link

The MAC address of the network board.

To statically assign IP address parameters to a Linux system, use the (general command)__ command or the newer (general command)__ command.

ifconfig; ip

The final network utility is the NetworkManager daemon, which has two interface utilities: nmtui and nmcli. The nmtui command provides a curses- based text-user interface with NetworkManager, as shown in Figure 14-8. The nmcli command is used to create, display, edit, delete, activate, and deactivate network connections with a command-line interface. What's great about both of these tools is that they will update the network related configuration files automatically! To view the existing network connections, simply enter __ or just __, as shown here:

nmcli con; nmcli

The final network utility is the NetworkManager daemon, which has two interface utilities: (descrbe)

nmtui and nmcli.The nmtui command provides a curses- based text-user interface with NetworkManager, as shown in Figure 14-8. The nmcli command is used to create, display, edit, delete, activate, and deactivate network connections with a command-line interface. What's great about both of these tools is that they will update the network related configuration files automatically! To view the existing network connections, simply enter nmcli con or just nmcli, as shown here:

To configure the default router address on a Debian class system, update the __ file and add a line for the gateway "gateway 192.168.1.1"

/etc/default/interfaces

EXAM TIP: The __ file configures the Linux system's hostname and can be made persistent by using the hostnamectl command.

/etc/hostname

route: You can add routes to the host's routing table by... For example, suppose you need to add a route to the 192.168.2.0/24 network through the router with an IP address of 10.0.0.254. In this case, you would enter the following: (command)

route add -net 192.168.2.0/24 gw 10.0.0.254

route: You can add routes to the host's routing table by entering (syntax)

route add -net <network_address> netmask <netmask> gw <router_address>.

route: Finally, to set the default route, enter route add default gw <router_address> at the shell prompt. For example, if you want to add 10.0.0.254 as your default gateway router, enter this:

route add default gw 10.0.0.254

route: Finally, to set the default route, enter (syntax)__ at the shell prompt.

route add default gw <router_address>

route: To remove existing routes, use route del -net <network_address> netmask <netmask> gw <router_address>. Here's an example: (remove entry for network address 192.168.2.0 with netmask 255.255.255.0 and gateway 10.0.0.254)

route del -net 192.168.2.0/24 gw 10.0.0.254

route: To remove existing routes, use (syntax)

route del -net <network_address> netmask <netmask> gw <router_address>.

Linux's systemd uses predictable network interface names. One key benefit is that

specific aliases can be permanently assigned to specific network interfaces. For example, an onboard network adapter is assigned the index number provided by the BIOS to construct the alias.

To configure the default router address on a Red Hat class system, update the/etc/sysconfig/network-scripts/ifcfg-<interface> file with the GATEWAY parameter, as shown here: (omitted) To configure the default router address on a Debian class system, update the/etc/default/interfaces file and add a line for the gateway, as shown here: (omitted) . After adding the gateway settings, simply restart the network, as shown here: (command)

systemctl restart network

The ip command can also disable and enable a network interface. To disable an interface, enter ip link set <interface> down at the shell prompt. To bring a disabled interface back online, enter ip link set <interface> up at the shell prompt. Also, systemctl can restart the network interface. To do this, simply enter __ on a Red Hat strain system, or __ on a Debian strain system.

systemctl restart network; systemctl restart networking

The netcat, or nc, command is a very useful tool for

testing network communications between hosts. It goes one step beyond the ping command and actually establishes a connection between two network hosts. One way to use this command is to open a listening socket on one host and then connect to that socket from another host.

In the following example, the listening socket is enabled using the "dash el" option using port 2388: "nc -l 2388". nc command to connect to this device whose IP address is 10.0.0.83: nc 10.0.0.83 2388. Once the connection is established, any

text typed at the prompt of the client system will appear on the netcat server

If you enter route without options, it simply displays the current routing table, as shown in this example: (omitted) Note that the default gateway is 10.0.0.1 because it is listed under the Gateway setting, and the "G" is shown under Flags (the "U" means __).

that the connection is "up"

Most networks allow sharing of filesystems over NFS. In order for NFS to function properly, all systems need to run NFS. For Windows systems, this means installing PC-NFS. NFS Manager is built into macOS. Once the NFS servers are properly set up,

their "shares" are accessible to NFS clients.

The final network utility is the NetworkManager daemon, which has two interface utilities: nmtui and nmcli. The nmtui command provides a curses- based text-user interface with NetworkManager, as shown in Figure 14-8. The nmcli command is used to create, display, edit, delete, activate, and deactivate network connections with a command-line interface. What's great about both of these tools is that

they will update the network related configuration files automatically! To view the existing network connections, simply enter nmcli con or just nmcli, as shown here:

The netcat, or nc, command is a very useful tool for testing network communications between hosts. It goes one step beyond the ping command and actually establishes a connection between two network hosts. One way to use this command is

to open a listening socket on one host and then connect to that socket from another host.

To access a shared NFS directory (/sales directory on device "system5"),

use the mount command and the name of the NFS server (system5), as shown: "mkdir /mnt/sys5" "mount -t nfs system5:/sales /mnt/sys5

There are two network-based filesystems you need to be familiar with for the Linux+ exam: • Network File System (NFS) • Samba NFS allows

users to mount network filesystems on vendor-neutral networks. Samba allows Linux systems to mount network filesystems on Windows-based networks. You should understand the basics of accessing these filesystems.

EXAM TIP: Use the __ command to get ownership information of a website domain, if the owner has not blocked it. The command __ <domain_name> will list their name, phone number, and address.

whois

To statically assign IP address parameters to a Linux system, use the ifconfig command or the newer ip command. Running ifconfig without any options displays the current status of all network interfaces in the system, as shown inFigure 14-7. The iwconfig command performs similarly to ifconfig, but

works with wireless networks.

To access a shared NFS directory (/sales directory on device "system5"), use the mount command and the name of the NFS server (system5), as shown: (mount to the /mnt/sys5 directory) *show commands"

"mkdir /mnt/sys5" "mount -t nfs system5:/sales /mnt/sys5

The __ command is a network diagnostics tool that combines the functionality of traceroute and ping.

"my traceroute" (mtr)

EXAM TIP: The __ command is the replacement command for netstat, but with more functionality to better examine network status.

"show sockets" (ss)

For example, to set the IP address assigned to the ens32 network interface to 10.0.0.84, enter the following: [root@localhost ~]# ip addr add 10.0.0.84 dev ens32. NOTE The actual ip commands allow shortening the options, so __ and even __ are possible ways to run the command and get the same results.

# ip address add 10.0.0.84 dev ens32; # ip a a 10.0.0.84 dev ens32

The hosts file contains one line per host record. The syntax is

<IP_address> <host_name> <alias(CNAME)>

To configure the default router address on a Red Hat class system, update the/etc/sysconfig/network-scripts/ifcfg-<interface> file with the __ parameter, as shown here: (omitted)

GATEWAY

The final network utility is the __ daemon, which has two interface utilities: nmtui and nmcli.

NetworkManager

ip addr show Output: Description of parameter: brd

The broadcast address of the network segment.

sample command to set the LInux system's hostname to "server-one"

hostnamectl set-hostname server-one

EXAM TIP: Use the whois command to

get ownership information of a website domain, if the owner has not blocked it. The command whois <domain_name> will list their name, phone number, and address.

EXAM TIP: The /etc/hostname file configures the Linux system's hostname and can be made persistent by using the (general command)__ command.

hostnamectl

If you enter route without options,

it simply displays the current routing table

This is configured in the/etc/resolv.conf file. This file defines the search prefix and the name servers to use. Here is some sample content from a CentOS system's resolv.conf file: (omitted). As can be seen in this example, the file contains two types of entries: -nameserver: Specifies the IP address of the DNS server to use for name resolution. You can configure up to three DNS servers. If the first server fails or is otherwise unreachable, the next DNS server is used. The syntax is

nameserver <DNS_server_IP_address>

NOTE: Changes made with the route or ip route command are not

persistent and are lost on reboot.

Use the -c option with the ping command to

specify a number of times to ping.

ip addr show Output: Parameter with description: ( The broadcast address of the network segment. )

brd

The netstat utility is another powerful tool in the virtual toolbox. This utility can do the following: (3)

-List network connections -Display the routing table -Display information about the network interface

Netstat option with description: ( Lists all listening and non-listening sockets)

-a

Use the __ option with the ping command to specify a number of times to ping.

-c

Linux's systemd uses predictable network interface names. One key benefit is that specific aliases can be permanently assigned to specific network interfaces. For example, an onboard network adapter is assigned the index number provided by the BIOS to construct the alias. A commonly assigned alias created using this parameter is eno1, where (explain)

-en is the Ethernet interface. -o1 is the onboard device index number (in this case, device number 1). At this point, the network interface is loaded and active.

Netstat option with description: ( Displays your routing table)

-r

This is configured in the/etc/resolv.conf file. This file defines the search prefix and the name servers to use. Here is some sample content from a CentOS system's resolv.conf file: (omitted). As can be seen in this example, the file contains two types of entries: (describe)

-search: Specifies the domain name that should be used to fill out incomplete hostnames. For example, if it's trying to resolve a hostname of WS1, the name will be automatically converted to the fully qualified domain name of WS1.mydom.com. The syntax is search <domain>. -nameserver: Specifies the IP address of the DNS server to use for name resolution. You can configure up to three DNS servers. If the first server fails or is otherwise unreachable, the next DNS server is used. The syntax is nameserver <DNS_server_IP_address>.

The ip command can also disable and enable a network interface. To disable an interface, enter ip link set <interface> down at the shell prompt. To bring a disabled interface back online, enter ip link set <interface> up at the shell prompt. Also, systemctl can restart the network interface. To do this, simply enter systemctl restart network on a Red Hat strain system, or systemctl restart networking on a Debian strain system. This IP address assignment is not persistent. It will be lost on reboot. To make it persistent, configure the file __ on this CentOS system.

/etc/sysconfig/network-scripts/ifcfg-ens32

There are actually several configuration options when it comes to IPv6 addressing. The first is to use static assignment. As with IPv4, static IPv6 address assignments require you to manually assign the entire 128-bit IPv6 address and prefix to the host. This can be done from the shell prompt using a command-line utility such as ifconfig or ip. Alternatively, you can manually enter the address and prefix in the appropriate interface configuration file in __ or use (general command)__ .

/etc/sysconfig/network; nmcli

make it persistent, configure the file /etc/sysconfig/network-scripts/ifcfg-ens32on this CentOS system. Sample parameters for this interface are shown here: Option with Description: (This option specifies that the interface use a static IP address assignment. Set this value to "dhcp" to dynamically assign an address.

BOOTPROTO="static"

Description of netstat option: -i

Displays statistics for your network interfaces

Description of netstat option: -r

Displays your routing table

__ ports are also called private ports.

Dynamic

There are two network-based filesystems you need to be familiar with for the Linux+ exam: • Network File System (NFS) • Samba NFS allows users to mount network filesystems on vendor-neutral networks. Samba allows

Linux systems to mount network filesystems on Windows-based networks. You should understand the basics of accessing these filesystems.

Description of netstat option: -a

Lists all listening and non-listening sockets

The ip command can also disable and enable a network interface. To disable an interface, enter ip link set <interface> down at the shell prompt. To bring a disabled interface back online, enter ip link set <interface> up at the shell prompt. Also, systemctl can restart the network interface. To do this, simply enter systemctl restart network on a (distribution)__ strain system, or systemctl restart networking on a (distribution)__ strain system.

Red Hat ; Debian

To configure the default router address on a Debian class system, update the /etc/default/interfaces file and

add a line for the gateway "gateway 192.168.1.1"

Most networks allow sharing of filesystems over NFS. In order for NFS to function properly,

all systems need to run NFS.

EXAM TIP: The ethtool command...

allows administrators to list and alter the hardware settings of the network card.

To view the current ARP table on your Linux system, simply run (command)

arp -a

ip: For example, to set the IP address assigned to the ens32 network interface to 10.0.0.84, enter the following:

ip addr add 10.0.0.84 dev ens32

To use the ip command to configure IP addressing parameters, enter (syntax) __at the shell prompt.

ip addr add <ip_address> dev <interface>

ip: To remove an IP address from an interface, just enter (syntax)__ at the shell prompt.

ip addr del <ip_address> dev <interface>

Another utility you can use to manage IP addressing on a Linux system is the newer ip command. Practice using this command because it may supersede ifconfig, route, and others because it can also manage IPv6. This command is also available on Windows, Chrome, and Macintosh computers. To view the current configuration, enter (command)__ at the shell prompt

ip addr show

The ip command can also disable and enable a network interface. To disable an interface, enter (syntax) __ at the shell prompt.

ip link set <interface> down

The ip command can also disable and enable a network interface. To bring a disabled interface back online, enter (syntax)__ at the shell prompt.

ip link set <interface> up

ip: The following example shows adding route 10.0.0.254 to the 192.168.5.0/24 network out of interface ens32:

ip route add 192.168.5.0/24 via 10.0.0.254 dev ens32

ip: To add a static route to the routing table, enter (syntax) __ at the shell prompt.

ip route add <network/prefix> via <router_ip_address> dev <interface>

ip: For example, to remove the 192.168.5.0/24 route, enter the following:

ip route del 192.168.5.0/24

ip: To remove a route from the routing table, enter (syntax)__ at the shell prompt.

ip route del <network/prefix>

The output from dig is considerably more extensive than that displayed by other DNS troubleshooting tools such as nslookup and host in that

it displays more than just the IP address of the host. It also lists the authoritative name server for the host and zone.

There are two network-based filesystems you need to be familiar with for the Linux+ exam:

• Network File System (NFS) • Samba

Using DNS for name resolution works great—until it doesn't work! Fortunately, there are several tools available to troubleshoot name resolution on a network: (3)

• dig• host• nslookup


Set pelajaran terkait

Social Studies Exploration Crossword

View Set

NCLEX 10000 ENDOCRINE AND METABOLIC

View Set

Principles of Management: Ch. 10 Quiz

View Set