I have one of these routers I attempted to upload firmware from the gui and now I cannot access it and no wifi networks show up.
I can access the serial console and attempted to run a TFTP server from my pc in order to re-flash but it just times out when I try to load the firmware from the server.
I have the IP of the server set to 0.0.0.0:69 when I try to set it to 10.10.10.3 (per the wiki) The server on my pc won’t start and gives an error. I know it’s probably a network setting that won’t let me set the correct ip address, just not sure where to go from here. Any help is appreciated.
You need to set up your PC to be on that IP address first, TFTP doesn’t magically listen to a particular IP, you need to configure the PC with that IP.
ip link set eth0 up ip addr add 10.10.10.3/24 dev eth0 ip addr add 10.10.10.1/24 dev eth0
Then you can start the TFTP server on the interface:
dnsmasq -d --port=0 --enable-tftp --tftp-root=/path/to/tftp/root -i eth0
I was correct that it is a networking error
cannot bind to local IPv4 socket: Cannot assign requested address
current ifconfig says:
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 169.254.210.0 netmask 255.255.0.0 broadcast 169.254.255.255 inet6 fe80::9a40:bbff:fe28:459b prefixlen 64 scopeid 0x20<link> ether 98:40:bb:28:45:9b txqueuelen 1000 (Ethernet) RX packets 15 bytes 900 (900.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1466 bytes 492951 (492.9 KB) TX errors 0 dropped 78 overruns 0 carrier 0 collisions 0
deleted by creator
cannot bind to local IPv4 socket: Cannot assign requested address
inet 169.254.210.0
Yeah. That’ll be that you’re needing an interface with that address assigned.
ifconfig
Going from memory, I believe that if you’ve got
ifconfig
available and this is a Linux system and you need to keep the address on the current interface to keep the system connected to the Internet or something, you can use something likeifconfig enp7s0:0 10.10.10.3
to use an interface alias, use both addresses (169.254.210.0 and 10.10.10.3) at the same time. Might also needifconfig enp7s0:0 up
after that. That being said, (a) I don’t think that I’ve set up an interface alias in probably a decade, and it’s possible that’s something has changed, (b) that’s a bit of additional complexity, and if you aren’t super familiar with Linux networking, you might not want to add more complexity if you don’t mind dropping just setting the address on the interface to something else.Probably an iproute2-based approach to do this too (the
ip
command rather than theifconfig
command) but I haven’t bothered to pick up iproute2 equivalents for a bunch of stuff.EDIT: Sounds like you can assign the address and bring the interface alias up as one step (or could a decade ago, when this comment was written):
To setup eth0:0 alias type the following command as the root user:
# ifconfig eth0:0 192.168.1.6 up
So probably give
ifconfig enp7s0:0 10.10.10.3 up
a try, then see if the TFTP server package can bind to the 10.10.10.3 address.An apipa address is a sign that networking is not working as intended. This should be resolved first before assigning a class C private addr manually.
You’ve got your network adapter set up to get an address from DHCP. If you need to host the server on 10.10.10.3, you need a network adapter set to that IP. the server can’t bind to 10.10.10.3 if no adapter is set to that IP.
I haven’t done anything with OpenWRT for a lomg time, but…
I have the IP of the server set to 0.0.0.0:69 when I try to set it to 10.10.10.3 (per the wiki) The server on my pc won’t start and gives an error.
I’m pretty sure that you can’t use all zeroes as an IP address.
kagis
https://en.wikipedia.org/wiki/0.0.0.0
RFC 1122 refers to 0.0.0.0 using the notation {0,0}. It prohibits this as a destination address in IPv4 and only allows it as a source address during the initialization process, when the host is attempting to obtain its own address.
As it is limited to use as a source address and prohibited as a destination address, setting the address to 0.0.0.0 explicitly specifies that the target is unavailable and non-routable.
You probably need to figure out why your TFTP server is unhappy with 10.10.10.3, and there’s not enough information here to provide guidance on that. I don’t know what OS or software package you’re using or the error or the network config.
It may be that you don’t have any network interface with 10.10.10.3 assigned to it, which I believe might cause the TFTP server to fail to bind a socket to that address and port when it attempts to do so.
If you are manually invoking the TFTP server as a non-root user and trying to bind to port 69, and this is a Linux system, it will probably fail, as ports below 1024 are privileged ports and processes running as ordinary users cannot bind to them. That might cause a TFTP server package to bail out.
But I’m really just taking wild stabs in the dark, without any information about the software involved and the errors you’re seeing. I would probably recommend trying to make 10.10.10.3 work, though, not 0.0.0.0.
If this is a Linux system, you might use a packet sniffer on the TFTP host, like Wireshark or tcpdump, to diagnose any additional issues that come up, since that will let you see how the two devices are talking to each other. But if you can’t get the TFTP server to even run on an IP address, then you’re not to that point yet.
The service is tftpd-hpa on Ubuntu. I did get 10.10.10.3 to work by putting :69 at the end 0.0.0.0 accepts all ip addresses attempting to connect to the server, not secure, but fine for a one off like this. I still can’t get the thing to connect to the server, but I did something at least.
Oh, wait, yeah, you’re right, and in fact a number of packages do take that when binding to an address. Sorry, that’s on me.