Показаны сообщения с ярлыком LAG. Показать все сообщения
Показаны сообщения с ярлыком LAG. Показать все сообщения

пятница, 29 декабря 2017 г.

Windows 2012/2016 Networking - VLAN + Team+ Hyper-V vSwitch

1. Как создавать Team VLAN интерфейсы в Windows 2012/2016 (т.н VLAN Mode):
802.1q парсится на уровне Team-интерфейса (метод не поддерживается для Hyper-V vSwitch):

https://community.mellanox.com/docs/DOC-1845


2. Team Interfaces
There are different ways of interfacing with the team:
  • Default mode: all traffic from all VLANs is passed through the team
  • VLAN mode: Any traffic that matches a VLAN ID/tag is passed through.  Everything else is dropped.
Inbound traffic passes through to one team interface at once.

The only supported configuration for Hyper-V is shown above: Default mode passing through all traffic t the Hyper-V Switch.  Do all the VLAN tagging and filtering on the Hyper-V Switch.  You cannot mix other interfaces with this team – the team must be dedicated to the Hyper-V Switch.  REPEAT: This is the only supported configuration for Hyper-V.
A new team has one team interface by default. 
Any team interfaces created after the initial team creation must be VLAN mode team interfaces (bound to a VLAN ID).  You can delete these team interfaces.
Get-NetAdapter: Get the properties of a team interface
Rename-NetAdapter: rename a team interface
Team Members
  • Any physical ETHERNET adapter with a Windows Logo (for stability reasons and promiscuous mode for VLAN trunking) can be a team member.
  • Teaming of InfiniBand, Wifi, WWAN not supported.
  • Teams made up of teams not supported.
You can have team members in active or standby mode.
содрано отсюда: http://www.aidanfinn.com/?p=12924
3. Официальное чтиво:
https://gallery.technet.microsoft.com/Windows-Server-2016-839cb607/view/Discussions#content

1.1.1      Using VLANs

VLANs are a powerful tool that solves many problems for administrators. There are a few rules for using VLANs that will help to make the combination of VLANs and NIC Teaming a very positive experience.
1)       Anytime you have NIC Teaming enabled, the physical switch ports the host is connected to should be set to trunk (promiscuous) mode. The physical switch should pass all traffic to the host for filtering without modification.[1]
1)      Anytime you have NIC Teaming enabled, you must not set VLAN filters on the NICs using the NICs advanced properties settings. Let the teaming software or the Hyper-V switch (if present) do the filtering.
When using SET all VLAN settings must be configured on the VM’s switch port. 

1.1.1.1     VLANs in a Hyper-V host

This section applies only to NIC Teaming.  It does not apply to SET as a SET team has no team interfaces on which a VLAN may be enabled.
In a Hyper-V host VLANs should be configured only in the Hyper-V switch, not in the stand-alone NIC Teaming software. Configuring team interfaces with VLANs can easily lead to VMs that are unable to communicate on the network due to collisions with VLANs assigned in the Hyper-V switch.  Consider the following NIC Teaming example:



Figure 6 - VLAN misconfiguration (stand-alone NIC Teaming)

Figure 6 shows a common misconfiguration that occurs when administrators try to use team interfaces for VLAN support and also bind the team to a Hyper-V switch.  In this case VM C will never receive any inbound traffic because all the traffic destined for VLAN 17 is taken out at the teaming module.  All traffic except traffic tagged with VLAN 17 will be forwarded to the Hyper-V switch, but VM C’s inbound traffic never arrives.  This kind of misconfiguration has been seen often enough for Microsoft to declare this kind of configuration, i.e., VLANs exposed at the teaming layer while the team is bound to the Hyper-V switch, unsupported.  Repeat: If a team is bound to a Hyper-V switch the team MUST NOT have any VLAN-specific team interfaces exposed.  This is an unsupported configuration 


1.1.1.1     VLANs in a Hyper-V VM

1)      The preferred method of supporting multiple VLANs in a VM is to provide the VM multiple ports on the Hyper-V switch and associate each port with a VLAN. Never team these ports in the VM as it will certainly cause communication problems.
2)      If the VM has multiple SR-IOV VFs make sure they are on the same VLAN before teaming them in the VM. It’s easily possible to configure the different VFs to be on different VLANs and, like in the previous case, it will certainly cause communication problems.
3)      The only safe way to use VLANs with NIC Teaming in a guest is to team Hyper-V ports that are
a.      Each connected to a different external Hyper-V switch, and
b.      Each configured to be associated with the same VLAN (or all associated with untagged traffic only).
TIP: If you must have more than one VLAN exposed into a guest OS consider renaming the ports in the guest to indicate what the VLAN is. E.g., if the first port is associated with VLAN 12 and the second port is associated with VLAN 48, rename the interface Ethernet to be EthernetVLAN12 and the other to be EthernetVLAN48.  Renaming interfaces is easy using the Windows PowerShell Rename-NetAdapter cmdlet or by going to the Network Connections panel in the guest and renaming the interfaces

[1] Advanced users may choose to restrict the switch ports to only passing the VLANs present on the host.  While this may slightly improve performance in networks with many VLANs that the local host doesn’t access, it risks creating difficult to diagnose problems when, for example, a VM is migrated to a host and it uses a VLAN not previously present on the destination host.

пятница, 25 августа 2017 г.

Настройка агрегированных каналов 802.3ad в FortiOS


Задача:
Нужно настроить LAG с LACP из 2-х портов с сабинтерфейсами, терминирующими VLAN ID 100/120, а также проверить что LAG поднялся и работает:

Решение:

FG300D # show system interface DMZ
config system interface
    edit "DMZ"
        set vdom "root"
        set type aggregate
        set member "port3" "port4"
        set role dmz
        set snmp-index 16
    next
end

FG300D # show system interface DMZ_VLAN100
config system interface
    edit "DMZ_VLAN100"
        set vdom "root"
        set ip 172.30.100.1 255.255.255.0
        set allowaccess ping
        set role dmz
        set snmp-index 18
        set interface "DMZ"
        set vlanid 100
    next
end

FG300D # show system interface DMZ_VLAN120
config system interface
    edit "DMZ_VLAN120"
        set vdom "root"
        set ip 172.30.120.1 255.255.255.0
        set allowaccess ping
        set role dmz
        set snmp-index 19
        set interface "DMZ"
        set vlanid 120
    next

end

и проверка:

FG300D-Pri-0355 # diag netlink aggregate name DMZ
LACP flags: (A|P)(S|F)(A|I)(I|O)(E|D)(E|D)
(A|P) - LACP mode is Active or Passive
(S|F) - LACP speed is Slow or Fast
(A|I) - Aggregatable or Individual
(I|O) - Port In sync or Out of sync
(E|D) - Frame collection is Enabled or Disabled
(E|D) - Frame distribution is Enabled or Disabled

status: up
npu: y
flush: n
asic helper: y
oid: 133
ports: 2
link-up-delay: 50ms
min-links: 1
ha: master
distribution algorithm: L4
LACP mode: active
LACP speed: slow
LACP HA: enable
aggregator ID: 2
actor key: 17
actor MAC address: 90:6c:ac:f5:86:4e
partner key: 32768
partner MAC address: 00:11:88:f2:95:c0

slave: port3
  link status: up
  link failure count: 2
  permanent MAC addr: 90:6c:ac:f5:86:4e
  LACP state: established
  actor state: ASAIEE
  actor port number/key/priority: 1 17 255
  partner state: ASAIEE
  partner port number/key/priority: 1 32768 32768
  partner system: 34817 00:11:88:f2:95:c0
  aggregator ID: 2
  speed/duplex: 1000 1
  RX state: CURRENT 6
  MUX state: COLLECTING_DISTRIBUTING 4

slave: port4
  link status: up
  link failure count: 1
  permanent MAC addr: 90:6c:ac:f5:86:4f
  LACP state: established
  actor state: ASAIEE
  actor port number/key/priority: 2 17 255
  partner state: ASAIEE
  partner port number/key/priority: 53 32768 32768
  partner system: 34817 00:11:88:f2:95:c0
  aggregator ID: 2
  speed/duplex: 1000 1
  RX state: CURRENT 6
  MUX state: COLLECTING_DISTRIBUTING 4


и проверяем сетевое взаимодействие поверх LAG c хостами из VLAN100,120:

FG300D # execute ping 172.30.100.254
PING 172.30.100.254 (172.30.100.254): 56 data bytes
64 bytes from 172.30.100.254: icmp_seq=0 ttl=64 time=7.3 ms
64 bytes from 172.30.100.254: icmp_seq=1 ttl=64 time=3.8 ms
64 bytes from 172.30.100.254: icmp_seq=2 ttl=64 time=4.0 ms
64 bytes from 172.30.100.254: icmp_seq=3 ttl=64 time=3.7 ms
64 bytes from 172.30.100.254: icmp_seq=4 ttl=64 time=3.7 ms

--- 172.30.100.254 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 3.7/4.5/7.3 ms

FG300D # execute ping 172.30.120.254
PING 172.30.120.254 (172.30.120.254): 56 data bytes
64 bytes from 172.30.120.254: icmp_seq=0 ttl=64 time=5.2 ms
64 bytes from 172.30.120.254: icmp_seq=1 ttl=64 time=3.7 ms
64 bytes from 172.30.120.254: icmp_seq=2 ttl=64 time=3.7 ms
64 bytes from 172.30.120.254: icmp_seq=3 ttl=64 time=3.7 ms
64 bytes from 172.30.120.254: icmp_seq=4 ttl=64 time=3.7 ms

--- 172.30.120.254 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 3.7/4.0/5.2 ms








среда, 24 мая 2017 г.

Памятка по настройке VLAN и LAG с LACP на D-Link DGS-3100

Данный коммутатор является L2 коммутатором, SVI доступны только для того Management VLAN.

Настройка VLAN:

DGS-3100# sh conf running include vlan
create vlan MGMT tag 59
create vlan voice tag 90
config vlan MGMT add tagged ch1
config vlan voice add tagged ch1
config ipif System ipaddress 172.17.17.19/24 vlan MGMT
config voice_vlan oui-table add 0001e3 description siemens_phone___________
config voice_vlan oui-table add 00036b description Cisco_phone_____________
config voice_vlan oui-table add 00096e description Avaya_phone_____________
config voice_vlan oui-table add 000fe2 description Huawei-3COM_phone_______
config voice_vlan oui-table add 0060b9 description nec-philips_phone_______
config voice_vlan oui-table add 00d01e description pingtel_phone___________
config voice_vlan oui-table add 00e075 description veritel_phone___________
config voice_vlan oui-table add 00e0bb description 3Com_phone______________

Настройка LAG c LACP:

DGS-3100# sh conf running include link_aggregation
create link_aggregation group_id 1 type lacp
config link_aggregation group_id 1 ports 1:(23-24)

Стоит запомнить, что в операционной системе данного коммутатора сначала создаются виртуальные интерфейсы LAG (в терминологии D-Link - Channel Group), затем к ним подключаются необходимые порты, а уже затем данные Channel Group включаются в нужные VLAN в tagged/untagged в зависимости от потребности.

Если порты до включения в Channel Group висели в каком либо VLAN, то коммутатор не дает включить их в Channel Group по причине членства в VLAN, т.е порты должны быть untagged в Default VLAN (VLAN ID 1), коммутатор ругается на это таким вот образом:

DGS-3100# config link_aggregation group_id 1 ports 1:23-24 state enable
It is not allowed to configure member ports which belong to VLANs


Fail.