0

I have a arm platform with gigabit ethernet that I would like to connect to my ubuntu machine to test the ethernet ports.

Networking is not my strong suit.

I've modified /etc/network/interfaces on the embedded system thusly:

# Configure Loopback
auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.0

And on my ubuntu machine I have set (through the network connections window):

IP: 192.168.1.1
netmask: 255.255.255.0
gateway: 192.168.1.0

When I test the connection, no connection is recognized on the arm system.

The eth0 port produces this output:

eth0: link up, 10 Mb/s, half duplex, flow control disabled        
ip: RTNETLINK answers: Invalid argument 

ifconfig displays:

# ifconfig                                                                                             
eth0      Link encap:Ethernet  HWaddr 02:50:43:C5:C5:75                                                
          inet addr:192.168.1.2  Bcast:0.0.0.0  Mask:255.255.255.0                                     
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                           
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                           
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                         
          collisions:0 txqueuelen:1000                                                                 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                                       
          Interrupt:11                                                                                 

lo        Link encap:Local Loopback                                                                    
          inet addr:127.0.0.1  Mask:255.0.0.0                                                          
          UP LOOPBACK RUNNING  MTU:16436  Metric:1                                                     
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                                           
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                                         
          collisions:0 txqueuelen:0                                                                    
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)   

Can anyone point out my most likely obvious mistake? Let me know if I need to provide more information.

EDIT: I'm running busybox 1.18.5 on the embedded system.

EDIT 2:

# route                                                                                                
Kernel IP routing table                                                                                
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface                          
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0  
reign_man
  • 569
  • 2
  • 8
  • 21
  • 1
    Can you provide the output of "route"? – imreal Oct 23 '12 at 19:02
  • added. Gateway is empty...hmm – reign_man Oct 23 '12 at 19:05
  • 1
    The asterisk means it is directly connected (with no hops), but it has no default route, how are you testing the connection? is 192.168.1.0 the ip of the interface on the switch? – imreal Oct 23 '12 at 19:10
  • I want to set the connection up such that I can ping both ways. As I understand it 192.168.1.0 should be the default ip for the switch. I am unsure how to verify the address of the switch. – reign_man Oct 23 '12 at 19:20
  • The switch (assuming it is a layer 3) should have a vlan with a specific ip and configured for the ports (physical) where the embedded system and the pc are connected. To see a list of ips depending on the switch, it might be "show ip", there you would see the vlan, then you could type "show vlans " to see the ports. – imreal Oct 23 '12 at 19:43
  • Hi @reign_man, may you please connect the embedded device directly to your ubuntu PC and do the ping test. Your `ifconfig` command show that there is no RX or TX packet – Dien Nguyen Nov 01 '12 at 01:34

1 Answers1

1

This is bad

auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.0

192.168.1.0 is your network address. For sure it cannot be your gateway. Usually you have configuration like this

auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255

where the latter two can automatically be calculated from the address and the netmask and are therefore not written in the config file

Ottavio Campana
  • 4,088
  • 5
  • 31
  • 58