Networking Flashcards

1
Q

What are the 5 different network drivers?

A
  1. Bridge
  2. Host
  3. Overlay
  4. MACVLAN
  5. None
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 5 attributes of the Container Networking Model (CNM)?

A
  1. Sandbox
  2. Endpoint
  3. Network
  4. Network Drivers
  5. IPAM Drivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the default network driver used when creating a container without specifying?

A

bridge network

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

Command to create a user defined bridge network?

A

docker network create –driver bridge mybridge

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

How to run a docker container in a specific network?

A

docker run –name mycontainer –network mybridge ubuntu

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

Name 4 differences between user defined and the default bridge network?

A
  1. User defines allows for embedded DNS for other containers on same bridge using container names
  2. User defined provides better isolation
  3. Containers can be attached/detached without stopping them on user defined bridge
  4. User defined bridges are configured inside docker, default bridge is not.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the main characteristic of the Host network driver?

A

Ports are opened directly from the host to the container. Ports do not need to be published

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

What is a use case for using the Host network?

A

Running a container which monitors the hosts eth0 interface

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

What network access does the None network driver have?

A

No access to/from the host or to/from other containers

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

How to publish all ports of a container to the host with the run command?

A

Use -P (–publish-all)

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

What is the legacy approach for linking containers?

A

docker run –name my_ubuntu –link source_container:alias_for_container ubuntu

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

How to encrypt an overlay network upon creation?

A

docker network create –opt encrypted –driver overlay my_network

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

How does docker encrypt overlay networks?

A

IPSEC tunnels between nodes

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