动动大拇指
快快关注哦
-
三层交换:汇聚接入层交换机 -
默认路由:实现到互联网数以万计网络访问的简化配置 -
静态路由:实现公司内部网络互通 -
NAT端口映射:实现企业内部Web服务器的发布
Switch(config)#hostname MS1
MS1(config)#ip routing
MS1(config)#interface vlan 1
MS1(config-if)#ip address 192.168.1.252 255.255.255.0
MS1(config-if)#no shutdown
MS1(config-if)#exit
MS1(config-if)#interface fastEthernet 0/1
MS1(config-if)#no switchport
MS1(config-if)#ip address 192.168.2.1 255.255.255.0
MS1(config-if)#no shutdown
Router(config)#hostname R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.2.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 1/0
R1(config-if)#ip address 61.159.62.129 255.255.255.248
R1(config-if)#no shutdown
MS1(config-if)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
R1(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
PC>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
Reply from 192.168.2.2: bytes=32 time=1ms TTL=254
Ping statistics for 192.168.2.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC>ping 61.159.62.129
Pinging 61.159.62.129 with 32 bytes of data:
Reply from 61.159.62.129: bytes=32 time=1ms TTL=254
Reply from 61.159.62.129: bytes=32 time=0ms TTL=254
Reply from 61.159.62.129: bytes=32 time=2ms TTL=254
Reply from 61.159.62.129: bytes=32 time=0ms TTL=254
Ping statistics for 61.159.62.129:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 2ms, Average = 0ms
R1(config)#ip nat inside source static tcp 192.168.1.8 80 61.159.62.131 80
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip nat inside
R1(config)#interface f1/0
R1(config-if)#ip nat outside
长按二维码
关注更多精彩
看都看完了,不如点这里试试
原文始发于微信公众号(老五说网络):通过端口映射技术将WEB服务器发布到Internet
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论