交换机VLAN与链路聚合

创建 VLAN10

1
2
Switch(config)#vlan 10
Switch(config-vlan)#exit

给 VLAN10 添加接口

1
2
Switch#config terminal
Switch(config)#interface range FastEthernet 0/1- 0/24

将所有的接口加入 VLAN10

1
2
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#exit

链路聚合

1
2
3
4
5
Switch(config)#interface port-channel 1 
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface range FastEthernet 0/23-0/24
Switch(config-if-range)#channel-group 1 mode on

路由器IP配置与静态路由

路由器接口配置IP

1
2
3
4
5
6
R1>en
R1#config terminal
R1(config)#interface FastEthernet 0/0
R1(config-if)#ip address 192.168.0.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit

静态路由

1
2
R1>en
R1#config terminal
1
R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.0.2

或者

1
R1(config)#ip route 192.168.2.0 255.255.255.0 FastEthernet 0/0