Linux Networking Flashcards

1
Q

lists all the interfaces on the local system.

A

ip addr list,

ip link

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

tracert in Windows..

A

is traceroute in Linux

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

ifconfig vs ip commands

A

most people accustemed using ifconfig but ip commands will replace it eventually

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

how to assign a non-persisting IP address

A

ip addr {del/add} {address/mask} dev {intf_number}

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

how to assign a non-persisting IP route

A

ip route {add/del} {network/mas} via {next_hop_ip} dev {intf_number}

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

displays local connection and routing information

A

netstat

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

displays local route table

A

netstat -r

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

displays interface statistics

A

netstat -i

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

displays DNS information such as A Records, MX Records, and CNAMES

A

dig

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

resolves a hostname to an IP address or vice versa and learn DNS information such as MX Records, Name Servers, CNAME, etc.

A

host

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

the primary way to show end edit routing table

A

ip route list

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

the secondary way to show and edit routing table

A

route

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

show ARP entries or set one

A

arp

apr -s {ip_address} {mac_address}

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

persistent interface route information is stored in

A

/etc/network/interfaces

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

how to change IP address from static to DHCP

A

delete iface eth0 inet static

add iface eth0 inet dhcp

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

where is DNS information stored

A

/etc/resolv.conf

17
Q

where is dynamically contructed DNS information stored

A

/etc/resolvconf/resolv.conf.d/

18
Q

how to regenerate resolv.conf.d

A

sudo resolvconf -u

19
Q

what is wrong in editing resolv.conf manually

A

changes will be overwritten in reboot

20
Q

when do you need to restart networking

A
  • changed default GW
  • adding additional NICs
  • after IP address and mask reconfiguration
21
Q

how to restart networking

A

sudo service networking restart