Configure Networking, Time Services Flashcards

1
Q

What is the command to show all network interfaces?

A

ip addr

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

What is the command to show a specific network interface?

A

ip addr show {ifname}

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

What is the command to trace the route of a packet?

A

traceroute

tracepath

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

What is the command to show listening ports and established connections?

A

ss

netstat *older

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

How do you show statistics on a network interface?

A

ip -s link show {ifname}

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

Where are networking devices located on the system?

A

/sys/class/net

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

How do you see the state of network devices?

A

nmcli dev status

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

What is the NetworkManager command to show network configurations?

A

nmcli con show

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

What is the NetworkManager command to add a DHCP connection that autoconnects on reboot?

A

nmcli con add con-name {name} autoconnect yes type ethernet ifname {ifname}

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

Where are NetworkManager configurations located?

A

/etc/sysconfig/network-scripts/

*ifcfg- files are config files for network interfaces

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

What is the NetworkManager command to add a static IP connection that autoconnects on reboot?

A

nmcli con add con-name {name} autoconnect yes type ethernet ifname {ifname} ip4 {ip} gw4 {gateway}

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

What is the NetworkManager command to bring down a network connection?

A

nmcli con down {name}

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

What is the NetworkManager command to bring up a network connection?

A

nmcli con up {name}

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

How do you modify a connection using NetworkManager?

A

nmcli con mod {name}

*can also edit config files in /etc/sysconfig/network-scripts

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

How do you delete a NetworkManager connection?

A

nmcli con del {name}

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

Where are DNS servers located?

A

/etc/resolv.conf

nameserver {server1} {server2} {etc}

17
Q

Where is the hosts file located?

A

/etc/hosts

*resolves names to ip manually

18
Q

How can you make either the /etc/hosts file or /etc/resolv.conf authoritative?

A

Edit /etc/nsswitch.conf
hosts: files dns myhostname
Order in which names will be resolved

19
Q

Where is the hostname of the system stored?

A

/etc/hostname

20
Q

What is the command to change hostname?

A

hostname *not persistent

hostnamectl set-hostname *persistent

21
Q

In /etc/resolve.conf what does search followed by a domain name do?

A

i.e search domain.com
When resolving a hostname the FQDN does not have to be specified for all search entries. The domain will be automatically appended.

22
Q

How would you use NetworkManager to add a network interface specific DNS address?

A

nmcli con mod {name} ipv4.dns {ip}
+ipv4.dns {ip} *add additional
-ipv4.dns {ip} *remove nameserver

23
Q

How do you resolve a hostname strictly internally?

A

getent host {name}

24
Q

How do you get information about system time?

A

timedatectl

date

25
Q

How do you set the timezone?

A

timezonectl set-timezone

26
Q

How do you enable/disable NTP?

A

timezonectl set-ntp true

timezonectl set-ntp false

27
Q

How do you set the time?

A

timedatectl set-time {time}

*first disable NTP

28
Q

What is the service that configures NTP?

A

chronyd

ntpd *older

29
Q

How do you see which servers are being used to sync by NTP?

A

chronyc sources -v

located at /etc/chrony.conf

30
Q

How do you see advances NTP information?

A

chronyc tracking
*shows information such as update interval
speeds/slows system clock incrementally to correct time to avoid breaking applications