一、问题
二、需求分析
1.IP合理划分
2.划分网段的个数
3.缺省
4.汇总
三、操作
1.广播域和网段的划分便于管理与汇总
需要4×2+6=14个广播域(向主机位借四位,这样就可以拥有十六个广播域)
192.168.1.0/24
192.168.1.000 00000/27----骨干
192.168.1.000 000 00/30------192.168.1.0/30
192.168.1.000 001 00/30------192.168.1.4/30
192.168.1.000 010 00/30------192.168.1.8/30
192.168.1.000 011 00/30------192.168.1.12/30
192.168.1.000 100 00/30------192.168.1.16/30
192.168.1.000 101 00/30------192.168.1.20/30
192.168.1.000 110 00/30
192.168.1.000 111 00/30
192.168.1.001 00000/27-----R1
192.168.1.001 0 0000/28------192.168.1.32/28
192.168.1.001 1 0000/28 ------192.168.1.48/28
192.168.1.010 00000/27----R2
192.168.1.010 0 0000/28------192.168.1.64/28
192.168.1.010 1 0000/28------192.168.1.80/28
192.168.1.011 00000/27-----R3
192.168.1.011 0 0000/28------192.168.1.96/28
192.168.1.011 1 0000/28------192.168.1.112/28
192.168.1.100 00000/27---R4
192.168.1.100 0 0000/28------192.168.1.128/28
192.168.1.100 1 0000/28------192.168.1.144/28
192.168.1.101 00000/27
192.168.1.110 00000/27
192.168.1.111 00000/27
即为
2.(1)配IP(顺时针)
示例:
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[r1]int l0
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack0]int l1
[r1-LoopBack1]ip address 192.168.1.49 28
(2)检查
方法一:[r1]display ip interface brief
方法二:[r1]ping 192.168.1.2
3.(1)写静态
示例r1:
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.6
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.6
[r1]ip route-static 192.168.1.20 30 192.168.1.2
[r1]ip route-static 192.168.1.20 30 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6
(2)检查
示例:<r1>ping 192.168.1.145
<r1>ping 192.168.1.129
4.(1)写缺省
示例r1:
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.6
(2)检查
[r1]ping 5.5.5.5
PING 5.5.5.5: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=253 time=40 ms
Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=253 time=20 ms
Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=253 time=40 ms
Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=253 time=40 ms
Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=253 time=30 ms
--- 5.5.5.5 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/34/40 ms
5.空接口(在黑洞在r1,r2,r3,r4身上写汇总)
示例r1:[r1]ip route-static 192.168.1.32 27 NULL 0
6.浮动静态(只与r4,r5有关系)
[r4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
四‘测试