Affichage des articles dont le libellé est MPLS. Afficher tous les articles
Affichage des articles dont le libellé est MPLS. Afficher tous les articles

10 avr. 2010

vlan-to-vlan local-switching

VLAN-to-VLAN Local Switching
R3:
!
interface FastEthernet0/0.345
 encapsulation dot1Q 345
 ip address 192.168.1.3 255.255.255.0
!

R1:
!
FastEthernet0/0.345
 encapsulation dot1Q 345
 ip address 192.168.1.1 255.255.255.
!
R2:
!
interface FastEthernet0/0.345
 encapsulation dot1Q 345
!
FastEthernet0/0.123
 encapsulation dot1Q 123
!
connect ethvl-to-ethvl FastEthernet0/0.123 FastEthernet0/0.345
!

R2#show connection

ID   Name            Segment 1              Segment 2                  State  
================================================================================
1    ethvl-to-ethvl  Fa0/0.123              Fa0/0.345                  UP     


R2#show connection id 1
Connection: 1 - ethvl-to-ethvl
 Current State: UP
 Segment 1: FastEthernet0/0.123 up
 Segment 2: FastEthernet0/0.345 up

CDP is not disabled:
R2#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
R3               Fas 0/0           171            R       7206VXR   Fas 0/0
R1               Fas 0/0           130            R       7206VXR   Fas 0/0
R2#

25 août 2009

Traffic Engineering and logging

mpls traffic-eng logging lsp

To log certain traffic engineering label switched path (LSP) events, use the mpls traffic-eng logging lsp command in global configuration mode.

  • path-errors = Logs RSVP path errors for traffic engineering LSPs.
  • reservation-errors = Logs RSVP reservation errors for traffic engineering LSPs.
  • preemption = Logs events related to the preemption of traffic engineering LSPs.
  • setups = Logs events related to the establishment of traffic engineering LSPs.
  • teardowns = Logs events related to the removal of traffic engineering LSPs.

IPv6 - 6PE

1. Introduction

Le lab suivant présente rapidement le fonctionnement de 6PE.
En prérequis, un coeur de réseau IPv4 MPLS constitue le backbone de l'opérateur.
Sur les équipements P (P1 dans le schéma ci-dessous), IPv6 n'est pas activé (ipv6 unicast-routing).
2. Configuration du coeur MPLS IPv4
6PE1:

!
hostname 6PE1
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
no clns route-cache
!
interface Serial1/1
description ## R2-R3 ##
ip address 192.168.23.2 255.255.255.0
ip router isis
mpls ip
serial restart-delay 0
!
router isis
net 49.0000.0000.0002.00
passive-interface Loopback0
!


6PE2:
!
hostname 6PE2
!
interface Loopback0
ip address 10.0.0.4 255.255.255.255
no clns route-cache
!
interface Serial1/3
description ## R4-R3 ##
ip address 192.168.34.4 255.255.255.0
ip router isis
mpls ip
serial restart-delay 0
!
router isis
net 49.0000.0000.0004.00
passive-interface Loopback0
!


P1:
!
hostname P1
!
interface Loopback0
ip address 10.0.0.3 255.255.255.255
no clns route-cache
!
interface Serial1/1
description ## R2-R3 ##
ip address 192.168.23.3 255.255.255.0
ip router isis
mpls ip
serial restart-delay 0
!
interface Serial1/2
description ## R3-R4 ##
ip address 192.168.34.3 255.255.255.0
ip router isis
mpls ip
serial restart-delay 0
!
router isis
net 49.0000.0000.0002.00
passive-interface Loopback0
!


3. Connexion des CE IPv6 aux 6PE:

6PE1:

!
ipv6 unicast-routing
ipv6 cef
!
interface Serial1/0
no ip address
ipv6 address 3FFE:B00:FFFF::2/48
no fair-queue
serial restart-delay 0
no clns route-cache
!


CE1:

!
ipv6 unicast-routing
ipv6 cef
!
interface Serial1/0
no ip address
ipv6 address 3FFE:B00:FFFF::1/48
no fair-queue
serial restart-delay 0
no clns route-cache
!
ipv6 route ::/0 Serial1/0 3FFE:B00:FFFF::2
!


6PE2:

!
ipv6 unicast-routing
ipv6 cef
!
interface Serial1/3
no ip address
ipv6 address 3FFE:B00:DDDD::2/48
no fair-queue
serial restart-delay 0
no clns route-cache
!


CE2:

!
ipv6 unicast-routing
ipv6 cef
!
interface Serial1/3
no ip address
ipv6 address 3FFE:B00:DDDD::1/48
no fair-queue
serial restart-delay 0
no clns route-cache
!
ipv6 route ::/0 Serial1/0 3FFE:B00:DDDD::2

!


4. Configuration des 6PE pour l'échange des préfixes

Le cœur n'est pas configuré pour IPv6, on se sert des labels.
Une session MP-iBGP est configurée entre les deux '6PE':

6PE1:

!
router bgp 10
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 10.0.0.4 remote-as 10
neighbor 10.0.0.4 update-source Loopback0
!
address-family ipv6
neighbor 10.0.0.4 activate
neighbor 10.0.0.4 send-label
network 3FFE:B00:FFFF::/48
exit-address-family
!

6PE2:

!
router bgp 10
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 10
neighbor 10.0.0.2 update-source Loopback0
!
address-family ipv6
neighbor 10.0.0.2 activate
neighbor 10.0.0.2 send-label
network 3FFE:B00:DDDD::/48
exit-address-family
!
5. Résultats et interprétations

Les networks IPv6 vers les CE1 et CE2 sont annoncés par leur PE respectifs.
Le next hop est de la forme ::FFFF:10.0.0.2, 10.0.0.2 est l'interface update source de la session MP-BGP vers 6PE1:


6PE2#show ip bgp ipv6 unicast
BGP table version is 7, local router ID is 10.0.0.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete


Network Next Hop Metric LocPrf Weight Path
*> 3FFE:B00:DDDD::/48 :: 0 32768 i
*>i3FFE:B00:FFFF::/48 ::FFFF:10.0.0.2 0 100 0 i
6PE2#

Le prefixe vers CE2 est présent dans la RIB IPv6:

6PE2#show ipv6 route
IPv6 Routing Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 3FFE:B00:DDDD::/48 [0/0]
via ::, Serial1/3
L 3FFE:B00:DDDD::2/128 [0/0]
via ::, Serial1/3
B 3FFE:B00:FFFF::/48 [200/0]
via ::FFFF:10.0.0.2
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
6PE2#


Le process BGP de 6PE2 génère un label pour le prefixe qu'il annonce, et le remonte dans la LFIB:

6PE2#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
16 16 10.0.0.2/32 0 Se1/2 point2point
17 Pop Label 10.0.0.3/32 0 Se1/2 point2point
18 Pop Label 192.168.23.0/24 0 Se1/2 point2point
19 Aggregate 101.101.101.4/32[V] \
0 CustIPv4
20 No Label 3FFE:B00:DDDD::/48 \
2080 Se1/3 point2point
6PE2#


Le next-hop annoncé par la session MP-iBGP est 10.0.0.2, ldp annonce le label 16 pour ce préfixe.

6PE2#show ipv6 cef 3FFE:B00:FFFF::/48
3FFE:B00:FFFF::/48
nexthop 192.168.34.3 Serial1/2 label 16 20
6PE2#


Pour le second PE, le principe est identique:


6PE1#show ip bgp ipv6 unicast
BGP table version is 7, local router ID is 10.0.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*>i3FFE:B00:DDDD::/48
::FFFF:10.0.0.4 0 100 0 i
*> 3FFE:B00:FFFF::/48
:: 0 32768 i
6PE1#



6PE1#show ipv6 route
IPv6 Routing Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
B 3FFE:B00:DDDD::/48 [200/0]
via ::FFFF:10.0.0.4
C 3FFE:B00:FFFF::/48 [0/0]
via ::, Serial1/0
L 3FFE:B00:FFFF::2/128 [0/0]
via ::, Serial1/0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
6PE1#


6PE1#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface
16 Pop Label 10.0.0.3/32 0 Se1/1 point2point
17 17 10.0.0.4/32 0 Se1/1 point2point
18 Pop Label 192.168.34.0/24 0 Se1/1 point2point
20 Aggregate 3FFE:B00:FFFF::/48 \
0
6PE1#


6PE1#sh ipv6 cef
3FFE:B00:DDDD::/48
nexthop 192.168.23.3 Serial1/1 label 17 20
3FFE:B00:FFFF::/48
attached to Serial1/0
3FFE:B00:FFFF::2/128
receive
FE80::/10
receive
FF00::/8
receive
6PE1#


15 juil. 2009

Remotely-Triggered Black Hole - RTBH


RTBH est une technique permettant d'éviter qu'une attaque DDoS surcharge la capacité du réseau opérateur.

La technique consiste à envoyer l'ensemble du trafic à destination d'un routeur client vers un black hole.

R2 et R4 constituent le cœur de réseau de l'opérateur.

R5 est le client.
R3 est le routeur permettant l'injection de routes.
R1 représente internet.

Les routeurs R2, R3 et R4 sont dans le même IGP.
Une session iBGP existe entre R2 et R3 et entre R2 et R4. R2 est RR.

R1 et R2 possèdent une session eBGP permettant l'échange des préfixes 150.1.1.1 et 150.5.1.1.

Un DDoS est effectué vers R5, 150.5.1.1.

Les étapes pour effectuer le RTBH sont:
1\ Création d'une route vers Null0 pour un préfixe 'bidon', en général, le TEST-NET (RFC3330), 192.0.2.0/24.
Cette route est présente sur l'ensemble des routeurs de Cœur.
ip route 192.0.2.0 255.255.255.0 Null0 name RTBH


2\ Sur le routeur injectant la route, R3, il faut installer une route statique vers le préfixe attaqué et la faire pointer vers Null0 ( de manière à pouvoir annoncer ce network).
Un tag est ajouté sur la route pour pouvoir effectuer un match dans une route-map.
R3:
ip route 150.5.1.1 255.255.255.255 Null0 tag 666


3\ Toujours sur R3, il faut redistribuer cette route vers le préfixe attaqué.
Une route-map est configurée de manière à modifier le next-hop en 192.0.2.1, qui ira donc pointer vers Null0 pour chaque routeur de coeur.
Cette route-map permet également de faire préférer cette route par rapport à l'originale:
!
route-map RTBH permit 10
match tag 666
set local-preference 700
set origin igp
set ip next-hop 192.0.2.1
!
route-map RTBH permit 20
!

Enfin,
router bgp 3352
redistribute static route-map RTBH

!
Résultat:
Sur R4, à l'origine, la route était apprise correctement:

R4#sh ip route 150.5.1.1
Routing entry for 150.5.1.1/32
Known via "bgp 3352", distance 20, metric 0
Tag 65535, type external
Last update from 150.1.45.5 01:10:58 ago
Routing Descriptor Blocks:
* 150.1.45.5, from 150.1.45.5, 01:10:58 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 65535

Suite aux modifications, elle est apprise de la manière suivante:
R4#sh ip route 150.5.1.1
Routing entry for 150.5.1.1/32
Known via "bgp 3352", distance 200, metric 0, type internal
Last update from 192.0.2.1 00:00:08 ago
Routing Descriptor Blocks:
* 192.0.2.1, from 150.2.1.1, 00:00:08 ago
Route metric is 0, traffic share count is 1
AS Hops 0


Et ce, sur chaque routeur de cœur.
L'interêt réside dans le fait que l'action n'est pas effectuée sur l'ensemble des routeurs de cœur, mais bien à partir d'un point centralisé.

L'inconvénient est que le DDoS à réussi, tout le trafic à destination du client est black-holed.

NTP - ACL

NTP - Network Time Protocol Packet types: -  Control messages : don't bother with this. -  NTP request/update messages: used for time sy...