Linux/Ubuntu2016. 10. 5. 18:18

dhclient.conf에서 lease를 이용하면 된다고 한다.


timeout 10;

lease {

interface "eth0";

fixed-address 10.0.0.10;

option subnet-mask 255.255.255.0;

renew 2 2022/1/1 00:00:01;

rebind 2 2022/1/1 00:00:01;

expire 2 2022/1/1 0:00:01;


or you can assign a second IP to the interface like /etc/network/interfaces


auto lo

iface lo inet loopback

iface eth0 inet dhcp


auto eth0:1

iface eth0:1 inet static

address 10.10.10.2

netmask 255.255.255.0

[링크 : http://stackoverflow.com/questions/12727175/set-static-ip-if-not-obtained-from-dhcp-script]


The timeout statement


timeout time ;


The timeout statement determines the amount of time that must pass between the time that the client begins to try to determine its address and the time that it decides that it's not going to be able to contact a server. By default, this timeout is sixty seconds. After the timeout has passed, if there are any static leases defined in the configuration file, or any leases remaining in the lease database that have not yet expired, the client will loop through these leases attempting to validate them, and if it finds one that appears to be valid, it will use that lease's address. If there are no valid static leases or unexpired leases in the lease database, the client will restart the protocol after the defined retry interval.Lease Declarations



The lease declaration


lease { lease-declaration [ ... lease-declaration ] }


The DHCP client may decide after some period of time (see PROTOCOL TIMING) that it is not going to succeed in contacting a server. At that time, it consults its own database of old leases and tests each one that has not yet timed out by pinging the listed router for that lease to see if that lease could work. It is possible to define one or more fixed leases in the client configuration file for networks where there is no DHCP or BOOTP service, so that the client can still automatically configure its address. This is done with the lease statement.


NOTE: the lease statement is also used in the dhclient.leases file in order to record leases that have been received from DHCP servers. Some of the syntax for leases as described below is only needed in the dhclient.leases file. Such syntax is documented here for completeness.


A lease statement consists of the lease keyword, followed by a left curly brace, followed by one or more lease declaration statements, followed by a right curly brace. The following lease declarations are possible:

[링크 : https://linux.die.net/man/5/dhclient.conf]


odroid 설정파일

$ vi /etc/dhcp/dhclient.conf

# Configuration file for /sbin/dhclient, which is included in Debian's

#       dhcp3-client package.

#

# This is a sample configuration file for dhclient. See dhclient.conf's

#       man page for more information about the syntax of this file

#       and a more comprehensive list of the parameters understood by

#       dhclient.

#

# Normally, if the DHCP server provides reasonable information and does

#       not leave anything out (like the domain name, for example), then

#       few changes must be made to this file, if any.

#


option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;


#send host-name "andare.fugue.com";

send host-name = gethostname();

#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;

#send dhcp-lease-time 3600;

#supersede domain-name "fugue.com home.vix.com";

#prepend domain-name-servers 127.0.0.1;

request subnet-mask, broadcast-address, time-offset, routers,

        domain-name, domain-name-servers, domain-search, host-name,

        dhcp6.name-servers, dhcp6.domain-search,

        netbios-name-servers, netbios-scope, interface-mtu,

        rfc3442-classless-static-routes, ntp-servers,

        dhcp6.fqdn, dhcp6.sntp-servers;

#require subnet-mask, domain-name-servers;

#timeout 60;

#retry 60;

#reboot 10;

#select-timeout 5;

#initial-interval 2;

#script "/etc/dhcp3/dhclient-script";

#media "-link0 -link1 -link2", "link0 link1";

#reject 192.33.137.209;


#alias {

#  interface "eth0";

#  fixed-address 192.5.5.213;

#  option subnet-mask 255.255.255.255;

#}


#lease {

#  interface "eth0";

#  fixed-address 192.33.137.200;

#  medium "link0 link1";

#  option host-name "andare.swiftmedia.com";

#  option subnet-mask 255.255.255.0;

#  option broadcast-address 192.33.137.255;

#  option routers 192.33.137.250;

#  option domain-name-servers 127.0.0.1;

#  renew 2 2000/1/12 00:00:01;

#  rebind 2 2000/1/12 00:00:01;

#  expire 2 2000/1/12 00:00:01;

#} 


어? odroid에 해봤는데 안되네.. 머지??!?!

아무튼.. dhcp는 link가 탐지되어야 하니 최소한 랜은 꽂혀서 hub에 연결은 되어야 dhcp client가 가동된다.


+

$ sudo vi /etc/dhcp/dhclient-enter-hooks.d/debug

RUN="yes"

                                echo "$var='${!var}'" >> /tmp/dhclient-script.debug 


[링크 : https://lists.debian.org/debian-user/2010/10/msg00375.html]

위의 내용을 바꾸면 /tmp/dhclient-script.debug 에 로그가 쌓이는데


Wed Oct 5 21:23:43 KST 2016: entering /sbin, dumping variables.

reason='PREINIT'

interface='eth0'

--------------------------

Wed Oct 5 21:23:54 KST 2016: entering /sbin, dumping variables.

reason='FAIL'

interface='eth0'

--------------------------

Wed Oct 5 21:24:10 KST 2016: entering /sbin, dumping variables.

reason='PREINIT'

interface='eth0'

--------------------------

Wed Oct 5 21:24:11 KST 2016: entering /sbin, dumping variables.

reason='TIMEOUT'

interface='eth0'

new_ip_address='192.168.219.130'

new_network_number='192.168.219.0'

new_subnet_mask='255.255.255.0'

new_broadcast_address='192.168.219.255'

new_routers='192.168.219.1'

new_domain_name_servers='1.214.68.2 61.41.153.2'

--------------------------

Wed Oct 5 21:24:14 KST 2016: entering /sbin, dumping variables.

reason='FAIL'

interface='eth0'

--------------------------

Wed Oct 5 21:27:14 KST 2016: entering /sbin, dumping variables.

reason='FAIL'

interface='eth0'

--------------------------

Wed Oct 5 21:27:40 KST 2016: entering /sbin, dumping variables.

reason='PREINIT'

interface='eth0'

--------------------------

Wed Oct 5 21:27:41 KST 2016: entering /sbin, dumping variables.

reason='BOUND'

interface='eth0'

new_ip_address='192.168.219.130'

new_network_number='192.168.219.0'

new_subnet_mask='255.255.255.0'

new_broadcast_address='192.168.219.255'

new_routers='192.168.219.1'

new_domain_name_servers='1.214.68.2 61.41.153.2'

old_ip_address='192.168.219.130'

old_network_number='192.168.219.0'

old_subnet_mask='255.255.255.0'

old_broadcast_address='192.168.219.255'

old_routers='192.168.219.1'

old_domain_name_servers='1.214.68.2 61.41.153.2'

-------------------------- 


운 좋게(?) timeout 한번나서 설정되었지만.. 내가 의도한 녀석은 아니고..

정상적으로 dhcp를 통해 받아와서야 BOUND로 표기되었다...

lease는 그냥 timeout 인건가.. 아니면 timeout을 길게줘야하나?



내용에 의하면.. 내가 원하는... DHCP 값을 못 받아 올 경우

기본 값으로 설정하는 용도로는 맞지 않다는 거군....

Expire

The DHCP client has failed to renew its lease or acquire a new one, and the lease has expired. The IP address must be relinquished, and all related parameters should be deleted, as in RENEW and REBIND.


Fail

The DHCP client has been unable to contact any DHCP servers, and any leases that have been tested have not proved to be valid. The parameters from the last lease tested should be deconfigured. This can be handled in the same way as EXPIRE.


Timeout

The DHCP client has been unable to contact any DHCP servers. However, an old lease has been identified, and its parameters have been passed in as with BOUND. The client configuration script should test these parameters and, if it has reason to believe they are valid, should exit with a value of zero. If not, it should exit with a nonzero value.

The usual way to test a lease is to set up the network as with REBIND (since this may be called to test more than one lease) and then ping the first router defined in $routers. If a response is received, the lease must be valid for the network to which the interface is currently connected. It would be more complete to try to ping all of the routers listed in $new_routers, as well as those listed in $new_static_routes, but current scripts do not do this.


[링크 : https://linux.die.net/man/8/dhclient-script]

[링크 : https://www.freebsd.org/cgi/man.cgi?dhclient-script(8)]


[링크 : http://elinux.org/RPi_Setting_up_a_static_IP_in_Debian]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu php4 설치  (0) 2016.10.06
ubuntu apt를 통해 자동 업데이트 되지 않도록 하기  (0) 2016.10.05
proprietary driver on lubuntu  (0) 2016.09.09
gnome-disks 벤치마크  (0) 2016.09.05
lynx 마우스 사용하기  (0) 2016.08.18
Posted by 구차니
Linux/Ubuntu2016. 9. 9. 20:31

lxde 라고 별건 없고 그냥

시스템 쪽에 업데이트 실행해서 독점 드라이버 탭에서 하면되는데

안뜨네...


[링크 : http://askubuntu.com/questions/197110/enable-drivers-on-lubuntu]

Posted by 구차니
Linux/Ubuntu2016. 9. 5. 21:01

디스크 성능 테스트 용


[링크 : http://askubuntu.com/questions/249310/how-can-i-launch-disk-utility-after-installing-it]

'Linux > Ubuntu' 카테고리의 다른 글

dhcp 받아오기 실패시 static ip로 설정하기 (timeout 시)  (0) 2016.10.05
proprietary driver on lubuntu  (0) 2016.09.09
lynx 마우스 사용하기  (0) 2016.08.18
axel  (0) 2016.08.18
baobab - Disk Usage Analyzer  (0) 2016.06.13
Posted by 구차니
Linux/Ubuntu2016. 8. 18. 20:23

좌 클릭은 이동

우 클릭은 이전 페이지로 이동


$ lynx -use_mouse

[링크 : http://linux.die.net/man/1/lynx]

'Linux > Ubuntu' 카테고리의 다른 글

proprietary driver on lubuntu  (0) 2016.09.09
gnome-disks 벤치마크  (0) 2016.09.05
axel  (0) 2016.08.18
baobab - Disk Usage Analyzer  (0) 2016.06.13
*.so 파일의 의존성 확인하기  (0) 2016.06.13
Posted by 구차니
Linux/Ubuntu2016. 8. 18. 19:56

wget보다 빠른 녀석인 듯?

$ sudo apt-cache search wget

abcde - A Better CD Encoder

axel - light download accelerator - console version

axel-dbg - light download accelerator - debugging symbols

devscripts - scripts to make the life of a Debian Package maintainer easier

filetea - Web-based file sharing system

libcupt3-0-downloadmethod-wget - flexible package manager -- wget download method

ow-shell - shell utilities to talk to an 1-Wire owserver

puf - Parallel URL fetcher

pwget - downloader utility which resembles wget (implemented in Perl)

snarf - A command-line URL grabber

texlive-latex-extra - TeX Live: LaTeX additional packages

wget - retrieves files from the web

wget-el - interface for wget on Emacsen

wput - tiny wget-like ftp-client for uploading files 


$ wget http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso?_ga=1.59634341.941728734.1471518637

--2016-08-18 20:13:20--  http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso?_ga=1.59634341.941728734.1471518637

Resolving releases.ubuntu.com (releases.ubuntu.com)... 91.189.88.148, 2001:67c:1360:8c01::1e

Connecting to releases.ubuntu.com (releases.ubuntu.com)|91.189.88.148|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1513308160 (1.4G) [application/x-iso9660-image]

Saving to: ‘ubuntu-16.04.1-desktop-amd64.iso?_ga=1.59634341.941728734.1471518637’


esktop-amd64.iso?_g   3%[                      ]  46.40M  2.48MB/s   eta 13m 18s

속도가 오를때 마다 줄이 넘어가서 일단 삭제하고..

아무튼 wget 보다는 빠르다.

$ axel http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso?_ga=1.59634341.941728734.1471518637

Initializing download: http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-desktop-amd64.iso?_ga=1.59634341.941728734.1471518637

File size: 1513308160 bytes

Opening output file ubuntu-16.04.1-desktop-amd64.iso

Starting download


[  0%]  .......... .......... .......... .......... ..........  [  91.7KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2151.5KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2164.4KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2177.7KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2190.9KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2203.9KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2217.0KB/s]

[  0%]  .......... .......... .......... .......... ..........  [2230.6KB/s]

[  1%]  .......... .......... .......... .......... ..........  [3247.9KB/s]

[  1%]  .......... .......... .......... .......... ..........  [3249.8KB/s]

[  1%]  .......... .......... ..........^C .

Downloaded 18.3 megabytes in 5 seconds. (3250.80 KB/s) 


'Linux > Ubuntu' 카테고리의 다른 글

gnome-disks 벤치마크  (0) 2016.09.05
lynx 마우스 사용하기  (0) 2016.08.18
baobab - Disk Usage Analyzer  (0) 2016.06.13
*.so 파일의 의존성 확인하기  (0) 2016.06.13
우분투 버전별 리눅스 커널  (4) 2016.06.09
Posted by 구차니
Linux/Ubuntu2016. 6. 13. 17:31

'Linux > Ubuntu' 카테고리의 다른 글

lynx 마우스 사용하기  (0) 2016.08.18
axel  (0) 2016.08.18
*.so 파일의 의존성 확인하기  (0) 2016.06.13
우분투 버전별 리눅스 커널  (4) 2016.06.09
응컁컁 ubuntu 16.10 LTS!  (0) 2016.04.24
Posted by 구차니
Linux/Ubuntu2016. 6. 13. 11:39

so 파일의 다른 so 파일 의존성은 readelf -d로 확인!


$ readelf -d libssl.so.1.0.0

Dynamic section at offset 0x45ef0 contains 30 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libcrypto.so.1.0.0]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [ld-linux-armhf.so.3]

[링크 : http://stackoverflow.com/...direct-shared-object-dependencies-of-a-linux-elf-binary]

'Linux > Ubuntu' 카테고리의 다른 글

axel  (0) 2016.08.18
baobab - Disk Usage Analyzer  (0) 2016.06.13
우분투 버전별 리눅스 커널  (4) 2016.06.09
응컁컁 ubuntu 16.10 LTS!  (0) 2016.04.24
notepadqq 흐음...  (0) 2016.03.23
Posted by 구차니
Linux/Ubuntu2016. 6. 9. 11:02

이렇게 보니.. 리눅스 버전이 미친듯이 올랐구나 싶네


4.10    Warty Warthog    2.6.8

5.04    Hoary Hedgehog   2.6.10

5.10    Breezy Badger    2.6.12

6.06    Dapper Drake     2.6.15

6.10    Edgy Eft         2.6.17

7.04    Feisty Fawn      2.6.20

7.10    Gutsy Gibbon     2.6.22

8.04    Hardy Heron      2.6.24

8.10    Intrepid Ibex    2.6.27

9.04    Jaunty Jackalope 2.6.28

9.10    Karmic Koala     2.6.31

10.04   Lucid Lynx       2.6.32

10.10   Maverick Meerkat 2.6.35

11.04   Natty Narwhal    2.6.38

11.10   Oneiric Ocelot   3.0

12.04   Precise Pangolin 3.2+

12.10   Quantal Quetzal  3.5

13.04   Raring Ringtail  3.8

13.10   Saucy Salamander 3.11

14.04   Trusty Tahr      3.13

14.10   Utopic Unicorn   3.16

15.04   Vivid Vervet     3.19

15.10   Wily Werewolf    4.2

16.04   Xenial Xerus     4.4 


[링크 : http://askubuntu.com/.../list-of-ubuntu-versions-with-corresponding-linux-kernel-version]

'Linux > Ubuntu' 카테고리의 다른 글

baobab - Disk Usage Analyzer  (0) 2016.06.13
*.so 파일의 의존성 확인하기  (0) 2016.06.13
응컁컁 ubuntu 16.10 LTS!  (0) 2016.04.24
notepadqq 흐음...  (0) 2016.03.23
ubuntu 15.10 vino.. 접속 불가?  (0) 2016.02.16
Posted by 구차니
Linux/Ubuntu2016. 4. 24. 08:58

$ do-release-upgrade


어제 자기 전에 걸어 두고 일어나니

지울 녀석이 남았다고 버팅겨서 y 해주었더니 금세 끝나네

자.. 이제 2년간 버텨보자 ㅋ




Welcome to Ubuntu 16.04 LTS (GNU/Linux 4.4.0-21-generic x86_64)


 * Documentation:  https://help.ubuntu.com/


Last login: Wed Apr 20 20:57:14 2016 from 192.168.219.153




'Linux > Ubuntu' 카테고리의 다른 글

*.so 파일의 의존성 확인하기  (0) 2016.06.13
우분투 버전별 리눅스 커널  (4) 2016.06.09
notepadqq 흐음...  (0) 2016.03.23
ubuntu 15.10 vino.. 접속 불가?  (0) 2016.02.16
ubuntu selinux... disabled?!  (0) 2016.02.15
Posted by 구차니
Linux/Ubuntu2016. 3. 23. 17:10

심심해서..

xming으로 연결해서 테스트 해봤더니

context 메뉴가 안드로메다로 간다



$ notepadqq

QXcbConnection: Failed to get the primary output of the screen

QXcbConnection: Failed to get the primary output of the screen

QXcbConnection: XCB error: 170 (Unknown), sequence: 162, resource id: 90, major code: 146 (Unknown), minor code: 20

QXcbConnection: XCB error: 170 (Unknown), sequence: 323, resource id: 90, major code: 146 (Unknown), minor code: 20


머지? 캡쳐 하려고 다시 실행하니 되네? ㄷㄷ

$ notepadqq

QXcbConnection: Failed to get the primary output of the screen

QXcbConnection: XCB error: 170 (Unknown), sequence: 162, resource id: 90, major code: 146 (Unknown), minor code: 20



아무튼.. Qt 기반인가 느리당... scite는 좀 그나마 빠른데 ㅠㅠ

'Linux > Ubuntu' 카테고리의 다른 글

우분투 버전별 리눅스 커널  (4) 2016.06.09
응컁컁 ubuntu 16.10 LTS!  (0) 2016.04.24
ubuntu 15.10 vino.. 접속 불가?  (0) 2016.02.16
ubuntu selinux... disabled?!  (0) 2016.02.15
ubuntu 15.10 가벼워졌네?  (0) 2016.02.12
Posted by 구차니