綜合實驗

攸始.發表於2020-09-28

實驗拓撲:在這裡插入圖片描述
實驗要求:
配置ip
配置ospf
配置路由彙總
配置路由重分發
1.配置ip
R1:
interface GigabitEthernet 0/0/0
ip add 192.168.1.1 255.255.255.0
undo sh
interface GigabitEthernet 0/0/1
ip add 192.168.3.2 255.255.255.0
undo sh
int loopback0
ip add 1.1.1.1 255.255.255.255
R2:
interface GigabitEthernet 0/0/0
ip add 192.168.1.2 255.255.255.0
undo sh
interface GigabitEthernet 0/0/1
ip add 192.168.2.1 255.255.255.0
undo sh
int loopback0
ip add 2.2.2.2 255.255.255.255
R3:
int Gigab 0/0/0
ip add 192.168.2.2 255.255.255.0
undo sh
int Gigab 0/0/1
ip add 192.168.4.1 255.255.255.0
undo sh
int loop
ip add 3.3.3.3 255.255.255.255
R4:
int Gigab 0/0/0
ip add 192.168.3.1 255.255.255.0
undo sh
ip loop
ip add 4.4.4.4 255.255.255.255
R5:
int Gigab 0/0/0
ip add 192.16.4.2 255.255.255.0
undo sh
int loopback0
ip add 172.16.10.1 255.255.255.255
int loopback1
ip add 172.16.20.1 255.255.255.255
lint loopbakc2
ip add 172.16.30.1 255.255.255.255
int loopbal3
ip add 172.16.40.1 255.255.255.255
配置ospf
R1:
ospf 1 route-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 192.168.3.0 0.0.0.255
network 192.168.1.0 0.0.0.255
R2:
ospf 1 route-id 2.2.2.2
area 1
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.618.2.0 0.0.0.255
R3:
ospf 1 route-id 3.3.3.3
area 1
network 3.3.3.3 0.0.0.0
network 192.168.2.0 0.0.0.255
R4:
ospf 1 route-id 4.4.4.4
area 2
network 4.4.4.4 0.0.0.0
network 192168.3.0 0.0.0.255
配置ospf
R1:
ospf 1 route-id 1.1.1.1
area 0
network 1.1.1.1 0.0.0.0
network 192.168.3.0 0.0.0.255
network 192.168.1.0 0.0.0.255
R2:
ospf 1 route-id 2.2.2.2
area 1
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.618.2.0 0.0.0.255
R3:
ospf 1 route-id 3.3.3.3
area 1
network 3.3.3.3 0.0.0.0
network 192.168.2.0 0.0.0.255
R4:
ospf 1 route-id 4.4.4.4
area 2
network 4.4.4.4 0.0.0.0
network 192168.3.0 0.0.0.255

二、RIP和OSPE
1.RIP
(1)配置RIPv1
[R1]rip 啟動rip程式
[R1-rip-1]network 192.168.1.0 宣告直連路由
(2)配置RIPv2
[R1]rip 啟動RIP程式
[R1-rip-1]version 2 指定RIP的版本
[R1-rip-1]network 192.168.1.0 宣告直連路由
[R1-rip-1]undo summary 關閉路由彙總
1.配置單區域的OSPF
(1)啟動OSPF程式指定Router
[R1]ospf router-id 1.1.1.1
(2)指定osfp區域
[R1-ospf-1]area 0
(3)宣告直連路由寫反掩碼
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
(4)檢視鄰居關係狀態
[R3]display ospf peer brief
(5)檢視介面的ospf資訊
[R3]display ospf interface GigabitEthernet 0/0/1
(6)檢視路由表
[R3]display ip routing-table
2.配置多區域ospf
(1)啟動ospf程式指定router-id
[R2]ospf 1 router-id 2.2.2.2
(2)指定ospf區域
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
3.配置ospf的特殊區域
(1)配置末梢區域
[R2]ospf 1 啟動ospf程式
[R2-ospf-1]area 1 程式ospf的區域1
[R2-ospf-1-area-0.0.0.1]stub設定為末梢區域
(2)配置完全末梢區域
[R2]ospf 1 進入到ospf程式1
[R2-ospf-1]area 1 進入區域1
[R2-ospf-1-area-0.0.0.1]atub no-summary
(3)非純末梢區域NSSA區域
[R3]ospf 1 進入到ospf程式1
[R3-ospf-1]area 1 進入到ospf區域1
[R3-ospf-1-area-0.0.0.1]nssa default-route-advertise 配置為DSSA區域通過預設路由和其他協議通訊
4.配置OSPF路由重分發
(1)將RIP重分發到ospf中
[R3]ospf 1 進入到ospf區域1中
[R3-ospf-1]import-route rip 釋出rip到ospf中
(2)將ospf釋出到rip中
[R3]rip 1 進入到rip程式
[R3-ospf-1]import-route ospf 1 釋出ospf到rip
(3)重分發靜態路由
[R3]ospf 1
[R3-ospf-1]import-route static
5.配置路由彙總
(1)配置外部路由彙總
[R3]ospf 1
[R3-ospf-1]asbr-summary 172.16.0.0 255.255.0.0
(2)配置域間彙總
[R3]ospf 1
[R3-ospf-1]area 2
[R3-ospf-1-area-0.0.0.2]abr-summay 172.16.0.0 255.255.0.0

相關文章