当前位置:网站首页>静态路由—综合实验
静态路由—综合实验
2022-07-20 05:52:00 【aweike】
实验要求
1.IP地址的规划
将192.168.0.0/24划分为9个网段
192.168.0.0/28 192.168.0.16/28 192.168.0.32/28 192.168.0.48/28 192.168.0.80/28 192.168.0.96/28
192.168.0.112/28 划分为192.168.0.112/30 192.168.0.116/30 192.168.0.120/30用作r1的环回
VLAN2:192.168.0.64/28 VLAN3:192.168.0.128/28
备用:192.168.0.144/28 192.168.0.160/28 192.168.0.176/28 192.168.0.192/28 192.168.0.208/28 192.168.0.224/28 192.168.0.240/28
2.拓扑结构的搭建
3.IP地址的配置
r1:
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.0.1 28
[r1-GigabitEthernet0/0/0]q
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.0.17 28
[r1-GigabitEthernet0/0/1]q
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 192.168.0.113 30
[r1-LoopBack0]interface LoopBack 1
[r1-LoopBack1]ip address 192.168.0.117 30
[r1-LoopBack1]interface LoopBack 2
[r1-LoopBack2]ip address 192.168.0.121 30
[r1-LoopBack2]q
r2:
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.0.2 28
[r2-GigabitEthernet0/0/0]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.0.33 28
[r2-GigabitEthernet0/0/1]q
r3:进行DHCP的分配
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.0.18 28
[r3-GigabitEthernet0/0/0]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.0.49 28
[r3-GigabitEthernet0/0/1]q[r3]interface g0/0/2.1
[r3-GigabitEthernet0/0/2.1]dot1q termination vid 2
[r3-GigabitEthernet0/0/2.1]ip address 192.168.0.65 28
[r3-GigabitEthernet0/0/2.1]arp broadcast enable
[r3-GigabitEthernet0/0/2.1]q
[r3]interface g0/0/2.1
[r3-GigabitEthernet0/0/2.1]ip address 192.168.0.65 28
Error: The address already exists.
[r3-GigabitEthernet0/0/2.1]ga
[r3-GigabitEthernet0/0/2.1]ga
[r3-GigabitEthernet0/0/2.1]q
[r3]interface g0/0/2.2
[r3-GigabitEthernet0/0/2.2]dot1q termination vid 3
[r3-GigabitEthernet0/0/2.2]ip address 192.168.0.129 28
[r3-GigabitEthernet0/0/2.2]arp broadcast enable
[r3-GigabitEthernet0/0/2.2]q
[r3]dhcp enable
[r3]ip pool a
[r3-ip-pool-a]network 192.168.0.64 mask 28
[r3-ip-pool-a]gateway-list 192.168.0.65
[r3-ip-pool-a]dns-list 114.114.114.114
[r3-ip-pool-a]q
[r3]ip pool b
[r3-ip-pool-b]network 192.168.0.128 mask 28
[r3-ip-pool-b]gateway-list 192.168.0.129
[r3-ip-pool-b]dns-list 114.114.114.114
[r3-ip-pool-b]q
[r3]interface g0/0/2.1
[r3-GigabitEthernet0/0/2.1]dhcp select global
[r3-GigabitEthernet0/0/2.1]q
[r3]interface g0/0/2.2
[r3-GigabitEthernet0/0/2.2]dhcp select global
[r3-GigabitEthernet0/0/2.2]q
r4:
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 192.168.0.34 28
[r4-GigabitEthernet0/0/0]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.0.50 28
[r4-GigabitEthernet0/0/1]interface g4/0/0
[r4-GigabitEthernet4/0/0]ip address 192.168.0.81 28
[r4-GigabitEthernet4/0/0]interface g0/0/2
[r4-GigabitEthernet0/0/2]ip address 192.168.0.97 28
[r4-GigabitEthernet0/0/2]q
r5:
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]ip address 100.1.1.1 24
r6:
[ISP]interface g0/0/0
[ISP-GigabitEthernet0/0/0]ip address 100.1.1.2 24
sw1:创建VLAN
[sw1]vlan batch 2 to 3
[sw1]interface e0/0/3
[sw1-Ethernet0/0/3]port link-type access
[sw1-Ethernet0/0/3]port default vlan 2
[sw1-Ethernet0/0/3]q
[sw1]interface e0/0/4
[sw1-Ethernet0/0/4]port link-type access
[sw1-Ethernet0/0/4]port default vlan 3
[sw1-Ethernet0/0/4]q
[sw1]interface e0/0/1
[sw1-Ethernet0/0/1]port link-type trunk
[sw1-Ethernet0/0/1]port trunk allow-pass vlan all
[sw1-Ethernet0/0/1]q
[sw1]interface e0/0/2
[sw1-Ethernet0/0/2]port link-type trunk
[sw1-Ethernet0/0/2]port trunk allow-pass vlan all
sw2:创建VLAN
[sw2]vlan batch 2 to 3
[sw2]interface e0/0/2
[sw2-Ethernet0/0/2]port link-type access
[sw2-Ethernet0/0/2]port default vlan 2
[sw2-Ethernet0/0/2]q
[sw2]interface e0/0/3
[sw2-Ethernet0/0/3]port link-type access
[sw2-Ethernet0/0/3]port default vlan 3
[sw2-Ethernet0/0/3]q
[sw2]interface e0/0/1
[sw2-Ethernet0/0/1]port link-type trunk
[sw2-Ethernet0/0/1]port trunk allow-pass vlan all
[sw2-Ethernet0/0/1]q
4.进行静态路由的配置,添加缺省路由和r1上的防环空接口
r1:
[r1]ip route-static 192.168.0.32 28 192.168.0.2
[r1]ip route-static 192.168.0.80 28 192.168.0.2
[r1]ip route-static 192.168.0.96 28 192.168.0.2
[r1]ip route-static 192.168.0.80 28 192.168.0.18
[r1]ip route-static 192.168.0.96 28 192.168.0.18
[r1]ip route-static 192.168.0.48 28 192.168.0.18
[r1]ip route-static 192.168.0.64 28 192.168.0.18
[r1]ip route-static 192.168.0.128 28 192.168.0.18
[r1]ip route-static 0.0.0.0 0 192.168.0.2
[r1]ip route-static 0.0.0.0 0 192.168.0.18
[r1]ip route-static 192.168.0.112 28 null 0
r2:
[r2]ip route-static 192.168.0.16 255.255.255.240 192.168.0.1
[r2]ip route-static 192.168.0.112 255.255.255.240 192.168.0.1
[r2]ip route-static 192.168.0.48 255.255.255.240 192.168.0.34
[r2]ip route-static 192.168.0.80 255.255.255.240 192.168.0.34
[r2]ip route-static 192.168.0.96 255.255.255.240 192.168.0.34
[r2]ip route-static 192.168.0.64 255.255.255.240 192.168.0.1
[r2]ip route-static 192.168.0.64 255.255.255.240 192.168.0.34
[r2]ip route-static 192.168.0.128 255.255.255.240 192.168.0.1
[r2]ip route-static 192.168.0.128 255.255.255.240 192.168.0.34
[r2]ip route-static 0.0.0.0 0 192.168.0.34
r3:
[r3]ip route-static 192.168.0.0 255.255.255.240 192.168.0.17
[r3]ip route-static 192.168.0.112 255.255.255.240 192.168.0.17
[r3]ip route-static 192.168.0.32 255.255.255.240 192.168.0.50
[r3]ip route-static 192.168.0.80 255.255.255.240 192.168.0.50
[r3]ip route-static 192.168.0.96 255.255.255.240 192.168.0.50
[r3]ip route-static 0.0.0.0 0 192.168.0.50
r4:
[r4]ip route-static 192.168.0.0 255.255.255.240 192.168.0.33
[r4]ip route-static 192.168.0.112 255.255.255.240 192.168.0.33
[r4]ip route-static 192.168.0.112 255.255.255.240 192.168.0.49
[r4]ip route-static 192.168.0.16 255.255.255.240 192.168.0.49
[r4]ip route-static 192.168.0.64 255.255.255.240 192.168.0.49
[r4]ip route-static 192.168.0.128 255.255.255.240 192.168.0.49
[r4]ip route-static 0.0.0.0 0 192.168.0.82
r5:故障时备用线路启动
[r5]ip route-static 192.168.0.0 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.112 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.16 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.32 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.48 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.64 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.128 255.255.255.240 192.168.0.97
[r5]ip route-static 192.168.0.0 255.255.255.240 192.168.0.81 preference 100
[r5]ip route-static 192.168.0.112 255.255.255.240 192.168.0.81 preference 100
[r5]ip route-static 192.168.0.16 255.255.255.240 192.168.0.81 preference 100
[r5]ip route-static 192.168.0.32 255.255.255.240 192.168.0.81 preference 100
[r5]ip route-static 192.168.0.48 255.255.255.240 192.168.0.81 preference 100
[r5]ip route-static 192.168.0.64 255.255.255.240 192.168.0.81 preference 100
[r5]ip route-static 192.168.0.128 255.255.255.240 192.168.0.81 preference 100
5.测试
边栏推荐
- DHCP overview and detailed DHCP server deployment
- System safety and Application
- ARP principle
- Shell脚本数组与冒泡排序
- 安装及管理程序
- File system and log analysis
- McCabe measurement method to calculate program complexity
- Network Security Learning (Qianfeng network security notes) 2 -- IP and basic DOS commands
- 快速了解Shell函数和数组
- LVM and disk quota
猜你喜欢
随机推荐
快速了解Shell函数和数组
Xshell installation configuration tutorial
Application of safertos in medical devices
Don't know how to learn MySQL? It's enough to finish the 50 questions of Niuke! (Part III)
Various variables and variable operations of shell
BeanUtils. Copyproperties() and jsonobject What copy type is parseobject() (shallow copy or deep copy)
DHCP原理及配置
One bite of Stream(1)
Ugui - text and texteffect
DHCP configuration
中关村软件园项目进度汇报
File system and log analysis
DHCP principle and configuration
Shell脚本数组与冒泡排序
进程和计划任务管理
RAID disk array
Shell函数调用
Shell脚本三种循环(多例题)
文件系统与日志分析
DHCP原理与配置