# RancherOS Networking

**URL:** https://forums.suse.com/t/rancheros-networking/344
**Category:** RancherOS
**Created:** [August 27, 2015, 6:39pm UTC](https://forums.suse.com/t/rancheros-networking/344 "2015-08-27T18:39:43Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sjkeerthi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sjkeerthi/32/2878_2.png) [@sjkeerthi](https://forums.suse.com/u/sjkeerthi)
#### Post date: [August 27, 2015, 6:39pm UTC](https://forums.suse.com/t/rancheros-networking/344/1 "2015-08-27T18:39:43Z")

</div>

Hi All,

First I would like to appreciate its a very great work.

How could I can assign my routeable ip address to the docker0 interface of rancheros so that the containers I create can access directly without port forwarding to the base host.

For example If I would like to host multiple apache for the customer and want to access directly of my network routeable ip address,

---

<div class="post-metadata">

### Author: ![wlan0](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/wlan0/32/49_2.png) [@wlan0](https://forums.suse.com/u/wlan0)
#### Post date: [August 28, 2015, 4:12pm UTC](https://forums.suse.com/t/rancheros-networking/344/2 "2015-08-28T16:12:48Z")

</div>

docker0 is a bridge interface.

If you’re interested in routing to a container using the host’s ip address, then you should start the container in host networking mode. In this mode, the container inherits the host’s networking stack. You can specify it under the “networking” tab while starting a new container using rancher UI.

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/1X/78ec5b21601e4684ec50da253a97476325a2c491.png)

---

<div class="post-metadata">

### Author: ![sjkeerthi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sjkeerthi/32/2878_2.png) [@sjkeerthi](https://forums.suse.com/u/sjkeerthi)
#### Post date: [September 19, 2015, 3:54pm UTC](https://forums.suse.com/t/rancheros-networking/344/3 "2015-09-19T15:54:11Z")

</div>

This options really didn’t help me out since it will refer to the base host of the ip address.

I really want real network routeable IP address to my container.

For example:

My RancherOS eth0 192.168.100.2 Netmask 255.255.255.0 GW 192.168.100.1

Now I want docker0 to be 192.168.100.3 I tried with below command.

sudo ros config set user\_docker.extra\_args [–fixed-cidr,192.168.100.0/24]  
sudo ros config set network.interfaces.docker0.address 192.168.100.3/24  
sudo ros config set network.interfaces.docker0.bridge true

After I reboot the machine and I could not able to access it docker interface or could not able to ping from the network.

```
      In that case How do I perform the same scenario in RancherOS

```

[https://jpetazzo.github.io/2013/10/16/configure-docker-bridge-network/](https://jpetazzo.github.io/2013/10/16/configure-docker-bridge-network/)

ip link set dev docker0 down  
ip link add br0 type bridge  
ip addr add 192.168.101.10/24 dev br0  
ip link set br0 up  
docker -d -b br0

How to set bridge mode on RancherOS.

If I follow the same the behaviour is strange.

The simple thing each container should get ip address from my route ip address

---

<div class="post-metadata">

### Author: ![pwFoo](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pwfoo/32/2884_2.png) [@pwFoo](https://forums.suse.com/u/pwFoo)
#### Post date: [October 2, 2016, 6:46pm UTC](https://forums.suse.com/t/rancheros-networking/344/4 "2016-10-02T18:46:35Z")

</div>

Any solution to use a host bridge interface instead of the default docker0 with RancherOS?

---

<div class="post-metadata">

### Author: ![pwFoo](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pwfoo/32/2884_2.png) [@pwFoo](https://forums.suse.com/u/pwFoo)
#### Post date: [October 7, 2016, 5:52pm UTC](https://forums.suse.com/t/rancheros-networking/344/5 "2016-10-07T17:52:57Z")

</div>

> Any solution to use a host bridge interface instead of the default docker0 with RancherOS?

docker network with macvlan driver is the solution 😉 Use host interface via docker macvlan network works fine. With and without using a vlan tag.

---

<div class="post-metadata">

### Author: ![Guido\_Steiner](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/guido_steiner/32/5862_2.png) [@Guido\_Steiner](https://forums.suse.com/u/Guido_Steiner)
#### Post date: [October 21, 2016, 7:40am UTC](https://forums.suse.com/t/rancheros-networking/344/6 "2016-10-21T07:40:10Z")

</div>

how can i add a service to a macvlan in the rancher gui?

---

<div class="post-metadata">

### Author: ![joshwget](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/joshwget/32/704_2.png) [@joshwget](https://forums.suse.com/u/joshwget)
#### Post date: [October 26, 2016, 5:14pm UTC](https://forums.suse.com/t/rancheros-networking/344/7 "2016-10-26T17:14:45Z")

</div>

You should ask this in the Rancher forums. This issue just applies to RancherOS.
