内容发布更新时间 : 2024/9/8 10:15:48星期一 下面是文章的全部内容请认真阅读。
H3C三层交换机配置实例
1 网络拓扑图 ............................................................................................................... 1 2 配置要求 ................................................................................................................... 1 3划分VLAN并描述 ...................................................................................................... 2
3.1进入系统视图 ................................................................................................ 2 3.2 创建VLAN并描述 ........................................................................................... 2 4 给VLAN设置网关 ..................................................................................................... 3
4.1 VLAN1的IP地址设置 ...................................................................................... 3 4.2 VLAN100的网关设置 ....................................................................................... 3 4.3 VLAN101的网关设置 ....................................................................................... 3 4.4 VLAN102的网关设置 ....................................................................................... 3 4.5 VLAN103的网关设置 ....................................................................................... 4 5 给VLAN指定端口,设置端口类型 ......................................................................... 4
5.1 VLAN100指定端口 ........................................................................................... 4 5.2 VLAN102指定端口 ........................................................................................... 4 5.3 VLAN1/101/103指定端口 ............................................................................... 5 6 配置路由协议 ........................................................................................................... 6
6.1 默认路由 ......................................................................................................... 6 6.2配置流分类 ...................................................................................................... 6 6.3 定义行为 ......................................................................................................... 6 6.4 应用QOS策略 ................................................................................................ 6 6.5 接口配置QOS策略 ........................................................................................ 7
I
II
1 网络拓扑图
图1-1 网络拓扑图
2 配置要求
用户1网络:172.16.1.0/24 至出口1网络:172.16.100.0/24 用户2网络:192.168.1.0/24 至出口2网络:192.168.100.0/24 实现功能:用户1通过互联网出口1,用户2通过互联网出口2。
1
3划分VLAN并描述
3.1进入系统视图
图3-1 系统视图
3.2 创建VLAN并描述
[H3C]vlan 1 //本交换机使用
[H3C-vlan1]description Manager //描述为“Manager” [H3C-vlan1]quit
[H3C]vlan 100 //划分vlan100
[H3C-vlan100]description VLAN 100 //描述为“VLAN 100” [H3C-vlan100]quit
[H3C]vlan 101 //划分vlan101
[H3C-vlan101]description VLAN 101 //描述为“VLAN 101” [H3C-vlan101]quit
[H3C]vlan 102 //划分vlan102
[H3C-vlan102]description VLAN 102 //描述为“VLAN 102” [H3C-vlan102]quit
[H3C]vlan 103 //划分vlan103
[H3C-vlan103]description VLAN 103 //描述为“VLAN 103” [H3C-vlan103]quit [H3C]
图3-2 划分VLAN及描述
2
4 给VLAN设置网关
4.1 VLAN1的IP地址设置
把VLAN1的IP地址设置为192.168.0.254,子网掩码为255.255.255.0,用于本地使用。
[H3C]interface vlan-interface 1
[H3C-Vlan-interface1]ip address 192.168.0.254 255.255.255.0 [H3C-Vlan-interface1]quit [H3C]
图4-1 VLAN 1的IP设置
4.2 VLAN100的网关设置
把VLAN100的网关设置为192.168.100.254,子网掩码为255.255.255.0 。 [H3C]interface vlan-interface 100
[H3C-Vlan-interface100]ip address 192.168.100.254 255.255.255.0 [H3C-Vlan-interface100]quit [H3C]
图4-2 VLAN100的网关设置
4.3 VLAN101的网关设置
把VLAN101的网关设置为192.168.1.254,子网掩码为255.255.255.0 。 [H3C]interface vlan-interface 101
[H3C-Vlan-interface101]ip address 192.168.1.254 255.255.255.0 [H3C-Vlan-interface101]quit [H3C]
图4-3 VLAN101的网关设置
4.4 VLAN102的网关设置
把VLAN102的网关设置为172.16.100.254,子网掩码为255.255.255.0 。
3