首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >网络(路由和交换),安全

网络(路由和交换),安全
EN

Network Engineering用户
提问于 2018-09-21 12:41:33
回答 2查看 96关注 0票数 2

在我公司的网络中,我正在安装新的cisco2811路由器,但我有问题,我的局域网网络不能平和接入网络。我从ISP那里得到了点到点的互联网。

PTP IP为192.186.86.200/24,其开关端口为15。

局域网IP 172.16.16.200/24 DHCP。

我已经在路由器中配置了虚拟接口。

也实施了NAT规则,但我现在不知道如何访问互联网。

我的互联网IP是192.186.86.200/24

我想我需要配置NAT规则,但不知道哪种类型。

这是路由器配置:

代码语言:javascript
复制
Router#show running-config
Building configuration...


Current configuration : 3700 bytes
!
! Last configuration change at 18:10:56 UTC Thu Sep 20 2018
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
enable password Ylinx
!
no aaa new-model
!
!
dot11 syslog
ip source-route
!
!
ip cef
!
ip dhcp excluded-address 172.16.16.200
ip dhcp excluded-address 10.2.60.55
!
ip dhcp pool YLINX_LAN
 network 172.16.16.0 255.255.255.0
 dns-server 8.8.8.8
 default-router 172.16.16.200
 lease 10
 update arp
!
ip dhcp pool YLINX_SERVERS
 network 10.2.60.0 255.255.255.0
 dns-server 8.8.8.8
 default-router 10.2.60.200
 lease 10
 update arp
!
!
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
voice-card 0
!
crypto pki token default removal timeout 0
!
crypto pki trustpoint TP-self-signed-2879905090
 enrollment selfsigned
 subject-name cn=IOS-Self-Signed-Certificate-2879905090
 revocation-check none
 rsakeypair TP-self-signed-2879905090
!
!

    quit
!
!
license udi pid CISCO2811 sn FHK0902F4V6
username naseer secret 5 $1$w6HC$W9eoccnVIhNDKbMr91f2e0
!
redundancy
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.400
 encapsulation dot1Q 400
 ip address 192.168.86.200 255.255.255.0
 ip nat outside
 ip virtual-reassembly in
!
interface FastEthernet0/0.401
 encapsulation dot1Q 401
 ip address 192.168.1.200 255.255.255.0
!
interface FastEthernet0/0.402
 encapsulation dot1Q 402
 ip address 172.16.16.200 255.255.255.0
!
interface FastEthernet0/0.403
 encapsulation dot1Q 403
 ip address 10.2.60.200 255.255.255.0
!
interface FastEthernet0/1
 ip address 1.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface BRI0/1/0
 no ip address
 encapsulation hdlc
 shutdown
!
ip forward-protocol nd
ip http server
no ip http secure-server
!
!
ip nat outside source static 192.168.86.200 172.16.16.200
ip route 0.0.0.0 0.0.0.0 192.168.86.1 10
ip route 0.0.0.0 0.0.0.0 192.168.1.1 50
!
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp profile default
!
!
!
!
!
!
line con 0
 password Ylinx
 login
line aux 0
line vty 0 4
 password Ylinx
 login
 transport input all
line vty 5 15
 password Ylinx
 login
 transport input all
!
scheduler allocate 20000 1000
end

开关接口配置:

代码语言:javascript
复制
interface GigabitEthernet1/0/15 
 description YLINX_PTP
 switchport access vlan 400
 switchport trunk encapsulation dot1q
 switchport mode access

interface GigabitEthernet1/0/16
 description YLINX_161_DIRECT
 switchport access vlan 402
 switchport trunk encapsulation dot1q
 switchport mode access

interface GigabitEthernet1/0/18
 description YLINX_CISCO_ROUTER
 switchport trunk encapsulation dot1q 
 switchport mode trunk

interface GigabitEthernet1/0/21 
 description YLINX_SERVERS
 switchport access vlan 403
 switchport trunk encapsulation dot1q
 switchport mode access
EN

回答 2

Network Engineering用户

发布于 2018-09-21 13:45:50

欢迎来到网络工程!这里有一些不对劲的地方:

  1. 没有内部nat声明。您有关于fa 0/0.401的外部NAT声明。在您的内部LAN接口上(无论是哪种),您需要内部的ip nat
  2. 如果您只是希望内部主机到达internet,请将NAT语句更改为: ip nat If source list 1接口FastEthernet0 0/0.401重载访问列表1 0.0.0 255.255.255.255

如果希望外部主机连接到内部主机(如web服务器),则需要一个不同的NAT语句,但需要提供更多信息才能推荐配置。

票数 2
EN

Network Engineering用户

发布于 2020-11-29 16:27:58

将ISP分配的公共ip地址配置为路由器出口interfàce。并进一步配置用于互联网接入(出站流量)的端口地址转换(PAT)。

静态NAT一对1用于入站流量

For PAT配置

Router(config) # access-list 10 permit 172.16.16.0 0.0.0.0.255 any

Router(config) # ip nat inside source list 1 interfàce F0/1 overload

票数 0
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://networkengineering.stackexchange.com/questions/53444

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档