Page 1 of 1
Network setup
Posted: Mon Jul 28, 2014 4:57 pm
by airizar
I've managed to use redpitaya connected directly to the ethernet connector of my PC but I would like to have it connected to my LAN network using a static configuration.
I follow the instructions of the manual (change the /opt/etc/network/interfaces file, etc)
I got this error when booting the Zynq
++ Bringing up eth0
ip: either "local" is duplicate, or "/24" is garbage
ip: RTNETLINK answers: Network is unreachable
The output of ifconfig is
eth0 Link encap:Ethernet HWaddr 00:26:32:F0:03:FB
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:85 errors:0 dropped:28 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8957 (8.7 KiB) TX bytes:0 (0.0 B)
Interrupt:54 Base address:0xb000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 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)
Any idea?
Regards
Andoni
Re: Network setup
Posted: Wed Jul 30, 2014 1:10 am
by hmaarrfk
Can you post your configuration file?
Re: Network setup
Posted: Wed Jul 30, 2014 11:14 am
by airizar
Yes, here it is
the XXX.YYY.ZZZ in the IP addresses is to not to disclose my address domain
Regards
Andoni
# Red Pitaya wired network (1000Base-T) configuration
# Choose one of the following:
# dhcp - Use DHCP + Zeroconf/avahi fallback.
# static - Use Static IP, NETMASK & GATEWAY as specified below.
NETWORK=static
# Static network configuration parameters (active if NETWORK=static)
IP=XXX.YYY.ZZZ.188
NETMASK=255.255.255.0
GATEWAY=XXX.YYY.ZZZ.1
Re: Network setup
Posted: Wed Jul 30, 2014 3:02 pm
by hmaarrfk
Sorry could you please post the fill file. You can change your IP address to XXXXXXX but there are some other lines in the file that are of importance. I just don't want to claim that it is a bigger problem before ruling out the easy solution.
Also when you post things, can you enclose them in [ code ] [ /code ](without the space) blocks. It makes it easier to read.
Re: Network setup
Posted: Wed Jul 30, 2014 3:07 pm
by hmaarrfk
hahaha, ok, I see your mistake.
The file you want to edit it:
Code: Select all
OS/filesystem/etc/network/interfaces
and not
For reference, I have never modified the config file and have my static IP setup correctly.
You can also modify it on the SD directly.
ediit:
So that network/config file is actually ignored by the final linux OS. You can see that because the files that are added to the OS can be found in OS/buildroot/overlay and there is no mention of netowk/config in there. By contrast, netowrk/interfaces links to /opt/etc/network/interfaces which is where your SD card gets mounted.
Re: Network setup
Posted: Wed Jul 30, 2014 4:22 pm
by airizar
The file that I did modify was "interfaces" but I thought you were referring to "config"
Code: Select all
# $Id: interfaces 955 2014-01-16 13:15:20Z ales.bardorfer $
#
# Red Pitaya network configuration
#
###########################
# lo: Loopback interface #
###########################
auto lo
iface lo inet loopback
######################################
# eth0: Wired Ethernet - 1000Base-T #
######################################
#
# Uncomment only one: dynamic or static configuration.
#
# Dynamic (DHCP) IP address
# iface eth0 inet dhcp
# udhcpc_opts -t7 -T3
# Static IP address
# Don't forget to set the static DNS IP in sd:/etc/init.d/rcS too.
iface eth0 inet static
address XXX.YYY.ZZZ.188
netmask 255.255.255.0
gateway XXX.YYY.ZZZ.1
################################
# wlan0: Wireless USB adapter #
################################
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -B -D wext -i wlan0 -c /opt/etc/network/wpa_supplicant.conf
post-down killall -q wpa_supplicant
udhcpc_opts -t7 -T3
Re: Network setup
Posted: Wed Jul 30, 2014 4:41 pm
by hmaarrfk
Your config looks good. I just wanted to make sure of that sneaky line above "address XXX.YYY...".
That is all I modified. I didn't even bother changing the rc.S because I wasn't expecting my RedPitaya to connect out.
Unless somebody else has a smart answer, I would just tripple check that:
1. The /etc/network/interfaces file is actually updated in the SD card itself
2. Your network is plugged in before you turn on the RedPitaya.
You can also try a different cable :S