Hasil gambar untuk docker

Cek network docker

root@man20820:~# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
b3a740b79b07        bridge              bridge              local
b6635c10ec51        host                host                local
4306742b6135        none                null                local
root@man20820:~# 

cek network mesin

root@man20820:~# ifconfig
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:9bff:fef1:5d80  prefixlen 64  scopeid 0x20<link>
        ether 02:42:9b:f1:5d:80  txqueuelen 0  (Ethernet)
        RX packets 1998  bytes 3838312 (3.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2067  bytes 507820 (495.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.254  netmask 255.255.255.240  broadcast 10.0.0.255
        inet6 fe80::215:18ff:fe01:8131  prefixlen 64  scopeid 0x20<link>
        ether 00:15:18:01:81:31  txqueuelen 1000  (Ethernet)
        RX packets 2634  bytes 609098 (594.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3575  bytes 3996380 (3.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 23  

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 2  bytes 224 (224.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 224 (224.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth5bb13a8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::1c0e:35ff:fefd:c356  prefixlen 64  scopeid 0x20<link>
        ether 1e:0e:35:fd:c3:56  txqueuelen 0  (Ethernet)
        RX packets 1998  bytes 3866284 (3.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2082  bytes 508966 (497.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@man20820:~# 

membuat macvlan

docker network create -d macvlan --subnet=10.0.0.240/28 --gateway=10.0.0.241  -o parent=eth0 macvlanku