设为首页收藏本站language 语言切换
查看: 2378|回复: 10
收起左侧

[求助] 做了单臂路由后,如何与外界联通

[复制链接]
发表于 2015-10-13 07:52:54 | 显示全部楼层 |阅读模式
3鸿鹄币

左边单臂路由做好了,如何让PC0ping通服务器

左边单臂路由做好了,如何让PC0ping通服务器

最佳答案

查看完整内容

R: interface Ethernet0/0 ip address 192.168.10.5 255.255.255.252 ! interface Ethernet0/1 no ip address ! interface Ethernet0/1.20 encapsulation dot1Q 20 ip address 192.168.20.1 255.255.255.0 ! interface Ethernet0/1.30 encapsulation dot1Q 30 ip address 192.168.30.1 255.255.255.0 ! ip route 0.0.0.0 0.0.0.0 192.168.10.6 Server: interface Ethernet0/0 ip address 192.1 ...
发表于 2015-10-13 07:52:55 | 显示全部楼层

搜狗截图15年10月13日0917_3.png
R:
interface Ethernet0/0
ip address 192.168.10.5 255.255.255.252
!
interface Ethernet0/1
no ip address
!
interface Ethernet0/1.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
!
interface Ethernet0/1.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.10.6


Server:
interface Ethernet0/0
ip address 192.168.10.6 255.255.255.252
!         
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.10.5


SW:
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
duplex auto
!
interface Ethernet0/2
switchport access vlan 20
switchport mode access
duplex auto
!
interface Ethernet0/3
switchport access vlan 30
switchport mode access
duplex auto


PC1:
interface Ethernet0/2
ip address 192.168.20.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.20.1



PC2:
interface Ethernet0/3
ip address 192.168.30.3 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.30.1


沙发 2015-10-13 07:52:55 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 08:53:28 | 显示全部楼层
写路由,或者做NAT
板凳 2015-10-13 08:53:28 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 09:18:23 | 显示全部楼层
接楼上  你的路由器2 应该是内网网关的角色 做nat、pat都可以 注意在子接口上 标志 ip nat inside
有问题可以加 QQ:279547402
地板 2015-10-13 09:18:23 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 10:06:36 | 显示全部楼层
楼上
5# 2015-10-13 10:06:36 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 11:01:33 | 显示全部楼层
6# 2015-10-13 11:01:33 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 11:24:36 | 显示全部楼层
路过了解一下
7# 2015-10-13 11:24:36 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 11:52:28 | 显示全部楼层
4楼的一条缺省路由搞掂。
8# 2015-10-13 11:52:28 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 13:35:34 | 显示全部楼层
网关都在路由器上,路由表显示直连。你懂配置一般都可以ping通。
9# 2015-10-13 13:35:34 回复 收起回复
回复

使用道具 举报

发表于 2015-10-13 15:02:24 | 显示全部楼层
1.请你搞清楚,是内网需要与外界联系,还是内网的Server需要与外界联系。是单一IP还是所有内网IP?
2.你做了单壁路由,Gateway应该是指在Route 的LAN Gateway上,如果想让route 的next-hop 可以访问外网
。你必须配置WAN PORT的 Pubilc IP(当然有公共IP,配ISP提供的,如果不是,请依运营商给的具体连接Internet 数据参数为准),下一条route 指向ISP所提供的Gateway.
3.内网访问外网,肯定需要做NAT地址转换,这样,私有IP段才能访问外界,这一点,你可以参考NAT configuation 来做配置。
4.PAT和NAT有巨别,建议你按你自己实际要求来做配置。理解一下基础的东西,对你有好处。
10# 2015-10-13 15:02:24 回复 收起回复
回复

使用道具 举报

发表于 2015-10-16 12:32:12 | 显示全部楼层
如果是楼主的这个拓扑,单臂路由后不需要在配置路由协议,都是直连路由
11# 2015-10-16 12:32:12 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-6 01:43 , Processed in 0.063601 second(s), 14 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表