0

I am trying to setup a network as displayed in the picture 1 (I forgot to mention that the netmask on all devices is set to 255.255.255.0).

Network setup

I want to ssh to my board (which is running linux) using my MacOSX and for some reason I cannot ping or ssh my Board1/2 using. The setup works perfectly fine (e.g I can both ping and ssh) when I am using a windows/linux pc instead of a Mac so I am pretty sure I am missing some network configuration on the Mac. Also, I have connected one of my boards(board1) to my internet router and I was able to ssh and ping the board. I have tried this setup with Mac's firewall disabled and enabled and I am getting the same result. When I ping the board on my Mac I get:

ping 192.168.1.100
Request timeout for icmp_seq 4

Here is my network configuration for en5:

en5: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
inet 192.168.1.90 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX <full-duplex,flow-control,energy-     efficient-ethernet>)
status: active

and for en0:

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.1.123 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active

I amd using the switch on another project and I know it is fine. Any help/suggestion is highly appriciated.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
maskarih
  • 101

1 Answers1

0

First of all, do not use the same network on two interfaces – the IP routing table has no real way of knowing which hosts are reachable through which interface. It just has two identical routes (192.168.1.0/24 on en0; 192.168.1.0/24 on en5) and ends up choosing the same one every time – you can reach hosts on en0 or en5, but not both.

If both ports must belong to the same subnet, use an Ethernet-layer bridge.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • Thanks, but what do you mean by192.168.1.0/24? you mean IPs ranging from 0-24? I will try with a separate network but I was hoping to find a way with this setup. – maskarih Dec 20 '16 at 14:59
  • I mean [/24 as in the network size](http://www.sput.nl/internet/cidr-routing.html) – also known as "net mask 255.255.255.0". If you want to keep one network, I repeat my suggestion to configure a bridge across the two Ethernet ports. – u1686_grawity Dec 20 '16 at 15:43
  • Ok,I got it working! by changing the network IP. Now I am using 192.168.2.* I was not able to use the bridge because en0 is already used by another bridge. Now since my development tools for my embedded boards are only available in linux, I installed linux on virtualbox with my mac being the host. I configured the eth0 on the linux machine to be 192.168.2.60 and I used bridge adapter for the interface type for en5. Now I am facing the same problem but this time on my guest linux (e.g i am not able to ping 192.168.2.90-100) but again I am still able to ping both boards from my mac to the boards – maskarih Dec 21 '16 at 06:28