랜선끼고 ifup or ifconfig eth$N up
IFF_UP = 1 // Interface is up
IFF_RUNNING = 1 // Resources allocated
랜선끼고 ifdown or ifconfig eth$N down
IFF_UP = 0 // Interface is up
IFF_RUNNING = 0 // Resources allocated
랜선뽑고 ifup or ifconfig eth$N up
IFF_UP = 1 // Interface is up
IFF_RUNNING = 0 // Resources allocated
랜선뽑고 ifdown or ifconfig eth$N down
IFF_UP = 0 // Interface is up
IFF_RUNNING = 0 // Resources allocated
그렇다면 if, ifconfig 명령의 차이는?
RHET5 기준 (https://access.redhat.com/solutions/27166)
An "ifconfig" command and "ifup" or "ifdown" command can activate network interfaces. "ifconfig" directly controls network interfaces, however "ifup" or "ifdown" executes "/etc/sysconfig/network-scripts/ifup-" or "ifdown-" scripts. The scripts use an ip command.
"ifconfig" and "ip" commands use ioctl() to activate or deactivate network interfaces. "ifconfig" flags network interfaces 'IFF_UP | IFF_RUNNING', however "ip" flags that 'IFF_UP'.
An "ifconfig up eth0" activates eth0 but does not setup IP addresses, however an "ifup eth0" setup IP addresses or other options based by an ifcfg-eth0, because the "ifup" uses an "ifup-eth*" script.
The ifup command will also configure any static routes that are configured in the network-scripts directory. The ifconfig command will not.
'엔지니어' 카테고리의 다른 글
Python3에서 한글 깨짐 없이 gmail 전송 (13) | 2017.01.03 |
---|---|
Windows10에서 Telnet 기능 켜기 (9) | 2016.12.15 |
[UDP] 특성 (1796) | 2016.12.06 |
[Linux] Bonding 본딩 설정 (1281) | 2016.12.05 |
[Django] email form 생성 (8) | 2016.11.24 |