交换机
全局模式下
hostname 修改交换机名字
vlan 5 vlan 10 划分VLAN
端口配置:
interface FastEthernet 0/1 switchport mode access(端口类型输出) switchport access vlan 5
interface FastEthernet 0/12 switchport mode access(端口类型输出) switchport access vlan 10
interface FastEthernet 0/3 switchport mode trunk(输出和输入) switchport trunk allowed vlan 5,10
终端配置IP。
路由器
aaa的路由配置:
interface fastEthernet 0/0 no shutdown ip address 10.1.1.6 255.255.255.0
interface fastEthernet 0/1 no shutdown ip address 172.2.2.5 255.255.255.0
ip route 20.3.3.0 255.255.255.0 172.2.2.6 ip route 192.4.4.0 255.255.255.0 172.2.2.6
bbb的路由配置:
interface fastEthernet 0/0 no shutdown ip address 172.2.2.6 255.255.255.0
interface fastEthernet 0/1 no shutdown ip address 20.3.3.5 255.255.255.0
ip route 10.1.1.0 255.255.255.0 172.2.2.5 ip route 192.4.4.0 255.255.255.0 20.3.3.6
ccc的路由配置:
interface fastEthernet 0/0 no shutdown ip address 20.3.3.6 255.255.255.0
interface fastEthernet 0/1 no shutdown ip address 192.4.4.6 255.255.255.0
ip route 172.2.2.0 255.255.255.0 20.3.3.5 ip route 10.1.1.0 255.255.255.0 20.3.3.5