Zaawansowane Przełączanie IP dr inż. Łukasz Sturgulewski, luk@kis.p.lodz.pl, http://luk.kis.p.lodz.pl/ ZPIP - v2015 1
Hierarchiczny model sieci WAN Edge WAN Edge Router WAN Edge Router Core Tier L2/L3 Switch L2/L3 Switch Aggregation Tier Access Tier L2 Switch SSL VPN Firewall IPSec VPN IPS L2/L3 Switch Security Sprawl Hard to manage STP in a flat L2 access network L2/L3 Switch Servers + Storage ZPIP - v2015 2
Hierarchiczny model sieci Warstwa dostępu do sieci Jest punktem, w którym urządzenia takie jak stacje robocze, serwery uzyskują dostęp do sieci (zostają do niej przyłączone). W korporacyjnej sieci LAN urządzeniem stosowanym w warstwie dostępu do sieci może być: przełącznik, punkt dostępowy. Funkcje warstwy dostępu obejmują również kontrolę, które urządzenia mogą się komunikować i w jaki sposób poprzez sieć: Bezpieczeństwo portów (port-security, DAI, DHCP snooping) VLAN Agregacja łączy, STP QoS PoE 1000 Mbit/s KSBG (v2013) 3
Hierarchiczny model sieci Warstwa dystrybucji sieci Agregacja danych otrzymanych z warstwy dostępowej, przetwarzanie ich a następnie przekazanie do warstwy szkieletowej skąd wysyłane są do węzła docelowego. Urządzenia (przełączniki L3) stosowane w warstwie dystrybucji: wysoka wydajność (1/10Gb Ethernet), wysoka dostępność (nadmiarowość, niezawodność). Operacje wykonywane w ramach warstwy dystrybucji: kontrola ruchu (polityka bezpieczeństwa) np. ACL rozdzielanie domen broadcastowych (routing pomiędzy VLAN) agregacja łączy (ang. link agregation), STP QoS KSBG (v2013) 4
Hierarchiczny model sieci Warstwa szkieletowa Agregacja danych z urządzeń warstwy dystrybucji. Maksymalna wydajność: 10Gb Ethernet, brak dodatkowych operacji na pakietach. Przełączniki L3: redundancja, dostępność (nadmiarowość, niezawodność). Agregacja łączy (ang. link agregation) QoS KSBG (v2013) 5
Hierarchiczny model sieci Zalety modelu hierarchicznego: Skalowalność Utrzymanie, konserwacja, przywracanie po awariach (modularna budowa) Nadmiarowość Wydajność Bezpieczeństwo Zarządzanie ZPIP - v2015 6
Rozliczenie ZPIP VC VC LAG QoS LAG VC LAG VC skrętka, DAC, światłowody ZPIP - v2015 7
QoS / CoS EX3300 Quality of Service (QoS) Layer 2 QoS (interface) Layer 3 QoS (interface) Ingress policing: 1 rate 2 color Hardware queues per port: 8 Scheduling methods (egress): Strict Priority (SP), SDWRR 802.1p, DiffServ Code Point (DSCP/IP) precedence trust and marking L2-L4 classification criteria, including Interface, MAC address, Ethertype, 802.1p, VLAN, IP address, DSCP/IP precedence, and TCP/UDP port numbers Congestion avoidance capabilities: Tail drop ZPIP - v2015 8
Ingress policing: 1 rate 2 color Limitowanie pasma: policing (drop gubienie nadmiaru) Pomiar prędkości (np. bps) i jedna z 3 akcji: Allow Drop Remark the packet with a different DSCP / IP precedence value. shaping (buffer buforowanie nadmiaru) ZPIP - v2015 9
Ingress policing: 1 rate 2 color Przy limitowaniu pasma za pomocą policing możliwe są trzy kategorie przypisywane do danego ruchu: Conforming (packet falls within the traffic contract) Exceeding (packet is using up the excess burst capability) Violating (packet is totally out of the traffic contract rate) ZPIP - v2015 10
Ingress policing: 1 rate 2 color Single rate, two color (one token bucket jedno wiadro z tokenami) Tokeny są uzupełniane w wiadrze tokenów (jak? kiedy?). Kiedy pakiet przybywa policer sprawdza czy jest wystarczająca liczba tokenów w wiadrze aby przepuścić pakiet (jak przeliczać tokeny na pakiety?); jeśli tak to przepuszcza pakiet i pobiera odpowiednia liczbę tokenów z wiadra. Token = 1 bajt Liczba uzupełnianych tokenów (działa w momencie przybycia pakietu): (Packet arrival time - Previous packet arrival time) * Police Rate / 8 ZPIP - v2015 11
Ingress policing: 1 rate 2 color https://networklessons.com/quality-of-service/qos-traffic-policing-explained/ ZPIP - v2015 12
Scheduling methods (egress) Firewall Filters ZPIP - v2015 13
Classification Klasyfikacja na podstawie: Interfejs Adres MAC Pole Ethertype 802.1p VLAN Adres IP DSCP/IP Numer portu TCP/UDP ZPIP - v2015 14
Classification Dwa typy klasyfikatorów: Behavior aggregate (Ba): rozróżnianie ruchu na podstawie 802.1p, DSCP/IP Multifield (Mf): rozróżnianie ruchu na podstawie wielu pól (kombinacje źródłowych i docelowych adresów L2/L3, L2/L3 QoS, portów TCP/UDP) ZPIP - v2015 15
IEEE 802.1P IEEE 802.1P: LAN Layer 2 QoS/CoS Protocol for Traffic Prioritization TPID = 8100 hex = IEEE 802.1Q / 802.1P TCI Tag Control Information: Network Protocols Handbook 2nd Edition. Copyright 2004-2005 Javvin Technologies Inc. ZPIP - v2015 16
IEEE 802.1P User Priority: PCP (Priority Code Point) Rekomendacja IEEE: PCP Priority Acronym Traffic types 1 0 (lowest) BK Background 0 1 BE Best Effort 2 2 EE Excellent Effort 3 3 CA Critical Applications 4 4 VI Video, < 100 ms latency and jitter 5 5 VO Voice, < 10 ms latency and jitter 6 6 IC Internetwork Control 7 7 (highest) NC Network Control ZPIP - v2015 17
Differentiated Services Code Point (DSCP) Usługa DSCP (Differentiated Services Code Point) to pole w pakiecie IP, które umożliwia przypisywanie ruchowi w sieci różnych poziomów usług. Osiąga się to przez oznaczenie każdego pakietu w sieci kodem DSCP i dostosowanie do niego odpowiedniego poziomu usług. Pole DSCP stanowi kombinację pól Pierwszeństwo IP oraz Typ usługi. ZPIP - v2015 18
Differentiated Services Code Point (DSCP) 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version IHL Type of Service Total Length +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Identification Flags Fragment Offset +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Time to Live Protocol Header Checksum +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Source Address +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Destination Address +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Options Padding +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ RFC: 791 INTERNET PROTOCOL DARPA INTERNET PROGRAM PROTOCOL SPECIFICATION September 1981 ZPIP - v2015 19
Differentiated Services Code Point (DSCP) Bits 0-2: Precedence. Bit 3: 0 = Normal Delay, 1 = Low Delay. Bits 4: 0 = Normal Throughput, 1 = High Throughput. Bits 5: 0 = Normal Relibility, 1 = High Relibility. Bit 6-7: Reserved for Future Use. 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ PRECEDENCE D T R 0 0 +-----+-----+-----+-----+-----+-----+-----+-----+ Precedence 111 - Network Control 110 - Internetwork Control 101 - CRITIC/ECP 100 - Flash Override 011 - Flash 010 - Immediate 001 - Priority 000 - Routine RFC: 791 INTERNET PROTOCOL DARPA INTERNET PROGRAM PROTOCOL SPECIFICATION September 1981 ZPIP - v2015 20
Firewall Filters JEX_11.a_C6_DeviceSecurity_and_FirewallFilters.ppt ZPIP - v2015 21
Scheduling Scheduling methods (egress): Strict Priority (SP) Scheduled Deficit Weighted Round Robin (SDWRR) ZPIP - v2015 22
ZPIP - v2015 23
Zwyczajowo mamy FIFO ZPIP - v2015 24
Strict Priority (SP) ZPIP - v2015 25
Scheduled Deficit Weighted Round Robin (SDWRR) ZPIP - v2015 26
CTI laboratoria sieciowe ZPIP - v2015 27
CTI laboratoria sieciowe Konsola urządzeń sieciowych dostępna poprzez serwer terminali (Opengear). Wszystkie urządzenia, zgromadzone w laboratorium, mają porty konsolowe podłączone do serwera terminali. Poprzez SSH np. putty należy połączyć się z serwerem terminali, nr portu TCP związany jest z nr fizycznego portu w serwerze terminali. ZPIP - v2015 28
Zadanie 1 Przygotować: 2 przełączniki EX3300 (szafy D, E, F), (maks. 2 osoby w podgrupie): Przywrócić fabryczną konfigurację Nadać unikatową nazwę Skonfigurować hasło dla root ZPIP - v2015 29
Usuwanie haseł z urządzeń ZPIP - v2015 30
Kasowanie konfiguracji startowych ZPIP - v2015 31
Kasowanie konfiguracji startowych Z menu urządzenia: MAINTENANCE: SYSTEM REBOOT? FACTORY DEFAULT? IDLE STATUS MAINT ZPIP - v2015 32
Konfigurowanie nazwy urządzenia ZPIP - v2015 33
Zadanie 2 1Gb/s C 1Gb/s A trunk 100Mb/s B 1Gb/s D 1Gb/s A, B VLAN Pracownik C, D VLAN Telefony ZPIP - v2015 34
Zadanie Utworzyć 2 VLANy W każdym dodać dwa PC, jak na topologii. Wykonać testy za pomocą IPerf + ping: jednoczesna transmisja pomiędzy A i B oraz C i D. Jaki jest podział pasma na łączu trunk? Skonfigurować QoS / CoS tak aby w czasie jednoczesnej transmisji VLAN Telefony miał ponad 75% dostępnego pasma oraz nie tracił pakietów zaś VLAN Pracownicy miał poniżej 25 pasma i mógł tracić pakiety. ZPIP - v2015 35
Konfiguracja {master:0}[edit] root# show firewall family ethernet-switching { filter xxxxxxxxx { term xxxxxxxxx { from { vlan xxxxxxxxx; source-address xxxxxxxxx protocol xxxxxxxxx source-port xxxxxxxxxx } } } } then { } forwarding-class xxxxxxxxx; loss-priority xxxxxxxxx; ZPIP - v2015 36
Konfiguracja {master:0}[edit] root# show class-of-service forwarding-classes { class xxxxxx queue-num 0-7; } interfaces { ge-0/0/xx { scheduler-map xxxxxx; } } scheduler-maps { xxxxxx { forwarding-class xxxxxx scheduler xxxxxx;} } schedulers { xxxxxx { transmit-rate percent xxxxxx; shaping-rate xxxxxx; buffer-size percent xxxxxx; priority xxxxxx; } } ZPIP - v2015 37
Konfiguracja ge-0/0/xx { } description pracownicy-ingress-port; unit 0 { } family ethernet-switching { port-mode access; } vlan { } members pracownicy; filter { input xxxxxxx; } ZPIP - v2015 38
ZPIP KONIEC ZPIP - v2015 39