http://blog.itpub.net/29960937/viewspace-1347901/

Tips: Record and feedback errors you have encountered.

Welcome to umap  from10.204.205.253,杩炴帴鍫″瀿鎴愬姛!
Trying 10.204.197.128 ... Last login: Tue May 14 10:30:13 2019 from 10.204.205.5
Authorized users only. All activity may be monitored and reported Aug 2018
You have new mail.
-bash-4.4$
-bash-4.4$ uname
SunOS
-bash-4.4$ su -
Password:
Authorized users only. All activity may be monitored and reported Aug 2018
You have new mail.
root@lnltedmr-tds:~# ipmpstat
usage: ipmpstat [-n] [-o <field> [-P]] -a|-g|-i|-p|-t output modes: -a display IPMP data address information
-g display IPMP group information
-i display IPMP-related IP interface information
-p display IPMP probe information
-t display IPMP target information options: -n display IP addresses numerically
-o display only the specified fields, in order
-P display using parsable output mode
root@lnltedmr-tds:~# ipmpstat -p
ipmpstat: probe-based failure detection is disabled
root@lnltedmr-tds:~# Linu
root@lnltedmr-tds:~#
root@lnltedmr-tds:~#
root@lnltedmr-tds:~# netadm enable -p ncp DefaultFixed
-p: illegal option -- p
usage: enable <enm-name>
Enable the specified ENM.
root@lnltedmr-tds:~# netadm list
root@lnltedmr-tds:~# netadm list
root@lnltedmr-tds:~# ipmpstat -p
ipmpstat: probe-based failure detection is disabled
root@lnltedmr-tds:~# ipmpstat -g
root@lnltedmr-tds:~# ipadm create-ipmp ipmp1
root@lnltedmr-tds:~# ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp1 ipmp1 failed -- --
root@lnltedmr-tds:~# ipadm create-ip net2
root@lnltedmr-tds:~# ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp1 ipmp1 failed -- --
root@lnltedmr-tds:~# ipadm add-ipmp -i net2 ipmp1
root@lnltedmr-tds:~# ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp1 ipmp1 failed -- [net2]
root@lnltedmr-tds:~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 3
inet 10.204.197.128 netmask ffffff00 broadcast 10.204.197.255
ether 0:10:e0:3d:24:88
net2: flags=11000803<UP,BROADCAST,MULTICAST,IPv4,FAILED> mtu 1500 index 6
inet 0.0.0.0 netmask ff000000
groupname ipmp1
ether 0:10:e0:3d:24:8a
sp-phys0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 4
inet 169.254.182.77 netmask ffffff00 broadcast 169.254.182.255
ether 2:21:28:57:47:17
ipmp1: flags=8011000802<BROADCAST,MULTICAST,IPv4,FAILED,IPMP> mtu 1500 index 5
inet 0.0.0.0 netmask 0
groupname ipmp1
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
net0: flags=120002004841<UP,RUNNING,MULTICAST,DHCP,IPv6,PHYSRUNNING> mtu 1500 index 3
inet6 fe80::210:e0ff:fe3d:2488/10
ether 0:10:e0:3d:24:88
net2: flags=20012000801<UP,MULTICAST,IPv6,FAILED> mtu 1500 index 6
inet6 ::/0
groupname ipmp1
ether 0:10:e0:3d:24:8a
sp-phys0: flags=120002000840<RUNNING,MULTICAST,IPv6,PHYSRUNNING> mtu 1500 index 4
inet6 ::/0
ether 2:21:28:57:47:17
ipmp1: flags=28012000800<MULTICAST,IPv6,FAILED,IPMP> mtu 1500 index 5
inet6 ::/0
groupname ipmp1
root@lnltedmr-tds:~# ipmpstat -i
INTERFACE ACTIVE GROUP FLAGS LINK PROBE STATE
net2 no ipmp1 ------- down disabled failed
root@lnltedmr-tds:~#

  在远程不好搞。得去机房了。

IPMP(IP Multipathing)是Solaris操作系统中重要特性,它将几个网络接口绑定在一起作为一个IPMP组,做到网络接口的冗余。即使其中的一个网络接口发生故障,IPMP上的业务IP不会丢失,会failover到其他接口上,避免了单点故障。IPMP可用于Oracle的RAC的公用网络或私有网络上。

基于linkIPMP(Link Based IPMP)

在Solaris中mpathd守护进程负责探测网络接口的故障与修复,它所用的参数配置文件为/etc/default/mpathd。IPMP根据mpathd探测网络接口故障的方法不同,可分为基于link的IPMP和基于probe的IPMP。

基于link的IPMP具有以下特点

–mpathd利用网络接口驱动程序进行探测(需要接口硬件支持)

–不需要额外的测试IP地址,节省IP资源

–默认可用(如果接口硬件支持)

在配置IPMP时,有两种模式:Active-Active模式和Active-Standby模式。在Active-Active模式中所有网络接口都要在线处于active状态;在Active-Standby模式中,至少有一个网络接口在线处于active状态,其他网络接口处于standby状态。查看IPMP组中各个网络接口的状态信息可用ipmpstat命令。

# ipmpstat
usage: ipmpstat [-n] [-o [-P]] -a|-g|-i|-p|-t
  output modes:  -a  display IPMP data address information
                 -g  display IPMP group information
                 -i  display IPMP-related IP interface information
                 -p  display IPMP probe information
                 -t  display IPMP target information
       options:  -n  display IP addresses numerically
                 -o  display only the specified fields, in order
                 -P  display using parsable output mode


Solaris 11上配置Link Based IPMP示例

1. 设置NCP (network configuration profile) 为DefaultFixed.

# netadm enable -p ncp DefaultFixed
查看ncp是否为DefaultFixed. # netadm list
TYPE PROFILE STATE
ncp DefaultFixed online
ncp Automatic disabled
loc Automatic offline
loc NoNet offline
loc DefaultFixed online

2. 设置IPMP的transitive-probing属性为false

#svccfg -s svc:/network/ipmp setprop config/transitive-probing=false

#svcadm refresh svc:/network/ipmp:default

查看transitive-probing属性

# svccfg -s svc:/network/ipmp listprop config/transitive-probing

config/transitive-probing boolean false

# ipmpstat -p

ipmpstat: probe-based failure detection is disabled

3. Active-Active模式 (以4个网络接口为例)

创建IPMP组ipmp1

# ipadm create-ipmp ipmp1

创建网络接口net2, net3, net9和net10

#ipadm create-ip net2

#ipadm create-ip net3

#ipadm create-ip net9

#ipadm create-ip net10

添加网络接口到ipmp1组中

# ipadm add-ipmp -i net2 -i net3 -i net9 -i net10 ipmp1

查看ipmp1信息

# ipmpstat -g
GROUP       GROUPNAME   STATE     FDT       INTERFACES
ipmp1           ipmp1                 ok            --           net10 net9 net3 net2
# ipmpstat -i
INTERFACE   ACTIVE  GROUP       FLAGS     LINK      PROBE     STATE
net10               yes         ipmp1          -------         up          disabled    ok
net9                 yes         ipmp1          -------         up          disabled    ok
net3                 yes         ipmp1          -------         up          disabled    ok
net2                 yes         ipmp1          --mbM--     up          disabled    ok

为ipmp1设置IP地址

# ipadm create-addr -T static -a 192.168.57.142/24 ipmp1/v4

# ipmpstat -a
ADDRESS                   STATE  GROUP       INBOUND     OUTBOUND
192.168.57.142            up         ipmp1          net2              net10 net9 net3 net2
查看ipmp1的IP地址

# ipadm show-addr

ADDROBJ   TYPE     STATE     ADDR

lo0/v4           static      ok            127.0.0.1/8

ipmp1/v4      static       ok           192.168.57.144/24

4. Active-Standby模式

继续上面的例子,把net9和net10转换为standby

# ipadm set-ifprop -p standby=on -m ip net9

# ipadm set-ifprop -p standby=on -m ip net10

# ipmpstat -i
INTERFACE   ACTIVE  GROUP       FLAGS     LINK      PROBE     STATE
net10              no           ipmp1           is-----        up          disabled    ok
net9                no           ipmp1           is-----        up          disabled    ok
net3                yes         ipmp1           -------         up          disabled    ok
net2                yes         ipmp1           --mbM--     up          disabled    ok

从ifconfig命令输出中可以看到net9和net10有STANDBY标志,处于inactive状态。

# ifconfig -a inet

ipmp1: flags=108001000843<up,broadcast,running,multicast,ipv4,ipmp,physrunning> mtu 1500 index 9
        inet 192.168.57.142 netmask ffffff00 broadcast 192.168.57.255
        groupname ipmp1
net2: flags=100001000843<up,broadcast,running,multicast,ipv4,physrunning> mtu 1500 index 10
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname ipmp1
net3: flags=100001000843<up,broadcast,running,multicast,ipv4,physrunning> mtu 1500 index 11
        inet 0.0.0.0 netmask ff000000 broadcast 0.255.255.255
        groupname ipmp1
net9: flags=100061000843<up,broadcast,running,multicast,ipv4,standby,inactive,physrunning> mtu 1500 index 12
        inet 0.0.0.0 netmask ff000000 
        groupname ipmp1
net10: flags=100061000843<up,broadcast,running,multicast,ipv4,standby,inactive,physrunning> mtu 1500 index 8
        inet 0.0.0.0 netmask ff000000 
        groupname ipmp1

官网原版:

Commonly Used Network Administration Commands

https://docs.oracle.com/cd/E37838_01/html/E61478/index.html

About IPMP Administration

https://docs.oracle.com/cd/E37838_01/html/E60991/gfkcy.html#scrolltoc

Administering IPMP

https://docs.oracle.com/cd/E37838_01/html/E60991/gdysw.html#scrolltoc

How to Configure an Active-Standby IPMP Group

https://docs.oracle.com/cd/E37838_01/html/E60991/gfyeh.html#scrolltoc

Example 15  Configuring an Active-Standby IPMP Group

This example shows how to create an active-standby IPMP configuration.

$ ipadm create-ipmp ipmp0

$ ipadm create-ip net0
$ ipadm create-ip net1
$ ipadm create-ip net2
$ ipadm add-ipmp -i net0 -i net1 -i net2 ipmp0 $ ipadm create-addr -a 192.0.2.5/24 ipmp0
ipadm: ipmp0/v4
$ ipadm create-addr -a 192.0.2.10/24 ipmp0
ipadm: ipmp0/v4a $ ipadm create-addr -a 192.0.2.15/27 net0
ipadm: net0/v4
$ ipadm create-addr -a 192.0.2.20/27 net1
ipadm: net1/v4
$ ipadm create-addr -a 192.0.2.25/27 net2
ipadm: net2/v4 $ ipadm set-ifprop -p standby=on -m ip net2 $ ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp0 ipmp0 ok 10.00s net0 net1 (net2) $ ipmpstat -t
INTERFACE MODE TESTADDR TARGETS
net0 routes 192.0.2.15/27 192.0.2.2/27
net1 routes 192.0.2.20/27 192.0.2.2/17
net2 routes 192.0.2.25/27 192.0.2.5/27

Solaris 11中配置基于link的IPMP的更多相关文章

  1. Solaris 11中的变化

    Solaris 11发布了好几个月了,用了后感觉好多配置的东东变化不小,写写自己遇到的问题和大家分享一下, 1,如何设置root密码 Solaris 11中root作为一个Role来存在,已经不能直接 ...

  2. Nginx的配置文件简介及在Nginx中配置基于不同ip的虚拟主机

    Nginx的配置文件简介及在Nginx中配置基于不同ip的虚拟主机: #user nobody; worker_processes 1; #error_log logs/error.log; #err ...

  3. 如何在 Linux 中配置基于密钥认证的 SSH

    什么是基于 SSH 密钥的认证? 众所周知,Secure Shell,又称 SSH,是允许你通过无安全网络(例如 Internet)和远程系统之间安全访问/通信的加密网络协议.无论何时使用 SSH 在 ...

  4. 在Linux-0.11中实现基于内核栈切换的进程切换

    原有的基于TSS的任务切换的不足 进程切换的六段论 1 中断进入内核 2 找到当前进程的PCB和新进程的PCB 3 完成PCB的切换 4 根据PCB完成内核栈的切换 5 切换运行资源LDT 6 利用I ...

  5. 在Tomcat中配置基于springside的项目

    注意点: Tomcat默认没有配置Transaction,需要在/Conf/Context.xml配置 1 <Transaction factory="org.objectweb.jo ...

  6. CentOS7中配置基于Nginx+Supervisor+Gunicorn的Flask项目

    配置Nginx 1.安装nginx yum install nginx 2.安装好后在/etc/nginx/default.d中添加location的配置,并指向8001端口,以后Gunicorn会监 ...

  7. Solaris 11配置IPS安装系统包(类似linux中的yum源)

    参考:http://blog.chinaunix.net/uid-8860-id-3777457.html 一. 概述: Solaris 11被称为第一个云操作系统,因此在很多方面体现了云系统的一些特 ...

  8. 11.翻译系列:在EF 6中配置一对零或者一对一的关系【EF 6 Code-First系列】

    原文链接:https://www.entityframeworktutorial.net/code-first/configure-one-to-one-relationship-in-code-fi ...

  9. hibernate中基于主键映射1-1关联关系和基于外键映射1-1关联关系的不同

    基于主键映射1-1关联关系和基于外键映射1-1关联关系的不同,主要区别是在配置映射文件上会有区别 两个持久化类为Manager和Department 1:基于主键映射1-1关联关系 1)使用其他持久化 ...

随机推荐

  1. KNN距离函数的简单拓展

    KNN--k-NearestNeighbor可以是是分类法中最简单的算法了. 大致的idea为:找出k各跟新数据点最像的点,看这些点主要属于哪类,那么新数据点也就属于哪类的了. 其伪代码如下: 1. ...

  2. 十二:jinja2模板中使用url_for

    在页面中,有点击跳转到另一个地址的时候,可以使用url_for来指定要跳转的视图函数:{{ url_for('view_function') }} 如果该视图需要接收参数

  3. 【DVWA】Brute Force(暴力破解)通关教程

    日期:2019-08-01 14:49:47 更新: 作者:Bay0net 介绍:一直以为爆破很简单,直到学习了 Burp 的宏录制和匹配关键词,才发现 burp 能这么玩... 0x01. 漏洞介绍 ...

  4. Java学习之==>集合体系(待续。。)

    一.概述 Java的集合体系,本质上是一个陈放数据的容器,像之前学过的数组也是陈放数据的容器,但在 Java 中数组的长度是固定的,使用起来没那么方便.集合提供了更加强大的功能,使用起来也更方便和快捷 ...

  5. freetype HarfBuzz fontconfig Cairo 编译顺序

    There is also a circular dependency between freetype and HarfBuzz. Note that fontconfig and Cario ar ...

  6. shell脚本判断端口是否打开

    [root@www zabbix_scripts]# cat check_httpd.sh #!/bin/bash a=`lsof -i: | wc -l` " ];then " ...

  7. JavaScript 奇怪的代码

    错误代码: var input = document.getElementsByTagName("input"); for (var i=0; i<input.length; ...

  8. java:HTML(table表格,ul列表)和CSS(导入.css文件,三种定义颜色方式,三种样式选择器,a标签属性顺序,)

    1.重点掌握: html: 1.form表单:input,checkbox,seelct,radio,button,submit 2.table表格:thead-->tr-->th;tbo ...

  9. 微信小程序前端支付

    原文地址 //index.js Page({ data: { }, //点击支付按钮进行支付 payclick: function () { var t = this; wx.login({ //获取 ...

  10. 【ABAP系列】SAP ABAP OOALV 动态设置单元格可否编辑

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP OOALV 动 ...