Introduction :

Démontrer l’utilisation du wildcard mask au travers de 2 exemples :

  • La commande network de l’IGP EIGRP
  • L’ACL

Topologie pour le test :

Topologie de tests

Configuration :

R1 :

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
 ip address 10.1.0.1 255.255.255.255
!
interface Loopback2
 ip address 10.2.0.1 255.255.255.255
!
interface Loopback3
 ip address 10.3.0.1 255.255.255.255
!
interface Loopback4
 ip address 10.4.0.1 255.255.255.255
!
interface Loopback5
 ip address 10.5.0.1 255.255.255.255
!
interface Loopback6
 ip address 10.6.0.1 255.255.255.255
!
interface Loopback7
 ip address 10.7.0.1 255.255.255.255
!
interface Loopback8
 ip address 10.8.0.1 255.255.255.255
!
interface Loopback9
 ip address 10.9.0.1 255.255.255.255
!
interface FastEthernet0/0
 description To_R2
 ip address 12.12.12.1 255.255.255.0
 duplex auto
 speed auto
!
!
interface FastEthernet0/0
 description To_R2
 ip address 12.12.12.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description To_R3
 ip address 13.13.13.1 255.255.255.0
 duplex auto
 speed auto
!
router eigrp 100
 redistribute connected route-map FILTER_CONNECTED_REDISTRIBUTE
 network 10.0.0.0 0.1.255.255
 network 10.4.0.0 0.1.255.255
 network 12.12.12.0 0.0.0.255
 network 13.13.13.0 0.0.0.255
 no auto-summary
 eigrp router-id 1.1.1.1
!
!
!
ip access-list standard FILTER_CONNECTED
 permit 10.6.0.0 0.1.0.1
 deny   any
!
no cdp log mismatch duplex
!
route-map FILTER_CONNECTED_REDISTRIBUTE permit 10
 match ip address FILTER_CONNECTED
!

R2 :

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 description To_R1
 ip address 12.12.12.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router eigrp 100
 network 2.2.2.2 0.0.0.0
 network 12.12.12.0 0.0.0.255
 no auto-summary
 eigrp router-id 2.2.2.2
!

R3 :

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description To_R1
 ip address 13.13.13.3 255.255.255.0
 duplex auto
 speed auto
!
router eigrp 100
 network 3.3.3.3 0.0.0.0
 network 13.13.13.3 0.0.0.0
 no auto-summary
 eigrp router-id 3.3.3.3
!

Tables de routage :

R1 :

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/409600] via 12.12.12.2, 00:14:56, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
D       3.3.3.3 [90/409600] via 13.13.13.3, 00:16:02, FastEthernet0/1
     10.0.0.0/32 is subnetted, 9 subnets
C       10.9.0.1 is directly connected, Loopback9
C       10.8.0.1 is directly connected, Loopback8
C       10.3.0.1 is directly connected, Loopback3
C       10.2.0.1 is directly connected, Loopback2
C       10.1.0.1 is directly connected, Loopback1
C       10.7.0.1 is directly connected, Loopback7
C       10.6.0.1 is directly connected, Loopback6
C       10.5.0.1 is directly connected, Loopback5
C       10.4.0.1 is directly connected, Loopback4
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/1

R2 :

R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
D       3.3.3.3 [90/435200] via 12.12.12.1, 00:14:33, FastEthernet0/0
     10.0.0.0/32 is subnetted, 5 subnets
D       10.1.0.1 [90/409600] via 12.12.12.1, 00:14:33, FastEthernet0/0
D EX    10.7.0.1 [170/409600] via 12.12.12.1, 00:06:33, FastEthernet0/0
D EX    10.6.0.1 [170/409600] via 12.12.12.1, 00:06:33, FastEthernet0/0
D       10.5.0.1 [90/409600] via 12.12.12.1, 00:14:33, FastEthernet0/0
D       10.4.0.1 [90/409600] via 12.12.12.1, 00:14:35, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
D       13.13.13.0 [90/307200] via 12.12.12.1, 00:14:35, FastEthernet0/0

R3

R3#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/435200] via 13.13.13.1, 00:14:42, FastEthernet0/1
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
     10.0.0.0/32 is subnetted, 5 subnets
D       10.1.0.1 [90/409600] via 13.13.13.1, 00:15:25, FastEthernet0/1
D EX    10.7.0.1 [170/409600] via 13.13.13.1, 00:06:48, FastEthernet0/1
D EX    10.6.0.1 [170/409600] via 13.13.13.1, 00:06:48, FastEthernet0/1
D       10.5.0.1 [90/409600] via 13.13.13.1, 00:15:28, FastEthernet0/1
D       10.4.0.1 [90/409600] via 13.13.13.1, 00:15:28, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
D       12.12.12.0 [90/307200] via 13.13.13.1, 00:15:28, FastEthernet0/1
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/1

Conclusion et Explications :

La configuration spécifique est faite sur R1.
Sur R1 :
l0 : 3.3.3.3/23 <— annoncé via la cmd network
l1 : 10.1.0.1/32 <— annoncé via la cmd network
l2 : 10.2.0.1/32
l3 : 10.3.0.1/32
l4 : 10.4.0.1/32 <— annoncé via la cmd network
l5 : 10.5.0.1/32 <— annoncé via la cmd network
l6 : 10.6.0.1/32 <— annoncé via la redistribution avec filtrage
l7 : 10.7.0.1/32 <— annoncé via la redistribution avec filtrage
l8 : 10.8.0.1/32
l9 : 10.9.0.1/32

network 10.0.0.0 0.1.255.255 : va faire participer à EIGRP les interfaces ayant pour @ 10.0.X.X et 10.1.X.X, ici on n’a que 10.1.0.1, le wildcard mask non contigu (0.1.0.1) ne fonctionne pas avec la cmd network. network 10.4.0.0 0.1.255.255 : va faire participer à EIGRP les interface avec @ 10.4.X.X et 10.5.X.X

Pour éviter de rentrer autant de cmd network que de réseau Loopback on a joué avec le wildcard, du fait de l’impossibilité de mettre un mask non contigu, on a été très ouvert sur les 2 derniers octets donc attention au plan d’adressage.

Autre point, redistribution des @ 10.7.0.1 et 10.8.0.1, via ACL/route-map et redistribution, là le wildcard mask non contigu a fonctionné !.

Seule petit bémol, avec la redistribution l’AD est de 170 eu lieu de 90.

Note :