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

[求助] 路由器一个公网地址转换两个内网地址

[复制链接]
发表于 2016-7-29 23:46:50 | 显示全部楼层 |阅读模式
3鸿鹄币
路由器一个公网地址转换两个内网地址这样可以吗,请教高手看一下配置哪里有问题,小弟求指教
Router#show run
Building configuration...

Current configuration : 1479 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
!
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 172.16.6.2 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 172.16.7.2 255.255.255.0
ip nat inside
ip virtual-reassembly
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
pppoe enable group global
pppoe-client dial-pool-number 1
!
interface Dialer1
ip address negotiated
ip mtu 1492
ip nat outside
ip virtual-reassembly
encapsulation ppp
ip tcp adjust-mss 1452
dialer pool 1
dialer idle-timeout 0
dialer hold-queue 100
dialer persistent
dialer-group 1
ppp authentication pap callin
ppp pap sent-username 888 password 0 888
!
router ospf 1
log-adjacency-changes
network 172.16.6.0 0.0.0.255 area 0
network 172.16.7.0 0.0.0.255 area 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
ip http server
no ip http secure-server
ip nat inside source list 1 interface Dialer1 overload
!
access-list 1 permit 172.16.0.0 0.0.255.255
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!         
end

Router#

Router(config)#do  show ip rout
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

O    192.168.30.0/24 [110/3] via 172.16.7.1, 00:19:50, FastEthernet0/1
                     [110/3] via 172.16.6.1, 00:19:50, FastEthernet0/0
O    192.168.10.0/24 [110/3] via 172.16.7.1, 00:19:50, FastEthernet0/1
                     [110/3] via 172.16.6.1, 00:19:50, FastEthernet0/0
O    192.168.40.0/24 [110/3] via 172.16.7.1, 00:19:50, FastEthernet0/1
                     [110/3] via 172.16.6.1, 00:19:50, FastEthernet0/0
     172.16.0.0/24 is subnetted, 4 subnets
C       172.16.6.0 is directly connected, FastEthernet0/0
C       172.16.7.0 is directly connected, FastEthernet0/1
O       172.16.1.0 [110/2] via 172.16.7.1, 00:19:51, FastEthernet0/1
                   [110/2] via 172.16.6.1, 00:19:51, FastEthernet0/0
O       172.16.2.0 [110/2] via 172.16.7.1, 00:19:51, FastEthernet0/1
                   [110/2] via 172.16.6.1, 00:19:51, FastEthernet0/0
O    192.168.20.0/24 [110/3] via 172.16.7.1, 00:19:52, FastEthernet0/1
                     [110/3] via 172.16.6.1, 00:19:52, FastEthernet0/0
     123.0.0.0/32 is subnetted, 2 subnets
C       123.112.152.1 is directly connected, Dialer1
C       123.112.154.8 is directly connected, Dialer1
S*   0.0.0.0/0 is directly connected, Dialer1

Router(config)#do show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            172.16.6.2      YES NVRAM  up                    up      
FastEthernet0/1            172.16.7.2      YES NVRAM  up                    up      
FastEthernet1/0            unassigned      YES NVRAM  up                    up      
NVI0                       unassigned      NO  unset  up                    up      
Virtual-Access1            unassigned      YES unset  up                    up      
Virtual-Access2            unassigned      YES unset  up                    up      
Dialer1                    123.112.154.8   YES IPCP   up                    up   

最佳答案

查看完整内容

端口NAT,搜索一下就有
发表于 2016-7-29 23:46:51 | 显示全部楼层
心碎258 发表于 2016-7-30 11:30
具体命令是啥呢,PAT不太会用啊,小弟新手求指教啊

端口NAT,搜索一下就有
沙发 2016-7-29 23:46:51 回复 收起回复
回复

使用道具 举报

发表于 2016-7-30 11:10:07 | 显示全部楼层
应该用PAT吧
板凳 2016-7-30 11:10:07 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-7-30 11:30:03 | 显示全部楼层

具体命令是啥呢,PAT不太会用啊,小弟新手求指教啊

点评

端口NAT,搜索一下就有  详情 回复 发表于 2016-7-30 20:45
地板 2016-7-30 11:30:03 回复 收起回复
回复

使用道具 举报

发表于 2016-7-30 12:18:49 | 显示全部楼层
路过,研究一下
5# 2016-7-30 12:18:49 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-8 07:51 , Processed in 0.085281 second(s), 17 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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