LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 04-13-2020, 07:58 PM   #1
sasaleh@nvcc.edu
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Rep: Reputation: Disabled
Docker container setup with wrong IP


My coworkers setup a docket container with the an IP schema that is used on my network. They've performed so much work on this VM. Is there a way to fix the IP issue without have to start the entire project from scratch? Here are details:

Code:
# ifconfig
br-b8296ba1c148: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
        inet6 fe80::42:61ff:fe63:b9b2  prefixlen 64  scopeid 0x20<link>
        ether 02:42:61:63:b9:b2  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 10.0.0.5  netmask 255.255.255.0  broadcast 0.0.0.0
        ether 02:42:a0:34:fc:28  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.4.160  netmask 255.255.255.128  broadcast 172.17.4.255
        inet6 fe80::250:56ff:fea2:7ba2  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:a2:7b:a2  txqueuelen 1000  (Ethernet)
        RX packets 85844634  bytes 31995987401 (29.7 GiB)
        RX errors 0  dropped 2473  overruns 0  frame 0
        TX packets 86980369  bytes 31407651471 (29.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 636  bytes 54838 (53.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 636  bytes 54838 (53.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth8450103: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::bca4:bbff:fea8:8eea  prefixlen 64  scopeid 0x20<link>
        ether be:a4:bb:a8:8e:ea  txqueuelen 0  (Ethernet)
        RX packets 678430  bytes 221475286 (211.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 636629  bytes 170305085 (162.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethd6f804d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::c812:b3ff:fe56:6625  prefixlen 64  scopeid 0x20<link>
        ether ca:12:b3:56:66:25  txqueuelen 0  (Ethernet)
        RX packets 244660  bytes 77508284 (73.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 174164  bytes 171261451 (163.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
The problem is the IP address shown above 172.18.0.1 is used in our production network. Is there a way to fix this without having to restart the entire project from the beginning?

Here are more details:

Code:
[root@ ~]# docker network ls
NETWORK ID          NAME                  DRIVER              SCOPE
0533fe2b7580        bridge                bridge              local
ce116ed2a25c        host                  host                local
48e74b162938        none                  null                local
b8296ba1c148        symmetricds_default   bridge              local
Thanks in advance.
 
Old 04-14-2020, 03:48 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,936

Rep: Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323
if I understand well you need to remove that bridge (br-b8296ba1c148) and recreate it using another IP.
 
Old 04-14-2020, 08:29 AM   #3
sasaleh@nvcc.edu
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Pan64 - yes, I want to delete the bridge and recreate, or change the IP on it.
 
Old 04-14-2020, 08:31 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,936

Rep: Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323Reputation: 7323
yes, just do that. Do you have any question?
https://www.cyberciti.biz/faq/how-to...-debian-linux/
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to setup Elastic Container Registry (ECR) for Docker on AWS LXer Syndicated Linux News 0 12-17-2019 07:23 AM
LXer: Setup Ruby on Rails Development environment with Docker and Docker Compose on Ubuntu LXer Syndicated Linux News 0 05-22-2019 10:42 PM
linux container host os and container os question jzoudavy Linux - Newbie 1 09-01-2015 05:21 AM
LXer: Inside the Open Container Project: How Docker plans to unite the container market LXer Syndicated Linux News 0 06-23-2015 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration