Networking - Command Line Network Utilities Flashcards

1
Q

What operating system(s) is “ifdown <interface> used on and what does it do?</interface>

A

Linux

Stops a network interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does “hostname” do on Linux, what can it be used for, and what switches are useful to know?

A

Displays the current devices’ name. It can be used to temporarily or permanently change the hostname.

The switches are as follows:
-s displays the short version of the hostname.
-b forces the computer to use the default hostname of localhost.
-d displays the DNS domain name.
-f displays the FQDN of the device.
-i displays the current IP address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does “hostname” do on Windows?

A

Shows the current devices’ name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does “ping” do on Linux, how does it work, and what switches can be used with it?

A

Ping sends an UDP echo request/reply packet to a remote host. A response from the remote host indicates that both hosts are correctly configured and a connection exists between them. In a Linux machine, ping keeps sending packets until the user manually stops the command (Ctrl + c).

Switches:
-c sets the number of UDP packets to be sent.
-i sets the interval between sent packets.
-f sends packets as quickly as the network allows.
-q displays only a summary of the ping results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does “ping” do on Windows, how does it work, and what switches can be used with it?

A

Ping sends an ICMP echo request/reply packet to a remote host. A response from the remote host indicates that both hosts are correctly configured and a connection exists between them. It sends 4 packets by default.

Switches:
-n specifies the number of ICMP packets sent.
-l sets the size of the packets.
-4 forces ping to use IPv4.
-6 forces ping to use IPv6.
-t sends continuous pings until manually stopped.
-a resolves the IP address to a hostname.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What operating system is “ip addr” used on and what parameters does it show you?

A

Linux

ip addr or ip addr show
Shows the addresses assigned to all the network interfaces.
Common ip addr show parameters include the following:
inet shows the IPv4 address with the subnet mask in CIDR notation.

brd - shows the broadcast address.
up or down - shows the interface status.
inet6 - shows the IPv6 IP address.

<interface> - show the networking information for the specified interface.

Example: ip addr show enp2s1
</interface>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What operating system is “ip” used on and what is it able to do. Also what utility did it replace?

A

It’s used on the Linux operating system and it replaced the “ifconfig” utility

It is used for:
Address—IP addresses and ranges.
Link—network adapter.
Route—the rules that manage the routing of traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What operating system is “traceroute” used on and what does it do?

A

Linux

Used to test connectivity between two devices as well as showing the path between those devices. Responses from each hop on the route are measured three times to accurately report how long the packet takes to reach the specific host and then return.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What operating system is “tracert” used on and what does it do?

A

Windows

Used to test connectivity between two devices as well as showing the path between those devices. Responses from each hop on the route are measured three times to accurately report how long the packet takes to reach the specific host and then return.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What operating system is ipconfig used on and what switches are used most often with it?

A

Windows

ipconfig—shows the IP address, subnet mask, and default gateway
ipconfig /all—shows detailed IP configuration information including the MAC address, DHCP information, DNS server, and more.
ipconfig /release—clears the current IP configuration obtained from a DHCP server.
ipconfig /renew—attempts to request a new IP configuration from a DHCP server.
ipconfig /displaydns—displays the contents of the local DNS cache.
ipconfig /flushdns—clears the DNS cache.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What operating system(s) is “ifconfig” used on, what info does it show, and what switches are used with it?

A

ifconfig is used on Linux and macOS systems and displays the installed network interfaces and the current configuration settings for each interface, including the MAC address, IP address, broadcast address, and subnet address.

Use the ifconfig command as follows:
Use ifconfig -a to display all the interfaces which are currently available, even if the interface is down.
Use ifconfig [interface_name] down to disable the specified network interface.
Use ifconfig [interface_name] up to enable the specified network interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What operating system(s) is “ifup <interface>" used on and what does it do?</interface>

A

It’s used on Linux

Starts a network interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What operating system(s) is ip link set <interface> down
ip link set <interface> up used on and what does it do?</interface></interface>

A

They are used on Linux

Starts and stops the specified interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What operating system(s) is “pathping” used on and what does it do?

A

Windows

The pathping utility performs the same function as tracert, but also shows information such as the network latency and packet loss for each hop. This is useful for determining if a device in the path is slowing traffic or dropping packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What operating system(s) is netstat used on and what does it do?

A

Windows and Linux

1. Active TCP or UDP connections.
2. Open ports on the computer and the programs using those ports.
3. Local routing table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What operating system(s) is “nslookup” used on and what does it do?

A

Windows

It looks up the IP address of a specified hostname. It also displays additional name resolution information, such as the DNS server used for the lookup request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What operating system(s) is “dig” used on and what does it do?

A

Linux

It looks up the IP address of a specified hostname. It also displays additional name resolution information, such as the DNS server used for the lookup request. You can also use the dig command to modify DNS settings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What operating system(s) is “net” used on and what does it do?

A

Windows

You can use the net utility in Windows to manage and modify almost any aspect of the network. You use the net utility in conjunction with a second command. Two commands commonly used with the net utility are:

use—configures or modifies a connection to a shared network resource, such as a shared folder.
user—adds, removes, or modifies a user account.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

In a Windows environment, if I wanted to see a device’s current IP configuration information for each network adapter, what utility would I use?

A

ipconfig

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In a Windows environment, what command shows detailed IP configuration information including the MAC address, DHCP information, DNS server, and more.

A

ipconfig /all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

In a Windows environment, what command clears the current IP configuration obtained from a DHCP server.

A

ipconfig /release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

In a Windows environment, what command attempts to request a new IP configuration from a DHCP server.

A

ipconfig /renew

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

In a Windows environment, what command displays the contents of the local DNS cache.

A

ipconfig /displaydns

24
Q

In a Windows environment, what command clears the DNS cache.

A

ipconfig /flushdns

25
Q

In Linux, what command replaced the ifconfig command?

A

ip

26
Q

What operating system(s) is “iwconfig” used on and what does it do?

A

Linux

It is used to display information about wireless network interfaces.

27
Q

On Linux, if I wanted to see the information about wireless network interfaces, what command would I use?

A

iwconfig

28
Q

On Linux, what two commands can be used to stop a network interface?

A

ifdown <interface></interface>

ip link set <interface> down</interface>

29
Q

On Linux, what two commands can be used to start a network interface?

A

ifup <interface></interface>

ip link set <interface> up</interface>

30
Q

On Windows and Linux, what command displays a device’s name

A

hostname

31
Q

On Linux, what hostname switch displays the short version of the hostname.

A

hostname -s

32
Q

On Linux, what hostname switch forces the computer to use the default hostname of localhost.

A

hostname -b

33
Q

On Linux, what hostname switch displays the DNS domain name.

A

hostname -d

34
Q

On Linux, what hostname switch displays the FQDN of the device.

A

hostname -f

35
Q

On Linux, what hostname switch displays the current IP address.

A

hostname -i

36
Q

On a Windows machine, what kind of echo request/reply packet is sent to the remote host?

A

Internet Control Message Protocol (ICMP)

37
Q

On a Linux machine, what kind of echo request/reply packet is sent to the remote host?

A

User Datagram Protocol (UDP)

38
Q

When using “ping” on a Windows machine, how many packets are sent by default?

A

4

39
Q

When using “ping” on a Linux machine, how many packets are sent by default?

A

Ping keeps sending packets until the user manually stops the command (Ctrl + c).

40
Q

On a Windows machine, what ping switch specifies the number of ICMP packets sent.

A

ping -n

41
Q

On a Windows machine, what ping switch sets the size of the packets.

A

ping -l

42
Q

On a Windows machine, what ping switch forces ping to use IPv4.

A

ping -4

43
Q

On a Windows machine, what ping switch forces ping to use IPv6.

A

ping -6

44
Q

On a Windows machine, what ping switch sends continuous pings until manually stopped.

A

ping -t

45
Q

On a Windows machine, what ping switch resolves the IP address to a hostname.

A

ping -a

46
Q

On a Linux machine, what ping switch sets the number of UDP packets to be sent?

A

ping -c

47
Q

On a Linux machine, what ping switch sets the interval between sent packets?

A

ping -i

48
Q

On a Linux machine, what ping switch sends packets as quickly as the network allows?

A

ping -f

49
Q

On a Linux machine, what ping switch displays only a summary of the ping results?

A

ping -q

50
Q

In Windows, if I wanted to see the hops that a packet takes between source and destination, what command would I use?

A

tracert

51
Q

In Windows, if I wanted to see the hops that a packet takes between source and destination, what command would I use?

A

traceroute

52
Q

What Windows command would I use to determine if a device in the path of a packet is slowing traffic or dropping packets?

A

pathping

53
Q

In Windows and Linux what command would I use to see the active TCP or UDP connections, open ports on the computer and the programs using those ports, and the local routing table?

A

netstat

54
Q

On Windows, what command would I use to resolve the IP address of a specified hostname as well as display additional name resolution information, such as the DNS server used for the request.

A

nslookup

55
Q

On Linux, what command would I use to resolve the IP address of a specified hostname, display additional name resolution information, such as the DNS server used for the request, and modify DNS settings.

A

dig

56
Q

On Windows, what command would I use if I wanted to configure or modify a connection to a shared network resource, such as a shared folder.

A

net use

57
Q

On Windows, what command would I use if I wanted to add, remove, or modify a user account.

A

net user