Você está na página 1de 9

Shared Ethernet Adapter (SEA)

A SEA can be used to connect a physical Ethernet network to a virtul Ethernet network. The SEA
hosted in the Virtual I/O Server acts as a layer-2 bridge between the internal and external network.
With Shared Ethernet Adapters on the Virtual I/O Server, virtual Ethernet adapters on client logical
partitions can send and receive outside network traffic.
Shared Ethernet Adapter is a Virtual I/O Server component that bridges a physical Ethernet adapter
and one or more virtual Ethernet adapters:
-The real adapter can be a physical Ethernet adapter, a Link Aggregation or EtherChannel device, or
a Logical Host Ethernet Adapter . The real adapter cannot be another Shared Ethernet Adapter or a
VLAN pseudo-device.
-The virtual Ethernet adapter (trunk adpater in the SEA) must be created with the following
settings:

Adapter ID: Any ID for the Virtual ethernet adapter


Port Virtual Ethernet: PVID given to this adapter (usually a VLAN ID which is not used at any other
adapter to avoid untagging packets)
IEE 802.1q: Additional VLAN IDs can be specified here
Ethernet bridging: This checkbox enables accessing external networks
Priority: For SEA Failover mode, you can specify which SEA should be the primary (here it is the
secondary SEA)

-------------------------------------------------A Shared Ethernet Adapter provides access by connecting the internal VLANs with the VLANs on the
external switches. Using this connection, logical partitions without physical adapters can share the
IP subnet with stand-alone systems and other external logical partitions. (A virtual Ethernet
adapter connected to the SEA must have the Access External Networks check box enabled.)
The Shared Ethernet Adapter forwards outbound packets received from a virtual Ethernet adapter to
the external network and forwards inbound packets to the appropriate client logical partition over
the virtual Ethernet link to that logical partition.
IF SEA failover has been configured leave SEA without IP addresses. (It makes maintenance of SEA
also easier)

Checking SEA on VIO server:


padmin@vios1: / # lsdev -dev ent* | grep Shared
ent8
Available
Shared Ethernet Adapter
padmin@vios1: / # lsdev -dev ent8 -attr | grep adapter
pvid_adapter ent4
Default virtual adapter to use for non-VLAN-tagged packets
real_adapter ent0
Physical adapter associated with the SEA

True
True

--------------------------------------------------Quality of Service
Quality of Service (QoS) is a Shared Ethernet Adapter feature which infulences bamdwidth. QoS allows
the Virtual I/O Server to give a higher priority to some types of packets. Shared Ethernet Adapter
on the VIO Server can inspect bridged VLAN-tagged traffic for the VLAN priority field in the VLAN
header. The 3-bit VLAN priority field allows each individual packet to be prioritized with a value
from 0 to 7 to distinguish more important traffic from less important traffic. More important
traffic is sent preferentially and uses more Virtual I/O Server bandwidth than less important
traffic.
--------------------------------------------------SEA and VLAN traffic:

The VLAN tag information is referred to as VLAN ID (VID). Ports on a switch are configured as being
members of a VLAN designated by the VID for that port. The default VID for a port is referred to as
the Port VID (PVID). The VID can be added to an Ethernet packet either by a VLAN-aware host, or by
the switch in the case of VLAN-unaware hosts.
For VLAN-unaware hosts, a port is set up as untagged and the switch will tag all packets entering
through that port with the Port VLAN ID (PVID). The switch will also untag all packets exiting that
port before delivery to the VLAN unaware host. A port used to connect VLAN-unaware hosts is called
an untagged port, and it can be a member of only one VLAN identified by its PVID.
Hosts that are VLAN-aware can insert and remove their own tags and can be members of more than one
VLAN. These hosts are typically attached to ports that do not remove the tags before delivering the
packets to the host, but will insert the PVID tag when an untagged packet enters the port.
A port will only allow packets that are untagged or tagged with the tag of one of the VLANs that the
port belongs to.
The SEA directs packets based on the VLAN ID tags. One of the virtual adapters in the SEA must be
designated as the default PVID adapter (ent1). Ethernet frames without any VLAN ID tags that the SEA
receives from the external network are forwarded to this adapter and assigned the default PVID.

Based on the above image, incoming packets from external networks:


- untagged packets are forwarded to ent1 and tagged with the default PVID=1
- packets with VID=1 are forwarded to adapter ent1
- packets tagged with VID 10 will be forwarded to ent1 as well (as the virtual Ethernet adapter ent1
has the additional VID 10.)
- before LPAR2 recieves packets Hypervisor will remove VLAN tag
- only packets for VLAN 10 are received by the network interfaces en1 on LPAR1
Outgoing packets to external networks:
- packets tagged with VLAN 1 (it matches the PVID ent1) are untagged by the Hypervisor before they
are received by ent1, then bridged to ent0 and sent out. (VLAN-unaware destination devices on the
external network will be able to receive these packets.)
- packets tagged with a VLAN 10, are processed with the VLAN tag unmodified.
- packets sent by LPAR2 will be tagged by Hypervisor, with PVID=1
- packets sent by LPAR1 through en1 (ent1) are tagged with VID=10 by AIX
- packets sent by LPAR1 through en0 (ent0) are tagged with PVID=1 by Hypervisor
(The virtual Ethernet adapter ent1 of the SEA also uses VID 10 and will receive the packet from the
POWER Hypervisor with the VLAN tag unmodified. The packet will then be sent out through ent0 with
the VLAN tag unmodified. So, only VLAN-capable destination devices will be able to receive these. )
--------------------------------------------------Shared Ethernet Adapter Failover:
In a Shared Ethernet Adapter failover configuration there are two Virtual I/O Servers, each running
a Shared Ethernet Adapter. The Shared Ethernet Adapters communicate with each other on a control
channel using two virtual Ethernet adapters configured on a separate VLAN. The control channel is
used to carry heartbeat packets between the two Shared Ethernet Adapters. When the primary Shared
Ethernet Adapter loses connectivity the network traffic is automatically switched to the backup
Shared Ethernet Adapter.

The trunk priority for the Virtual Ethernet adapters on VIO Server 1 (which has the Access external
network flag set) is set to 1. This means that normally the network traffic will go through VIO
Server 1. VIO Server 2 with trunk priority 2 is used as backup in case VIO Server 1 has no
connectivity to the external network.
more info: https://www-304.ibm.com/support/docview.wss?uid=isg3T1011040
--------------------------------------------------Shared Ethernet Adapter failover with Loadsharing
The Virtual I/O Server Version 2.2.1.0, or later, provides a load sharing function to enable to use
the bandwidth of the backup Shared Ethernet Adapter (SEA).It makes an effective use of the backup
SEA bandwidth.

In this example the packets of VLAN 10 will go through VIOS1 and packets of VLAN 20 will go through
VIOS2.
Prerequisites:
- Both of primary and backup Virtual I/O Servers are at Version 2.2.1.0, or later.
- Two or more trunk adapters are configured for the primary and backup SEA pair.
- The virtual local area network (VLAN) definitions of the trunk adapters are identical between the
primary and backup SEA pair.
To create or enable the SEA failover with Load Sharing, you have to enable the load sharing mode on
the primary SEA first before enabling load sharing mode on the backup SEA. The load sharing
algorithm automatically determines which trunk adapters will be activated and will treat network
packets for VLANs in the SEA
pair. You can not specify the active trunk adapters of the SEAs manually in the load sharing mode.
Changing the SEA to Load Sharing mode:
$ chdev -dev ent6 -attr ha_mode=sharing

--------------------------------------------------Checking SEA Load sharing distribution:


Check which adapter is active on which VIO:
$ entstat -all ent8 | grep -e Priority -e "Virtual Adapter" -e "
Mode"

State:" -e "High Availability

ent8:
SEA adapter
ent4, ent5: Trunk virtual ethernet adapters in SEA
VIO1:
State: PRIMARY_SH
<--shows it is in load sharing mode and it is the primary SEA
adapter (if we were in failover mode)
High Availability Mode: Sharing
Priority: 1
...
Virtual Adapter: ent4
Priority: 1 Active: False
Virtual Adapter: ent5
Priority: 1 Active: True
VIO2:
State: BACKUP_SH
<--shows it is in load sharing mode and it is the backup SEA
adapter (if we were in failover mode)
High Availability Mode: Sharing
Priority: 2
...
Virtual Adapter: ent4
Priority: 2 Active: True
Virtual Adapter: ent5
Priority: 2 Active: False
--------------------------------------------------SEA and SEA failover creation:
To create a Shared Ethernet Adapter (SEA) you need:
- <PHYS>: a physical adapter as backend
- <VIRT>: a virtual adapter
- <VLAN>: an internal VLAN ID
- default: specifies the default virtual adapter to be used for non-VLAN-tagged packets
- defaultid: this VLAN ID used for untagged packets (the PVID used for the SEA device)
for SEA failover:
- <CONT>: a second virtual adapter for the control channel
+ optional settings:
-netaddr: SEA will periodically ping this IP address, so it can detect network failures
-largesend: enable TCP segmentation offload

# simple SEA
$ mkvdev -sea <PHYS> -vadapter <VIRT> -default <VIRT> -defaultid <VLAN>
# Shared Ethernet Adapter Failover:
$ mkvdev -sea <PHYS> -vadapter <VIRT> -default <VIRT> -defaultid <VLAN> -attr ha_mode=auto
ctl_chan=<CONT>
# Shared Ethernet Adapter Failover with Load Sharing:

$ mkvdev -sea ent1 -vadapter ent4,ent5 -default ent4 -defaultid 10 -attr ha_mode=sharing
ctl_chan=ent6

(with optional settings)


$ mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1 -attr ha_mode=auto ctl_chan=ent3
netaddr=9.3.4.1 largesend=1
(Any interface with an IP address on the adapters used when defining the SEA must be detached.)

--------------adding a virtual adapter later to the SEA:


chdev -dev entx -attr virt_adapters=entY,entZ
(entX: SEA adapter; entY,entZ: virtual adapters - all virt. adapters has to be listed here, not just
the new one)
--------------SEA Failover testing:
On VIOS1 and VIOS2 virtual adapters have been created. At creation time trunk priority has been set:
VIOS1: 1
VIOS2: 2
With command 'mkvdev' SEAs (ent14) have been created on both VIO
1. check settings:
VIOS1:
lsattr -El ent14 | grep ha_mode
netstat -v ent14 | grep Active

<--should show: ha_mode=auto


<--should show: Priority: 1 Active: True

VIOS2:
lsattr -El ent14 | grep ha_mode
netstat -v ent14 | grep Active

<--should show: ha_mode=auto


<--should show: Priority: 2 Active: False

2. perform manual SEA failover:


VIOS1:
chdev -l ent14 -a ha_mode=standby
3. check settings:
VIOS1:
lsattr -El ent14 | grep ha_mode
netstat -v ent14 | grep Active
errpt | head

<--should show: ha_mode=standby


<--should show: Priority: 1 Active: False
<--should show: BECOME BACKUP

VIOS2:
lsattr -El ent14 | grep ha_mode
netstat -v ent14 | grep Active
errpt | head

<--should show: ha_mode=auto


<--should show: Priority: 2 Active: True
<--should show: BECOME PRIMARY

4. switching back:
VIOS1:
chdev -l ent14 -a ha_mode=auto

5. check settings:
VIOS1:
lsattr -El ent14 | grep ha_mode
netstat -v ent14 | grep Active
errpt | head

<--should show: ha_mode=auto


<--should show: Priority: 1 Active: True
<--should show: BECOME PRIMARY

VIOS2:
lsattr -El ent14 | grep ha_mode
netstat -v ent14 | grep Active
errpt | head

<--should show: ha_mode=auto


<--should show: Priority: 2 Active: False
<--should show: BECOME BACKUP

--------------thread attribute:
Threading ensures that CPU resources are shared fairly when a Virtual I/O Server provides a mix of
SEA and VSCSI services.
If it set to 1, it will equalize the priority between virtual disk and SEA network I/O. This
throttles Ethernet traffic to prevent it from consuming a higher percentage of CPU resources versus
the virtual SCSI activity. This is a concern only when CPU resources are constrained resources.)
padmin@vios1 : /home/padmin # lsdev -dev ent14 -attr | grep thread
thread
1
Thread mode enabled (1) or disabled (0)

True

Threading is enabled by default for shared Ethernet adapters.


Disable threading when a Virtual I/O Server is not used for VSCSI (chdev dev entX attr thread=0).
--------------entstat -all ent4
(entstat -all ent4 | grep Active)
netstat -cdlistats | grep -Ei "\(ent|media|link status"
(good!!!)

shows if this adapter is active or not


this lists links on all physical adapter

--------------Configuring the interface on SEA (adding ip...):


cfgassist or mktcpip command:
mktcpip -hostname VIO_Server1 -inetaddr 9.3.5.196 -interface en3 -netmask 255.255.254.0 -gateway
9.3.4.1
--------------SEA load sharing mode error:
$ chdev -dev ent23 -attr ha _mode=sharing
Method error (/usr/lib/methods/chgsea):
0514-018 The values specified for the following attributes
are not valid:
ha_mode. Insufficient no. of adapters.

This indicates that you have only 1 virtual adapter configured in the SEA, so load cannot be shared
(that is why you cannot chage ha_mode attribute). Add additional Virtual Ethernet Adpater to the SEA
for this sharing mode to activate.

Você também pode gostar