You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question that I am not understanding about docker networks, Macvlan and ipvlan. In the first example, I want to show you the macvlan bridge mode network. This works correctly for me, I show you what I have done to make it work correctly.
First I have executed these commands
sudo ip link add macvlan_int link enp0s3 type macvlan mode bridge
sudo ip address add 192.168.1.2/24 dev macvlan_int
sudo ip link set macvlan_int up
sudo ip route add 192.168.1.110/32 dev macvlan_int
After I have run docker compose, I have it working this way.
I run this in my browser http://192.168.1.110 and the Macvlan Bridge mode works correctly
So far so good, it works well for me, but now the problems come. Before starting the next example I want to mention something to the previous example, if I have done something wrong or I want you to mention something to me, I am new to docker in networks. Now let's move on to the second example to the macvlan 802.1Q trunk bridge mode I want to implement this. The only thing I have done is the following in my docker compose.
Here what I have done is the following, I have changed the IP to this 192.168.1.130 then I have added the enp1s0.50, ok so far everything is fine inside the container I execute the ping to the IP 192.168.1.130 and it works, it gives me a signal, but When I run this on my host and add the ping 192.168.1.130 it doesn't work correctly when I run that on my host and add the http://192.168.1.130 it tells me connection refused, I want to mention that I have no conflicts with anything I have checked it too I have run these commands netstat -rn | fgrep 0.0.0.0 || ip route, nmap -sn 192.168.1.0/24,ifconfig,netstat -a, ip -br -col add show to check if there is a problem, I can't solve the problem so that it works correctly, why do I get a signal that it works when pinging the IP address that I have assigned but on my host I do not receive a signal and it does not let me access the IP address from my host?
Now let's move on to the third example. I have a problem, I want to implement ipvlan l2 and the same thing happens to me as the second example. It doesn't work on the host of my system, but on the container it works when pinging the IP address.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a question that I am not understanding about docker networks, Macvlan and ipvlan. In the first example, I want to show you the macvlan bridge mode network. This works correctly for me, I show you what I have done to make it work correctly.
sudo ip link add macvlan_int link enp0s3 type macvlan mode bridge
sudo ip address add 192.168.1.2/24 dev macvlan_int
sudo ip link set macvlan_int up
sudo ip route add 192.168.1.110/32 dev macvlan_int
So far so good, it works well for me, but now the problems come. Before starting the next example I want to mention something to the previous example, if I have done something wrong or I want you to mention something to me, I am new to docker in networks. Now let's move on to the second example to the macvlan 802.1Q trunk bridge mode I want to implement this. The only thing I have done is the following in my docker compose.
Here what I have done is the following, I have changed the IP to this 192.168.1.130 then I have added the enp1s0.50, ok so far everything is fine inside the container I execute the ping to the IP 192.168.1.130 and it works, it gives me a signal, but When I run this on my host and add the ping 192.168.1.130 it doesn't work correctly when I run that on my host and add the http://192.168.1.130 it tells me connection refused, I want to mention that I have no conflicts with anything I have checked it too I have run these commands netstat -rn | fgrep 0.0.0.0 || ip route, nmap -sn 192.168.1.0/24,ifconfig,netstat -a, ip -br -col add show to check if there is a problem, I can't solve the problem so that it works correctly, why do I get a signal that it works when pinging the IP address that I have assigned but on my host I do not receive a signal and it does not let me access the IP address from my host?
Now let's move on to the third example. I have a problem, I want to implement ipvlan l2 and the same thing happens to me as the second example. It doesn't work on the host of my system, but on the container it works when pinging the IP address.
Beta Was this translation helpful? Give feedback.
All reactions