如何配置三层交换机、路由器?

2025-03-10 14:52:35
推荐回答(4个)
回答1:

我用的三层交换机,拓扑图在下面,你看看就会明白,如果需要pkt文件的话告诉我一下:

1.交换机配置

Building configuration...

Current configuration : 1456 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Switch

!

!

!

!

!

ip routing

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

!

!

!

!

interface FastEthernet0/1

!

interface FastEthernet0/2

 switchport access vlan 200

!

interface FastEthernet0/3

 switchport access vlan 200

!

interface FastEthernet0/4

 switchport access vlan 10

!

interface FastEthernet0/5

!

interface FastEthernet0/6

!

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

 ip address 10.76.201.2 255.255.255.128

!

interface Vlan10

 ip address 192.168.10.254 255.255.255.0

!

interface Vlan200

 ip address 10.76.200.1 255.255.255.128

!

router ospf 110

 log-adjacency-changes

 network 10.76.201.0 0.0.0.127 area 192

 network 10.76.200.0 0.0.0.127 area 192

 network 192.168.10.0 0.0.0.255 area 192

2.路由器上所需的配置

interface FastEthernet0/0

 ip address 10.76.201.1 255.255.255.128

 duplex auto

 speed auto

!

interface FastEthernet0/1

 no ip address

 duplex auto

 speed auto

 shutdown

!

interface Vlan1

 no ip address

 shutdown

!

router ospf 110

 log-adjacency-changes

 network 10.76.201.0 0.0.0.127 area 192

3.有什么问题可以提。

回答2:

首先注意下你的vlan10 的192.168.10.0/24 这个网段 掩码不能用24位的 ,因为你的28路由器接口地址用到了192.168.10.段的地址了

再就是 3层交换 不知道你想怎么使用它, 它可以当路由器使用, 也可以当2层交换使用。
当2层用的话, 先关闭路由功能, 然后划分vlan 接电脑的端口用access模式
上行的g3/1 用trunk模式 把vlan10 和200 划进去。

28路由器对交换机启用单臂路由
28路由器下行f0/0 做子接口 f0/0.1 和f0/0.2 对子接口启用dot1q 封装 一个封装vlan10 一个封装200 对子接口配置ip地址,该ip地址分别是vlan10 和200 的网关地址
配置完后,vlan10 和200就可以通信了

然后在28路由器现有的ospf中添加新的network 192.168.10.0 和10.76.200.0/25 这两个网段就是vlan10 和vlan200的网段
现在vlan10 和200 就可以与外网通信了

希望能帮到你。总体思路就是用28对交换机做单臂路由 然后在ospf中添加新的网段

第二种就是3层交换机中直接终结vlan ,与28路由器对接的直接启用3层接口对接。 然后在3层交换上做个往外出的默认路由,然后还是要在28路由器现有的ospf中添加新的网段。

细节东西你可以再细问我。。。

回答3:

1,如果财政局给你的ip只有一个的话,你必须在加路由器的 不能直接连接交换机,因为交换几没有路由功能(重新分配ip)
2,加上路由器的话 在路由器上面 填写财政局给你的ip DNS 等参数 保存后路由器才能连接正常
3,如果进行vlan配置的话 建议通过交换机管理页面 进行配置,这样子对新手很容易上手

回答4:

专业问题,实在难懂啊。好像一般TP的都是默认设定的。只要设置好帐号和密码,把路由器上的接线,分别接到交换机上就可以。