Configure network from livecd

#1

Is there a way to change ip address, dns server, etc after booting livecd?

I found configuration files in /etc/net, which are read by smolnetd at startup, so I tried to kill and restart smolnetd, but it won’t launch second time.

I’ve tried this on image from Redox Crash Challenge, on real hardware. Realtek network driver presumably has started normally.

BTW, runs on real hardware like a charm, that’s great!

0 Likes

#2

Is there a way to change ip address, dns server

AFAIK at the moment changing the value in /etc/net/ is the only supported method to change these. batonius is currently working on netcfg in his branch here, which would allow you to change these. AFAIK it will also allow us to support DHCP again. The DNS server is currently hard coded to 8.8.8.8 in dnsd. Again, once netcfg lands there will be an endpoint for adding and removing dns servers. It isn’t in the original draft RFC, but batonius has mentioned that he will add an endpoint for it.

0 Likes

#3

That’s cool!

But is it supposed to work if I change these files and restart smolnetd?

0 Likes

#4

But is it supposed to work if I change these files and restart smolnetd?

AFAIK yes. We read the ip and ip_router files when smolnetd starts here. Although, note that the netmask is hard coded to 255.255.255.0. It should give you an error. It may be that it wasn’t able to clean up properly and it wasn’t able to re-open a file.

0 Likes

#5

OK, I’ll test it more later.

0 Likes

#6

The netcfg scheme was just added. If you’re building from git sources, you should be able to rebuild and check it out!

1 Like

#7

Yeah, I’m already building!

0 Likes

#8

When we can change this https://github.com/redox-os/rust/blob/master/src/libstd/sys/redox/net/mod.rs#L41-L48 ?

0 Likes

#9

I hope we can change that soon

1 Like

#10

See the tracking issue redox-os/netstack#19. I’d be interested to get feedback on a config format.

Edit: Posted the wrong issue link

0 Likes