PAP验证试验
在R1和R2上做相同的配置
R1(config)#int s 0/0
R1(config-if)#encapsulation ppp
在R1上配置用户名和密码和认证方式
R1(config)#username laoxie password 123
R1(config-if)#ppp authentication pap
被认证方上配置需要发送的密码
R2(config)#int s 0/0
R2(config-if)#ppp pap sent-username laoxie password 123
认证经历两次握手,由被认证方发起请求
——————————————–
CHAP认证试验
R1(config-if)#ppp authentication chap
R1(config-if)#exit
R1(config)#username user1 password 123
R1(config-if)#ppp chap hostname user2
R2(config)#username r2 password 123
R2(config)#int s 0/0
R2(config-if)#ppp chap hostname r1
PS:chap 如果没有指定发送用户名,发送路由器的名称
——————————————–
IP协商
R2(config-if)#ip add negotiated
R2在端口上配置协商模式
R1(config-if)#peer default ip address 192.168.1.10
——————————————–
压缩试验 | 命令如下
ip tcp header-compression //TCP头部压缩
compress stac //数据压缩
show一下效果
R1#show compress
Serial0/0
Software compression enabled
uncompressed bytes xmt/rcv 817/817
compressed bytes xmt/rcv 405/413
Compressed bytes sent: 405 bytes 0 Kbits/sec ratio: 2.017
Compressed bytes recv: 413 bytes 0 Kbits/sec ratio: 1.978
1 min avg ratio xmt/rcv 0.512/0.520
5 min avg ratio xmt/rcv 0.512/0.520
10 min avg ratio xmt/rcv 0.512/0.520
no bufs xmt 0 no bufs rcv 0
resyncs 0
Additional Stac Stats:
Transmit bytes: Uncompressed = 0 Compressed = 405
Received bytes: Compressed = 419 Uncompressed = 0
在Corp配置,因为要求不能访问web服务器,所以要用扩展访问列表,下面开始配置
注意:特权模式密码是cisco
Router>en Password: Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#access-list 100 permit tcp host 192.168.33.4 host 172.22.242.23 eq 80 Router(config)#access-list 100 deny tcp any host 172.22.242.23 eq 80 Router(config)#access-list 100 permit ip any any Router(config)#do show ip int b Interface IP-Address OK? Method Status Protocol FastEthernet0/0 192.168.33.254 YES manual up up FastEthernet0/1 172.22.242.30 YES manual up up Serial1/0 198.18.247.65 YES manual up up Serial1/1 unassigned YES unset administratively down down Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down Vlan1 unassigned YES unset administratively down down Router(config)#int fa 0/1 Router(config-if)#ip access-group 100 out Router(config-if)#end Router# %SYS-5-CONFIG_I: Configured from console by console Router# Router#copy run start Destination filename [startup-config]? Building configuration... [OK] Router# Router# |
测试一下ACL是否正常,最后记得保存,一定要保存
最后发泄一句:尼玛的ACL,尼玛的OSPF,尼玛的EIGRP,尼玛的cisco,尼玛的英文考卷,尼玛的….题库看的抓狂….
首先说一点吧,犯了一个很白痴的错误,刚搭好拓扑,R1无法与内网通信,老谢居然在R1上做了条默认路由
NAT的作用就是把内网IP转换成外网IP,我这样一来试验没有一点效果,而且在真实环境中,ISP不可能收到私网地址
PC0 IP:192.168.1.2
PC1 IP:192.168.1.3
静态NAT
R2(config)#ip nat inside source static 192.168.1.2 200.200.200.1 R2(config)#int fa0/0 R2(config-if)#ip nat inside R2(config-if)#ip nat outside R2(config-if)#end |
动态NAT
注意:静态NAT配置clear不掉,必须no掉配置
步骤:定义ACL允许访问外网的地址、定义合法地址池、实现转换
R2(config)#access-list 1 permit 192.168.1.0 255.255.255.0 /*定义ACL*/ R2(config)#ip nat pool laoxie 200.200.200.1 200.200.200.1 netmask 255.255.255.0 /*pool名称laoxie后面为范围*/ R2(config)#ip nat inside source list 1 pool laoxie /*定义NAT使用list1的ACL和laoxie的pool*/ R2(config)#end |
PAT
R2(config)#access-list 1 permit 192.168.1.0 0.0.0.255 R2(config)#ip nat pool laoxie 200.200.200.1 200.200.200.1 netmask 255.255.255.0 R2(config)#ip nat inside source list 1 pool laoxie overload |
DZ x2.0伪静态规则 apache
分类:网站技术日期:2011-07-01 - 13:12:18评论:9条作者:老谢
# 将 RewriteEngine 模式打开 RewriteEngine On # 修改以下语句中的 /discuz 为你的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 / RewriteBase / # Rewrite 系统规则请勿修改 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1 |
最新评论
老何:不至于跌得这么狠吧
Andy烧麦:这些大厂都能提供必要的售后
王光卫博客:小米生态还是比较丰富
空空裤兜:在天猫买的利维斯顿,阿里智能APP...
林羽凡:我突然发现,你也记录了很多博文了。
菊座:小米的东西还行
zwwooooo:一般电器产品都jd,就是想售后身心
zwwooooo:能随便搞个公司玩玩也算是实力选手
大D:坚持就是胜利哈哈哈
老麦:看着那一排日志存档,老前辈了啊。