Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have 2 NICs: eth0 & eth1 on a host OS which runs some VMs (LXC) under it.

  • The hosts eth0 is connected to a private network and configured as the primary interface.
  • The hosts eth1 is connected to the DMZ.
  • Each VM has a static IP that bridges to eth0 on the host.
  • Some VMs, which need a public IP, have a 2nd virtual NIC bridged to the hosts eth1.

Question:

  • Can I remove the IP address on the hosts eth1 NIC? The host has absolutely no need for a public IP address, I only need to bridge the interface to selected guest VMs. It's the guest VM which will host a service on whatever public IP its assigned.

Cursory attempts at removing the IP on the hosts eth1 have generated errors.

share|improve this question
    
You might be interested in this question. –  TNW Apr 16 '13 at 11:17
1  
Have generated what errors? –  Hauke Laging Apr 16 '13 at 11:37

2 Answers 2

It should work, as long the interface is still up

ifconfig eth0 | grep UP
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

the bridge is a "switch" and it doesn't need to have one IP. But please check if you have firewall rules in eth0:

iptables -l -vnx

if rp_filter is off

 cat /proc/sys/net/ipv4/conf/eth1/rp_filter
 0

and if all fails, try to enable the STP:

 brctl stp br0 on

and enable the promisc mode in that interface:

  ifconfig eth0 promisc 

(ifconfig eth0 -promisc to remove it)

Of course, also check if there is no other config using that removed IP :)

share|improve this answer

Yes it works.

It depends on your operating system on how to configure such a network setup in a way that the bridge is up and running after a reboot in that constellation.

From my experience:

  • SLES10 SP4: Works - do not use yast2
  • SLES11 SP2: Works - use mv to rename the bridge to something useful after setup with yast2
  • Ubuntu 10.04 LTS: Works only manually - Ubuntu keeps setting a dummy-IP.
  • RedHat 5: Works - use vi.
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.