탐색 링크 건너뛰기 | |
인쇄 보기 종료 | |
![]() |
Oracle Solaris 관리: 네트워크 인터페이스 및 네트워크 가상화 Oracle Solaris 11 Information Library (한국어) |
walkprop 하위 명령을 사용하여 대화식으로 등록 정보 값 확인 및 변경
자동 네트워크 구성 모드에서 수동 네트워크 구성 모드로 전환하는 방법
수동 네트워크 구성 모드에서 자동 네트워크 구성 모드로 전환하는 방법
7. 프로파일에 데이터 링크 및 인터페이스 구성 명령 사용
새 사용자 정의 프로파일과 기존 사용자 정의 프로파일의 등록 정보 값은 netcfg 명령에 set 하위 명령을 사용하여 설정됩니다. 이 하위 명령은 대화식 모드 또는 명령줄 모드에서 사용할 수 있습니다. 명령줄 모드에서 등록 정보 값을 설정하거나 변경하면 변경 사항이 지속 저장소에 즉시 커밋됩니다.
set 하위 명령의 구문은 다음과 같습니다.
netcfg set prop-name=value1[,value2...]
특정 등록 정보 값을 검색해야 하는 경우 netcfg get 명령을 사용합니다. 자세한 내용은 특정 등록 정보 값 가져오기를 참조하십시오.
예 4-9 netcfg 명령줄 모드에서 등록 정보 값 설정
명령줄 모드에서 netcfg 명령을 사용하여 등록 정보 값을 설정하는 경우 명령줄에서 하위 명령을 여러 개 입력해야 합니다.
예를 들어, net1이라는 링크 NCU의 mtu 등록 정보를 설정하려면 다음 명령을 입력합니다.
$ netcfg "select ncp User; select ncu phys net1; set mtu=1492"
이 예에서는 select 하위 명령을 사용하여 최상위 프로파일을 선택한 다음 수정된 mtu 등록 정보 값이 포함된 NCU를 다시 선택합니다.
명령줄에서 지정된 등록 정보에 대해 동시에 여러 값을 설정할 수 있습니다. 여러 값을 설정하는 경우 각 값을 쉼표(,)로 구분해야 합니다. 지정한 등록 정보의 개별 값에도 쉼표가 포함되어 있는 경우 등록 정보 값의 일부인 쉼표 앞에 백슬래시를 추가해야 합니다(\,). 단일 값만 포함된 등록 정보 내의 쉼표는 분리자로 해석되지 않으므로 앞에 백슬래시를 추가할 필요가 없습니다.
다음 예에서는 NCP User의 NCU myncu에 대한 ip-version 등록 정보 값이 설정됩니다.
$ netcfg "select ncp User; select ncu ip myncu; set ip-version=ipv4,ipv6"
예 4-10 대화식으로 프로파일의 등록 정보 값 설정
대화식으로 등록 정보 값을 설정하는 경우 먼저 현재 범위에서 프로파일을 선택해야 합니다. 이 경우 대화식 세션이 해당 프로파일의 범위로 이동됩니다. 이 범위에서 등록 정보를 수정하려는 객체를 선택할 수 있습니다. 선택한 프로파일이 지속 저장소에서 메모리로 로드됩니다. 다음 예와 같이 이 범위에서 프로파일 또는 해당 등록 정보를 수정할 수 있습니다.
$ netcfg netcfg> select ncp User netcfg:ncp:User> select ncu ip iwk0 netcfg:ncp:User:ncu:iwk0> set ipv4-default-route = 129.174.7.366
다음 예에서는 foo 위치의 ipfilter-config-file 등록 정보가 설정됩니다.
$ netcfg netcfg> list NCPs: Automatic User Locations: Automatic NoNet foo netcfg> select loc foo netcfg:loc:foo> list LOC:foo activation-mode manual enabled false nameservices dns dns-nameservice-configsrc dhcp nameservices-config-file "/etc/nsswitch.dns" netcfg:loc:foo> set ipfilter-config-file=/path/to/ipf-file netcfg:loc:foo> list LOC:foo activation-mode manual enabled false nameservices dns dns-nameservice-configsrc dhcp nameservices-config-file "/etc/nsswitch.dns" ipfilter-config-file "/path/to/ipf-file" netcfg:loc:foo> end Committed changes netcfg> exit Nothing to commit $
다음 예에서는 NCP User의 NCU net0에 대한 link-mtu 등록 정보가 대화식으로 수정됩니다.
$ netcfg netcfg> select ncp User netcfg:ncp:User> select ncu phys net0 netcfg:ncp:User:ncu:net0> list NCU:net0 type link class phys parent "User" enabled true activation-mode prioritized priority-mode exclusive priority-group 1 netcfg:ncp:User:ncu:net0> set link-mtu=5000 netcfg:ncp:User:ncu:net0> list NCU:net0 type link class phys parent "User" enabled true activation-mode prioritized priority-mode exclusive priority-group 1 link-mtu 5000 netcfg:ncp:User:ncu:net0> commit Committed changes netcfg:ncp:User:ncu:net0> exit Nothing to commit $