fpga-design-contest / ad-refkit

autonomous driving contest reference kit
MIT License
10 stars 7 forks source link

Add a static IP address #3

Open miyo opened 4 years ago

miyo commented 4 years ago

In order to access ZYBO Z7-20 without setting IP address manually, it is better to add a static IP address for eth0 as default in creating root file system.

miyo commented 4 years ago
  1. create /etc/netplan/01-netcfg.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.2.200/24
      gateway4: 192.168.2.1
      nameservers:
        addresses: [192.168.2.1]
        search: [local]
  1. run netplan generate

The command generates the followings.

  1. disable networking and enable systemd-networkd
$ systemctl disable networking
$ systemctl enable systemd-networkd.service