题目
子网划分
R1的环回:192.168.1.0/28
R2的环回:192.168.1.16/28
R123的0/0/0接口:192.168.1.32/28R3-4:192.168.1.128/30
vlan2: 192.168.1.48/28
vlan3: 192.168.1.64/28192.168.1.0/24
O区域:192.168.1.0/25
1区域:192.168.1.128/25
1.先做交换机
[WL2]vlan 2
[WL2]vlan 3
[WL2-GigabitEthernet0/0/2]port link-type access
[WL2-GigabitEthernet0/0/2]port default vlan 2
[WL2-GigabitEthernet0/0/3]port link-type access
[WL2-GigabitEthernet0/0/3]port default vlan 3
[WL2-GigabitEthernet0/0/1]port link-type trunk
[WL2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
2.配ip环回
[R1-LoopBack0]ip address 192.168.1.1 28
[R1-GigabitEthernet0/0/0]ip address 192.168.1.33 28
[R2-LoopBack0]ip address 192.168.1.17 28
[R2-GigabitEthernet0/0/0]ip address 192.168.1.34 28
[R3-GigabitEthernet0/0/0]ip address 192.168.1.35 28
[R3-GigabitEthernet0/0/1]ip address 192.168.1.129 30
[R4-GigabitEthernet0/0/0]ip address 192.168.1.130 30
[R4-LoopBack0]ip address 4.4.4.1 24
例如:
在R3上创网关,要让两个vlan连接
[R3-GigabitEthernet0/0/2.1]ip address 192.168.1.49 28
[R3-GigabitEthernet0/0/2.1]dot1q termination vid 2
[R3-GigabitEthernet0/0/2.1]arp broadcast enable
[R3-GigabitEthernet0/0/2.2]ip address 192.168.1.65 28
[R3-GigabitEthernet0/0/2.2]dot1q termination vid 3
[R3-GigabitEthernet0/0/2.2]arp broadcast enable
例如:
3.全网可达
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.15
[R1-ospf-1-area-0.0.0.0]network 192.168.1.33 0.0.0.0
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1-area-0.0.0.0]network 192.168.1.16 0.0.0.15
[R2-ospf-1-area-0.0.0.0]network 192.168.1.34 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 192.168.1.35 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 192.168.1.49 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 192.168.1.65 0.0.0.0
[R3-ospf-1]area 1
[R3-ospf-1-area-0.0.0.1]network 192.168.1.129 0.0.0.0
例如:
4.写缺省
[R4-ospf-1]default-route-advertise always
写黑洞避免环回
5.保证更新安全
[R3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 12345
[R4]info-center
[R4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
6.修改优先级让R3成为DR设备
[R1-GigabitEthernet0/0/0] ospf dr-priority 0
[R2-GigabitEthernet0/0/0] ospf dr-priority 0