Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"--net host" doesn't work on WIN10 #543

Closed
colingonglin opened this issue Mar 1, 2017 · 3 comments
Closed

"--net host" doesn't work on WIN10 #543

colingonglin opened this issue Mar 1, 2017 · 3 comments

Comments

@colingonglin
Copy link

I ran the following command on both win10 and linux and got the different behavior:

 docker run --rm --net host alpine ip addr

WIN10, I can't see the local network(192.168.1.xx/24):

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST400> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 92:bd:65:36:19:39 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 62:77:2d:52:14:bd brd ff:ff:ff:ff:ff:ff
4: hvint0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:15:5d:01:9c:07 brd ff:ff:ff:ff:ff:ff
    inet 10.0.75.2/24 scope global hvint0
       valid_lft forever preferred_lft forever
    inet6 fe80::215:5dff:fe01:9c07/64 scope link
       valid_lft forever preferred_lft forever
5: teql0: <NOARP> mtu 1500 qdisc noop state DOWN qlen 100
    link/void
6: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
7: gre0@NONE: <NOARP> mtu 1476 qdisc noop state DOWN qlen 1
    link/gre 0.0.0.0 brd 0.0.0.0
8: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN qlen 1000
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: ip_vti0@NONE: <NOARP> mtu 1332 qdisc noop state DOWN qlen 1
    link/ipip 0.0.0.0 brd 0.0.0.0
10: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN qlen 1
    link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
11: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN qlen 1
    link/sit 0.0.0.0 brd 0.0.0.0
12: ip6tnl0@NONE: <NOARP> mtu 1452 qdisc noop state DOWN qlen 1
    link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
13: ip6gre0@NONE: <NOARP> mtu 1448 qdisc noop state DOWN qlen 1
    link/[823] 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
14: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether c0:ff:ee:c0:ff:ee brd ff:ff:ff:ff:ff:ff
    inet 192.168.65.2/29 brd 192.168.65.7 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::c875:a7f1:a790:a909/64 scope link
       valid_lft forever preferred_lft forever
15: br-2e88de1808db: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 02:42:0a:bc:08:d1 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 scope global br-2e88de1808db
       valid_lft forever preferred_lft forever
16: br-7b62dcfafa90: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 02:42:40:17:c8:fd brd ff:ff:ff:ff:ff:ff
    inet 172.19.0.1/16 scope global br-7b62dcfafa90
       valid_lft forever preferred_lft forever
17: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 02:42:e8:59:30:36 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

LINUX, I can see the local network:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:3e:04:cd:43 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.204/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 31414543sec preferred_lft 31414543sec
@simonferquel
Copy link

By design, --net host is not supported on Docker for Windows.

@friism
Copy link

friism commented Mar 11, 2017

Closing.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 20, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

4 participants