纯小白新手第一次学着配置交换机问题求救,在线等答案

[复制链接]
发表于 : 2017-12-23 18:03:24 最新回复:2017-12-25 10:51:07
1174 12
tycw    

  求助帖: (未解决)
本帖最后由 tycw 于 2017-12-23 20:32 编辑 器材,s7706-24千兆板1台(sw1)
    s5700s-li 52p两台(sw4,,sw5)

想法:在sw4上配置vlan2 4 6 8,vlanif2,4,6,8,IP192.168.X.254
    另外配置vlan100,vlanif100 ip192.168.100.4 
   
    在sw5上配置vlan3 5 7 9,vlanif3,5,7,9,IP192.168.X.254
    另外配置vlan100,vlanif100 ip192.168.100.5
   
    两个交换机上都写缺省路由 ip route-static 0.0.0.0 0.0.0.0 192.168.100.1
 
   
   sw1上配置vlan100,vlanif100 192.168.100.1
          vlan10,vlanif10  192.168.1.254
    
    写路由  ip route-static 192.168.2.0 255.255.255.0 192.168.100.4
          ip route-static 192.168.4.0 255.255.255.0 192.168.100.4
          ip route-static 192.168.6.0 255.255.255.0 192.168.100.4
          ip route-static 192.168.8.0 255.255.255.0 192.168.100.4

          ip route-static 192.168.3.0 255.255.255.0 192.168.100.5
          ip route-static 192.168.5.0 255.255.255.0 192.168.100.5
          ip route-static 192.168.7.0 255.255.255.0 192.168.100.5
          ip route-static 192.168.9.0 255.255.255.0 192.168.100.5
          ip route-static 192.168.1.0 255.255.255.0 192.168.100.1
          ip route-static 0.0.0.0 0.0.0.0 192.168.100.2

   路由器连接sw1 ip为192.168.100.2

昨天在ensp上按这个思路模拟操作,各网段互相之间都能ping通,也能ping通路由器ip192.168.100.2
今天上机实战,搞了一整天,问题如下
1、电脑无论接入哪个ip段,都能ping通 100.4  100.5  100.1这几个ip
2、电脑无论接入哪个交换机,都只能ping通所在ip段的网关,其余网段的网关全部不通

拓扑图  在ensp上用5700和3700做的模拟,接口和实际的不同
附件: 您需要 登录 才可以下载或查看,没有帐号?注册
  • x
  • 常规:

点评 回复

跳转到指定楼层
tycw     发表于 2017-12-23 18:07:11 已赞(0) 赞(0)

本帖最后由 tycw 于 2017-12-23 18:21 编辑 sw4

system-view
sysname JAZX-SW4
vlan batch 2 4 6 8
port-group jazx2
group-member GigabitEthernet0/0/1 to GigabitEthernet0/0/12
port link-type access
port default vlan 2
quit

port-group jazx4
group-member GigabitEthernet0/0/13 to GigabitEthernet0/0/24
port link-type access
port default vlan 4
quit

port-group jazx6
group-member GigabitEthernet0/0/25 to GigabitEthernet0/0/36
port link-type access
port default vlan 6
quit

port-group jazx8
group-member GigabitEthernet0/0/37 to GigabitEthernet0/0/44
port link-type access
port default vlan 8
quit


interface vlanif 2
ip address 192.168.2.254 24

interface vlanif 4
ip address 192.168.4.254 24

interface vlanif 6
ip address 192.168.6.254 24

interface vlanif 8
ip address 192.168.8.254 24
quit

vlan batch 100
port-group jazx100
group-member GigabitEthernet0/0/45 to GigabitEthernet0/0/48
port link-type access
port default vlan 100
quit

interface vlanif 100
ip address 192.168.100.4 24
quit

ip route-static 0.0.0.0 0.0.0.0 192.168.100.1

dhcp enable
interface vlanif2
dhcp select interface
dhcp server excluded-ip-address 192.168.2.1 192.168.2.100
dhcp server excluded-ip-address 192.168.2.201 192.168.2.253
dhcp server dns-list 192.168.100.2 114.114.114.114

interface vlanif6
dhcp select interface
dhcp server excluded-ip-address 192.168.6.1 192.168.6.100
dhcp server excluded-ip-address 192.168.6.201 192.168.6.253
dhcp server dns-list 192.168.100.2 114.114.114.114

interface vlanif8
dhcp select interface
dhcp server excluded-ip-address 192.168.8.1 192.168.8.100
dhcp server excluded-ip-address 192.168.8.201 192.168.8.253
dhcp server dns-list 192.168.100.2 114.114.114.114
quit

aaa
local-user admin password irreversible-cipher yy826905
local-user admin privilege level 15
local-user admin service-type http
quit







sw5

system-view
sysname JAZX-SW5
vlan batch 3 5 7 9
port-group jazx3
group-member GigabitEthernet0/0/1 to GigabitEthernet0/0/12
port link-type access
port default vlan 3
quit

port-group jazx5
group-member GigabitEthernet0/0/13 to GigabitEthernet0/0/24
port link-type access
port default vlan 5
quit

port-group jazx7
group-member GigabitEthernet0/0/25 to GigabitEthernet0/0/36
port link-type access
port default vlan 7
quit

port-group jazx9
group-member GigabitEthernet0/0/37 to GigabitEthernet0/0/44
port link-type access
port default vlan 9
quit


interface vlanif 3
ip address 192.168.3.254 24

interface vlanif 5
ip address 192.168.5.254 24

interface vlanif 7
ip address 192.168.7.254 24

interface vlanif 9
ip address 192.168.9.254 24
quit

vlan batch 100
port-group jazx100
group-member GigabitEthernet0/0/45 to GigabitEthernet0/0/48
port link-type access
port default vlan 100
quit

interface vlanif 100
ip address 192.168.100.5 24
quit

ip route-static 0.0.0.0 0.0.0.0 192.168.100.1

dhcp enable
interface vlanif5
dhcp select interface
dhcp server excluded-ip-address 192.168.5.1 192.168.5.100
dhcp server excluded-ip-address 192.168.5.201 192.168.5.253
dhcp server dns-list 192.168.100.2 114.114.114.114

interface vlanif7
dhcp select interface
dhcp server excluded-ip-address 192.168.7.1 192.168.7.100
dhcp server excluded-ip-address 192.168.7.201 192.168.7.253
dhcp server dns-list 192.168.100.2 114.114.114.114

interface vlanif9
dhcp select interface
dhcp server excluded-ip-address 192.168.9.1 192.168.9.100
dhcp server excluded-ip-address 192.168.9.201 192.168.9.253
dhcp server dns-list 192.168.100.2 114.114.114.114
quit

aaa
local-user admin password irreversible-cipher yy826905
local-user admin privilege level 15
local-user admin service-type http
quit

sw1

system-view
sysname JAZX-SW1

vlan batch 100
port-group jazx100
group-member GigabitEthernet1/0/10 to GigabitEthernet1/0/23
port link-type access
port default vlan 100
quit

vlan batch 10
port-group jazx10
group-member GigabitEthernet1/0/0 to GigabitEthernet1/0/9
port link-type access
port default vlan 10
quit

interface vlanif 100
ip address 192.168.100.1 24
quit

interface vlanif 10
ip address 192.168.1.254 24
quit

ip route-static 192.168.2.0 255.255.255.0 192.168.100.4
ip route-static 192.168.4.0 255.255.255.0 192.168.100.4
ip route-static 192.168.6.0 255.255.255.0 192.168.100.4
ip route-static 192.168.8.0 255.255.255.0 192.168.100.4

ip route-static 192.168.3.0 255.255.255.0 192.168.100.5
ip route-static 192.168.5.0 255.255.255.0 192.168.100.5
ip route-static 192.168.7.0 255.255.255.0 192.168.100.5
ip route-static 192.168.9.0 255.255.255.0 192.168.100.5
ip route-static 192.168.1.0 255.255.255.0 192.168.100.1
ip route-static 0.0.0.0 0.0.0.0 192.168.100.2

aaa
local-user admin password irreversible-cipher yy826905
local-user admin privilege level 15
local-user admin service-type http
quit
  • x
  • 常规:

点评 回复

社区管理员咕噜噜  管理员   发表于 2017-12-23 18:08:21 已赞(0) 赞(0)

帮顶,请专家解答
  • x
  • 常规:

点评 回复

企业互动社区精华帖管理规则
关注!关注!关注!
kmyd  版主   发表于 2017-12-23 18:15:26 已赞(0) 赞(0)

把三台交换机的完整配置发上来看下!2楼的贴子也编辑下吧,看起来好乱!
  • x
  • 常规:

点评 回复

tycw     发表于 2017-12-23 18:22:50 已赞(0) 赞(0)

kmyd 发表于 2017-12-23 18:15 把三台交换机的完整配置发上来看下!2楼的贴子也编辑下吧,看起来好乱!
发了,麻烦版主帮我看一下

我突然想到个问题,5700s-li是不是不能当3层机用,放在接入层给vlan做网关啊
  • x
  • 常规:

点评 回复

kmyd  版主   发表于 2017-12-23 18:57:40 已赞(1) 赞(1)

tycw 发表于 2017-12-23 18:22 发了,麻烦版主帮我看一下我突然想到个问题,5700s-li是不是不能当3层机用,放在接入层给vlan做网关啊 ...
从你的配置和图上来看,如果三台交换机的互联接口是图上的话,那SW4和SW5互联端口都不在Vlan100里面,肯定不通了!三台交换机用Vlan100来互联,互联接口要加入到vlan100里面!
  • x
  • 常规:

点评 回复

tycw     发表于 2017-12-23 19:05:17 已赞(0) 赞(0)

kmyd 发表于 2017-12-23 18:57 从你的配置和图上来看,如果三台交换机的互联接口是图上的话,那SW4和SW5互联端口都不在Vlan100里面,肯 ...
拓扑图是在ensp上用5700和3700模拟出来的,端口信息和实际的不一样
现在sw4和sw5的45-48口属于vlan100,vlanif分别是100.4和100.5
sw1的10-23口属于vlan100,vlanif是100.1,100.2是预留给路由器的。
网线也接对了,没问题
而且电脑随便接入任何交换机的任何1个vlan,都能ping通100.1 100.4 100.5这3个ip,但是除了自己所在vlanif外的其他网关地址都ping不通
  • x
  • 常规:

点评 回复

tycw     发表于 2017-12-23 19:11:32 已赞(0) 赞(0)

3台机器查询的路由表如下,麻烦您看看有没有什么问题
[JAZX-SW4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5


Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 Static 60 0 RD 192.168.100.1 Vlanif100
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.100.0/24 Direct 0 0 D 192.168.100.4 Vlanif100
192.168.100.4/32 Direct 0 0 D 127.0.0.1 Vlanif100

<JAZX-SW5>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 Static 60 0 RD 192.168.100.1 Vlanif100
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.100.0/24 Direct 0 0 D 192.168.100.5 Vlanif100
192.168.100.5/32 Direct 0 0 D 127.0.0.1 Vlanif100

<JAZX-SW1>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 Static 60 0 RD 192.168.100.2 Vlanif100
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.0/24 Static 60 0 RD 192.168.100.4 Vlanif100
192.168.3.0/24 Static 60 0 RD 192.168.100.5 Vlanif100
192.168.4.0/24 Static 60 0 RD 192.168.100.4 Vlanif100
192.168.5.0/24 Static 60 0 RD 192.168.100.5 Vlanif100
192.168.6.0/24 Static 60 0 RD 192.168.100.4 Vlanif100
192.168.7.0/24 Static 60 0 RD 192.168.100.5 Vlanif100
192.168.8.0/24 Static 60 0 RD 192.168.100.4 Vlanif100
192.168.9.0/24 Static 60 0 RD 192.168.100.5 Vlanif100
192.168.100.0/24 Direct 0 0 D 192.168.100.1 Vlanif100
192.168.100.1/32 Direct 0 0 D 127.0.0.1 Vlanif100
  • x
  • 常规:

点评 回复

tycw     发表于 2017-12-23 21:39:17 已赞(0) 赞(0)

顶起来,没人帮忙看看吗?
  • x
  • 常规:

点评 回复

yicheng_xj     发表于 2017-12-23 23:37:04 已赞(0) 赞(0)

tycw 发表于 2017-12-23 21:39顶起来,没人帮忙看看吗?

从你的SW4和SW5路由表来看都只有本地直连路由,SW1也是只有本地直连路由和回址路由,除此之外各Vlan间没有信息可达路由。
可尝试加指向路由:1、SW4上的所有VLAN指一条去向SW5,由100.5来做转发;2、SW5上的所有VLAN指一条去向SW4,由100.4来做转发。
  • x
  • 常规:

点评 回复

12
返回列表
发表回复
您需要登录后才可以回帖 登录 | 注册

如果附件按钮无法使用,请将Adobe Flash Player 更新到最新版本!
快速回复 返回顶部