Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set up a working vm with public ip adress, but I can't get it working.

Here's my config :

Network:

range: 101.110.22.41 - 45

netmask: 255.255.255.248

gateway: 101.110.22.46

Host (CentOS):

eth0 is bridged with br0, it has no ip address configured.

br0:

ipaddr: 101.110.22.41

gateway: 101.110.22.46

netmaks: 255.255.255.248

dns: 8.8.8.8

arp: yes

Guest (debian):

eth0:

ipaddr: 101.110.22.42

gateway: 101.110.22.46

netmask: 255.255.255.248

dns: 8.8.8.8

I accepted forwarding in iptables by adding a rule for the Bridge with the following line:

iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT

When I ping the gateway from the Guest, I get the message "network is unreachable"

But the Host and the Guest can ping each other.

The Host can ping 8.8.8.8 and i can do my yum update.

I can also connect with ssh from a distant computer.

I tried the same config in a local network and it worked perfectly ... (for the Guest)

Can someone help me in this matter ?

Thanks a lot !

PS: Sorry for my poor english.


Still "destination network unreachable" with iptables disabled.

Here's the 'brctl show' output:

bridge name     bridge id               STP enabled     interfaces
br0             8000.902b344fd4b2       no              eth0
                                                        vnet0
                                                        vnet1
virbr0          8000.52540073d7cb       yes             virbr0-nic

Yes I have 2 guests and the two of them have the same issue.

Another strange thing, after some time, the connexion's lost and I have to reboot or do "service network restart" ...

Here's the config files for eth0 and br0:

ifcfg-br0:

DEVICE=br0
TYPE=Bridge
DELAY=0
ONBOOT=yes
BOOTPROTO=static
IPADDR=101.110.22.41
NETMASK=255.255.255.248
GATEWAY=101.110.22.46
DNS1=8.8.8.8
PEERDNS=yes
NM_CONTROLLED=no
ARP=yes

ifcfg-eth0:

DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
HWADDR=90:2B:34:4F:D4:FF
BRIDGE=br0
ARP=yes

Also, i have 2 interfaces, one configured for the local network and this one for the public ip.

They have exactly the same config files, only the adresses and gateway changed. But for my test, I put down the one for the local network.


Some fresh news, it finally worked !!

I only added the following in ifcfg-eth0 on the Host:

VLAN=yes

But, there's still something strange.

When i boot my Host it can access internet.

Then i boot my guest and it can access internet.

But, when my guest is booted the host is the one answering "network unreachable" to my ping.

For test purpose it's ok, but when we will put it in prod we need to access the host ...

Do you have an idea ?

share|improve this question
    
That seems about right. There are two tap interfaces there (vnet0 & vnet1) ...so you have 2 guests instead of one? Can you also post the output of /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-br0 ? –  Craconia Apr 30 '13 at 11:17

1 Answer 1

Can you try it with iptables disabled?

service iptables stop

...just to make sure if this is a firewall issue or not.

Also, please post the output of:

brctl show
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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