-2

I have an interface eth0 which I add to bridge (br-lan).

Then I want to give eth0's IP to br-lan and bring eth0 to state with no IP for it.

I did following steps but after some interval eth0 gets another DHCP IP different from br-lan but within same subnet.

# brctl addbr br-lan
# brctl addif br-lan eth0
# ifconfig br-lan up
# ifconfig
br-lan    Link encap:Ethernet  HWaddr d0:39:72:54:c5:93  
      inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
      inet6 addr: fd00:aaaa::d239:72ff:fe54:c593/64 Scope:Global
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:545 errors:0 dropped:0 overruns:0 frame:0
      TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:44350 (43.3 KiB)  TX bytes:6125 (5.9 KiB)

eth0  Link encap:Ethernet  HWaddr d0:39:72:54:c5:93  
      inet addr:192.168.11.175  Bcast:192.168.11.255  Mask:255.255.255.0
      inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:27 errors:0 dropped:0 overruns:0 frame:0
      TX packets:306 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:5145 (5.0 KiB)  TX bytes:37372 (36.4 KiB)
      Interrupt:40

root@beaglebone:~# ifconfig eth0 0.0.0.0
root@beaglebone:~# ifconfig 
br-lan    Link encap:Ethernet  HWaddr d0:39:72:54:c5:93  
      inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
      inet6 addr: fd00:aaaa::d239:72ff:fe54:c593/64 Scope:Global
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:545 errors:0 dropped:0 overruns:0 frame:0
      TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:44350 (43.3 KiB)  TX bytes:6125 (5.9 KiB)

eth0  Link encap:Ethernet  HWaddr d0:39:72:54:c5:93  
      inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:35 errors:0 dropped:0 overruns:0 frame:0
      TX packets:313 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:6048 (5.9 KiB)  TX bytes:37792 (36.9 KiB)
      Interrupt:40

root@beaglebone:~# dhclient br-lan
root@beaglebone:~# ifconfig 
br-lan    Link encap:Ethernet  HWaddr d0:39:72:54:c5:93  
      inet addr: 192.168.11.192  Bcast:192.168.11.255  Mask:255.255.255.0
      inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
      inet6 addr: fd00:aaaa::d239:72ff:fe54:c593/64 Scope:Global
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:548 errors:0 dropped:0 overruns:0 frame:0
      TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:45134 (44.0 KiB)  TX bytes:9094 (8.8 KiB)

 eth0      Link encap:Ethernet  HWaddr d0:39:72:54:c5:93  
      inet addr:192.168.11.175  Bcast:192.168.11.255  Mask:255.255.255.0
      inet6 addr: fe80::d239:72ff:fe54:c593/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:499 errors:0 dropped:0 overruns:0 frame:0
      TX packets:794 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:42497 (41.5 KiB)  TX bytes:74010 (72.2 KiB)
      Interrupt:40

Does anyone have any idea why eth0 gets back different IP?

My /etc/network/interfaces have no configuration for eth0 DHCP. Infact even if I add following lines to it, eth0 still gets 192.168.11.X IP after I do "dhclient br-lan"

 auto eth0
 iface eth0 inet static
   address 192.168.0.102
   netmask 255.255.255.0
  network 192.168.0.0
  gateway 192.168.0.1

How do I ask eth0 to net get DHCP IP and just stick to no-IP

I am running Debian 7.4 on Beaglebone

Milind Dumbare
  • 2,768
  • 2
  • 16
  • 32

1 Answers1

1

Apparently wicd was reconnecting eth0. Following steps fixed the problem of auto- reconnecting eth0

  1. Change the "auto_reconnect = True" to "auto_reconnect = False" in /etc/wicd/manager-settings.conf

  2. /etc/init.d/wicd restart

Milind Dumbare
  • 2,768
  • 2
  • 16
  • 32
  • 1
    My static ip configuration was overriden by wicd service. I realised this by your answer. Thank you. I just remove wicd service in my case. – Fer Jan 03 '17 at 12:02