0

I am trying to setup 4 network interfaces in Debian virtual machine via Vmware Fusion. I want that each interface gets its ip through DHCP which is on physical network. Access point does see all the NICs on the medium, they are connected to it, but they cannot ping each other and access internet. eth0 was by default and for now all traffic goes through him. I think it maybe because of gw, but don't know how to fix this. Thank you.

eth0      Link encap:Ethernet  HWaddr 00:0c:29:5b:81:fc  
      inet addr:192.168.0.102  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::20c:29ff:fe5b:81fc/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:730 errors:0 dropped:0 overruns:0 frame:0
      TX packets:269 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:144422 (141.0 KiB)  TX bytes:40299 (39.3 KiB)

eth1      Link encap:Ethernet  HWaddr 00:0c:29:5b:81:06  
      inet addr:192.168.0.104  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::20c:29ff:fe5b:8106/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:602 errors:0 dropped:0 overruns:0 frame:0
      TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:120508 (117.6 KiB)  TX bytes:18979 (18.5 KiB)

eth2      Link encap:Ethernet  HWaddr 00:0c:29:5b:81:10  
      inet addr:192.168.0.105  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::20c:29ff:fe5b:8110/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:564 errors:0 dropped:0 overruns:0 frame:0
      TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:110311 (107.7 KiB)  TX bytes:18773 (18.3 KiB)

eth3      Link encap:Ethernet  HWaddr 00:0c:29:5b:81:1a  
      inet addr:192.168.0.106  Bcast:192.168.0.255  Mask:255.255.255.0
      inet6 addr: fe80::20c:29ff:fe5b:811a/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:537 errors:0 dropped:0 overruns:0 frame:0
      TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:102340 (99.9 KiB)  TX bytes:18334 (17.9 KiB)

/etc/network/interfaces

 auto lo
 iface lo inet loopback

 auto eth0
 iface eth0 inet dhcp

 auto eth1
 iface eth1 inet dhcp

 auto eth2
 iface eth2 inet dhcp

 auto eth3
 iface eth3 inet dhcp

route -n

 0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth2
 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3
| improve this question | | | | |
  • What's the OS of the host machine? And is the host connected via wifi or via ethernet? – MariusMatutiae Jan 14 '16 at 7:02
  • What you are trying to do borders non non-sensical (there may be usage cases to justify it, but its unlikely someone who would be doing that would be asking this kind of question on SU. You might want to explain what you are trying to achieve, which will probably yield a better answer. (For example, if you are wanting to use all NICS, you might want to channel bond the interfaces. If you want multiple IP's for the machine as well, you might want to bring up virtual Interfaces. If you want to have VM's, you might want to create a bridge and let the VM's make DHCP requests directly) – davidgo Jan 14 '16 at 7:50
  • @MariusMatutiae, the host is OS X. connected via wifi. – cre8eve Jan 14 '16 at 16:30
  • @davidgo, I want a software from VM, that takes interface as argument and makes requests through it. I can run multiple instances of the program, but if interface is already used by the program, I can not run it through the same interface. So I thought creating some more NICs would solve the problem. What do you think? – cre8eve Jan 14 '16 at 16:33
0

Your idea is quite creative, but probably not the ideal way of setting the network up.

You will probably find that its not working because of Reverse Path Filtering. '

To fix this, edit /etc/sysctl.conf, and search for "rp_filter". Change any instances of "net.ipv4.conf.XXXXX.rp_filter" from 1 to 0 (You may have 1 or more entries). Once you have done this run "sysctl -p" to reload the file.

If the program supports it, a better way to solve this problem, rather then to bring up multiple NICS is to bring up a single NIC with multiple sub-interfaces on it. You can do this by defining eth0:X (where X is the sub-interface number) rather then ethX.

| improve this answer | | | | |
  • thank you! for this very software net.ipv4.conf.XXXXX.rp_filter set to 0 didn't work, but setting it to 2 did the job – cre8eve Jan 15 '16 at 1:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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