On Sat, 18 Apr 2020, Michael Howard via trinity-users wrote:
On 18/04/2020 21:48, Marvin Jones via trinity-users
wrote:
On Sat, 18 Apr 2020, Michael Howard via
trinity-users wrote:
> On 18/04/2020 21:00, Marvin Jones via trinity-users wrote:
>>
>> I want to set a static IP for the box -- and get rid of the DHCP crap.
>> Could someone please point me where to start?
>>
Ah, your using ubuntu 18. I was a bit quick of the mark :) I'm a
debian guy but ...
If you have no *.yaml file in your /etc/netplan directory then you might not
have any networking setup. If you have no networking setup, it might be you are
not connected to your router by any means?
Yup, the /etc/netplan directory was empty. But, I had a working network.
I guess without a .yaml in the directory, the network is defined by a
full-on DHCP process.
But, taking in your comments below and some of the terse explanation I
found in searching the interweb, I built a 01_netcfg.yaml and
populated it ... then `sudo netplan apply`
`ifconfig` showed me I had my new, static ip.
Then with trepidation, I rebooted.
The network came up with my new, static ip.
Success!
I can only guess what the difference between 01_netcfg.yaml,
55_netcfg.yaml 99_netcfg.yaml might be. In reading the man
pages,I believe later ones can override options set in earlier
ones. Too complicated by half.
To check your current settings, use 'ip a' and
'ip route show' at a command
prompt. This will give you a view of you current setup, i.e. ip range and
gateway etc, if you have any, which you probably haven't.
If not then create one as '99_config.yaml' with your specific details. If when
you did the 'ip a' above, you got info, great, if not you will need to get the
ip range info from your router. You could do this by setting up dhcp first (not
sure why you don't want to use dhcp, it is easier). The yaml file for dhcp
would be;
network:
version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: true
where enp3s0 would need to be the device name returned by 'ip a'. probably the
second stanza of that printout. Once dhcp is setup, you will know the network
details you need to setup static addressing.
Your yaml file for static would be along the lines of (but not with the
10.10.10.0 ip range or the eth0 device name);
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 10.10.10.2/24
gateway4: 10.10.10.1
nameservers:
search: [mydomain, otherdomain]
addresses: [10.10.10.1, 1.1.1.1]
Change the device name and ip details above to match your own. Or ask again
when you know more details.
Thank you!
--
Marvin L Jones | Marvin | W3DHJ | linux
Pueblo, Colorado | @ | Jonesy | FreeBSD __
38.238N 104.547W |
jonz.net | DM78rf | OS/2 SK
---------------------------------------------------------------------
To unsubscribe, e-mail: trinity-users-unsubscribe(a)lists.pearsoncomputing.net
For additional commands, e-mail: trinity-users-help(a)lists.pearsoncomputing.net
Read list messages on the web archive:
http://trinity-users.pearsoncomputing.net/
Please remember not to top-post:
http://trinity.pearsoncomputing.net/mailing_lists/#top-posting