Solaris11之网络配置(更新:2021-10-21)

目录

Solaris11网络配置新特性

手动配置网络

创建静态IP地址

创建IP接口

创建IP地址

配置默认网关

配置DNS服务器

配置主机名

放开root远程登录


Solaris11网络配置新特性

Oracle Solaris 11 使用基于配置文件的网络配置,其配置模式有两种:手动配置自动配置
Automatic NCP 使用 DHCP 来从连接的任何以太网接口获取基本网络配置(IP 地址、路由器和 DNS 服务器)。如果失败,它将尝试连接已知网络列表中信号最好的无线网络。
DefaultFixed NCP 有效地禁用了自动网络配置,需要使用 dladm 和 ipadm 手动配置网络接口以及使用 Oracle Solaris Service Management Facility (SMF) 配置名称服务。
配置文件由两个管理命令(netadm 和 netcfg)管理,用一个实体描述网络接口、名称服务、路由和 IP 过滤器和 IPsec 策略的配置。

dladm 可执行数据链路(第 2 层)管理,配置物理链路、聚合、VLAN、IP 隧道和 InfiniBand 分区。它还管理链路层属性。
ipadm 可配置 IP 接口、IP 地址和 TCP/IP 协议属性。它还可取代 ndd 来进行网络层和传输层调优。

这里仅介绍手动配置静态网络。

技术资源 | Oracle 中国

手动配置网络

手动配置网络分为两步:1、创建静态 IP 地址;2、配置网关

创建静态IP地址

切换到手动配置默认
# netadm enable -p ncp DefaultFixed
# netadm list
TYPE        PROFILE        STATE
ncp         Automatic      disabled
ncp         DefaultFixed   online
loc         DefaultFixed   online
loc         Automatic      offline
loc         NoNet          offline

 创建静态 IP 地址是分两步:1、创建 IP 接口;2、创建 IP 地址。

创建IP接口

# dladm show-phys                             
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net1              Ethernet             up         1000   full      e1000g1
net0              Ethernet             up         1000   full      e1000g0
# ipadm create-ip net0
# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       down       yes    --
net1       ip       ok       yes    --

创建IP地址

# 添加静态ip地址
ipadm create-addr -T static -a 192.168.35.221/23 net0/v4
# 删除静态ip地址
ipadm delete-addr net0-a/v4(此项为ADDROBJ)
# ipadm show-if
IFNAME     CLASS    STATE    ACTIVE OVER
lo0        loopback ok       yes    --
net0       ip       ok       yes    --
net1       ip       ok       yes    --
# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok           127.0.0.1/8
net0/v4          static   ok           192.168.35.221/23
lo0/v6            static   ok           ::1/128
net1/v6          addrconf ok           fe80::250:56ff:fea3:1836/10

配置默认网关

# 添加永久默认网关
route -p add default 192.168.34.1
# 删除默认网关
route -p delete default 192.168.10.1
# 查看永久路由表项
route -p show

配置DNS服务器

# svccfg -s svc:/network/dns/client setprop config/nameserver=net_address:'(223.5.5.5 8.8.8.8)'
# svccfg -s svc:/network/dns/client listprop config/nameserver
config/nameserver net_address 223.5.5.5 8.8.8.8
# svcadm refresh svc:/network/dns/client
# cat /etc/resolv.conf 
……
nameserver      223.5.5.5
nameserver      8.8.8.8
# 此时可能还是不行,则需要在编辑/etc/nsswitch.conf 
vi /etc/nsswitch.conf 
将hosts:  files 修改为:hosts:  files dns;然后执行:
svcadm refresh name-service/switch
svcadm restart name-service/switch

配置主机名

# svccfg -s svc:/system/identity:node setprop config/nodename=target-solaris11
# svccfg -s svc:/system/identity:node listprop config/nodename
config/nodename astring     target-solaris11
# svcadm refresh svc:/system/identity:node
# svcadm restart identity:node

放开root远程登录

Solaris即便配置了PermitRootLogin yes,也无法使用root远程登录Solaris,不管是password认证还是public key认证。

forced-commands-only:允许root进行SSH登录,但仅允许使用密钥方式进行验证,而且仅允许执行已授权的命令
no:不允许root登录SSH
without-password:不允许root通过password认证登录SSH
yes:允许root登录SSH

解决:注释如下文件的行
vi /etc/user_attr
#root::::type=roles

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2013年最新版的强悍Unix版本Solaris 11.1系统文件,功能十分强大,不愧是真正血统的Unix系统! Oracle Announces Availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1 Delivers Oracle Database and Java Enhancements, Expanded Mission Critical Cloud Management Capabilities and Advanced Platform Features Redwood Shores, Calif – October 26, 2012 News Facts Oracle today announced general availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1. Oracle Solaris 11 is the first cloud OS that allows customers to build large-scale enterprise-class Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) clouds on a wide range of SPARC and x86 servers and Oracle engineered systems. Oracle Solaris Cluster 4.1 extends high availability and disaster recovery capabilities of Oracle Solaris and includes unique virtual cluster features supporting highly efficient application consolidation with best-in-class availability. Oracle Solaris 11 is already widely in production with thousands of customers with mission critical deployments across industries such as financial services, communications, healthcare, retail, public sector and media and entertainment. Read customer success stories about Oracle Solaris here. Oracle Solaris 11 is also gaining strong momentum among enterprise application vendors with hundreds of applications already qualified for Oracle Solaris Ready status through the Oracle PartnerNetwork (OPN). OPN members can develop, sell and implement their solutions on Oracle Solaris 11 and take advantage of specialized Oracle Solaris resources to expand their market reach. Customers and partners can quickly and safely upgrade to Oracle Solaris 11.1 using the built-in update tools and software repositories available with Oracle Solaris 11. Oracle will host a webcast on November 7, 2012 at 8 a.m. Pacific time on Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1, featuring Markus Flierl, vice president, Oracle Solaris Engineering, Core Technology and Bill Nesheim, vice president, Oracle Solaris Engineering, Platform Software. Register here. This event will also include an interactive chat with core developers of Oracle Solaris and Oracle Solaris Cluster. New and Enhanced Features in Oracle Solaris 11.1 Oracle Solaris 11.1 increases the performance, availability and I/O throughput of the latest Oracle Database technology. A new, optimized shared memory interface between the Oracle Database and Oracle Solaris 11.1 provides 8x faster database startup and shutdown, as well as online resizing of the Oracle Database System Global Area (SGA). Oracle Solaris 11.1 introduces unique new capabilities for optimizing Oracle Database performance. Oracle Solaris 11.1 exposes Oracle Solaris DTrace I/O interfaces that allow an Oracle Database administrator to identify I/O outliers and subsequently isolate network or storage bottlenecks. A new Oracle Solaris DTrace plug-in for Oracle Java Mission Control to enable customers to profile Java applications on Oracle Solaris production systems. New cloud management features add to Oracle Solaris 11’s zero overhead built-in virtualization capabilities across system, network and storage resources, including expanded support for Software Defined Networks (SDN) with Edge Virtual Bridging enhancements, to maximize network resource utilization and manage bandwidth in cloud environments. New built-in memory predictor monitors application memory use and provides optimized memory page sizes and resource location to speed overall application performance. Support for an unprecedented 32 TB of RAM and thousands of CPUs unlocks the full potential of Oracle’s latest server systems. Oracle Solaris Cluster 4.1 Highlights New Oracle Solaris 10 Zone Clusters allow customers to consolidate mission critical Oracle Solaris 10 applications on Oracle Solaris 11 cloud environments. Expanded disaster recovery operations using Oracle’s Sun ZFS Storage Appliance services along with Oracle Solaris Cluster 4.1 to coordinate failover of applications and data to a remote disaster recovery site. Faster application recovery with improved storage failure detection and resource dependencies management. New labeled security capability in Oracle Solaris Zone Clusters provides military grade application separation in highly consolidated mission-critical deployments using Oracle Solaris 11 Trusted Extensions. Integrated Oracle Deployments and Support Oracle Enterprise Manager Ops Center provides comprehensive cloud management capabilities for Oracle Solaris 11, including self-service provisioning of Oracle Solaris 11 Zones. Ops Center’s integrated systems management delivers enterprise scale cloud performance. Oracle Enterprise Manager Ops Center is available to Oracle Solaris customers at no additional cost under the Ops Center Everywhere Program. Oracle Solaris Studio delivers the latest in compiler optimizations, multithread performance and powerful analysis tools for native development, and optimized application performance and reliability on Oracle Solaris 11.1 systems. Oracle Solaris 11 guarantees binary compatibility with previous Oracle Solaris versions through the Oracle Solaris Binary Application Guarantee Program, which provides customers a seamless upgrade path and the industry’s best investment protection. Oracle Solaris Legacy Containers allows older Oracle Solaris environments to be brought forward onto latest generation hardware to provide power, cooling and footprint consolidation savings. OPN members can find Oracle Solaris tools and resources in the Oracle Solaris Knowledge Zone, including Oracle Solaris Ready, Oracle Solaris 11 Specialization and Oracle Solaris Development Initiative. The Oracle Solaris Remote Lab now provides a secure cloud environment for OPN members to test and validate their applications with Oracle Solaris 11 in SPARC and x86 virtual environments. Supporting Quotes “Oracle recommends Oracle Solaris 11 for all UNIX®-based Oracle implementations. Oracle Solaris 11.1 delivers over 300 new performance and feature enhancements and is engineered together with Oracle Database, middleware, applications to increase performance, streamline management and automate support for Oracle deployments,” said John Fowler, executive vice president, Systems, Oracle. “The combination of the secure, highly available capabilities of Oracle Solaris Cluster 4.1 and the built-in virtualization of Oracle Solaris 11.1 helps customers bring their most mission-critical applications into a cost effective, agile cloud environment and delivers extreme availability for enterprise applications.” “Clients are looking for ways to reduce the complexity of systems management while enabling Platform as a Service (PaaS) & Software as a Service (SaaS) clouds,” says Lee Diamante, solutions architect, Systems Computing Solutions at Forsythe. “The value of Oracle Solaris 11 is that it maintains all the enterprise-class features expected with a mission-critical OS, while bringing in new, innovative technologies. Forsythe has a long and rich history of delivering customer solutions on Oracle Solaris systems. This is why we are excited about the Solaris 11.1 release.” “Oracle is making it much easier for partners like Informatica to gain access to their software with the new testing environments; shrinking the time to measurable results and value,” said Julie Lockner, vice president, ILM, Informatica. “With the release of Oracle Solaris 11.1 Informatica customers now have access to mission critical deployments across major industries, with an environment of high performance and high availability. With all the new feature enhancements, we look forward to making the Informatica Platform certified on the Oracle Solaris 11 product family.”

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值