Networking Flashcards

(51 cards)

1
Q

Show devices set on a system

A

nmcli dev show

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

Show network configuration settings on a system

A

nmcli con show

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

Turn off the connection

A

nmcli con down “Wired conn” [name of conn, ex- eth0]

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

Delete connection

A

nmcli con del “wired conn” [name of connection, ex eth0]

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

Check status of network devices

A

nmcli dev status

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

Show specified network device details

A

nmcli dev show eth0

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

Add new connection

A

nmcli con add con-name “backup” type ethernet ip4 192.168.0.122/24 gw4 192.168.0.1 ifname eth0 auroconnect

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

Edit current connection

A

nmcli con edit (which will prompt you for each setting and here you can enter in
each item based on the list printed out)

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

Add dns value for specified connection

A

nmcli con mod eth0 ipv4.dns “192.168.0.2”

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

Show dns field for specified connection

A

nmcli -f ipv4.dns con show backup/eth0

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

Display ip-address info

A

ip addr show

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

Display routing table

A

ip route show

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

Add/delete ip-address to specified interface

A

ip addr add/del 192.168.0.100/24 dev eth0

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

Show ip-address for specified interface

A

ip addr show eth0

ip addr show dev eth0

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

Switch on/off ip link

A

ip link set eth0 up/down

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

Add/delete route

A

ip route add/del default via 192.168.1.2 dev eth0

ip route add/del 10.10.0.0/16 via 192.168.1.2 dev eth0

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

Set host name for the system

A

hostnamectl set-hostname “CetnosWK”

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

Get hostname

A

hostname

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

Legacy networking tools- need to install package

A

yum install net-tools

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

Legacy: ip info details of configured interfaces

A

ifconfig

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

Legacy: change ip adress

A
ifconfig eth0 192.168.0.3
ifconfig eth0 (to show it's been change)
22
Q

Legacy: turn on/off network interface

A

ifup/ifdown eth0

23
Q

Legacy: print routing table

print routing table with ip-addresses rather than names, so destination instead of default will be shown as 0.0.0.0

A

route

route -n

24
Q

Legacy: delete default route

A

route del default

25
Legacy: add default route
route add default gw 192.168.0.1
26
Legacy: add new route
route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.0.1 dev eth0
27
Test availability of destination host Test the same but with specified number of packets Test the same using ipv4 proto Test the same using ipv6 proto
ping 192.168.0.35 ping -c 10 192.168.0.35 ping -4 -c 10 198.168.0.35 ping -6 -c 10 ::1 or ping6 -c 10 ::1
28
Display all hops a packet will traverse to get the destination The same but instead of using icmp use tcp packets The same but using ipv6 proto
traceroute google.com traceroute -T 8.8.8.8 traceroute -6 ::1/ traceroute6 ::1
29
Display all hops a packet will traverse to get the destination using UDP instead of icmp by default
tracepath google.com
30
Display network connections and their state on the system (now deprecated and need to install net-tools to use this)
netstat
31
Display network status and states listening on tcp, udp protos Display the same and show process id listening on these ports Display routing table Display all listening and non-listening sockets , show numerical addr instead symbolic host
netstat -tul netstat -tulp netstat -r netstat -an
32
Modern tool to display network status and states
ss | P.S. (no support to show routing table i.e. -r switch)
33
File contains host entries with ip-names mappings including where localhost IP is
/etc/hosts
34
File contains hostname of the system | this file is updated by hostnamectl
/etc/hostname
35
File contains DNS server ip
/etc/resolv.conf
36
Database file of name switch service conf file, to determine the sources from which to obtain ns info in range of categories, and in what order
/etc/nsswitch.conf example of output hosts: files DNS The first thing to check will be files (/etc/hosts, /etc/hostname), then DNS (/etc/resolv.conf)
37
Simple DNS lookup
host (need to install bind-utils first) | host google.com
38
DNS lookup including types of DNS records Lookup using specified DNS server Lookup for specific record type
dig google.com dig @8.8.8.8 reddit.com dig -t MX google.com dig @8.8.8.8 -t any google.com
39
Directly query /etc/nsswitch.conf for records
getent hosts
40
``` Network bonding (teaming) Network bridging ```
1. Config that treats 2+ network interfaces as a single one 2. Combines 2+ networks into a new logical network. Often used in virtualization, where the guest's network communicates on the same network as the host system 2. 1.install bridge-utils 2. 2. create bridge interface: brctl addbr br0 2. 3. add nic to bridge: brctl addif br0 veth0 2. 4 check status: brctl show
41
Bonding modes
Mode=1 active-backup sets all nics to backup state while one remains active Mode=2 XOR policy selects nic based on XOR operation Mode=4 IEEE 802.3ad policy creates aggregation teaming Mode=5 adaptive transmit load balancing policy ensures outgoing traffic distribution according to the load of each nic
42
List ethernet nics using pci
lspci | grep ethernet
43
Network port scanner
nmap -p 1-1023 -sV -sS -T4 192.168.1.1 nmap -A -T4 scanme.nmap.org sV -probe open ports for service/version info sS- TCP SYN, sT- connect, sA- ACK, sW -window, sU- UDP scan, sF -FYN, T4 -for faster execution -A-to check OS and version detection, open ports etc
44
Utility for reading from and writing to network connections using TCP or UDP
netcat on server (192.168.0.1) side: nc -l -p 1234 on client side: nc 192.168.0.1. 1234 on client side: nc -zv 192.168.0.1 20-80 z -report connection status (53- connection succeded, 24- connection refused etc)
45
CLI component of wireshark
tshark
46
Very common utility to sniff traffic similar to tshark
tcpdump
47
Show arp table
arp -n (show in numeric instead of symbolic names) arp -d _address_ - delete entry arp -s _address_ _hw_address_ -set up a new table entry
48
Display bandwidth usage
iftop | iftop -i _if_name (listen on interface)
49
Measurement tool for tcp/udp bandwidth performance
iperf3
50
Network diagnostic tool, which updates network status in real-time Combines functionality of traceroute and ping
mtr google.com mtr -r google.com -display only final report, will not be updated in real-time
51
Whois lookup, requests whois directory service
whois google.com