HP 6125G HP 6125G & 6125G/XG Blade Switches ACL and QoS Configuration - Page 19

IPv4 packet filtering configuration example, Network requirements, Configuration procedure

Page 19 highlights

# Create IPv4 basic ACL 2002, and configure a rule for the ACL to permit only the packets sourced from 10.1.3.1. [Switch] acl number 2002 [Switch-acl-basic-2001] rule permit source 10.1.3.1 0 [Switch-acl-basic-2001] quit # Enable the FTP server on the switch. [Switch] ftp server enable # Use ACL 2001 to control FTP clients' access to the FTP server. [Switch] ftp server acl 2002 IPv4 packet filtering configuration example Network requirements As shown in Figure 2, apply an ACL to the inbound direction of interface GigabitEthernet 1/0/1 on Device A so that every day from 08:00 to 18:00 the interface allows only packets sourced from Host A to pass. Figure 2 Network diagram Configuration procedure # Create a time range from 08:00 to 18:00 every day. system-view [DeviceA] time-range study 8:00 to 18:00 daily # Create IPv4 ACL 2009, and configure two rules in the ACL. One rule permits packets sourced from Host A and the other denies packets sourced from any other host during the time range study. [DeviceA] acl number 2009 [DeviceA-acl-basic-2009] rule permit source 192.168.1.2 0 time-range study [DeviceA-acl-basic-2009] rule deny source any time-range study [DeviceA-acl-basic-2009] quit # Apply IPv4 ACL 2009 to filter incoming packets on GigabitEthernet 1/0/1. [DeviceA] interface gigabitethernet 1/0/1 [DeviceA-GigabitEthernet1/0/1] packet-filter 2009 inbound [DeviceA-GigabitEthernet1/0/1] quit 13

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84

13
# Create IPv4 basic ACL 2002, and configure a rule for the ACL to permit only the packets sourced
from 10.1.3.1.
[Switch] acl number 2002
[Switch-acl-basic-2001] rule permit source 10.1.3.1 0
[Switch-acl-basic-2001] quit
# Enable the FTP server on the switch.
[Switch] ftp server enable
# Use ACL 2001 to control FTP clients' access to the FTP server.
[Switch] ftp server acl 2002
IPv4 packet filtering configuration example
Network requirements
As shown in
Figure 2
, apply an ACL to the inbound direction of interface GigabitEthernet 1/0/1 on
Device A so that every day from 08:00 to 18:00 the interface allows only packets sourced from Host A
to pass.
Figure 2
Network diagram
Configuration procedure
# Create a time range from 08:00 to 18:00 every day.
<DeviceA> system-view
[DeviceA] time-range study 8:00 to 18:00 daily
# Create IPv4 ACL 2009, and configure two rules in the ACL. One rule permits packets sourced from
Host A and the other denies packets sourced from any other host during the time range
study
.
[DeviceA] acl number 2009
[DeviceA-acl-basic-2009] rule permit source 192.168.1.2 0 time-range study
[DeviceA-acl-basic-2009] rule deny source any time-range study
[DeviceA-acl-basic-2009] quit
# Apply IPv4 ACL 2009 to filter incoming packets on GigabitEthernet 1/0/1.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] packet-filter 2009 inbound
[DeviceA-GigabitEthernet1/0/1] quit