Cloud Native应用交付

  • 首页
  • 关于本站
  • 个人介绍
  • Downloads
  • Repo
    • Github
    • Container
  • F5
    • F5 Python SDK
    • F5-container
    • F5-LBaaS
  • 社交
    • 联系我
    • 微信/微博
    • 公众号
    • 打赏赞助
行至水穷处 坐看云起时
Cloud Native Application Services: cnadn.net
  1. 首页
  2. 项目案例
  3. 正文

[原创]BSCI第一章实验2之任务4(人邮自学指南BSCI)

2006年07月4日 7562点热度 0人点赞 0条评论

本次实验在任务3的基础上进行了改进,因为在任务3情况下NAT有致命弱点,所以本次实验改用route-map路由映射表来进行,此时路由器的NAT表条目将不再是只有内部本地和全局本地,还会有TCP/UDP等端口信息,这样就可以每次唯一的确定一个会话.本次实验与任务3
不同的地方就是在P1R1有所不同,其他不变.

P1R1的配置(红色部分是不同的部分,要删除任务3中NAT命令):
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1-2514
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
!
!
!
!
interface Loopback0
 ip address 1.1.1.1 255.0.0.0
!
interface Ethernet0
 ip address 10.1.1.1 255.255.255.0
 ip nat inside
!        
interface Ethernet1
 no ip address
 shutdown
!        
interface Serial0
 ip address 172.31.1.1 255.255.255.0
 ip nat outside
 encapsulation frame-relay
 no arp frame-relay
 frame-relay map ip 172.31.1.2 102 broadcast
 frame-relay map ip 172.31.1.5 105 broadcast
 no frame-relay inverse-arp
!        
interface Serial1
 ip address 10.1.0.1 255.255.255.0
 ip nat outside
 clock rate 125000
!        
ip nat pool bbr 192.168.1.1 192.168.1.254 prefix-length 24
ip nat pool pod 10.1.0.64 10.1.0.95 netmask 255.255.255.0
ip nat inside source route-map to-bbr pool bbr
ip nat inside source route-map to-pod pool pod

ip http server
ip classless
ip route 10.0.0.0 255.0.0.0 172.31.1.5
!        
!        
access-list 100 permit ip 10.1.1.0 0.0.0.255 10.254.0.0 0.0.0.255
access-list 101 permit ip 10.1.1.0 0.0.0.255 any
!        
route-map to-bbr permit 10
 match ip address 100
!        
route-map to-pod permit 10
 match ip address 101

!        
!        
line con 0
 logging synchronous
line aux 0
line vty 0 4
 login   
!        
end  

结果分析:
r3-2514#ping 10.254.0.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.254.0.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/52/60 ms

此时R1上调试信息:
*Mar  1 01:04:02.475: NAT: s=10.1.1.3->192.168.1.1, d=10.254.0.5 [35]
*Mar  1 01:04:02.519: NAT*: s=10.254.0.5, d=192.168.1.1->10.1.1.3 [35]
*Mar  1 01:04:02.527: NAT*: s=10.1.1.3->192.168.1.1, d=10.254.0.5 [36]
*Mar  1 01:04:02.571: NAT*: s=10.254.0.5, d=192.168.1.1->10.1.1.3 [36]
*Mar  1 01:04:02.579: NAT*: s=10.1.1.3->192.168.1.1, d=10.254.0.5 [37]
*Mar  1 01:04:02.623: NAT*: s=10.254.0.5, d=192.168.1.1->10.1.1.3 [37]
*Mar  1 01:04:02.631: NAT*: s=10.1.1.3->192.168.1.1, d=10.254.0.5 [38]
*Mar  1 01:04:02.671: NAT*: s=10.254.0.5, d=192.168.1.1->10.1.1.3 [38]
*Mar  1 01:04:02.683: NAT*: s=10.1.1.3->192.168.1.1, d=10.254.0.5 [39]
r1-2514(config)#do show ip nat trans
Pro Inside global      Inside local       Outside local      Outside global
icmp 192.168.1.1:7     10.1.1.3:7         10.254.0.5:7       10.254.0.5:7

接着PING 10.1.0.2看这次是否成功:
r3-2514#ping 10.1.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/32/40 ms


再看看R1上调试信息:
*Mar  1 01:04:58.763: NAT: s=10.1.1.3->10.1.0.65, d=10.1.0.2 [40]
*Mar  1 01:04:58.787: NAT*: s=10.1.0.2, d=10.1.0.65->10.1.1.3 [40]
*Mar  1 01:04:58.799: NAT*: s=10.1.1.3->10.1.0.65, d=10.1.0.2 [41]
*Mar  1 01:04:58.823: NAT*: s=10.1.0.2, d=10.1.0.65->10.1.1.3 [41]
*Mar  1 01:04:58.831: NAT*: s=10.1.1.3->10.1.0.65, d=10.1.0.2 [42]
*Mar  1 01:04:58.855: NAT*: s=10.1.0.2, d=10.1.0.65->10.1.1.3 [42]
*Mar  1 01:04:58.863: NAT*: s=10.1.1.3->10.1.0.65, d=10.1.0.2 [43]
*Mar  1 01:04:58.887: NAT*: s=10.1.0.2, d=10.1.0.65->10.1.1.3 [43]
*Mar  1 01:04:58.895: NAT*: s=10.1.1.3->10.1.0.65, d=10.1.0.2 [44]
*Mar  1 01:04:58.919: NAT*: s=10.1.0.2, d=10.1.0.65->10.1.1.3 [44]

r1-2514(config)#do show ip nat trans
Pro Inside global      Inside local       Outside local      Outside global
icmp 10.1.0.65:8       10.1.1.3:8         10.1.0.2:8         10.1.0.2:8

两次PING路由器对每个都进行了单独的NAT转换,相互不影响.同样的道理,如果我们不用ROUTE-MAP路由映射表,改用任务3里的配置加上OVERLOAD将会得到同样的效果.

相关文章

  • 暴风影音DNS事件分析
  • 配置组播(最少配置)
  • [转]RTR/SLA 在多ISP环境下下的应用--已经更新,切换后线路恢复时,已能自动恢复
  • 【原创】用CISCO VPN-Client4.01连接扩展验证-VPN-SERVER配置
  • 【原创】用CISCO VPN-Client4.01连接VPN-SERVER配置
本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: 实验 BSCI NAT 设备 试验
最后更新:2006年07月4日

纳米

linjing.io

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

页面AI聊天助手

纳米

linjing.io

☁️迈向Cloud Native ADC ☁️

认证获得:
TOGAF: ID 152743
Kubernetes: CKA #664
Microsoft: MCSE MCDBA
Cisco: CCNP
Juniper: JNCIS
F5:
F5 Certified Solution Expert, Security
F5 Certified Technology Specialist, LTM/GTM/APM/ASM
F5 Certified BIG-IP Administrator
  • 点击查看本博技术要素列表
  • 归档
    分类
    • AI
    • Automation
    • Avi Networks
    • Cisco ACI
    • CISCO资源
    • F5 with ELK
    • F5-Tech tips
    • F5技术
    • Juniper
    • Linux
    • NGINX
    • SDN
    • ServiceMesh
    • WEB编程
    • WINDOWS相关
    • 业界文章
    • 交换机技术
    • 化云为雨/Openstack
    • 协议原理
    • 容器/k8s
    • 我的工作
    • 我的生活
    • 网站技术
    • 路由器技术
    • 项目案例
    标签聚合
    api envoy docker neutron gtm flannel DNS irule istio openstack F5 bigip network k8s nginx
    最近评论
    汤姆 发布于 8 个月前(09月10日) 嗨,楼主,里面的json怎么下载啊,怎么收费啊?
    汤姆 发布于 8 个月前(09月09日) 大佬,kib的页面可以分享下吗?谢谢
    zhangsha 发布于 1 年前(05月12日) 资料发给我下,谢谢纳米同志!!!!lyx895@qq.com
    李成才 发布于 1 年前(01月02日) 麻烦了,谢谢大佬
    纳米 发布于 1 年前(01月02日) 你好。是的,因为以前下载系统插件在一次升级后将所有的下载生成信息全弄丢了。所以不少文件无法下载。DN...
    浏览次数
    • Downloads - 183,772 views
    • 联系我 - 118,966 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 116,509 views
    • Github - 103,659 views
    • F5常见log日志解释 - 79,774 views
    • 从传统ADC迈向CLOUD NATIVE ADC - 下载 - 74,623 views
    • Sniffer Pro 4 70 530抓包软件 中文版+视频教程 - 74,320 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 67,770 views
    • 关于本站 - 60,909 views
    • 这篇文档您是否感兴趣 - 55,495 views
    链接表
    • F5SE创新
    • Jimmy Song‘s Blog
    • SDNlab
    • Service Mesh社区
    • 三斗室
    • 个人profile
    • 云原生社区

    COPYRIGHT © 2023 Cloud Native 应用交付. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    京ICP备14048088号-1

    京公网安备 11010502041506号