错题集之——三层交换

前言

今天再次复习了下S5700交换机的三层聚合,但是奇怪的是,可能长时间没接触,容易忘。。又出问题了,翻了笔记本才发现原来是这个问题。

一、试验情况

在这里插入图片描述

二、命令如下

1.CE1

代码如下(示例):

The device is running!

<HUAWEI>undo terminal monitor 
Info: Current terminal monitor is off.
<HUAWEI>sys
Enter system view, return user view with return command.
[~HUAWEI]int	
[~HUAWEI]interface eth	
[~HUAWEI]interface Eth-Trunk 1
[*HUAWEI-Eth-Trunk1]undo portswitch 
[*HUAWEI-Eth-Trunk1]ip add 10.1.1.1 24
[*HUAWEI-Eth-Trunk1]q
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown	
[*HUAWEI-GE1/0/0]eth-trunk 1
[*HUAWEI-GE1/0/0]int g1/0/1
[*HUAWEI-GE1/0/1]undo shutdown	
[*HUAWEI-GE1/0/1]eth-trunk 1
[*HUAWEI-GE1/0/1]q	
[*HUAWEI]interface LoopBack 0
[*HUAWEI-LoopBack0]ip address 192.168.1.100 32
[*HUAWEI-LoopBack0]q
[*HUAWEI]ip route-static 192.168.2.100 32 10.1.1.2

2.CE2

代码如下(示例):

The device is running!

<HUAWEI>undo terminal monitor 
Info: Current terminal monitor is off.
<HUAWEI>sys
Enter system view, return user view with return command.	
[~HUAWEI]int Eth-Trunk 1	
[*HUAWEI-Eth-Trunk1]undo portswitch 
[*HUAWEI-Eth-Trunk1]ip add 10.1.1.2 24
[*HUAWEI-Eth-Trunk1]q
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown	
[*HUAWEI-GE1/0/0]eth-trunk 1
[*HUAWEI-GE1/0/0]int g1/0/1
[*HUAWEI-GE1/0/1]undo shutdown	
[*HUAWEI-GE1/0/1]eth-trunk 1	
[*HUAWEI-GE1/0/1]q
[*HUAWEI]int		
[*HUAWEI]interface LoopBack 0
[*HUAWEI-LoopBack0]ip add 192.168.2.100 32
[*HUAWEI-LoopBack0]q
[*HUAWEI]ip route-static 192.168.1.100 32 10.1.1.1

问题出现

问题来了,不通。。。。。

查看问题所在

老样子,翻出我的老笔记本,发现,原来用S5700交换机做三层聚合的时候,必须得最后退出进行保存配置,否则不生效,所以我又重新来过

1.CE1

代码如下(示例):

The device is running!

<HUAWEI>undo terminal monitor 
Info: Current terminal monitor is off.
<HUAWEI>sys
Enter system view, return user view with return command.
[~HUAWEI]int	
[~HUAWEI]interface eth	
[~HUAWEI]interface Eth-Trunk 1
[*HUAWEI-Eth-Trunk1]undo portswitch 
[*HUAWEI-Eth-Trunk1]ip add 10.1.1.1 24
[*HUAWEI-Eth-Trunk1]q
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown	
[*HUAWEI-GE1/0/0]eth-trunk 1
[*HUAWEI-GE1/0/0]int g1/0/1
[*HUAWEI-GE1/0/1]undo shutdown	
[*HUAWEI-GE1/0/1]eth-trunk 1
[*HUAWEI-GE1/0/1]q	
[*HUAWEI]interface LoopBack 0
[*HUAWEI-LoopBack0]ip address 192.168.1.100 32
[*HUAWEI-LoopBack0]q
[*HUAWEI]ip route-static 192.168.2.100 32 10.1.1.2
[*HUAWEI]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y

2.CE2

代码如下(示例):

The device is running!

<HUAWEI>undo terminal monitor 
Info: Current terminal monitor is off.
<HUAWEI>sys
Enter system view, return user view with return command.	
[~HUAWEI]int Eth-Trunk 1	
[*HUAWEI-Eth-Trunk1]undo portswitch 
[*HUAWEI-Eth-Trunk1]ip add 10.1.1.2 24
[*HUAWEI-Eth-Trunk1]q
[*HUAWEI]int g1/0/0
[*HUAWEI-GE1/0/0]undo shutdown	
[*HUAWEI-GE1/0/0]eth-trunk 1
[*HUAWEI-GE1/0/0]int g1/0/1
[*HUAWEI-GE1/0/1]undo shutdown	
[*HUAWEI-GE1/0/1]eth-trunk 1	
[*HUAWEI-GE1/0/1]q
[*HUAWEI]int		
[*HUAWEI]interface LoopBack 0
[*HUAWEI-LoopBack0]ip add 192.168.2.100 32
[*HUAWEI-LoopBack0]q
[*HUAWEI]ip route-static 192.168.1.100 32 10.1.1.1
[*HUAWEI]q
Warning: Uncommitted configurations found. Are you sure to commit them before ex
iting? [Y(yes)/N(no)/C(cancel)]:y

查看连通性

1.CE1

<HUAWEI>ping 192.168.2.100
  PING 192.168.2.100: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.100: bytes=56 Sequence=1 ttl=255 time=12 ms
    Reply from 192.168.2.100: bytes=56 Sequence=2 ttl=255 time=4 ms
    Reply from 192.168.2.100: bytes=56 Sequence=3 ttl=255 time=5 ms
    Reply from 192.168.2.100: bytes=56 Sequence=4 ttl=255 time=4 ms
    Reply from 192.168.2.100: bytes=56 Sequence=5 ttl=255 time=4 ms

  --- 192.168.2.100 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/5/12 ms

2.CE2

[~HUAWEI]ping 192.168.1.100
  PING 192.168.1.100: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.100: bytes=56 Sequence=1 ttl=255 time=11 ms
    Reply from 192.168.1.100: bytes=56 Sequence=2 ttl=255 time=8 ms
    Reply from 192.168.1.100: bytes=56 Sequence=3 ttl=255 time=5 ms
    Reply from 192.168.1.100: bytes=56 Sequence=4 ttl=255 time=5 ms
    Reply from 192.168.1.100: bytes=56 Sequence=5 ttl=255 time=4 ms

  --- 192.168.1.100 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 4/6/11 ms

总结

果然啊,老师容易忘记这个很少出现的东西,还是得常复习啊。

猜你喜欢

转载自blog.csdn.net/Lucien010230/article/details/112159349