- 백업 관리 유틸리티
- dump 전체 백업 또는 최근에 변경된 데이터의 백업
- restore dump command에 의해 백업된 테이프에서 파일의 복원
- volcopy 하나의 디스크의 파일시스템 전체 혹은 일부를 다른 디스크 또는 테이프에 압축된 이미지로 복사
- labelit 파일 시트템의 superblock에 label을 기록
- 시스템 Backup
- 디스크를 기반으로 한 시스템에서 디스크 화일들의 복사본을 다른 매체에 보관하는 2차적인 보전 작업
- UNIX의 dump에는 0~9까지의 서로 다른 수준이 있음
- 수준 0은 total dump로서 모든 파일이 dump되며 이 dump 출력은 시스템이 재복구에 사용될 수 있다.
- 1~9까지는 부분 dump애며 수준차에 따라 변경된 화일들만 dump된다.
- 완전히 디스크 전체를 dump하는 수준 0은 정보의 양이 많고 시간을 많이 필요로 하기 때문에 자주 실행할 수는 없다.
- 보통 total dump는 일주일에 한번 정도 실행한다.
- 나머지 한 주간 동안의 1일 dump는 시스템의 상황에 따라서 결정된다.
- 하루 동안에 변경된 부분만 dump
- total dump이래 변경된부분만 dump
- ruler sequence로 dump
- 예를 들면 연속으로 매일의 수준을 3,2,3,1,2,3,2,3,로 하여 dump
- 위의 두가지 방법을 보완한 형태
- dump : 파일 시스템의 dump
- 형식 dump [option] filesystem
- 기능
- UNIX File system의 모든 파일 또는 어떤 날짜 이후 변경된 화일들을 마그네틱 tape로 dump한다.
- 옵션을 정하지 않으면 default로서 9u가 된다.
- option
- level dump의 수준 0~9까지 있음
- u 전체 백업 이 후 달라진 내용만을 백업하는 옵션
- f dump-file dump를 file의 형태로 한다. 예를 들면 /dev/rmt/0
- D dump를 disk로 한다.
- b factor 테이프에 기록할 블록 사이즈 명시
- volcopy : 파일 시스템의 복사
- 형식 volcopy [option] fsname srcdev vol1 destdev vol2
- 기능
- 디스크의 모든 파일 시스템의 image를 다른 디스크 또는 tape에 똑같이 복사함
- bit-for-bit 복사이므로 total backup으로만 사용가능
- 보통 신속한 disk-to-disk 복사에 사용된다.
- volcoy의 가장 큰 장점은 손실한 데이터를 아주 용이하게 복구 가능함.
- option
- -F ufs 복사하고자 하는 File system의 type
- fsname File system을 복사할 때의 mount point
- scrdev File system을 복사할 device명 (source device)
- vol1 source device의 volumn label
- destdev 복사할 destination device의 device명
- vol2 destination device의 volumn label
- labelit : 파일 시스템에 label 부여
- 형식 labelit [option] dev [faname vol]
- 기능
- 파일 시스템의 superblock에 짧은 label을 기록한다.
- 이후의 작업에서 파일 시스템을 식별하는데 사용된다.
- option
- -F ufs ufs file system type
- dev raw disk device의 label
- fsname File system을 복사할 때의 mount point
- vol physical media의 임의의 식별자
- restore : dump로부터의 복구
- 형식 restore options [filename(s)]
- 기능
- Dump command로부터 생성된 backup 데이프트로부터 화일들을 복구한다.
- 반드시 옵션을 지정해야 한다.
- option
- i : 복구를 대화식으로 하도록 함
- r : 수준 0으로 dump된 것을 새로운 file system이나 빈 file system으로 전체 복구함.
- R : 복구 재개. 전체 백업된 것중에서 부분적인 복구 가능
- t : 백업 content 표시
- X : 파일또는 디렉토리를 복구또는 압축해제
- h : 디렉만을 복구 파일이 들어 있지 않은 경오는 복구 하지 않음
- v : 복구한 파일 이름을 표시함
- UNIX System의 Network 관련 File
- /etc/hosts
- /etc/networks
- /etc/netmasks
- /etc/protocols
- /etc/services
- /etc/ethers
- /etc/bootptab
- /etc/inetd.conf
- /etc/hosts
- 사용되는 host 주소들의 모임을 기록한 화일
# Internet host table # 127.0.0.1 localhost 202.30.35.54 bravo.kwangju.ac.kr ice1 loghost 210.110.193.11 ice1 210.110.193.11 ice2 203.246.48.7 cse1 203.246.48.13 cse2 203.246.48.15 cse4 203.246.48.18 cse7 203.246.48.8 dblab 203.246.48.9 dblabs 203.246.48.17 cse6 |
- /etc/networks
- 네트워크 이름과 각각의 인터네트 주소
#ident "@(#)networks 1.4 92/07/14 SMI" /* SVr4.0 1.1 */ # # The networks file associates Internet Protocol (IP) network numbers # with network names. The format of this file is: # # network-name network-number nicnames . . . # The loopback network is used only for intra-machine communication # loopback 127 # # Internet networks arpanet 10 arpa # Historical |
- /etc/netmasks
- 경로 설정에 필요한 네트 마스크를 지정하는 파일
Subnet mask가 제공하는 세 가지 정보 Network, Subnetwork, Host The netmasks file associates Internet Protocol (IP) address # masks with IP network numbers. # # network-number netmask # # # Both the network-number and the netmasks are specified in # "decimal dot" notation, e.g: # # 128.32.0.0 255.255.255.0 |
- /etc/services
- 네트워크 서비스 이름
사용하는 포트 이름 트랜스포트 프로토콜의 종류 지정 ftp-data 20/tcp ftp 21/tcp telnet 23/tcp smtp 25/tcp mail time 37/tcp timserver time 37/udp timserver name 42/udp nameserver whois 43/tcp nicname # usually to sri-nic domain 53/udp domain 53/tcp hostnames 101/tcp hostname # usually to sri-nic sunrpc 111/udp rpcbind |
- /etc/protocols
- 트랜스포트 프로토콜의 번호 기록
#ident "@(#)protocols 1.2 90/02/03 SMI" /* SVr4.0 1.1 */ # # Internet (IP) protocols # ip 0 IP # internet protocol, pseudo protocol number icmp 1 ICMP # internet control message protocol ggp 3 GGP # gateway-gateway protocol tcp 6 TCP # transmission control protocol egp 8 EGP # exterior gateway protocol pup 12 PUP # PARC universal packet protocol udp 17 UDP # user datagram protocol hmp 20 HMP # host monitoring protocol xns-idp 22 XNS-IDP # Xerox NS IDP rdp 27 RDP # "reliable datagram" protocol |
- /etc/ethers
- ethernet 주소와 시스템의 host name을 갖고 있음
- rarpd에 의해 사용됨
- 형식
- Ethernet-address host-name
- 예: 8:0:20:f:aa:d9 ganesh
- /etc/bootptab
- startup시 bootpd에 읽혀짐
- 형식
- bootp-client:tag
- bootp-client는 bootp-client의 실질적인 이름
- /etc/inetd.conf
- 화일 /etc/inetd.conf에 포함되어 있는 정보를 inetd이 사용하여 네트워크 서비스를 관리
- ftp,telnet 등의 요구가 오면 새로운 프로세스가 connection을 위해 inetd에 의해 시작됨
Configuration file for inetd(1M). See inetd.conf(4). # To re-configure the running inetd process, edit this file, then # send the inetd process a SIGHUP. # Syntax for socket-based Internet services: # <service_name> <socket_type> <proto> <flags> <user> <server_pathname> <args> # # Ftp and telnet are standard Internet services. # ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd |
- UNIX System의 Network Process
- inetd
- 모든 네트워크 서비스 daemon을 관리
- /etc/inetd.conf 란 configuration 화일에 따라 수행
- boot time 에 시작
- 시스템상에 항상 running
- routed
- RIP(routing information protocol)를 구현한 process
- 동적으로 routing table 을 생성하는 기능
- host가 internetwork router이면 주기적으로 send
- routing table 복사본을 연결된 호스트 혹은 네트웍에 전송함
- rarpd
- RARP daemon
- /etc/hosts, /etc/ethers 화일을 참조
- IP address를 발견하지 못하면 no reply를 전송
- bootpd
- BOOT server process
- BOOT protocol을 정의(RFC 951,1048)
- bootpd 명령 형식
- /etc/bootpd [-s -t -d]
- -s는 standalone mode, -t는 분 단위의 timeout value, -d는 debugging을 위해 사용됨
- boot request를 수신할 때 daemon이 시작
- nfsd
- NFS server상에서 실행
- 클라이언트로부터 RPC call을 accept
- named
- Internet-domain 스타일 네임 서버 daemon
- host name을 네트워크 주소로 mapping
- dynamically provide host-to-address lookup
- maintain distributed database of hostname-to-IP address mappings(4.3 BSD)
- automount
- 자동적으로 NFS 화일 시스템을 mount
- 더이상 필요하지 않으면 unmount
- rpcbind
- Solaris 시스템에서 실행
- SunOS 상에서는 동일한 기능인 portmap process가 사용됨
- RPC 서비스 전에 시작되어야 함
- universal address(port number)를 RPC 프로그램 number 로 mapping 하는 기능
- UNIX System의 Network Command
- hostname
- netstat
- route
- ifconfig
- ping
- arp
- nslookup
- domainname
- rpcinfo
- snoop
- hostname
- 현재의 host name을 출력
- /etc/rc.boot 파일이 수행될 때 결정됨
- host name에 대한 정보는 화일 /etc/hostname.xx0에서 유지됨
- host name의 변경
- 사용 예
- netstat
- 기능
- 연결되어 있는 종단간 호스트의 정보
- 네트워크 접속 하드웨어에 대한 정보
- 데이터 버퍼
- 경로 결정 표 및 통계
- 프로토콜별 통계
- netstat의 실행 결과
- 종단간 호스트의 정보
- netstat -a
- 현재 연결되어 있는 모든 종단간 호스트에 대한 정보 표시
- 클라이언트로부터 연결을 기다리고 있는 모든 서버에 대한 정보까지 표시
- 실행 예
TCP Local Address -----------------------
*.ftp .telnet
bravo.kwangju.ac.kr.telnet bravo.kwangju.ac.kr.nfsd |
Remote Address -----------
*.* *.*
ice1.1210 ice2.985 |
Swind ------
0 0
8647 8760 |
Send-Q --------
0 0
0 0 |
Rwind ------
0 0
8760 8760 |
Recv-Q -------
0 0
0 0 |
State ----------
LISTEN LISTEN
ESTABLISHED ESTABLISHED | |
- 네트워크 접속 하드웨어에 관한 정보
Name |
Mtu |
Net/Dest |
Address |
Ipkts |
Ierrs |
Opkts |
Oerrs |
Collis |
Queue |
lo0 |
8232 |
loopback |
localhost |
198611 |
0 |
198611 |
0 |
0 |
0 |
lane0 |
1500 |
bravo.kwangju.ac.kr |
bravo.kwangju.ac.kr |
2513926 |
0 |
1324269 |
0 |
0 |
0 | |
- 데이터 버퍼
streams |
allocation: |
|
|
|
|
current |
maximum |
cumulative total |
allocation failures |
streams queues msg linkblk strevent syncq qband |
154 459 267 8 6 15 0 |
255 640 16313 340 340 113 255 |
8026 19003 11213297 172 36693 629 2 |
0 0 0 0 0 0 0 |
167 Kbytes allocated for streams data | |
- 경로 결정 표 및 통계
- 경로 결정표의 수정은 route 명령 사용
- 수정된 경로 결정 표 확인
- netstat -r
Routing Table: Destination |
Gateway |
Flags |
Ref |
Use |
Interface |
------------- |
------------------- |
------ |
---- |
------- |
--------- |
202.30.35.0 224.0.0.0 default localhost |
bravo.kwangju.ac.kr bravo.kwangju.ac.kr 202.30.35.33 localhost |
U U UG UH |
3 3 0 0 |
209 0 4096 195006 |
lane0 lane0
lo0 | |
- 프로토콜별 통계
- netstat -s
UDP |
udpInDatagrams = 1493 udpOutDatagrams = 1488 |
udpInErrors = 0 |
TCP |
tcpRtoAlgorithm = 4 tcpRtoMax = 60000 tcpActiveOpens = 2147 tcpAttemptFails = 1 tcpCurrEstab = 1 tcpOutDataSegs =191769 |
tcpRtoMin = 200 tcpMaxConn = -1 tcpPassiveOpens = 638 tcpEstabResets = 29 tcpOutSegs =319932 tcpOutDataBytes =159754275 |
IP |
ipForwarding = 2 ipInReceives =760857 ipInAddrErrors = 0 ipForwDatagrams = 0 |
ipDefaultTTL = 255 ipInHdrErrors = 0 ipInCksumErrs = 0 ipForwProhibits = 0 |
ICMP |
icmpInMsgs = 286 icmpInCksumErrs = 2 IcmpInDestUnreachs = 4 |
icmpInErrors = 0 icmpInUnknowns = 0 icmpInTimeExcds = 0 | |
- netstat -rs
Routing Table: Destination |
Gateway |
Flags |
Ref |
Use |
Interface |
------------- |
------------------- |
------ |
---- |
------- |
--------- |
202.30.35.0 224.0.0.0 default localhost |
bravo.kwangju.ac.kr bravo.kwangju.ac.kr 202.30.35.33 localhost |
U U UG UH |
3 3 0 0 |
209 0 4096 195006 |
lane0 lane0
lo0 |
UDP |
udpInDatagrams = 1493 udpOutDatagrams = 1488 |
udpInErrors = 0 |
TCP |
tcpRtoAlgorithm = 4 tcpRtoMax = 60000 tcpActiveOpens = 2147 tcpAttemptFails = 1 tcpCurrEstab = 1 tcpOutDataSegs =191769 |
tcpRtoMin = 200 tcpMaxConn = -1 tcpPassiveOpens = 638 tcpEstabResets = 29 tcpOutSegs =319932 tcpOutDataBytes =159754275 |
IP |
ipForwarding = 2 ipInReceives =760857 ipInAddrErrors = 0 ipForwDatagrams = 0 |
ipDefaultTTL = 255 ipInHdrErrors = 0 ipInCksumErrs = 0 ipForwProhibits = 0 |
ICMP |
icmpInMsgs = 286 icmpInCksumErrs = 2 IcmpInDestUnreachs = 4 |
icmpInErrors = 0 icmpInUnknowns = 0 icmpInTimeExcds = 0 | |
- route
- ifconfig
- ifconfig의 기능
- 네트워크 접속에 관련된 변수 조정
- 접속 하드웨어에 대한 정보
- 정보에 대한 새로운 값의 설정
- 네트워크 관리자만이 주로 사용 가능함
- ifconfig le0 (Backbone line이 Fiber인 경우는 lane0)
- 네트워크 접속 방법으로 ethernet 카드 지정
- [bravo] ifconfig lane0
lane0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 202.30.35.54 netmask ffffff00 broadcast 202.30.35.255 ether 8:0:20:96:fd:d0 |
- ifconfig -a
- 호스트에서 사용하고 있는 모든 네트워크 접속 하드웨어에 대한 변수 값 출력
- 실행 예
[bravo]ifconfig -a lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000 lane0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 202.30.35.54 netmask ffffff00 broadcast 202.30.35.255 ether 8:0:20:96:fd:d0 |
- ping
- 접속하고자 하는 호스트가 사용가능한지를 check하는 명령
- ping 호스트 [제한시간]
- 사용 예
- [bravo]ping honey
- honey.kwangju.ac.kr is alive
- [bravo]ping -s honey 64 10
PING honey.kwangju.ac.kr: 64 data bytes 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=0. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=1. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=2. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=3. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=4. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=5. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=6. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=7. time=1. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=8. time=2. ms 72 bytes from honey.kwangju.ac.kr (202.30.35.45): icmp_seq=9. time=2. ms
----honey.kwangju.ac.kr PING Statistics---- 10 packets transmitted, 10 packets received, 0% packet loss round-trip (ms) min/avg/max = 1/1/2 |
- arp
- ARP 프로토콜에 의해 사용됨
- Internet-to-Ethernet 변환 테이블을 표시하거나 변경
- 사용 예
- arp hostname
- arp -a
- arp -d hostname
- arp -f filename
- arp -s hostname ether_addr [temp] [pub] [trail]
- [bravo]arp -a
Net to Media Table |
Device |
IP Address |
Mask |
Flags |
Phys Addr |
------------------ |
------------------ |
---------------- |
------ |
------------------ |
lane0 lane0 lane0 lane0 lane0 lane0 lane0 |
202.30.35.33 dns.kwangju.ac.kr 202.30.35.130 bravo.kwangju.ac.kr klic.kwangju.ac.kr 203.246.50.209 224.0.0.0 |
255.255.255.255 255.255.255.255 255.255.255.255 255.255.255.255 255.255.255.255 255.255.255.255 240.0.0.0 |
SP
SM |
00:00:ef:04:d1:10 08:00:5a:99:81:bc 00:60:2f:03:bc:81 08:00:20:96:fd:d0 00:20:48:09:0b:95 00:10:5a:82:ee:00 01:00:5e:00:00:00 | |
- nslookup
- Internet domain name server를 찾기 위해 사용되는 interactive 명령
- nslookup 명령 형식: nslookup [address]
[bravo]nslookup honey Server: dns.kwangju.ac.kr Address: 202.30.35.43 Name: honey.kwangju.ac.kr Address: 202.30.35.45
[bravo ]nslookup hosim Server: dns.kwangju.ac.kr Address: 202.30.35.43 Name: hosim.kwangju.ac.kr Address: 202.30.35.55 |
- domainname
- domainname의 기능
- 현재의 네트워크 정보 서비스 기능을 제공
- domain name을 set하거나 display하는데 사용
- 사용 형식
- domainname [name-of-domain]
- 인수 없이 사용하면 현재의 도메인 이름
- domain name에 관한 정보는 파일 /etc/defaultdomain에서 유지하고 있음
- rpcinfo
- rpc와 관련된 정보를 보고하는 기능
- 사용 형식
- rpcinfo [-m] [-s] host
- rpcinfo [-p] host
- rpcinfo -s
- 간결한 형태로 정보를 display
- [bravo ]rpcinfo -s
program |
version(s) |
netid(s) |
service |
owner |
100000 100029 100078 100024 100232 |
2,3,4 2,1 4 1 10 |
udp,tcp,ticlts,ticotsord,ticots ticots,ticotsord,ticlts ticots,ticotsord,ticlts ticots,ticotsord,ticlts,tcp,udp udp |
rpcbind keyserv kerbd status sadmind |
superuser superuser superuser superuser superuser | |
- rpcinfo
- displays all RPC services registered on the local host
program |
version |
netid |
address |
service |
owner |
100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 |
4 3 4 3 4 3 4 3 2 4 3 2 |
ticots ticots ticotsord ticotsord ticlts ticlts tcp tcp tcp udp udp udp |
bravo.rpc bravo.rpc bravo.rpc bravo.rpc bravo.rpc bravo.rpc 0.0.0.0.0.111 0.0.0.0.0.111 0.0.0.0.0.111 0.0.0.0.0.111 0.0.0.0.0.111 0.0.0.0.0.111 |
rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind rpcbind |
superuser superuser superuser superuser superuser superuser superuser superuser superuser superuser superuser superuser | |
- uname
- 현재 시스템의 정보를 display
- 사용 예
- [bravo]uname
- SunOS
- [bravo]uname -a
- SunOS bravo 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-Enterprise
- snoop
- 네트웍 상에서 패켓의 내용을 display and capture한다
- Sun 시스템에서 사용됨
- [bravo / 6 ]snoop -c 5
Using device /dev/lane (promiscuous mode) 203.245.15.12 -> bravo.kwangju.ac.kr HTTP GET /~c96141058/st_white.mid HTTP/1.1 bravo.kwangju.ac.kr -> 203.245.15.12 HTTP HTTP/1.1 404 Not Found 210.110.193.20 -> bravo.kwangju.ac.kr TELNET C port=1169 bravo.kwangju.ac.kr -> 210.110.193.20 TELNET R port=1169 Using device /dev/la 202.30.35.130 -> bravo.kwangju.ac.kr ICMP Redirect (for network to 202.30.35.29) snoop: 5 packets captured |
- snoop -v arp
ETHER: ----- Ether Header ----- ETHER: Packet 1 arrived at 14:13:36.88 ETHER: Packet size = 60 bytes ETHER: Destination = ff:ff:ff:ff:ff:ff, (broadcast) ETHER: Source = 0:a0:24:3d:2:97, ETHER: Ethertype = 0806 (ARP) ARP: ----- ARP/RARP Frame ----- ARP: Hardware type = 1 ARP: Protocol type = 0800 (IP) ARP: Length of hardware address = 6 bytes ARP: Length of protocol address = 4 bytes ARP: Opcode 1 (ARP Request) ARP: Sender's hardware address = 0:a0:24:3d:2:97 ARP: Sender's protocol address = 203.246.48.203, 203.246.48.203 ARP: Target hardware address = ? ARP: Target protocol address = 203.246.48.203, 203.246.48.203 |
|