华为交换机静态路由配置

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

华为交换机静态路由配置 The latest revision on November 22, 2020

一、实验拓扑图:

二、配置:

LSW1:

interface Vlanif2

ip address

#

interface Vlanif3

ip address

#

interface Vlanif4

ip address

#

interface MEth0/0/1

#

interface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

interface Ethernet0/0/2

port link-type access

port default vlan 2

#

interface Ethernet0/0/10

port link-type access

port default vlan 3

LSW2:

interface Vlanif2

ip address

#

interface Vlanif4

ip address

#

interface MEth0/0/1

#

interface Ethernet0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094 #

interface Ethernet0/0/2

port link-type access

port default vlan 2

三、测试:

1.配置好上面的命令好以后:

和之间能互ping通,但是与之间互ping不通:

2.在LSW1配置:ip route-static

在LSW2配置:

ip route-static

ip route-static

就能测试正常:

3.把两台交换机的 interface ethernet 0/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4094

改为: interface ethernet 0/0/1

port link-type access

port default vlan 4

测试的结果也是正常ping通的。

四、收集信息:

在两台交换机创建相同的VLAN,分配不同的网段,之间用trunk链路,同台交换机的不同网段可以互相ping通,不同的交换机之间是ping不通,可以做安全,只需要通过路由协议就能互通。

五、查看路由表:

1.

相关文档
最新文档