综合练习一
题目要求:
- 实验范图
- 实现PC机之间互通
配置思路:
配置过程:
- 配置终端设备及3700交换机
实现此案例需要按照如下步骤进行。
1)配置PC的IP地址和网关
2) 配置SW1/5/6的vlan为10/20/30,交换机之间的链路为Trunk,与PC间为Access
3)配置SW2/3/7的vlan为40/50,交换机之间的链路为Trunk,与PC间为Access
4) 配置SW4/8/9的vlan为60/70/80,交换机之间的链路为Trunk,与PC间为Access
5)配置R1/R2/R3的接口IP地址
6)配置每个 VLAN 的网关接口IP地址
- SW1为vlan10/20/30的网关设备:
interface vlanif 10 ip address 192.168.10.254 24 quit interface vlanif 20 ip address 192.168.20.254 24 quit interface vlanif 30 ip address 192.168.30.254 24 quit
- SW2为 vlan 40 的网关:
interface vlanif 40 ip address 192.168.40.254 24 quit
- SW3为 vlan 50 的网关:
interface vlanif 50 ip address 192.168.50.254 24 quit
- R3的 gi0/0/0为 vlan60/70/80 的网关:
interface gi0/0/0.60 dot1q termination vid 60 arp broadcast enable ip address 1921.68.60.254 24 quit interface gi0/0/0.70 dot1q termination vid 70 arp broadcast enable ip address 1921.68.70.254 24 quit interface gi0/0/0.80 dot1q termination vid 80 arp broadcast enable ip address 1921.68.80.254 24 quit
7)在SW1与R1之间添加 vlan 100,实现两者互通
- SW1:
vlan 100 quit interface gi0/0/1 port link-type access port default vlan 100 quit interface vlanif 100 ip address 192.168.100.100 24 quit ip route-static 0.0.0.0 0 192.168.100.1
- R1:
interface gi0/0/0 ip address 192.168.100.1 24 quit ip route-static 192.168.10.0 24 192.168.100.100 ip route-static 192.168.20.0 24 192.168.100.100 ip route-static 192.168.30.0 24 192.168.100.100 ip route-static 192.168.40.0 24 192.168.12.2 ip route-static 192.168.50.0 24 192.168.12.2 ip route-static 192.168.60.0 24 192.168.12.2 ip route-static 192.168.70.0 24 192.168.12.2 ip route-static 192.168.80.0 24 192.168.12.2
8)在SW2与R2之间添加 vlan 400,实现两者互通
- SW2:
vlan 400 quit interface gi0/0/1 port link-type access port default vlan 400 quit interface vlanif 400 ip address 192.168.200.3 24 quit ip route-static 0.0.0.0 0 192.168.200.2
- R2:
interface gi0/0/0 ip address 192.168.200.2 24 quit ip route-static 192.168.40.0 24 192.168.200.3
9)在SW3与R2之间添加 vlan 500,实现两者互通
- SW3:
vlan 500 quit interface gi0/0/1 port link-type access port default vlan 500 quit interface vlanif 500 ip address 192.168.255.3 24 quit ip route-static 0.0.0.0 0 192.168.255.2
- R2:
interface gi4/0/0 ip address 192.168.255.2 24 quit ip route-static 192.168.50.0 24 192.168.255.3 ip route-static 192.168.10.0 24 192.168.12.1 ip route-static 192.168.20.0 24 192.168.12.1 ip route-static 192.168.30.0 24 192.168.12.1 ip route-static 192.168.60.0 24 192.168.23.3 ip route-static 192.168.70.0 24 192.168.23.3 ip route-static 192.168.80.0 24 192.168.23.3
10)在R3上配置路由条目信息,实现与其他PC所在的网段的互通
ip route-static 192.168.10.0 24 192.168.23.2 ip route-static 192.168.20.0 24 192.168.23.2 ip route-static 192.168.30.0 24 192.168.23.2 ip route-static 192.168.40.0 24 192.168.23.2 ip route-static 192.168.50.0 24 192.168.23.2 ip route-static 192.168.60.0 24 192.168.23.2
11)测试不同网段的PC之间的连通性
经测试PC机全部互通
参考命令