Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

Implement IPMP on Solaris

Preamble

This document is intended to give fast overview and sample way to implement IPMP on SUN Solaris. IPMP play very important role in SUN strategy to provide high availability in Solaris. Basic idea is to have IP address why “switch” between physical interfaces in case of fail of one of them

Prerequisites

1. To implement IPMP you need to have on the machine 2 NICs with unique MAC addresses
2. NICs in IPMP group should have same media type (i.e. Ethernet or ATM for example)
3. NICs should be be connected to the same switch or hub. In case of switch check if they are in same VLAN (if configured)
4. Loaded ip module to the interface
# ifconfig e1000g2 modlist
0 arp
1 ip
2 e1000g
5. If you do not have it execute
# ifconfig e1000g2 modinsert ip
6. Working gateway for IPs used in IPMP group

Setup

1. set in /etc/hostname.e1000g2 and /etc/hostname.e1000g3 the appropriate parameters for to attach interfaces to the group named test and set additional IP address
# cat /etc/hostname.e1000g2
sun3-2-1 netmask + broadcast + failover group test up addif sun3-2  netmask + broadcast + -failover deprecated  up
# cat /etc/hostname.e1000g3
sun3-2-2 netmask + broadcast + failover group test up
2. activate the interfaces
# ifconfig e1000g2 plumb
# ifconfig e1000g3 plumb
# ifconfig e1000g2 `cat /etc/hostname.e1000g2 `
Setting netmask of e1000g2 to 255.255.255.0
Created new logical interface e1000g2:1
Setting netmask of e1000g2:1 to 255.255.255.0
# ifconfig e1000g3 `cat /etc/hostname.e1000g3 `
Setting netmask of e1000g3 to 255.255.255.0
3. Check what's happen with interfaces and IPs
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.88 netmask ffffff00 broadcast 192.168.1.255
        ether 0:c:29:b2:8f:92
e1000g2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 12
        inet 10.0.1.12 netmask ffffff00 broadcast 10.0.1.255
        groupname test
        ether 0:c:29:b2:8f:9c
e1000g2:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 12
        inet 10.0.1.32 netmask ffffff00 broadcast 10.0.1.255
e1000g3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 10
        inet 10.0.1.22 netmask ffffff00 broadcast 10.0.1.255
        groupname test
        ether 0:c:29:b2:8f:b0


Final notes

Of course the above example give just very brief explanation and sample configuration. For more information take a look on the official Oracle  documentations.

Setting IP on Solaris - canonical way

To set IP address in Solaris you should first check if there is such network adapter. This can be done on many ways:

dmesg or from /var/adm/messages:

Sep 18 11:50:10 sun3 mac: [ID 469746 kern.info] NOTICE: e1000g3 registered


dladm:

e1000g3 link: up speed: 1000 Mbps duplex: full

prtconf:

dev_path=/pci@0,0/pci15ad,750@14:e1000g3 dev_link=/dev/e1000g3


Set in /etc/hosts record for this IP/hostname

10.0.1.32 yourhostname


Set netmask for this IP in /etc/netmasks
10.0.1.0 255.255.255.0

Next step is to set in /etc the file hostname.e1000g3 with content:

yourhostname netmask + broadcast + up

The previous three steps are done to have interface up on boot of the system

Plumb the interface

ifconfig e1000g3 plumb

And get it up and running

ifconfig e1000g3 `cat /etc/hostname.e1000g3`

To set your default gateway create file /etc/defaultrouter and put inside the IP address of your gateway

Should I trust AI

 Should I trust AI? So far no, sorry.  I tested for the moment (May, 2025) most advanced model for programming and ask very simple question:...