# [SOLVED] failing to settle tun/tap

## lalebarde

Hi all,

I am trying to configure tun/tap in the frame of the use of a virtual machine (kvm-qemu), following the gentoo doc here : http://en.gentoo-wiki.com/wiki/KVM#Enabling_the_access_to_Internet. I have not yet tried the virtual machine, but after these configuration changes, I have no more internet on my host.

Here is my "normal" /etc/conf.d/net :

```
dns_domain_lo="MAISON"

config_eth0=( "192.168.0.10 netmask 255.255.255.0 brd 192.168.0.255" )

routes_eth0=( "default via 192.168.0.1" )

dns_servers_eth0="212.27.40.240 212.27.40.241"
```

And the new one :

```
dns_domain_lo="MAISON"

bridge_br0="eth0 tap0"

brctl_br0=( "setfd 0" "sethello 0" "stp off" )

rc_need_br0="net.tap0"

#  host system is a static address at 192.168.0.10 with dns server at 1? and a router at 1

config_br0=( "192.168.0.10/24" )

routes_br0=( "default via 192.168.0.1" )

dns_domain_br0="example.com"

dns_servers_br0="192.168.0.1"

dns_search_br0="example.com"

config_tap0=( "null" )

tuntap_tap0="tap"

tunctl_tap0="-u chronos"

mac_tap0="52:54:00:12:34:56"

config_eth0=( "null" )
```

I am not sure what to put for dns_servers_br0.

I did not followed the masquerading option. I modified also /etc/sysctl.conf as requested, and added the scripts /etc/init.d/bridge_forward and /etc/init.d/kvm as suggested, with :

```
NUM_OF_DEVICES=1

USERID="chronos"

        /sbin/ifconfig br0 192.168.0.10 netmask 255.255.255.0 up
```

I also did :

```
rc_update add kvm default

rc_update add bridge_forward default
```

My ifconfig ilooks good (unfortunatly I did not save a trace).

Any clue (I am a network noob) ?Last edited by lalebarde on Mon Nov 08, 2010 8:46 am; edited 1 time in total

----------

## Logicien

Hi,

your problem look like being related to your DNS configuration. Do you receive the IP address when you do

```
host forums.gentoo.org 212.27.40.240
```

Is the machine/router 192.168.0.1 act as an available DNS server or it is not configure/capable for/of DNS serving? You may change

```
dns_servers_br0="192.168.0.1"
```

to

```
dns_servers_br0="212.27.40.240 212.27.40.241"
```

to go back to your previous DNS configuration which are the DNS servers of your ISP. I think you should remove the lines

```
dns_domain_br0="example.com" 

dns_search_br0="example.com"
```

as they are just examples and do not represent any real domain. Until you use tap0 for virtual networking with Qemu or need IP translation, you do not need masquerading.

----------

## lalebarde

 :Very Happy:   :Very Happy:   :Very Happy:   Thank you very much Logicien - it now works   :Very Happy:   :Very Happy:   :Very Happy: 

----------

