显示ARP表 show arp 显示名字缓存 show hosts 显示当前IP过滤表的内容 show ip access-list [access-list-number name
] 显示当前活动端口累计通过的包数 show ip accouting [checkpoint] 显示IP ARP表 show ip arp 显示某一个端口状态 show ip interface [type number ] 显示目前的路由表 show ip route [address [mask]protocol ] 测试网络是否通 ping [protocol]{host address}
IP 配置实例
Creat a Network from Separates Subnets Example Serial Interface Configuration Example IP Access List Configuration Example 标准IP过滤表配置实例 限定虚拟终端访问实例 扩展IP过滤表配置实例 Ping Command Example Creat a Network from Separates Subnets Example
在下面例子中,subnet 1和subnet 2被主干网分开. Configuration for Router B
interface ethernet 2 ip address 192.5.10.1 255.255.255.0 ip address 131.108.3.1 255.255.255.0 secondary Configuration for Router C
interface ethernet 1 ip address 192.5.10.2 255.255.255.0 ip address 131.108.3.2 255.255.255.0 secondary
Serial Interface Configuration Example
在下面的例子中,把Ethernet 0的地址赋予Serial 1. Serial 1是unnumbered.
interface ethernet 0 ip address 145.22.4.67 255.255.255.0 interface serial 1 ip unnumbered ethernet 0 IP Access List Configuration Example
标准IP过滤表配置实例:
该例表明在36.48.0.0这个网段上只答应B机(36.48.0.3)与A机通信,其它的36.0.
0.0的网段如36.51.0.0可以与A机通信,而其它的如Internet用户均被过滤掉了. Configuration for Router A
access-list 2 permit 36.48.0.3 access-list 2 deny 36.48.0.0 0.0.255.255 access-list 2 permit 36.0.0.0 0.255.255.255 ! (Note:all other access denied) interface ethernet 0 ip access-group 2 in
限定虚拟终端访问实例:
该例只答应在192.89.55.0这个网段上的主机访问路由器.
Configuration for Router
access-list12 permit 192.89.55.0 0.0.0.255 ! line vty 0 4 access-class 12 in
!Allow existing TCP connection access-list 105 permit tcp any any established !Allow ICMP messages access-list 105 permit icmp any any !Allow SMTP to one host access-list 105 permit tcp any host 201.236.15.14 eq smtp !Allow WWW to server (other services may be required) access-list 105 permit tcp any host 201.222.11.5 eq www !Allow DNS,FTP command and data,and smtpto another host access-list 105 permit any host 201.222.11.7 eq domain access-list 105 permit any host 201.222.11.7 eq 42 access-list 105 permit any host 201.222.11.7 eq ftp access-list 105 permit any host 201.222.11.7 eq ftp-data access-list 105 permit any host 201.222.11.7 eq smtp ! interface serial 0 ip access-group 105 in
Ping Command Example
在例子中,目的地址是131.108.1.111.源地址是131.108.105.62.
Sandbox# ping Protocol [ip]: Target IP address: 131.108.1.111 Repeat count [5]:10 Datagram size [100]:64 Timeout in seconds [2]: Extended commands [n]: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 131.10
8.1.111, timeout is 2 seconds: !!!!!!!!!! SUCcess rate is 100 percent, round-trip min/avg/max = 4/4/4 ms
显示ARP表 show arp 显示名字缓存 show hosts 显示当前IP过滤表的内容 show ip access-list [access-list-number name ] 显示当前活动端口累计通过的包数 show ip accouting [checkpoint] 显示IP ARP表 show ip arp 显示某一个端口状态 show ip interface [type number ] 显示目前的路由表 show ip route [address [mask]protocol ] 测试网络是否通 ping [protocol]{host address}
IP 配置实例
Creat a Network from Separates Subnets Example Serial Interface Configuration Example IP Access List Configuration Example 标准IP过滤表配置实例 限定虚拟终端访问实例 扩展IP过滤表配置实例 Ping Command Example Creat a Network from Separates Subnets Example
在下面例子中,subnet 1和subnet 2被主干网分开. Configuration for Router B
interface ethernet 2 ip address 192.5.10.1 255.255.255.0 ip address 131.108.3.1 255.255.255.0 secondary Configuration for Router C
interface ethernet 1 ip address 192.5.10.2 255.255.255.0 ip address 131.108.3.2 255.255.255.0 secondary
Serial Interface Configuration Example
在下面的例子中,把Ethernet 0的地址赋予Serial 1. Serial 1是unnumbered.
interface ethernet 0 ip address 145.22.4.67 255.255.255.0 interface serial 1 ip unnumbered ethernet 0 IP Access List Configuration Example
!Allow existing TCP connection access-list 105 permit tcp any any established !Allow ICMP messages access-list 105 permit icmp any any !Allow SMTP to one host access-list 105 permit tcp any host 201.236.15.14 eq smtp !Allow WWW to server (other services may be required) access-list 105 permit tcp any host 201.222.11.5 eq www !Allow DNS,FTP command and data,and smtpto another host access-list 105 permit any host 201.222.11.7 eq domain access-list 105 permit any host 201.222.11.7 eq 42 access-list 105 permit any host 201.222.11.7 eq ftp access-list 105 permit any host 201.222.11.7 eq ftp-data access-list 105 permit any host 201.222.11.7 eq smtp ! interface serial 0 ip access-group 105 in
Ping Command Example
在例子中,目的地址是131.108.1.111.源地址是131.108.105.62.
Sandbox# ping Protocol [ip]: Target IP address: 131.108.1.111 Repeat count [5]:10 Datagram size [100]:64 Timeout in seconds [2]: Extended commands [n]: Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 131.10 8.1.111, timeout is 2 seconds: !!!!!!!!!! Success rate is 100 percent, round-trip min/avg/max = 4/4/4 ms