Doesn't work network in host

artem1992

New Member
Dec 21, 2015
6
0
1
30
My network configuration (i found this in next topic):

To /etc/iproute2/rt_tables file i added:
Code:
100  vlan169

/etc/network/interfaces:

Code:
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
        address 192.168.0.103
        netmask 255.255.255.0
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto vmbr2
iface vmbr2 inet static
        address  192.168.169.254
        netmask 255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        post-up ip rule add from 192.168.169.0/24 iif venet0 table vlan169
        post-up ip route add default via 192.168.0.1 dev vmbr2 table vlan169
        post-up ip route flush cache
        pre-down ip rule del from 192.168.169.0/24 iif venet0 table vlan169
        pre-down ip route del default via 192.168.0.1 dev vmbr2 table vlan169
        pre-down ip route flush cache

Than i create windows vm, did set bridge mod (bridge vmbr2) and set up network in windows:

0ExTPCk.png


But ping 192.168.169.245 doesn't work. Please help me. What i did wrong?
 
i'm no expert on Linux-native bridges (i only do openvswitch with proxmox exclusively and get someone else to do the complicated linux-native networking stuff if that ever comes up), so this might not be expert testimony ...

- but did you just assign the same IP for the bridge AND the VM's vNic ?
- And more to the point, vmbr2 is not connected to a physical nic ?

have a look here for examples:
https://pve.proxmox.com/wiki/Network_Model
https://pve.proxmox.com/wiki/Open_vSwitch

ps.: with next topic you mean this one https://forum.proxmox.com/threads/add-vlans-without-reboots-network-restarts.25241/ right ? the link provided there for vlans refers to Pve 1.x / 2.x
 
I do not know how you'd do ip-forwarding on a linux-native bridge. As i said, not my strong suit.

This is a local Machine ? Not running in a datacenter like hetzner/ovh ? So you can run multiple macs from the eth0/vmbr0, right?

i'd then do the following:
  1. attach your physical eth0 to vmbr0. (linux native or openvswitch)
  2. Add a IP for your NODE so you can access the GUI.
  3. Setup your VM
    1. for each vNIC do the following via GUI:
      1. add a vNic
      2. Assign it a Vlan-tag "e.g. 169" if your into vlan tagging, leave it out if your not into tagging.
      3. Assign it a Bridge "vmbr0"
  4. Restart your VM.
  5. Configure your Windows VM
    1. set your ipaddress 192.168.x.y
    2. set the appropriate subnet add your gateway 192.168.0.1


That should work. for a single Physical Nic. For multiple Nics you can do bonding / multiple bridges.
 
This is a local Machine ? yes
Please, can you explain what you mean:
  1. attach your physical eth0 to vmbr0. (linux native or openvswitch)
  2. Add a IP for your NODE so you can access the GUI.
So this is my config, is it correct?
qj6QcOI.png

Code:
auto lo
iface lo inet loopback

iface lo inet loopback

iface eth0 inet manual


auto vmbr0
iface vmbr0 inet static
        address  192.168.0.103
        netmask  255.255.255.0
        gateway  192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

Setup your VM

eeXiB0q.png

Z45RZzU.png


trying do ping:
uz9MuWK.png

 
that is "odd".

I assume you know about this gem:
The network configuration is usually changed using the web interface. Changes are stored to /etc/network/interfaces.new, and are activated when you reboot the host. Actual configuration resides in /etc/network/interfaces. The following examples list the contents of that file.

Q0: have you done "ifconfig" on your Proxmox-node to verify you have only that interface up with the setting you posted ? Cannot tell from your screenshot if you restarted networking or not.
Q1: from VM can you ping your proxmox host ? as in 192.168.0.103 ?
Q2: You installed your virtio-network drivers i assume (otherwise you'd not have that virtual interface in windows)
Q3: the mac-Address is unique for your network right ?
Q4: what is the output of ifconfig equivalent on windows ?
Q5: which windows version is that ? can not tell from screenshot.
Q6: your Proxmox-node can ping 192.168.0.1 and it is the gateway, right ?
 
Last edited:
thank you for your help

Q0 - i did restart

Code:
root@pve:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 20:cf:30:12:18:c2
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19500 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14266 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5148947 (4.9 MiB)  TX bytes:7284939 (6.9 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16155 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16155 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5332995 (5.0 MiB)  TX bytes:5332995 (5.0 MiB)

tap101i0  Link encap:Ethernet  HWaddr 72:56:6b:e3:43:a6
          inet6 addr: fe80::7056:6bff:fee3:43a6/64 Scope:Link
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:267 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:1258 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:32196 (31.4 KiB)  TX bytes:168 (168.0 B)

vmbr0     Link encap:Ethernet  HWaddr 20:cf:30:12:18:c2
          inet addr:192.168.0.103  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::22cf:30ff:fe12:18c2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17240 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12115 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3619948 (3.4 MiB)  TX bytes:7127871 (6.7 MiB)

q1: from VM can you ping your proxmox host ? as in 192.168.0.103 ?
No

Q2: You installed your virtio-network drivers i assume (otherwise you'd not have that virtual interface in windows)

yes

Q3: the mac-Address is unique for your network right ?
yes

Q4: what is the output of ifconfig equivalent on windows ?
cNujcsw.png

also i tried set gateway 192.168.0.103 doesn't work too (
Q5: which windows version is that ? can not tell from screenshot.
windows XP
Q6: your Proxmox-node can ping 192.168.0.1 and it is the gateway, right ?
yes i can ping and it is gateway.

thanks
 
Last edited:
Q7: I can not remember, does Windows XP require a reboot after you change the network settings ?
Q8 It says "local area connection 4" - are there any other "active adapters" ?
Q9: i'd say your /etc/network/interfaces on your Proxmox-node is setup correctly. Can you try and create a LXC and assign it an ip of 192.168.0.x/24 start it and ping it from your proxmox-node ?
Q10: can you stop the windows firewall ? According to a couple of threads i found it blocks pings by default :)
Q11: i just stumbled upon this: https://pve.proxmox.com/wiki/Windows_XP_Guest_Notes suggestion: setup a second vNic for that VM. use different mac and choose rtl8139 instead of virtio. If you have a DHCP server in your network, see if you can get that Vm to get a ip auto-assigned. If so, your virtio-driver might not be working.
 
Last edited:
Q8 It says "local area connection 4" - are there any other "active adapters" ?

cNujcsw.png


no
Q7: I can not remember, does Windows XP require a reboot after you change the network settings ?
no

Q9: i'd say your /etc/network/interfaces on your Proxmox-node is setup correctly. Can you try and create a LXC and assign it an ip of 192.168.0.x/24 start it and ping it from your proxmox-node ?

Code:
root@pve:~# ping 192.168.0.105
PING 192.168.0.105 (192.168.0.105) 56(84) bytes of data.
64 bytes from 192.168.0.105: icmp_seq=1 ttl=128 time=2.46 ms
64 bytes from 192.168.0.105: icmp_seq=2 ttl=128 time=1.59 ms
64 bytes from 192.168.0.105: icmp_seq=3 ttl=128 time=2.02 ms
^C
--- 192.168.0.105 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.599/2.031/2.469/0.357 ms
ping from pve server to windows vm works

ok i will try install linux vm
 
Well firewall is stopped.

: i just stumbled upon this: https://pve.proxmox.com/wiki/Windows_XP_Guest_Notes suggestion: setup a second vNic for that VM. use different mac and choose rtl8139 instead of virtio. If you have a DHCP server in your network, see if you can get that Vm to get a ip auto-assigned. If so, your virtio-driver might not be working.

thanks i will try this
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!