1

Using ubuntu 16.04.

My goal is to run a small service inside of a network namespace(my-network) and communicate with that service from the host.

I have created a linux bridge, a new network namespace, and a pair of virtual ethernet devices.

ifconfig from the host:

my-bridge Link encap:Ethernet  HWaddr 26:d3:9c:ae:c3:4c
      inet addr:10.0.4.0  Bcast:10.0.4.255  Mask:255.255.255.0
      inet6 addr: fe80::ccce:74ff:fe32:c59f/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:91 errors:0 dropped:0 overruns:0 frame:0
      TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:6052 (6.0 KB)  TX bytes:2034 (2.0 KB)

veth-device Link encap:Ethernet  HWaddr 26:d3:9c:ae:c3:4c
      inet6 addr: fe80::24d3:9cff:feae:c34c/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:8 errors:0 dropped:0 overruns:0 frame:0
      TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:648 (648.0 B)  TX bytes:1152 (1.1 KB)

ifconfig from my-network:

eth0  Link encap:Ethernet  HWaddr fa:aa:f3:3a:d1:c5
      inet addr:10.0.4.4  Bcast:0.0.0.0  Mask:255.255.255.0
      inet6 addr: fe80::f8aa:f3ff:fe3a:d1c5/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:20 errors:0 dropped:0 overruns:0 frame:0
      TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:1152 (1.1 KB)  TX bytes:648 (648.0 B)

I have brought both ethernet interfaces up, and attached the interface on the host to the bridge. However, I can't seem to connect to the network interface inside my-network.

me @ ip $ ping 10.0.4.4
PING 10.0.4.4 (10.0.4.4) 56(84) bytes of data.
From 10.0.4.0 icmp_seq=1 Destination Host Unreachable
From 10.0.4.0 icmp_seq=2 Destination Host Unreachable

It seems like the communication can get to the bridge but no further.

Wondering if I am missing some sort of dnsmasq configuration or routing table entry.

Help appreciated. Thanks!

0

I attached the ip address 10.0.4.0 to the bridge. The first and last address in the last quartile of an ip address are reserved for the network identifier and the broadcast address (10.0.4.1 and 10.0.4.255), respectively. Once I moved the bridge to 10.0.4.1 the network topology worked.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.