2018年9月21日 星期五

dns

桌機、筆電、ap、伺服器的dns原本是設定誰?如果是指到你們學校的dns,你得把他們改成: 163.17.40.1、163.17.40.3、163.28.80.41或中華電信, google的dns 168.95.1.1, 168.95.192.1, 8.8.8.8 2001:288:5400::1, 2001:288:5400::3, 2001:288:5000:1:163:28:80:41

163.17.40.1, 163.17.40.3, 163.28.80.41, 168.95.1.1, 168.95.192.1, 8.8.8.8, 2001:288:5400::1, 2001:288:5400::3, 2001:288:5000:1:163:28:80:41

DNS1="163.17.40.1"
DNS2="163.17.40.3"
DNS3="163.28.80.41"
DNS4="168.95.1.1"
DNS5="168.95.192.1"
DNS6="8.8.8.8"


https://linuxconfig.org/how-to-setup-a-static-ip-address-on-debian-linux

How to setup a Static IP address on Debian Linux

Objective

The objective is to configure a static IP address on Debian Linux server. 

Please note that for Desktop installations it is recommended to use GUI tools, such as network-manager. If you wish to configure your network interfaces directly via /etc/network/interfaces file on your Desktop, make sure you disable any other possibly interfering network configuration daemons. For example, the below commands will disable network-manager:
# systemctl stop NetworkManager.service
# systemctl disable NetworkManager.service

Operating System and Software Versions

  • Operating System: - Debian 9 (Stretch)

Requirements

Privileged access to your Debian Linux system is required.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Enable Static IP

By default you will find the following configuration within the /etc/network/interfaces network config file:
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
Update the iface eth0 inet dhcp to iface eth0 inet static. The resulting content of /etc/network/interfaces network config file should look similar to the one below:
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static


Configure IP Address

At this stage, we have two choices on how to configure a static IP address for our eth0 network interface. The first option is to add IP address configuration directly into /etc/network/interfaces file. Append the following line to your existing /etc/network/interfaces:
        address 10.1.1.125
        netmask 255.0.0.0
        gateway 10.1.1.1
The resulting content /etc/network/interfaces file should look like the one below. Update your IP address, netmask and gateway as necessary:
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
      address 10.1.1.125
      netmask 255.0.0.0
      gateway 10.1.1.1
The second and recommended option is to define your network interfaces separately within /etc/network/interfaces.d/ directory. 

During the networking daemon initiation the /etc/network/interfaces.d/ directory is searched for network interface configurations. Any found network configuration is included as part of the /etc/network/interfaces

Create a new network configuration file with any arbitrary file name eg. eth0 and include the eth0IP address configuration shown below. To do this use your preferred text editor for example vim:
# cat /etc/network/interfaces.d/eth0
iface eth0 inet static
      address 10.1.1.125
      netmask 255.0.0.0
      gateway 10.1.1.1
Now, remove the above lines stated from /etc/network/interfaces so you will end up with:
# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0


Static DNS server

To configure a static DNS edit /etc/resolv.conf file, and include the IP address of your preferred nameserver eg:
nameserver 8.8.8.8
Alternatively, add the following line into your /etc/network/interfaces network config file:
dns-nameservers 8.8.8.8 8.8.4.4

Apply Changes

To apply changes restart your network daemon:
# service networking restart
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME or create a JOB ALERT on LinuxCareers.com job portal.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

YOU MAY ALSO BE INTERESTED IN:



Comments and Discussions

2018年9月20日 星期四

https://docs.google.com/document/d/1X7QfJmx7nIRxgMiw1PS4OmyOlkaxvgTjKPhL2PQGpGY/edit

https://docs.google.com/document/d/1X7QfJmx7nIRxgMiw1PS4OmyOlkaxvgTjKPhL2PQGpGY/edit

2018年9月11日 星期二

2018年9月5日 星期三

宜蘭國華國中 優秀張大師以micro:bit [玩]音樂資源分享

宜蘭國華國中 優秀張大師以micro:bit [玩]音樂資源分享 microbit 電路板強大的音樂功能,第一堂課教學生簡單的動畫設計及簡單的樂理如何看簡譜 1-C-do 2-D-re 3-E-mi 4-F-fa 5-G-so 6-A-la 7-B-si 再轉到程式就可以做收很棒的音效及音樂 https://makecode.microbit.org/_3HmFXE1DXCV9 瑪莉兄弟 https://makecode.microbit.org/82637-50969-31654-55217 星際大戰 https://makecode.microbit.org/_RF6gRyUH75tf 小星星 (利用變數) https://makecode.microbit.org/82637-50969-31654-55217 星際大戰 https://makecode.microbit.org/97217-41458-26568-28834 生日快樂 https://makecode.microbit.org/11285-64888-01807-60559 國歌 https://makecode.microbit.org/_FLs4AWPr65HX 天空之城 https://makecode.microbit.org/_EFh0TAit2ftW 土耳其進行曲 以下2018/01/11 FB 分享 microbit 音樂設計參考 不可能的任務 https://makecode.microbit.org/_Umeb3jb1i9CV python https://makecode.microbit.org/_4hki9bfX7FC7 Amazing Grace https://makecode.microbit.org/_ECe3fWg2Xcdo 新年快樂 https://makecode.microbit.org/_fevWm31gU6D3 迎春花 https://makecode.microbit.org/_Y8W7MXU0765k 迎新春 https://makecode.microbit.org/_fKMKWfX59J1H 瑪莉兄弟-game over https://makecode.microbit.org/_VAa835ea5aq3 瑪莉兄弟-水底世界音效 https://makecode.microbit.org/_TJqE8vKuDcAh Mozart https://makecode.microbit.org/_gLe0hp3809dh

STEAM

2018年9月3日 星期一

合勤NWA1123-AC PRO 802.11ac 無線基地台

合勤NWA1123-AC PRO 802.11ac 無線基地台