二层交换机链路聚合、三层交换机链路聚合和三层交换机的单臂路由

二层交换机的链路聚合:
启动设备,配置PC的IP地址与子网掩码

SW5配置信息

undo terminal monitor

system-view

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0

[Huawei-ui-console0]sysname SW5

[SW5]int Eth-Trunk 1

[SW5-Eth-Trunk1]port link-type trunk

[SW5-Eth-Trunk1]port trunk allow-pass vlan all

[SW5-Eth-Trunk1]int e0/0/2

[SW5-Ethernet0/0/2]eth-trunk 1

[SW5-Eth-Trunk1]int e0/0/3

[SW5-Ethernet0/0/3]eth-trunk 1

[SW5-Eth-Trunk1]int e0/0/4

[SW5-Ethernet0/0/4]eth-trunk 1

[SW5-Ethernet0/0/4]quit

[SW5]vlan 2

[SW5-vlan2]int e0/0/1

[SW5-Ethernet0/0/1]port hybrid pvid vlan 2

[SW5-Ethernet0/0/1]port hybrid untagged vlan 2

[SW5-Ethernet0/0/1]quit

SW6配置信息

undo terminal monitor

system-view

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0

[Huawei-ui-console0]sysname SW6

[SW6]int Eth-Trunk 1

[SW6-Eth-Trunk1]port link-type trunk

[SW6-Eth-Trunk1]port trunk allow-pass vlan all

[SW6-Eth-Trunk1]int e0/0/2

[SW6-Ethernet0/0/2]eth-trunk 1

[SW6-Eth-Trunk1]int e0/0/3

[SW6-Ethernet0/0/3]eth-trunk 1

[SW6-Eth-Trunk1]int e0/0/4

[SW6-Ethernet0/0/4]eth-trunk 1

[SW6-Ethernet0/0/4]quit

[SW6]vlan 2

[SW6-vlan2]int e0/0/1

[SW6-Ethernet0/0/1]port hybrid pvid vlan 2

[SW6-Ethernet0/0/1]port hybrid untagged vlan 2

[SW6-Ethernet0/0/1]quit

三层交换机的链路聚合:
CE3配置信息

undo terminal monitor

system-view

[Huawei-ui-console0]sysname CE3

[~CE3]int Eth-Trunk 1

[*CE3-Eth-Trunk1]undo portswitch

[*CE3-Eth-Trunk1]ip add 10.1.1.1 24

[*CE3-Eth-Trunk1]int g1/0/0

[*CE3-GE1/0/0]eth-trunk 1

[*CE3-GE1/0/0]undo shutdown

[*CE3-Eth-Trunk1]int g1/0/1

[*CE3-GE1/0/1]eth-trunk 1

[*CE3-GE1/0/1]undo shutdown

[*CE3-Eth-Trunk1]int g1/0/2

[*CE3-GE1/0/2]eth-trunk 1

[*CE3-GE1/0/2]undo shutdown

[*CE3-GE1/0/2]quit

[*CE3]quit

[~CE3]int LoopBack 0

[*CE3-LoopBack0]ip add 192.168.1.100 32

[*CE3-LoopBack0]quit

[*CE3]quit

Warning: Uncommitted configurations found. Are you sure to commit them before ex

iting? [Y(yes)/N(no)/C(cancel)]:y

[*CE3]ip route-static 192.168.2.100 32 10.1.1.2 (设置静态路由,设定路由下一跳地址)

CE4配置信息

undo terminal monitor

system-view

[Huawei-ui-console0]sysname CE4

[~CE4]int Eth-Trunk 1

[*CE4-Eth-Trunk1]undo portswitch

[*CE4-Eth-Trunk1]ip add 10.1.1.2 24

[*CE4-Eth-Trunk1]int g1/0/0

[*CE4-GE1/0/0]eth-trunk 1

[*CE4-GE1/0/0]undo shutdown

[*CE4-Eth-Trunk1]int g1/0/1

[*CE4-GE1/0/1]eth-trunk 1

[*CE4-GE1/0/1]undo shutdown

[*CE4-Eth-Trunk1]int g1/0/2

[*CE4-GE1/0/2]eth-trunk 1

[*CE4-GE1/0/2]undo shutdown

[*CE4-GE1/0/2]quit

[*CE4]quit

[~CE4]int LoopBack 0

[*CE4-LoopBack0]ip add 192.168.2.100 32

[*CE4-LoopBack0]quit

[*CE4]quit

Warning: Uncommitted configurations found. Are you sure to commit them before ex

iting? [Y(yes)/N(no)/C(cancel)]:y

[*CE4]ip route-static 192.168.1.100 32 10.1.1.1

配置信息需要到用户试图保存才能生效

三层交换机的单臂路由:
SW4配置信息

undo terminal monitor

system-view

[Huawei]user-interface console 0

[Huawei-ui-console0]idle-timeout 0 0

[Huawei-ui-console0]sysname SW4

[SW4]vlan batch 10 20

[SW4]int g0/0/1

[SW4-GigabitEthernet0/0/1]port hybrid pvid vlan 10

[SW4-GigabitEthernet0/0/1]port hybrid untagged vlan 10

[SW4-GigabitEthernet0/0/1]int g0/0/2

[SW4-GigabitEthernet0/0/2]port hybrid pvid vlan 20

[SW4-GigabitEthernet0/0/2]port hybrid untagged vlan 20

[SW4-GigabitEthernet0/0/2]quit

[SW3]int vlanif 10

[SW3-Vlanif10]ip add 192.168.10.1 24

[SW3-Vlanif10]int vlanif 20

[SW3-Vlanif20]ip add 192.168.20.1 24

[SW3-Vlanif20]quit

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注