Exempel 1

Var ska en Standard ACL lista placeras eller tillämpas?

Frågan besvaras i ett exempel där nätverkstrafiken från 192.168.10.0 /24 ska blockeras att komma fram till nätverket 192.168.30.0 /24. Detta ska göras med en Standard ACL. Jag följer riktlinjerna som säger att standard ACL placeras nära till destination och att den ska filtrera avsändarens IP-adressen. 

Exemplet har jag byggt upp med PT-routrar och 2960 switchar samt routing med RIPv2.

Nätverkstopologi

ACL placering

En ACL kan placeras på fyra tänkbara platser som har markerats i orange. Vi analyserar de platserna:

  1. Den skulle blockera all trafik från 192.168.10.0 /24
  2. Den skulle blockera trafik från 192.168.10.0 till LAN 30 och 31 men inte till LAN 11
  3. Den skulle blockera all trafik från 192.168.10.0 till LAN 30 och 31
  4. Den skulle blockera all trafik från 192.168.10.0 enbart till LAN 30. Placerar man listan på router R3 och interface Fa0/0, kommer nätverkstrafik som lämnar routern R3 granskas och blockeras.

Konfigurationer

  • PC1
  • IP address: 192.168.10.1
  • Subnet Mask: 255.255.255.0
  • Default gateway: 192.168.10.254
  • PC2
  • IP address: 192.168.11.2
  • Subnet Mask: 255.255.255.0
  • Default gateway: 192.168.11.254
  • PC3
  • IP address: 192.168.30.3
  • Subnet Mask: 255.255.255.0
  • Default gateway: 192.168.30.254
  • PC4
  • IP address: 192.168.31.4
  • Subnet Mask: 255.255.255.0
  • Default gateway: 192.168.31.254
  • Router> enable
  • Router# configure terminal
  • Router(config)# hostname R1
  • R1(config)# no ip domain-lookup
  • R1(config)# interface fa0/0
  • R1(config-if)# description Connected to LAN 1
  • R1(config-if)# ip address 192.168.10.254 255.255.255.0
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • R1(config)# interface fa1/0
  • R1(config-if)# description Connected to LAN 2
  • R1(config-if)# ip address 192.168.11.254 255.255.255.0
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • R1(config)# interface Se2/0
  • R1(config-if)# description Connected to R2
  • R1(config-if)# ip address 20.20.20.1 255.255.255.252
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • R1(config)# router rip
  • R1(config-router)# version 2
  • R1(config-router)# no auto-summary
  • R1(config-router)# network 192.168.10.0
  • R1(config-router)# network 192.168.11.0
  • R1(config-router)# network 20.20.20.0
  • R1(config-router)# end
  • R1#
  • Router> enable
  • Router# configure terminal
  • Router(config)# hostname R2
  • R2(config)# no ip domain-lookup
  • R2(config)# interface Se2/0
  • R2(config-if)# description DCE connected to R1
  • R2(config-if)# clock rate 128000
  • R2(config-if)# ip address 20.20.20.2 255.255.255.252
  • R2(config-if)# no shutdown
  • R2(config-if)# exit
  • R2(config)# interface Se3/0
  • R2(config-if)# description DCE connected to R3
  • R2(config-if)# clock rate 128000
  • R2(config-if)# ip address 30.30.30.2 255.255.255.252
  • R2(config-if)# no shutdown
  • R2(config-if)# exit
  • R2(config)# router rip
  • R2(config-router)# version 2
  • R2(config-router)# no auto-summary
  • R2(config-router)# network 20.20.20.0
  • R2(config-router)# network 30.30.30.0
  • R2(config-router)# end
  • R2#
  • Router> enable
  • Router# configure terminal
  • Router(config)# hostname R3
  • R3(config)# no ip domain-lookup
  • R3(config)# interface fa0/0
  • R3(config-if)# description Connected to LAN 3
  • R3(config-if)# ip address 192.168.30.254 255.255.255.0
  • R3(config-if)# no shutdown
  • R3(config-if)# exit
  • R3(config)# interface fa1/0
  • R3(config-if)# description Connected to LAN 4
  • R3(config-if)# ip address 192.168.31.254 255.255.255.0
  • R3(config-if)# no shutdown
  • R3(config-if)# exit
  • R3(config)# interface Se3/0
  • R3(config-if)# description Connected to R2
  • R3(config-if)# ip address 30.30.30.1 255.255.255.252
  • R3(config-if)# no shutdown
  • R3(config-if)# exit
  • R3(config)# router rip
  • R3(config-router)# version 2
  • R3(config-router)# no auto-summary
  • R3(config-router)# network 192.168.30.0
  • R3(config-router)# network 192.168.31.0
  • R3(config-router)# network 30.30.30.0
  • R3(config-router)# end
  • R3#
  • R3(config)# access-list 10 deny 192.168.10.0 0.0.0.255
    R3(config)# access-list 10 permit any
    R3(config)# interface fa0/0
    R3(config)# ip access-group 10 out
    R3(config)# end
    R3#