Linux Networking Flashcards

1
Q

How would you check if a network device is working?

A

nmcli device status

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

How would you get more in-depth information on a network device functionality?

A

nmcli show DEVICE

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

How might you edit a network device (for IP for example)

A

nmcli connection edit DEVICE

Takes you to nmcli prompt then:

nmcli> set PARAMETER VARIABLE

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

Relaunch the full TCP/IP stack.

A

sudo systemctl restart network.service

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

How to start/restart dhcp?

A

dhclient
dhclient-r

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

How would you restart the network stack on an older (non sysd distro)?

A

service network restart

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

Where is the network config stored in RHEL and SysV based distros

A

/etc/sysconfig/network-scripts

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

Where would the network config be in Ubuntu? (2 potential locations)

A

/etc/network
Or
/etc/netplan
Look for file ending config_yaml

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

How would you tell a system running netplan to take network configuration changes

A

sudo netplan apply

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

How would you save an nmcli edit?

A

nmcli save persistent
Then
sudo nmcli connection reload

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

How to apply an ip with netplan

A

Edit /etc/netplan/01-netplan-manager-all.yaml
Then
sudo netplan apply

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

How to start up/enable SSH

A

sudo systemctl enable —now ssh
(sshd in rhel)

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

Where are RHEL network config files?

A

/etc/sysconfig/network-scripts

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

What is the minimum information needed to connect to network?

A

IP Address
Subnet Mask
Default Gateway
Host name
DNS

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

What does ss -anpt do?

A

Display processes that have active network ports open.

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

How do you display information about your current network interfaces?

A

ip address show

17
Q

How do you view your current wireless settings?

A

iwconfig

18
Q

How do you view the programs currently listening for incoming network connections?

A

netstat -l
Or
ss -l

19
Q

How to add a static route?

A

ip route add 8.8.8.8/32