Last clearing of \
Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0 input packets with dribble condition detected 1 packets output, 52 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out Serial0/0 is up, line protocol is down (disabled) Hardware is HD64570
Internet address is 192.168.12.1/24
MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec) LCP Closed
Closed: LEXCP, BRIDGECP, IPCP, CCP, CDPCP, LLC2, BACP Last input never, output never, output hang never Last clearing of \ --More--
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
ri#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.12.2, 00:00:08, Serial0/0 C 192.168.12.0/24 is directly connected, Serial0/0
R2的配置
Router>enable
Router#hostname r2 ^
% Invalid input detected at '^' marker.
Router#config t
Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname r2 r2(config)#interfa f0/0\\
^
% Invalid input detected at '^' marker.
r2(config)#inter f0/0
r2(config-if)#ip address 192.168.2.1 255.255.255.0 r2(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
r2(config-if)#inter s0/1
r2(config-if)#ip address 192.168.12.2 255.255.255.0 r2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/1, changed state to up
r2(config-if)#exit r2(config)#router rip
r2(config-router)#network 192.168.12.0 r2(config-router)#network 192.168.2.0 r2(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console r2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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
C 192.168.2.0/24 is directly connected, FastEthernet0/0 r2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, 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
C 192.168.2.0/24 is directly connected, FastEthernet0/0 r2#conf t
Enter configuration commands, one per line. End with CNTL/Z. r2(config)#inter s0/1 r2(config-if)#encap ppp r2(config-if)#e
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up xit
r2(config)#exit
%SYS-5-CONFIG_I: Configured from console by console r2#ping 192.168.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds: !!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/3/4 ms
r2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
R 192.168.1.0/24 [120/1] via 192.168.12.1, 00:00:18, Serial0/1 C 192.168.2.0/24 is directly connected, FastEthernet0/0 C 192.168.12.0/24 is directly connected, Serial0/1 r2#
标准数据包过滤
ri(config)#access-list 99 deny 192.168.2.2 0.0.0.0 ri(config)#access-list permit 0.0.0.0 255.255.255.255 ^
% Invalid input detected at '^' marker.
ri(config)#interf s0/0
ri(config-if)#ip access-group 99 in ri(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console ri#show ip access-list
Standard IP access list 99 deny host 192.168.2.2 ri#
扩展ip访问链表配置 ri(config)#inter s0/0
ri(config-if)#no ip access-group 99 in ri(config-if)#exit
ri(config)#access-list 110 deny tcp 192.168.2.2 0.0.0.0 192.168.12.1.0.0.0.0 eq23 ^ % Invalid input detected at '^' marker.
ri(config)#access-list 110 deny tcp 192.168.2.2 0.0.0.0 192.168.12.1.0.0.0.0 eq 23 ^ % Invalid input detected at '^' marker.
ri(config)#
ri(config)#access-list 110 deny tcp 192.168.2.2 0.0.0.0 192.168.12.1 0.0.0.0 eq 23 ri(config)#inter s0/0 ri(config-if)#exit
ri(config)#access-list 110 permit ip any any ri(config)#inter s0/0
ri(config-if)#ip access-group 110 in ri(config-if)#exit
ri(config)#exit
%SYS-5-CONFIG_I: Configured from console by console ri#show ip access-list Standard IP access list 99 deny host 192.168.2.2 Extended IP access list 110
deny tcp host 192.168.2.2 host 192.168.12.1 eq telnet permit ip any any (2 match(es)) ri#