文章目录
-
-
- 创建配置环境,实现全网互访
- 配置步骤
-
- 接入层交换机(sw4、sw5)划分vlan
- [汇聚层交换机(sw2、sw3)配置ip地址作为vlan网关、与sw1 ip地址直连](#汇聚层交换机(sw2、sw3)配置ip地址作为vlan网关、与sw1 ip地址直连)
- 核心层交换机(sw1)配置ip地址与汇聚层交换机(sw2、sw3)、R1直连
- 路由器R1配置ip地址
- [sw1、sw2、sw3、R1配置静态路由,使vlan10、vlan20、172网段用户互访(静态路由:ip route-static 目标网段 子网掩码 下一跳地址)](#sw1、sw2、sw3、R1配置静态路由,使vlan10、vlan20、172网段用户互访(静态路由:ip route-static 目标网段 子网掩码 下一跳地址))
- 查看配置
-
- [SW4、SW5:display port vlan active](#SW4、SW5:display port vlan active)
- [SW2、SW3:display port vlan active](#SW2、SW3:display port vlan active)
- [SW2、SW3:display ip interface brief](#SW2、SW3:display ip interface brief)
- [SW1:display port vlan active](#SW1:display port vlan active)
- [SW1:display ip interface brief](#SW1:display ip interface brief)
- [SW1、SW2、SW3、R1:display ip routing-table protocol static](#SW1、SW2、SW3、R1:display ip routing-table protocol static)
- 实现全网互通
-
创建配置环境,实现全网互访
![](https://file.jishuzhan.net/article/1738166392428957697/72d55840eb510913531ceff6f455c040.webp)
配置步骤
接入层交换机(sw4、sw5)划分vlan
![](https://file.jishuzhan.net/article/1738166392428957697/08d464949e49da0aa76fbc8771717ed6.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/ef7288cd5490ee1e862ebb1eedb356a3.webp)
汇聚层交换机(sw2、sw3)配置ip地址作为vlan网关、与sw1 ip地址直连
![](https://file.jishuzhan.net/article/1738166392428957697/cd12765a686057ee466b3c947cea46ed.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/45e944ca05262c42fa2bba7e0c05fa4a.webp)
核心层交换机(sw1)配置ip地址与汇聚层交换机(sw2、sw3)、R1直连
![](https://file.jishuzhan.net/article/1738166392428957697/21cf0bf011d4b2739d73fc3c78f9ff97.webp)
路由器R1配置ip地址
![](https://file.jishuzhan.net/article/1738166392428957697/ce28061dbfdc99fe320b1b2abbff7f14.webp)
sw1、sw2、sw3、R1配置静态路由,使vlan10、vlan20、172网段用户互访(静态路由:ip route-static 目标网段 子网掩码 下一跳地址)
![](https://file.jishuzhan.net/article/1738166392428957697/1db2b60ca06177bda661875d68d3dc4c.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/18c79561f7c4f315169093ce72e8d220.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/6fddef8296dc4e1c2a5f8833070e1b14.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/6f9d772750859e8ef21f49a2b16dd12b.webp)
查看配置
SW4、SW5:display port vlan active
![](https://file.jishuzhan.net/article/1738166392428957697/b14509d0bed4c614079c5cb872203da1.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/d903e034f3628a78f5c66e6ac6531c1a.webp)
SW2、SW3:display port vlan active
![](https://file.jishuzhan.net/article/1738166392428957697/e069000187ac8faa3e1ce88672755779.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/44c0cd2d4226a9c8895b7ddfe2f111b2.webp)
SW2、SW3:display ip interface brief
![](https://file.jishuzhan.net/article/1738166392428957697/29fb1744a3b64369a3544d17d1d8f9ef.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/53e1c8b8c4b0f0b89dba16be72b3b86c.webp)
SW1:display port vlan active
![](https://file.jishuzhan.net/article/1738166392428957697/018ecf11b26ab0386ddf495fcd301e7a.webp)
SW1:display ip interface brief
![](https://file.jishuzhan.net/article/1738166392428957697/032696868a802465d2f5aea16bbfc103.webp)
SW1、SW2、SW3、R1:display ip routing-table protocol static
![](https://file.jishuzhan.net/article/1738166392428957697/996127851899909be1747ac13ee43c88.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/15563d8c737cb113b8162114ca65c3f7.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/26645feef20410c31cfe6dc271332291.webp)
![](https://file.jishuzhan.net/article/1738166392428957697/83b8d7415aa670faed3a76372872a5a3.webp)
实现全网互通
PC1与PC3ping通,PC1与Server1ping通
![](https://file.jishuzhan.net/article/1738166392428957697/9f78807a4801ba34170fa52d014fb230.webp)
PC3与Server1ping通
![](https://file.jishuzhan.net/article/1738166392428957697/424b389fe51f986f177b339dab65f560.webp)