【H3C】三层交换,单臂路由部署

1、基本拓扑搭建

其中 PC16,PC2同属VLAN 20 ,PC17属于 VLAN 30,PC5属于VLAN90,PC6属于VLAN100

2、配置PC

3、测试Ping通

//PC16视图

//ping PC2 同属一个网段,可ping通
<H3C>ping 10.30.2.2
Ping 10.30.2.2 (10.30.2.2): 56 data bytes, press CTRL_C to break
56 bytes from 10.30.2.2: icmp_seq=0 ttl=255 time=8.000 ms
56 bytes from 10.30.2.2: icmp_seq=1 ttl=255 time=5.000 ms
56 bytes from 10.30.2.2: icmp_seq=2 ttl=255 time=5.000 ms
56 bytes from 10.30.2.2: icmp_seq=3 ttl=255 time=5.000 ms
56 bytes from 10.30.2.2: icmp_seq=4 ttl=255 time=5.000 ms

//ping PC17 不属于一个网段,不能ping通
<H3C>ping 10.30.3.17
Ping 10.30.3.17 (10.30.3.17): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out

4、二层交换配置

进入S1

<H3C>sys
[H3C]sys S1
[S1]vlan 10 20 30 40 50 60
[S1]vlan 20
[S1-vlan20]port g1/0/16
[S1-vlan20]vlan 30
[S1-vlan30]port g1/0/17
[S1-vlan30]quit
[S1]interface range g1/0/2 g1/0/5
[S1-if-range]port link-type trunk
[S1-if-range]port trunk permit vlan 10 20 30 40 50 60
[S1-if-range]quit

进入S2

<H3C>sys
[H3C]sys S2
[S2]vlan 10 20 30 40 50 60
[S2]vlan 20
[S2-vlan20]port g1/0/7
[S2-vlan20]quit
[S2]interface range g1/0/4 g1/0/5
[S2-if-range]port link-type trunk
[S2-if-range]port trunk permit vlan 10 20 30 40 50 60
[S2-if-range]quit

进入S3

<H3C>sys
[H3C]sys S3
[S3]vlan 10 20 30 40 50 60
[S3]interface range g1/0/2 g1/0/4
[S3-if-range]port link-type trunk
[S3-if-range]port trunk permit vlan 10 20 30 40 50 60
[S3-if-range]quit
[S3]

5、三层交换配置

进入S3

[S3]interface vlan 10
[S3-Vlan-interface10]%May 22 14:12:33:433 2024 S3 IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface10 changed to up.
%May 22 14:12:33:434 2024 S3 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface10 changed to up.

[S3-Vlan-interface10]ip address 10.30.1.254 24
[S3-Vlan-interface10]quit
[S3]interface vlan 20
[S3-Vlan-interface20]%May 22 14:13:11:413 2024 S3 IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface20 changed to up.
%May 22 14:13:11:414 2024 S3 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface20 changed to up.

[S3-Vlan-interface20]ip address 10.30.2.254 24
[S3-Vlan-interface20]quit
[S3]interface vlan 30
[S3-Vlan-interface30]%May 22 14:13:32:728 2024 S3 IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface30 changed to up.
%May 22 14:13:32:728 2024 S3 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface30 changed to up.

[S3-Vlan-interface30]ip address 10.30.3.254 24
[S3-Vlan-interface30]quit
[S3]interface vlan 40
[S3-Vlan-interface40]%May 22 14:14:13:720 2024 S3 IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface40 changed to up.
%May 22 14:14:13:720 2024 S3 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface40 changed to up.

[S3-Vlan-interface40]ip address 10.30.4.254 24
[S3-Vlan-interface40]quit
[S3]interface vlan 50
[S3-Vlan-interface50]%May 22 14:14:38:249 2024 S3 IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface50 changed to up.
%May 22 14:14:38:249 2024 S3 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface50 changed to up.

[S3-Vlan-interface50]ip address 10.30.5.254 24
[S3-Vlan-interface50]quit
[S3]interface vlan 60
[S3-Vlan-interface60]%May 22 14:14:53:621 2024 S3 IFNET/3/PHY_UPDOWN: Physical state on the interface Vlan-interface60 changed to up.
%May 22 14:14:53:622 2024 S3 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Vlan-interface60 changed to up.

[S3-Vlan-interface60]ip address 10.30.6.254 24
[S3-Vlan-interface60]quit

6、测试ping通

//PC16视图

<H3C>ping 10.30.3.17
Ping 10.30.3.17 (10.30.3.17): 56 data bytes, press CTRL_C to break
56 bytes from 10.30.3.17: icmp_seq=0 ttl=254 time=8.000 ms
56 bytes from 10.30.3.17: icmp_seq=1 ttl=254 time=6.000 ms
56 bytes from 10.30.3.17: icmp_seq=2 ttl=254 time=6.000 ms
56 bytes from 10.30.3.17: icmp_seq=3 ttl=254 time=7.000 ms
56 bytes from 10.30.3.17: icmp_seq=4 ttl=254 time=7.000 ms

<H3C>ping 10.30.2.2
Ping 10.30.2.2 (10.30.2.2): 56 data bytes, press CTRL_C to break
56 bytes from 10.30.2.2: icmp_seq=0 ttl=255 time=4.000 ms
56 bytes from 10.30.2.2: icmp_seq=1 ttl=255 time=3.000 ms
56 bytes from 10.30.2.2: icmp_seq=2 ttl=255 time=9.000 ms
56 bytes from 10.30.2.2: icmp_seq=3 ttl=255 time=12.000 ms
56 bytes from 10.30.2.2: icmp_seq=4 ttl=255 time=3.000 ms

7、测试ping通

//PC5视图

<H3C>
<H3C>ping 10.30.10.6
Ping 10.30.10.6 (10.30.10.6): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out

8、配置S13

<H3C>sys
[H3C]sys S13
[S13]vlan 90 100
[S13]vlan 90
[S13-vlan90]port g1/0/5
[S13-vlan90]quit
[S13]vlan 100
[S13-vlan100]port g1/0/6
[S13-vlan100]quit
[S13]interface g1/0/2
[S13-GigabitEthernet1/0/2]port link-type trunk
[S13-GigabitEthernet1/0/2]port trunk permit vlan all
[S13-GigabitEthernet1/0/2]quit

9、配置单臂路由

配置CE5

<H3C>sys
[H3C]sysname CE5
[CE5]interface g0/2.9
[CE5-GigabitEthernet0/2.9]ip address 10.30.9.254 24
[CE5-GigabitEthernet0/2.9]vlan-type dot1q vid 90
[CE5-GigabitEthernet0/2.9]quit
[CE5]interface g0/2.10
[CE5-GigabitEthernet0/2.10]ip address 10.30.10.254 24
[CE5-GigabitEthernet0/2.10]vlan-type dot1q vid 100
[CE5-GigabitEthernet0/2.10]quit

10、测试ping通

//PC5视图

<H3C>ping 10.30.10.6
Ping 10.30.10.6 (10.30.10.6): 56 data bytes, press CTRL_C to break
56 bytes from 10.30.10.6: icmp_seq=0 ttl=254 time=6.000 ms
56 bytes from 10.30.10.6: icmp_seq=1 ttl=254 time=7.000 ms
56 bytes from 10.30.10.6: icmp_seq=2 ttl=254 time=5.000 ms
56 bytes from 10.30.10.6: icmp_seq=3 ttl=254 time=8.000 ms
56 bytes from 10.30.10.6: icmp_seq=4 ttl=254 time=7.000 ms

--- Ping statistics for 10.30.10.6 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 5.000/6.600/8.000/1.020 ms
<H3C>%May 22 14:38:12:394 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 10.30.10.6: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 5.000/6.600/8.000/1.020 ms.

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值