Home > OS >  Docker can ping network, but can't access the service
Docker can ping network, but can't access the service

Time:11-23

Excuse me. Can I docker container ping baidu, but not as a result, the curl issue ought to be out there, ask bosses give a direction of processing

Outside the container is completely ok

CodePudding user response:

Such IP addr, mtu is the same as
 2: eth0: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 
The link/Mr 00:16:3 e 10:19 behold: bd BRD ff: ff: ff: ff: ff: ff
Inet 172.16.176.197/20 BRD 172.16.191.255 scope global dynamic eth0
Valid_lft preferred_lft 312090154 SEC, 312090154 SEC
Inet6 fe80: : 216:3 the eff: fe10:19 bd/64 scope link
Valid_lft forever preferred_lft forever
3: docker0: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue state UP group default
The link/Mr 02:42:8 0-6: c: b7 BRD ff: ff: ff: ff: ff: ff
Inet 172.17.0.1/16 BRD 172.17.255.255 scope global docker0
Valid_lft forever preferred_lft forever
Inet6 fe80: : therefore 0 ff: fe63:8 cb7/64 scope link
Valid_lft forever preferred_lft forever
263: vethea39945 @ if262: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue master docker0 state UP group default
The link/Mr 02: a3: fb: even b: 51 BRD ff: ff: ff: ff: ff: ff link - netnsid 1
Inet6 fe80: : a3: FBFF: fe43:7 b51/64 scope link
Valid_lft forever preferred_lft forever
269: veth31e5b1f @ if268: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue master docker0 state UP group default
The link/Mr 86:9 e: Ed: 58: f9:38 BRD ff: ff: ff: ff: ff: ff link - netnsid 0
Inet6 fe80: : 849 e: edff: fe58: f938/64 scope link
Valid_lft forever preferred_lft forever

CodePudding user response:

2: eth0: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
The link/Mr 00:16:3 e 10:19 behold: bd BRD ff: ff: ff: ff: ff: ff
Inet X.X.X.X/20 BRD 172.16.191.255 scope global dynamic eth0
Valid_lft preferred_lft 312090154 SEC, 312090154 SEC
Inet6 fe80: : 216:3 the eff: fe10:19 bd/64 scope link
Valid_lft forever preferred_lft forever
3: docker0: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue state UP group default
The link/Mr 02:42:8 0-6: c: b7 BRD ff: ff: ff: ff: ff: ff
Inet 172.17.0.1/16 BRD 172.17.255.255 scope global docker0
Valid_lft forever preferred_lft forever
Inet6 fe80: : therefore 0 ff: fe63:8 cb7/64 scope link
Valid_lft forever preferred_lft forever
263: vethea39945 @ if262: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue master docker0 state UP group default
The link/Mr 02: a3: fb: even b: 51 BRD ff: ff: ff: ff: ff: ff link - netnsid 1
Inet6 fe80: : a3: FBFF: fe43:7 b51/64 scope link
Valid_lft forever preferred_lft forever
269: veth31e5b1f @ if268: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue master docker0 state UP group default
The link/Mr 86:9 e: Ed: 58: f9:38 BRD ff: ff: ff: ff: ff: ff link - netnsid 0
Inet6 fe80: : 849 e: edff: fe58: f938/64 scope link
Valid_lft forever preferred_lft forever

CodePudding user response:

I found that after the IP addr mtu is same,,,
 2: eth0: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 
The link/Mr 00:16:3 e 10:19 behold: bd BRD ff: ff: ff: ff: ff: ff
Inet X.X.X.X/20 BRD 172.16.191.255 scope global dynamic eth0
Valid_lft preferred_lft 312090154 SEC, 312090154 SEC
Inet6 fe80: : 216:3 the eff: fe10:19 bd/64 scope link
Valid_lft forever preferred_lft forever
3: docker0: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue state UP group default
The link/Mr 02:42:8 0-6: c: b7 BRD ff: ff: ff: ff: ff: ff
Inet 172.17.0.1/16 BRD 172.17.255.255 scope global docker0
Valid_lft forever preferred_lft forever
Inet6 fe80: : therefore 0 ff: fe63:8 cb7/64 scope link
Valid_lft forever preferred_lft forever
263: vethea39945 @ if262: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue master docker0 state UP group default
The link/Mr 02: a3: fb: even b: 51 BRD ff: ff: ff: ff: ff: ff link - netnsid 1
Inet6 fe80: : a3: FBFF: fe43:7 b51/64 scope link
Valid_lft forever preferred_lft forever
269: veth31e5b1f @ if268: & lt; BROADCAST and MULTICAST, the UP, LOWER_UP & gt; Mtu 1500 qdisc noqueue master docker0 state UP group default
The link/Mr 86:9 e: Ed: 58: f9:38 BRD ff: ff: ff: ff: ff: ff link - netnsid 0
Inet6 fe80: : 849 e: edff: fe58: f938/64 scope link
Valid_lft forever preferred_lft forever

CodePudding user response:

Is there bosses to help
  • Related