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
hi, thanks for writing this book - i'm enjoying it so far!
on ubuntu 18.04, i was following the examples in chapter 4 > network namespace (p.45), and ran into a couple of issues (quite possibly of my own doing, so please treat the below as conjecture):
ip addr add
To send IP traffic, there needs to an IP address associated with its interface. In the container:
root@myhost:~$ ip addr add 192.168.1.100/24 dev ve1
And on the host:
root@myhost:~$ ip addr add 192.168.1.200/24 dev ve1
i believe the second command should be targetting ve2 instead of ve1
ping from container
At this point the container can send traffic only to 192.168.1.0/24 addresses. You can test this with a ping from within the container to the remote end:
root@myhost:~$ ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=0.355 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=0.035 ms
^C
with the ip addr add issue fixed as described, this ping didn't work as the ip is actually the "container" end rather than remote. i think the command should actually be ping 192.168.1.200 which does work.
the ping as written in the book:
does work from the host - expected as this is pinging the "container"
does work within the "container" but only after running ip link set lo up - expected as this is now able to ping itself (as loopback is down by default in the new net namespace)
The text was updated successfully, but these errors were encountered:
hi, thanks for writing this book - i'm enjoying it so far!
on ubuntu 18.04, i was following the examples in chapter 4 > network namespace (p.45), and ran into a couple of issues (quite possibly of my own doing, so please treat the below as conjecture):
ip addr add
i believe the second command should be targetting
ve2
instead ofve1
ping from container
with the ip addr add issue fixed as described, this ping didn't work as the ip is actually the "container" end rather than remote. i think the command should actually be
ping 192.168.1.200
which does work.the ping as written in the book:
ip link set lo up
- expected as this is now able to ping itself (as loopback is down by default in the new net namespace)The text was updated successfully, but these errors were encountered: