设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 1004|回复: 6
收起左侧

[求助] 三层交换机模拟内网,两台交换机模拟外网

[复制链接]
发表于 2017-4-18 22:07:52 | 显示全部楼层 |阅读模式
10鸿鹄币
222111.png
如图,我在三层交换机上做了个dhcp,下面vlan2-8的ip是192.168.2.1——192.168.8.1,
我想要让上面两个路由器模拟外网接入内网,能让下面的电脑ping通路由器,求大腿教我怎么配置路由器
还有我在三层路由器上开通ip routing所有vlan就能互相Ping通应该没问题吧?

最佳答案

查看完整内容

R3上做nat,核心路由器并配置静态路由
发表于 2017-4-18 22:07:53 | 显示全部楼层
R3上做nat,核心路由器并配置静态路由
沙发 2017-4-18 22:07:53 回复 收起回复
回复

使用道具 举报

发表于 2017-4-18 23:10:48 | 显示全部楼层
R3上做nat,核心路由器并配置静态路由
板凳 2017-4-18 23:10:48 回复 收起回复
回复

使用道具 举报

发表于 2017-4-19 00:39:18 | 显示全部楼层
描述的不清不楚、ping通路由器,那个路由器
地板 2017-4-19 00:39:18 回复 收起回复
回复

使用道具 举报

发表于 2017-4-19 12:06:21 | 显示全部楼层
配置路由呀,没配的话,怎么可能能连通
5# 2017-4-19 12:06:21 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-4-19 14:24:21 | 显示全部楼层
各位老哥我是真的没思路啊,给点简单的代码哦
6# 2017-4-19 14:24:21 回复 收起回复
回复

使用道具 举报

发表于 2017-5-9 18:22:01 | 显示全部楼层
吾任性 发表于 2017-4-19 14:24
各位老哥我是真的没思路啊,给点简单的代码哦

Switch#show run
Building configuration...

Current configuration : 1542 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
ip routing
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/1
switchport access vlan 2
!
interface FastEthernet0/2
switchport access vlan 3
!
interface FastEthernet0/3
switchport access vlan 4
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
no switchport
ip address 172.16.0.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
!
interface Vlan2
ip address 192.168.2.1 255.255.255.0
!
interface Vlan3
ip address 192.168.3.1 255.255.255.0
!
interface Vlan4
ip address 192.168.4.1 255.255.255.0
!
router eigrp 100
network 172.16.0.0 0.0.0.255
network 192.168.0.0 0.0.7.255
no auto-summary
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.0.1
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end


Router#show run
Building configuration...

Current configuration : 974 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524KPWF
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface Loopback0
no ip address
!
interface GigabitEthernet0/0
ip address 10.0.0.1 255.255.255.248
ip nat outside
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 172.16.0.1 255.255.255.0
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
!
router eigrp 100
network 172.16.0.0 0.0.0.255
no auto-summary
!
ip nat inside source list 99 interface GigabitEthernet0/0 overload
ip classless
ip route 172.16.0.0 255.255.255.0 172.16.0.2
!
!
access-list 99 permit 192.168.0.0 0.0.7.255
access-list 99 permit 172.16.0.0 0.0.0.255
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end





Router#show run
Building configuration...

Current configuration : 638 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524273Y
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface GigabitEthernet0/0
ip address 10.0.0.2 255.255.255.248
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end


很简单
7# 2017-5-9 18:22:01 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-26 16:13 , Processed in 0.056662 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

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