Akashic Records

ifconfig 본문

Operation System Controls

ifconfig

Andrew's Akashic Records 2018. 4. 17. 16:23
728x90

ifconfig

system의 network을 재설정했으나 rebooting이 불가능할 경우에는 ifconfig를 써서 확인할 수 있다.

1.        ifconfig -a 로 network card interface를 확인한 후

2.        ifconfig xxx0 plumb 로 network card를 올린후에

3.        ifconfig xxx0 ip address up 으로 network interface에 ip address를 물립니다.

4.        ifconfig -a 로 제대로 setting이 됐는지 확인하고. 제대로 되었으면

5.        netsts -rn으로 gateway를 setting 합니다.

6.        route add net default gateway address 하면 됩니다.

ex) # ifconfig -a

lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232

inet 127.0.0.1 netmask ff000000

le0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500

inet 211.217.224.128 netmask ffffff00 broadcast 211.217.224.255


네트웤카드가 hme0이고 ip가 211.233.233.123이며 gateway가 211.233.233.1 일 경우


# ifconfig le0 down (기존의 카드를 죽이고)

# ifconfig le0 unplumb (기존의 카드를 뗀 후)

# ifconfig -a (새로운 디바이스를 찾아서)

# ifconfig hme0 plumb (새로운 디바이스를 붙이고)

# ifconfig hme0 211.233.233.123 (ip를 넣은 후)

# ifconfig hme0 up (ip를 붙인다 )

# ifconfig -a (확인을 한 다음에..)

# netstat -rn (route table을 보고 )

# route add net default 211.233.233.1 (gateway를 붙인다.)

# netstat -rn (세팅이 잘 되었는지 확인하고)

# ping 211.217.224.128 ( test를 하면 끝...)


728x90

'Operation System Controls' 카테고리의 다른 글

link  (0) 2018.04.17
kill  (0) 2018.04.17
grep  (0) 2018.04.17
fsck  (0) 2018.04.17
Chapter 5 Unix System Utility  (0) 2018.04.17
Comments