Thứ Hai, 4 tháng 6, 2012

ACL đặt tên

Mô hình :




Cấu hình trên router HN:

Cấu hình đặt tên,các interface, định tuyến với giao thức rip version 2
Router>enable
Router#conf t
Router(config)#host HN
HN(config)#interface s0/0
HN(config-if)#ip add 10.1.1.1 255.255.255.252
HN(config-if)#no shut
HN(config)#interface fa0/0
HN(config-if)#ip add 192.168.1.1 255.255.255.0
HN(config-if)#no shut
HN(config)#router rip
HN(config-router)#verso
HN(config-router)#ver
HN(config-router)#version 2
HN(config-router)#net 192.168.1.0
HN(config-router)#net 10.1.1.0
HN(config-router)#no auto
HN(config-router)#no auto-summary
HN(config-router)#exit

Cấu hình trên router HUE

Router>enable
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host Hue
Hue(config)#interface s0/0
Hue(config-if)#ip add 10.1.1.1.2 255.255.255.252
Hue(config-if)#clock rate 64000
Hue(config-if)#no shut
Hue(config)#interface s0/1
Hue(config-if)#ip add 11.1.1.1 255.255.255.252
Hue(config-if)#cloc rate 64000
Hue(config-if)#no shut
Hue(config)#interface fa0/0
Hue(config-if)#ip add 192.168.2.1 255.255.255.0
Hue(config-if)#no shut
Hue(config)#router rip
Hue(config-router)# version 2
Hue(config-router)#net 192.168.2.0
Hue(config-router)#net 11.1.1.0
Hue(config-router)#net 10.1.1.0
Hue(config-router)#no auto-summary
Hue(config-router)#exit
Hue(config)#exit

Cấu hình trên router SG:

Router>enable
Router#conf t
Router(config)#host SG
SG(config)#interface s0/1
SG(config-if)#ip add 11.1.1.2 255.255.255.252
SG(config-if)#no shut
SG(config)#interface fa0/0
SG(config-if)#ip add 192.168.3.1 255.255.255.0
SG(config-if)#no shut
SG(config)#router rip
SG(config-router)#ver
SG(config-router)#version 2
SG(config-router)#net 192.168.3.0
SG(config-router)#net 11.1.1.0
SG(config-router)#no auto
SG(config-router)#no auto-summary
SG(config-router)#exit
SG(config)#exit
SG(config)#enable secret ccna
SG(config)#line vty 0 4
SG(config-line)#pass ccna
SG(config-line)#login
Cấu hình ACLs đặt tên  thay thế ACLs standard, và ACLs extend
Cấu hình trên router đích permit Lan HN access truy cập vào Lan SG
Cấu hình trên router nguồn deny PC 192.168.1.100 telnet vào router SG
- Cấu hình trên Router đích (router SG)
SG(config)#ip access-list standard LAN_HN
SG(config-std-nacl)#permit 192.168.1.0 0.0.0.255
SG(config)#interface fa0/0
SG(config-if)#ip access-group LAN_HN out<<<<<<<
- Cấu hình trên router nguồn (router HN)
HN(config)#ip access-list extended ACL_extend
HN(config-ext-nacl)#deny tcp 192.168.1.100 0.0.0.0 11.1.1.2 0.0.0.0 eq 23
HN(config-ext-nacl)#permit tcp any any<<<<<<<<
HN(config)#interface fa0/0
HN(config-if)#ip access-group ACL_extend in


Mark_pro!

Không có nhận xét nào:

Đăng nhận xét