Network Flashcards

1
Q

lists all available network interfaces on your system

A

ip link show

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

view device and address info of device ens3

A
ip addr show ens3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

show statistics about a specific network dev performance

A
ip -s link show ens3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

tests connectivity to a machine

A

ping -c3 192.0.2.254

ping6 2001:db8:0:1::1

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

find other IPv6 nodes on the local network

A

ping6 ff02::1%ens4

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

show routing information

A

ip route

ip -6 route

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

trace the network traffic path to reach a remote host

A
tracepath access.redhat.com
mtr access.redhat.com
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

display socket statistics.

A

ss -ta
ss -plunt

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

Locate the network interface name that is associated with the 52:54:00:00:fa:0a Ethernet address

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

Display the current IP address and netmask for all interfaces

A

ip -br addr

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

Display the statistics for the enX interface.

A
ip -s link show enX
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Display the listening TCP sockets on the local system

A

ss -lt

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

displays the status of all network devices

A

nmcli dev status

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

displays a list of all connections.

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

displays a list of all active connections.

A
nmcli con show --active
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

adds an eno2 connection of the ethernet type for the eno2 network interface

A
nmcli con add 
con-name eno2 
type ethernet 
ifname eno2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

creates an eno3 connection of the ethernet type for the eno3 network interface with a static IPv4 network setting

A
nmcli con add 
con-name eno3 
type ethernet 
ifname eno3 
ipv4.method manual 
ipv4.addresses 192.168.0.5/24 
ipv4.gateway 192.168.0.254
18
Q

activates a network connection on the device that it is bound to

A
nmcli con up static-ens3
19
Q

disconnects the network device and brings down the connection

A

nmcli dev disconnect ens3

20
Q

list the current settings for a connection

A

nmcli con show static-ens3

21
Q

update the static-ens3 connection to set the 192.0.2.2/24 IPv4 address and the 192.0.2.254 default gateway. automatically enable the connection at system boot.

A
nmcli con mod static-ens3
ipv4.addresses 192.0.2.2/24 
ipv4.gateway 192.0.2.254
connection.autoconnect yes
22
Q

update the static-ens3 connection to set the 2001:db8:0:1::a00:1/64 IPv6 address and the 2001:db8:0:1::1 default gateway

A
nmcli con mod static-ens3 
ipv6.addresses 2001:db8:0:1::a00:1/64
ipv6.gateway 2001:db8:0:1::1
23
Q

adds the 2.2.2.2 DNS server to the static-ens3 connection

A
nmcli con mod static-ens3 +ipv4.dns 2.2.2.2
24
Q

loads all connection profiles

A

nmcli con reload

25
loads only the eno2 connection profile
```nmcli con reload en02```
26
deletes a connection from the system
nmcli con del static-ens3
27
view your current permissions
nmcli gen permissions
28
useful network manager commands
nmcli dev status nmcli dev disconnect nmcli con show nmcli con up nmcli con reload nmclicon edit nmcli con mod nmcli con add nmcli con del
29
NetworkManager config file format
ini
30
Connection properties
ip4.address1 ip4.method ip4.gateway ip4.dns ip4.dns-search ip4.ignore-auto-dns connection.autoconnect connection.id connection.interface-name connection.type connection.uuid 802-3-ethernet.mac-address
31
What do you do after changing a connection config file?
```nmcli con reload``` ```nmcli con up static-ens3```
32
Determine hostname
hostname
33
Where is hostname stored
/etc/hostname
34
Set hostname via cli
```hostnamectl hostname example.com```
35
How does stub resolver go about converting names to ips?
determines where to look based on /etc/nsswitch.conf . By default it uses /etc/hosts
36
Command to test hostname resolution
getent hosts hostname
37
Explain the content of /etc/resolv.conf
nameserver: up to 3 nameservers search: suffixes to append to requests when querying just a hostname domain: hostname resolution in a local network
38
Change dns with nmcli
```nmcli con mod ID ipv4.dns IP``` ```nmcli con down ID``` ```nmcli con up ID```
39
adds or removes an individual dns entry
```nmcli con mod ID +ipv4.dns IP```
40
test DNS server connectivity
```dig example.com``` ```host example.com```
41
test DNS server connectivity specifically usin /etc/hosts
```getent hosts example.com```