network question

bread-baker

Member
Mar 6, 2010
432
0
16
pve host is 192.168.1.10

pve host has 2 nics, only one in use now.

gateway is 192.168.1.2

is it possible for ct's to use 10.100.0.0 network and access wan ?

if so how do i set that up?
 
almost got it working.
for the ct, does it need to use veth or will venet work?

I'm using venet but can not ping wan targets
 
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  192.168.1.10
        netmask  255.255.255.0
        gateway  192.168.1.2
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp


auto vmbr0
iface vmbr0 inet static
        address  10.100.100.10
        netmask  255.255.0.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
 
ok, I have another question, and I won't be able to work on this until later.....
on the wiki:
Code:
auto vmbr1
iface vmbr1 inet static
        address  10.10.11.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s '10.10.11.0/24' -o eth0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.11.0/24' -o eth0 -j MASQUERADE

the address 10.10.11.1 is on a different subnet then vmbr0 : 10.10.10.1

is that correct or a wiki typo?

and I assume I use vmbr0 + vmbr1 ?


and if I want 10.100.100.0 in the ct's then what should I use in vmbr1 ?

thanks !
 
I still can not ping from ct to wan. ct to host is ok .

ct has address 10.100.100.28 using venet

host:
Code:
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  192.168.1.10
        netmask  255.255.255.0
        gateway  192.168.1.2
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp


auto vmbr0
iface vmbr0 inet static
        address  10.100.100.10
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0

##  NAT:
auto vmbr1
iface vmbr1 inet static
        address  10.100.11.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s '10.100.11.0/24' -o eth0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.100.11.0/24' -o eth0 -j MASQUERADE

any suggestion?
 
this works so far:
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  192.168.1.10
        netmask  255.255.255.0
        gateway  192.168.1.2
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp


##  NAT:
auto vmbr0
iface vmbr0 inet static
        address  10.100.100.10
        netmask  255.255.0.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s '10.100.0.0/16' -o eth0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.100.0.0/16' -o eth0 -j MASQUERADE

so the ct and download apt updates .

the wiki info was a little confusing as the nat example uses a different subnet then the routed section..
 
Last edited: