# Week 12 network 實作解答 ## 1. - `vim /etc/hostname` - `vim /etc/hosts` - `sudo shutdown -r now` ## 2. ```bash= sudo vim /etc/netplan/00-init.yaml sudo netplan apply ``` ## 3. ```bash= # 1. add network device ip addr add 10.102.66.200/24 dev ens40 ip address show dev ens40 ``` ## 4. 00:0c:29:45:1c:8f ``` # This is the network config written by 'subiquity' network: ethernets: eth_tmp: match: macaddress: "00:0c:29:45:1c:8f" set-name: eth_tmp dhcp4: true eth0: match: macaddress: "00:0c:29:45:1c:a3" set-name: eth0 dhcp4: true eth1: match: macaddress: "00:0c:29:45:1c:ad" set-name: eth1 dhcp4: true bridges: LAN: interfaces: [eth0, eth1] addresses: [192.168.3.223/24] version: 2 ``` ```bash= ip a | grep inet | grep LAN | grep 192.168.3.223 ```