CCNA(Stand-ALONE)Lab 31-Named Access Lists

Objective: Create a named access list that will deny all ping traffic from PC 1 to Router 1, but will enable all access from Router 4 to Router 1. For this lab, the access list must be added on Router 1.
Lab Equipment: Router 1 and Router 4 from the eRouters menu and PC 1 from the eStations menu
Background Reading: Lab Primer Lesson 10: Access Lists

1. Establish the configurations outlined in the table below. Use the winipcfg command on PC 1 to configure the IP address and default gateway.
Router1:
Router4:
PC1:

2. configure RIP on the two routers. Be sure to use the proper network statements.
Router1(config)#router rip
Router1(config-router)#network 192.168.1.0

Router4(config)#router rip
Router4(config-router)#network 192.168.1.0

3. Use the show ip route command on each router to make sure that the routes have been received.
Router1#show ip route

Router4#show ip route

4. Verify that you can ping Router1 from PC 1.
C:>ping 192.168.1.1

5. Create an access list that prevents ping traffic originating from PC 1 and destined for Router1 from reaching Router1. Typically, this access list could be placed on either Router4 or Router1. It often makes more sense to place the access list on the router closest to the source as possible; this helps keep unnecessary traffic off the backbone.
For this example, however, the access list will be placed on Router1 for inbound traffic.

Router1(config)#ip access-list extended deny_ping
Router1(config-ext-acl)#deny icmp host 192.168.1.18 192.168.1.1
0.0.0.0 log
Router1(config-ext-acl)#permit ip any any log

The first statement above defines the access list as extended. The second statment denies any ICMP traffic with a source IP address of 192.168.1.18 that is destined for 192.168.1.1; the wildcard mask of 0.0.0.0 in this line means that the IP address must be matched exactly. Notice how the host command is used for the first part of the access list and the wildcard mask of 0.0.0.0 is used for the second part of the access list. The host command and the wildcard mask of 0.0.0.0 both do the same thing. The log keyword allows you to double-check your work.

6. Next, apply the access list to inbound traffic on the serial 0 interface of Router1.
Router1(config-ext-acl)#exit
Router1(config)#interface serial 0
Router1(config-if)#ip access-group deny_ping in

7. Connect to PC 1 and send a test ping to Router1. Then connect to Router4 and send a test ping to Router1. Are the pings successful?
C:>ping 192.168.1.1

Router4#ping 192.168.1.1

8. Connect to Router1 again; you should see two separate log messages. The first one is denying the ping from PC 1, and the second is allowing the ping from Router4.
*********************************************************






本文转自redking51CTO博客,原文链接:http://blog.51cto.com/redking/74792 ,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SQLAlchemy 是一个 SQL 工具包和对象关系映射(ORM)库,用于 Python 编程语言。它提供了一个高级的 SQL 工具和对象关系映射工具,允许开发者以 Python 类和对象的形式操作数据库,而无需编写大量的 SQL 语句。SQLAlchemy 建立在 DBAPI 之上,支持多种数据库后端,如 SQLite, MySQL, PostgreSQL 等。 SQLAlchemy 的核心功能: 对象关系映射(ORM): SQLAlchemy 允许开发者使用 Python 类来表示数据库表,使用类的实例表示表中的行。 开发者可以定义类之间的关系(如一对多、多对多),SQLAlchemy 会自动处理这些关系在数据库中的映射。 通过 ORM,开发者可以像操作 Python 对象一样操作数据库,这大大简化了数据库操作的复杂性。 表达式语言: SQLAlchemy 提供了一个丰富的 SQL 表达式语言,允许开发者以 Python 表达式的方式编写复杂的 SQL 查询。 表达式语言提供了对 SQL 语句的灵活控制,同时保持了代码的可读性和可维护性。 数据库引擎和连接池: SQLAlchemy 支持多种数据库后端,并且为每种后端提供了对应的数据库引擎。 它还提供了连接池管理功能,以优化数据库连接的创建、使用和释放。 会话管理: SQLAlchemy 使用会话(Session)来管理对象的持久化状态。 会话提供了一个工作单元(unit of work)和身份映射(identity map)的概念,使得对象的状态管理和查询更加高效。 事件系统: SQLAlchemy 提供了一个事件系统,允许开发者在 ORM 的各个生命周期阶段插入自定义的钩子函数。 这使得开发者可以在对象加载、修改、删除等操作时执行额外的逻辑。
SQLAlchemy 是一个 SQL 工具包和对象关系映射(ORM)库,用于 Python 编程语言。它提供了一个高级的 SQL 工具和对象关系映射工具,允许开发者以 Python 类和对象的形式操作数据库,而无需编写大量的 SQL 语句。SQLAlchemy 建立在 DBAPI 之上,支持多种数据库后端,如 SQLite, MySQL, PostgreSQL 等。 SQLAlchemy 的核心功能: 对象关系映射(ORM): SQLAlchemy 允许开发者使用 Python 类来表示数据库表,使用类的实例表示表中的行。 开发者可以定义类之间的关系(如一对多、多对多),SQLAlchemy 会自动处理这些关系在数据库中的映射。 通过 ORM,开发者可以像操作 Python 对象一样操作数据库,这大大简化了数据库操作的复杂性。 表达式语言: SQLAlchemy 提供了一个丰富的 SQL 表达式语言,允许开发者以 Python 表达式的方式编写复杂的 SQL 查询。 表达式语言提供了对 SQL 语句的灵活控制,同时保持了代码的可读性和可维护性。 数据库引擎和连接池: SQLAlchemy 支持多种数据库后端,并且为每种后端提供了对应的数据库引擎。 它还提供了连接池管理功能,以优化数据库连接的创建、使用和释放。 会话管理: SQLAlchemy 使用会话(Session)来管理对象的持久化状态。 会话提供了一个工作单元(unit of work)和身份映射(identity map)的概念,使得对象的状态管理和查询更加高效。 事件系统: SQLAlchemy 提供了一个事件系统,允许开发者在 ORM 的各个生命周期阶段插入自定义的钩子函数。 这使得开发者可以在对象加载、修改、删除等操作时执行额外的逻辑。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值