Solaris11的网络配置与Solaris10有很大不同,Solaris11通过network configuration profiles(NCP)来管理网络配置。

Solaris11网络配置分为Fixed Network Configuration和 Reactive Network Configuration两种。

Fixed Network是指网络配置不会根据网络环境自动适应的配置模式,即网络配置不会随着网络环境的变化而变化。Fixed Network Configuration通常适用于数据中心的服务器。Fixed Network需要手工配置网络,配置信息记录在DefaultFixed profile文件中。Fixed Network Configuration并不等同于配置静态IP地址,Fixed Network Configuration也可以配置为DHCP。

Reactive Network是指网络配置能够自动适应网络环境的变化,即网络配置会随着网络环境的变化而变化。Reactive Network Configuration通常适用于桌面系统。例如:桌面系统能够通过Reactive Network模式自动搜索并连接WLAN网络。Reactive Network Configuration并不等同于DHCP, Reactive Network Configuration也可配置静态IP地址。

以下是Solaris11.1上Fixed Network配置过程:

1. 启用DefaultFixed NCP

1.1 检查当前启用的NCP

1.2 启用DefaultFixed NCP

2. 配置IP地址

IP地址信息存储在DefaultFixed Profile中。

2.1 检查物理网卡及link状态

2.2 创建网络interface

2.3 配置IP地址

2.4 将主机名与IP地址加入/etc/hosts文件(可选步骤)

此步骤主要是为了方便主机名与IP地址之间的解析。

root@mytest:~# vi /etc/hosts
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost loghost
192.168.1.200 mytest  mytest.test.local

3.  配置缺省路由

缺省路由信息存储在/etc/inet/static_routes-DefaultFixed文件中.

root@mytest:~# more /etc/inet/static_routes-DefaultFixed
# File generated by route(1M) - do not edit.
default 192.168.1.1

4. 配置domainname

domainname信息存储在SMF中,有两种方法设置:

4.1 使用domainname命令设置

设置前使用domainname命令及SMF命令检查
root@mytest:~# domainname
<输出为空>
root@mytest:~# svcprop -p config/domainname -l all network/nis/domain
config/domainname hostname manifest ""
config/domainname hostname admin "" 使用domainname设置
root@mytest:~# domainname test.local 设置后检查
root@mytest:~# domainname
test.local
root@mytest:~# svcprop -p config/domainname -l all network/nis/domain
config/domainname hostname manifest ""
config/domainname hostname admin test.local

4.2使用SMF命令设置

设置前检查
root@mytest:~# domainname
<输出为空>
root@mytest:~# svccfg -s svc:/network/nis/domain listprop -l all config/domainname
config/domainname hostname admin
config/domainname hostname manifest 使用SMF命令设置
root@mytest:~# svccfg -s svc:/network/nis/domain setprop config/domainname = test.local
root@mytest:~# svccfg -s nis/domain:default refresh
root@mytest:~# svcadm enable nis/domain:default 设置后检查
root@mytest:~# domainname
test.local
root@mytest:~# svccfg -s svc:/network/nis/domain listprop -l all config/domainname
config/domainname hostname admin test.local
config/domainname hostname manifest

5. 设置NSSWITCH

NSSWITCH信息保存在SMF中,有两种方法设置:

5.1 使用SMF命令设置

设置前检查
root@mytest:~# svccfg -s svc:/system/name-service/switch listprop -l all config
config application site-profile
config application manifest
config/value_authorization astring manifest solaris.smf.value.name-service.switch
config/default astring site-profile files
config/default astring manifest files
config/printer astring site-profile "user files"
config/printer astring manifest "user files" 使用SMF命令设置
root@mytest:~# svccfg -s svc:/system/name-service/switch setprop config/host='"files dns"'
root@mytest:~# svccfg -s svc:/system/name-service/switch setprop config/password='"files ldap"'
root@mytest:~# svccfg -s svc:/system/name-service/switch setprop config/group='"files ldap"'
root@mytest:~# svcadm refresh svc:/system/name-service/switch 设置后检查
root@mytest:~# svccfg -s svc:/system/name-service/switch listprop -l all config
config application site-profile
config application manifest
config/value_authorization astring manifest solaris.smf.value.name-service.switch
config/default astring site-profile files
config/default astring manifest files
config/printer astring site-profile "user files"
config/printer astring manifest "user files"
config/host astring admin "files dns"
config/password astring admin "files ldap"
config/group astring admin "files ldap"

5.2 使用nscfg命令从/etc/nsswitch.conf文件中导入

设置前检查
root@mytest:~# svccfg -s svc:/system/name-service/switch listprop -l all config
config application site-profile
config application manifest
config/value_authorization astring manifest solaris.smf.value.name-service.switch
config/default astring site-profile files
config/default astring manifest files
config/printer astring site-profile "user files"
config/printer astring manifest "user files" nsswitch.conf文件
root@mytest:~# more /etc/nsswitch.conf #
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
# DO NOT EDIT THIS FILE. EDITS WILL BE LOST.
# See nsswitch.conf(4) for details. passwd: files ldap
group: files ldap
hosts: files dns
ipnodes: files dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files
printers: user files
project: files
auth_attr: files
prof_attr: files
tnrhtp: files
tnrhdb: files
sudoers: files 使用nscfg命令导入
root@mytest:~# nscfg import -f svc:/system/name-service/switch:default 导入后检查
root@mytest:~# svccfg -s svc:/system/name-service/switch listprop -l all config
config application site-profile
config application manifest
config/value_authorization astring manifest solaris.smf.value.name-service.switch
config/default astring site-profile files
config/default astring manifest files
config/password astring admin "files ldap"
config/group astring admin "files ldap"
config/host astring admin "files dns"
config/printer astring admin "user files"
config/printer astring site-profile "user files"
config/printer astring manifest "user files"

6. 设置DNS Client

DNS Client信息保存在SMF中,有两种方法可以设置DNS Client:

6.1 使用SMF命令设置

root@mytest:~# svccfg -s svc:/network/dns/client setprop config/domain=test.local
root@mytest:~# svccfg -s svc:/network/dns/client listprop -l all config/domain
config/domain astring admin test.local
root@mytest:~# svccfg -s svc:/network/dns/client setprop config/search=test.local
root@mytest:~# svccfg -s svc:/network/dns/client listprop -l all config/search
config/search astring admin test.local
root@mytest:~# svccfg -s svc:/network/dns/client setprop config/nameserver=net_address:'(192.168.1.100 192.168.2.100)'
root@mytest:~# svccfg -s svc:/network/dns/client listprop -l all config/nameserver
config/nameserver net_address admin 192.168.1.100 192.168.2.100
root@mytest:~# svcadm enable dns/client

6.2 使用nscfg命令从/etc/resolv.conf文件中导入


导入信息前
root@mytest:~# svccfg -s svc:/network/dns/client listprop -l all config
config application manifest
config/value_authorization astring manifest solaris.smf.value.name-service.dns.client resolv.conf内容
root@mytest:~# more /etc/resolv.conf #
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
# DO NOT EDIT THIS FILE. EDITS WILL BE LOST.
# See resolv.conf(4) for details. domain test.local
search test.local
nameserver 192.168.1.100
nameserver 192.168.2.100 使用nscfg命令导入
root@mytest:~# nscfg import -f svc:/network/dns/client:default 导入信息后
root@mytest:~# svccfg -s svc:/network/dns/client listprop -l all config
config application manifest
config/value_authorization astring manifest solaris.smf.value.name-service.dns.client
config/domain astring admin test.local
config/search astring admin test.local
config/nameserver net_address admin 192.168.1.100 192.168.2.100

Solaris11.1网络配置(Fixed Network)的更多相关文章

  1. Debian系网络配置 /etc/network/interfaces

    说Debian系的网卡配置跟Redhat系很不一样,Redhat是放在/etc/sysconfig/network-scripts目录下面的一大堆文件里面,要修改?你一个一个文件来过吧.Debian系 ...

  2. [Linux][VMWare] 学习笔记之安装Linux系统-网络配置

    最近开始折腾Linux,在本机装了个VMWare和Centos,装完之后虚拟机里面的OS可以上网,但是使用SecureCRT连接不上虚拟机,开始折腾这个网络. vmware安装好以后,会自动添加两张网 ...

  3. Linux基础-网络配置

    任务目标:临时配置网络ip,网关,DNS,然后重启network:写配置文件永久保存网络配置 临时配置ens33网卡IP地址为192.168.30.99,查看更改完的ifconfig信息: 重新启动n ...

  4. CentOS启动网络提示connect: Network is unreachable(配置静态路由)

    ls /etc/sysconfig/network-script/ifcfg-eth0 一.看是否在上述目录下存在ifcfg-eth0 这个文件,若存在则按下面的步骤操作: 1.手工配置ip看能不能配 ...

  5. ​vmware虚拟机centos网络配置错误,执行/etc/init.d/network start 或 restart 提示Device eth0 has different MAC address than expected, ignoring

    vmware虚拟机centos网络配置错误,执行/etc/init.d/network start 或 restart 提示Device eth0 has different MAC address ...

  6. Docker Network Configuration 高级网络配置

    Network Configuration TL;DR When Docker starts, it creates a virtual interface named docker0 on the ...

  7. docker学习之network:初识网络配置

    起因 我的开发环境需要一个python代码运行环境.reids服务和mysql服务. 由于以前,我的开发环境是mac,而CI和线上运行环境是centos,偶尔会出项本地单元测试跑不过,而CI可以过.这 ...

  8. Oracle 网络配置与管理

    [学习目标] Oracle 监听器是一个服务器端程序,用于监听所有来自客户端的请求,并为其提供数 据库服务.因此对监听器的管理与维护相当重要.         本章主要内容是描述对Oracle 监听器 ...

  9. Linux下面无线网络配置

    原文:http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html 配置 WLAN 特定参数 iwconfig ethX essid ...

随机推荐

  1. 从配置maven环境到maven项目的新建

    话不多说,直接入正题. 一.配置maven 环境 首先安装最新版支持javaee的eclipse.我这里下载的版本是eclipse-jee-mars-2-win32-x86_64的新版(我是2017年 ...

  2. bootstrap参考网站

    http://www.chuntao.org.cn/http://www.dianxiaohuo.com/

  3. php:file()与file_get_contents():讲日志文件没行读为数组形式

    file()与file_get_contents()一样,都是读取某文件的内容.file_get_contents()输出的是整个文件(不能读取TXT里的首行缩进和换行符). file() 函数把整个 ...

  4. python切片、迭代、生成器、列表生成式等高级特性学习

    python高级特性 1行代码能实现的功能,决不写5行代码.请始终牢记,代码越少,开发效率越高. 切片 当我们要取一个list中的前n各元素时,如果前n个少的话,我们还可以一个一个的取,但是若前n个元 ...

  5. 目标检测 — NMS

    1.非极大值抑制步骤 非极大值抑制算法(Non-maximum suppression,NMS)在目标检测中经常用到.我们的检测算法可能对同一目标产生多次检测的结果,非极大值抑制算法可以保证每个目标只 ...

  6. ural 2022 Riding a Toad

    2022. Riding a Toad Time limit: 1.0 secondMemory limit: 64 MB A tribe of leafmen live in the old for ...

  7. 【51Nod】-1326 遥远的旅途

    Description 一个国家有 N 个城市, 这些城市被标为 0,1,2,...N-1. 这些城市间连有 M 条道路, 每条 道路连接两个不同的城市, 且道路都是双向的. 一个小鹿喜欢在城市间沿着 ...

  8. HANA IMPORT AND EXPORT

    权限管控的过于严格,所以找机会写个导入导出的流程.从测试机传输到生产机 1 选中EXPORT , 导出将要传输的模型 也可以 在QUICK VIEW 里选中导入导出.个人爱好 2 选择传输的两种模式 ...

  9. Alex and broken contest CodeForces - 877A

    /* Name: Copyright: Author: Date: 2018/5/2 10:45:16 Description: 要求出现一个朋友的名字,仅一次 */ #include <ios ...

  10. ugui Event.current.mousePosition获取的坐标原点在左上角

    脚本里使用OnGUI(),在鼠标按下时出发EventType.MouseDown事件,此时如果观察Event.current.mousePosition的坐标原点时左上角,即鼠标按下的点越靠近左上角, ...