Introduction
Este documento descreve como configurar e verificar o recurso Marcação em Linha Cisco em um Switch Cisco Catalyst 9300.
Requirements
A Cisco recomenda que você tenha conhecimento destes tópicos:
Você deve ter o Cisco ISE implantado em sua rede, e os usuários finais devem autenticar-se no Cisco ISE via 802.1x (ou outro método) quando se conectarem com fio. O Cisco ISE atribui uma Security Group Tag (SGT) depois que eles se autenticam em sua rede com fio.
Componentes Utilizados
As informações neste documento são baseadas nestas versões de software e hardware:
- Cisco Identity Services Engine com 3.0 P5
- Switch Cisco Catalyst 9300 que executa o 17.03.02a
- Switch Cisco Catalyst 9300 que executa o 17.07.01
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. Se a rede estiver ativa, certifique-se de que você entenda o impacto potencial de qualquer comando.
Informações de Apoio
A marcação em linha é implementada na camada de Acesso porque esse é o primeiro ponto de contato das informações. Em outras palavras, todos os seus dispositivos finais estão conectados à camada de Acesso. Quando os dispositivos da camada de acesso fizerem a classificação, será necessário compartilhar essas informações com os dispositivos que fazem a aplicação. Para fazer isso, o NAS pode adicionar 20 bytes ao quadro ethernet. Este é o campo CMD (metadados Cisco) do quadro. Dentro disso, o SGT está incluído.
Configurar
Diagrama de Rede
Diagrama de topologia
- O PC1 autentica e o ISE atribui dinamicamente o SGT3.
- Marcação em linha C9300A com C9300B
- O PC2 autentica e o ISE atribui dinamicamente o SGT 17
- O C9300B reforça o tráfego ICMP de SGT3 para SGT17.
Marcação em linha
C9300A
interface TwoGigabitEthernet1/0/4
switchport trunk allowed vlan 761
switchport mode trunk
cts manual
policy static sgt 2 trusted
end
C9300B
interface GigabitEthernet1/0/4
switchport trunk allowed vlan 761
switchport mode trunk
cts manual
policy static sgt 2 trusted
end
Você deve usar o comando cts manual e, em seguida, policy static para habilitar a marcação embutida. O sgt usado no comando pode ser o sgt do dispositivo de rede ou qualquer outro que seja um espaço reservado. A função do comando trusted é instruir o switch a honrar o SGT, se ele receber tráfego com cabeçalho CMD. Sem o comando trusted, o switch marca todo o tráfego que flui dessa interface com o SGT definido.
Verificações
SGT de Downloads de Sessão de Acesso
PC1
Switch#show authentication session interface Tw1/0/3 details
Interface: TwoGigabitEthernet1/0/3
IIF-ID: 0x1FB0D90E
MAC Address: 507b.9df0.34bb
IPv6 Address: Unknown
IPv4 Address: 10.4.16.142
User-Name: 50-7B-9D-F0-34-BB
Status: Authorized
Domain: DATA
Oper host mode: multi-auth
Oper control dir: both
Session timeout: N/A
Common Session ID: 3D781F0A0000000F2AE95F4A
Acct Session ID: 0x00000005
Handle: 0x02000004
Current Policy: POLICY_Tw1/0/3
Local Policies:
Service Template: DEFAULT_LINKSEC_POLICY_SHOULD_SECURE (priority 150)
Security Policy: Should Secure
Server Policies:
SGT Value: 3
Method status list:
Method State
mab Authc Success
PC2
Switch#show authentication session interface Gi1/0/1 details
Interface: GigabitEthernet1/0/1
IIF-ID: 0x1D1CA5C7
MAC Address: 507b.9df8.02ed
IPv6 Address: fe80::114c:dce1:ffa1:1642
IPv4 Address: 10.4.16.141
User-Name: 50-7B-9D-F8-02-ED
Status: Authorized
Domain: DATA
Oper host mode: multi-auth
Oper control dir: both
Session timeout: N/A
Common Session ID: 21781F0A000000242AF41195
Acct Session ID: 0x00000004
Handle: 0x4300000f
Current Policy: POLICY_Gi1/0/1
Local Policies:
Service Template: DEFAULT_LINKSEC_POLICY_SHOULD_SECURE (priority 150)
Security Policy: Should Secure
Server Policies:
SGT Value: 17
Method status list:
Method State
mab Authc Success
O switch aprende a vinculação IP-SGT
C9300A
Switch#show cts role-based sgt-map all
Active IPv4-SGT Bindings Information
IP Address SGT Source
============================================
10.4.16.142 3 LOCAL
C9300B
Switch#show cts role-based sgt-map all
Active IPv4-SGT Bindings Information
IP Address SGT Source
============================================
10.4.16.141 17 LOCAL
10.31.120.33 2 INTERNAL
Status de autorização entre C9300A e C9300B
C9300A
Switch#show cts interface Two 1/0/4
Global Dot1x feature is Disabled
Interface TwoGigabitEthernet1/0/4:
CTS is enabled, mode: MANUAL
IFC state: OPEN
Interface Active for 01:36:44.332
Authentication Status: NOT APPLICABLE
Peer identity: "unknown"
Peer's advertised capabilities: ""
Authorization Status: SUCCEEDED
Peer SGT: 2:TrustSec_Devices
Peer SGT assignment: Trusted
SAP Status: NOT APPLICABLE
Propagate SGT: Enabled
Cache Info:
Expiration : N/A
Cache applied to link : NONE
Statistics:
authc success: 0
authc reject: 0
authc failure: 0
authc no response: 0
authc logoff: 0
sap success: 0
sap fail: 0
authz success: 0
authz fail: 0
port auth fail: 0
L3 IPM: disabled.
C9300B
Switch#show cts interfac Gig 1/0/4
Global Dot1x feature is Disabled
Interface GigabitEthernet1/0/4:
CTS is enabled, mode: MANUAL
IFC state: OPEN
Interface Active for 01:34:18.433
Authentication Status: NOT APPLICABLE
Peer identity: "unknown"
Peer's advertised capabilities: ""
Authorization Status: SUCCEEDED
Peer SGT: 2:TrustSec_Devices
Peer SGT assignment: Trusted
SAP Status: NOT APPLICABLE
Propagate SGT: Enabled
Cache Info:
Expiration : N/A
Cache applied to link : NONE
Statistics:
authc success: 0
authc reject: 0
authc failure: 0
authc no response: 0
authc logoff: 0
sap success: 0
sap fail: 0
authz success: 0
authz fail: 0
port auth fail: 0
L3 IPM: disabled.
Troubleshoot
Para solucionar qualquer problema, considere:
- O quadro é sempre marcado na porta de entrada do dispositivo compatível com SGT.
- Processo de marcação antes de outro serviço L2, como QoS.
- Sem impacto na MTU/fragmentação do IP.
- Impacto de MTU do quadro L2: ~ 40 bytes (~1600 bytes com MTU de 1552 bytes)
- O MACsec é opcional para hardware com capacidade.
Captura de pacotes/EPC
Fluxo de marcação embutida
Se quiser solucionar problemas de marcação em linha, você precisará capturar um pacote na entrada.
Dica: se você pegar um pcap no uplink do SW, não verá a marca, pois ela está incluída no nível da interface, de modo que o EPC possa ser obtido antes da aplicação da marca.
Cuidado: há algumas exceções, como o C4500. Devido à arquitetura do C4500, ele não é capaz de detectar o cabeçalho CMD, mesmo se você pegar o pcap na interface de entrada. Para esses casos específicos, você pode usar a configuração Netflow, Netflow Trustsec
Aproveite a EPC (Embedded Packet Capture, captura de pacotes incorporada) na porta de entrada do C9300B
Switch#monitor capture test interface Gig 1/0/4 both
Switch#monitor capture test match any
Switch#monitor capture test start
<
> Switch#
monitor capture test stop
Depois de usar o EPC, você pode usar o comando show monitor capture buffer brief para verificar o número do quadro da solicitação ICMP.
Switch#show monitor capture test buffer
..
..
44 17.059569 10.4.16.142 b^F^R 10.4.16.141 ICMP 86 Echo (ping) request id=0x0001, seq=147/37632, ttl=128
45 17.061079 10.4.16.141 b^F^R 10.4.16.142 ICMP 74 Echo (ping) reply id=0x0001, seq=147/37632, ttl=128 (request in 44)
..
..
A partir da saída anterior, observou-se que o pacote ICMP está no quadro 4. Com isso, você pode executar: show monitor capture <name> buffer detailed | iniciar Frame <number> para ver o conteúdo:
..
..
Frame 44: 86 bytes on wire (688 bits), 86 bytes captured (688 bits) on interface 0
Interface id: 0 (/tmp/epc_ws/wif_to_ts_pipe)
Interface name: /tmp/epc_ws/wif_to_ts_pipe
Encapsulation type: Ethernet (1)
Arrival Time: Jun 3, 2022 19:12:00.140014000 UTC
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1654283520.140014000 seconds
[Time delta from previous captured frame: 0.362660000 seconds]
[Time delta from previous displayed frame: 0.362660000 seconds]
[Time since reference or first frame: 17.059569000 seconds]
Frame Number: 44
Frame Length: 86 bytes (688 bits)
Capture Length: 86 bytes (688 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:vlan:ethertype:cmd:ethertype:ip:icmp:data]
Ethernet II, Src: 50:7b:9d:f0:34:bb (50:7b:9d:f0:34:bb), Dst: 50:7b:9d:f8:02:ed (50:7b:9d:f8:02:ed)
Destination: 50:7b:9d:f8:02:ed (50:7b:9d:f8:02:ed)
Address: 50:7b:9d:f8:02:ed (50:7b:9d:f8:02:ed)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: 50:7b:9d:f0:34:bb (50:7b:9d:f0:34:bb)
Address: 50:7b:9d:f0:34:bb (50:7b:9d:f0:34:bb)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 761
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = DEI: Ineligible
.... 0010 1111 1001 = ID: 761
Type: CiscoMetaData (0x8909)
Cisco MetaData <<<<<<<<<<<<<<<<<<<<<<< CMD header
Version: 1
Length: 1
Options: 0x0001
SGT: 3 <<<<<<<<<<<<<<<<<<<<<<<<<< SGT of PC1
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 10.4.16.142, Dst: 10.4.16.141
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 60
Identification: 0x7d1f (32031)
Flags: 0x0000
0... .... .... .... = Reserved bit: Not set
.0.. .... .... .... = Don't fragment: Not set
..0. .... .... .... = More fragments: Not set
...0 0000 0000 0000 = Fragment offset: 0
Time to live: 128
Protocol: ICMP (1)
Header checksum: 0x887f [validation disabled]
[Header checksum status: Unverified]
Source: 10.4.16.142
Destination: 10.4.16.141
Internet Control Message Protocol
Type: 8 (Echo (ping) request)
Code: 0
Checksum: 0x4cc8 [correct]
[Checksum Status: Good]
Identifier (BE): 1 (0x0001)
Identifier (LE): 256 (0x0100)
Sequence number (BE): 147 (0x0093)
Sequence number (LE): 37632 (0x9300)
Data (32 bytes)
0000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 abcdefghijklmnop
0010 71 72 73 74 75 76 77 61 62 63 64 65 66 67 68 69 qrstuvwabcdefghi
Data: 6162636465666768696a6b6c6d6e6f707172737475767761...
[Length: 32]
..
..
Verificação SGACL
O switch faz download apenas das SGACLs que correspondem às vinculações IP-SGT aprendidas de diferentes métodos (local, SXP, marcação em linha e assim por diante). O C9300B aprende dinamicamente o grupo de segurança de destino do ISE. Como ele aprende o grupo de segurança de origem? Com Inline Tagging. Como o comando show cts role-based sgt-map all não mostra os SGTs aprendidos da marcação em linha, você pode concluir que se o SGACL for baixado, o switch está ciente dos grupos de segurança de origem (marcação em linha) e de destino (local).
Switch#show cts role-based permissions
IPv4 Role-based permissions default:
Permit_IP_Log-00
IPv4 Role-based permissions from group 3:DataCenter to group 17:MedicalDevices:
denyJonsICMP-06 <<<<
DENY_PRINTER_80_04-01
permitJons-01
IPv4 Role-based permissions from group 16:IUH_Office to group 17:MedicalDevices:
denyJonsICMP-06
RBACL Monitor All for Dynamic Policies : FALSE
RBACL Monitor All for Configured Policies : FALSE
Quando você faz ping do PC1 do PC2, o ICMP é bloqueado:
cisco>ping -S 10.4.16.142 10.4.16.141
Pinging 10.4.16.141 from 10.4.16.142 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.4.16.141:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Informações Relacionadas