CIS251_5.6_Managing_Container_Networking_Corey_Adams

docx

School

ECPI University, Greensboro *

*We aren’t endorsed by this school

Course

251

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

3

Uploaded by corada5995

Report
CIS251 – 5.6 – Managing Container Networking Corey Adams
Docker Networking Commands Command Example Description docker network ls docker network ls To display all the networks available to docker connections. docker inspect nat docker inspect nat To see the details for a specific network. (docker inspect Left- Test | ConvertFrom- Json) (docker inspect Left-Test | ConvertFrom- Json).NetworkSettings.Networks.nat To view the network settings for the docker container. Test-NetConnection - CommonTCPPort HTTP Test-NetConnection - CommonTCPPort SMB Test-NetConnection -CommonTCPPort HTTP -ComputerName 172.18.145.78 Test-NetConnection -CommonTCPPort SMB -ComputerName 172.18.145.78 Verify that you can ping between the containers. Verify that the host firewall is still operational. docker network create docker network create --driver nat -- subnet 192.168.128.0/17 Test-Nat To create a new network using the NAT driver and to create a network that has different settings from the default network, or you need to isolate containers. docker network ls docker network inspect docker network ls docker network inspect Test-Nat To view the network. docker run -it --name Net-Test docker run -it --name Net-Test --network Test-Nat iis-core-template PowerShell To test the network, create a container and attach it to the Test- Nat network. docker network connect docker network connect VS-EXT-01 Net- Test To connect the Net-Test container to the VS-EXT-01 network. docker inspect network docker inspect network VS-EXT-01 To check if the network adapter is connected. docker network disconnect docker network disconnect VS-EXT-01 Net-Test To Disconnect the adapter from the container. docker network connect --help docker network connect --help To learn more about connecting a container to a network.
docker run -it --name Port-Test docker run -it --name Port-Test -p 12345:80/tcp iis-core-template PowerShell Exposes TCP port 80 on the container to TCP port 12345 on the host. If you are connected to a transparent network, you can also choose the host IP address to bind to i.e. -p 192.168.1.1:12345:80/tcp.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help