任务
- 按标示配置IP地址
- 配置OSPF路由协议,全网互通,
- OSPF进程ID=1
配置图
AR2路由器配置
- 基础配置 GE 0/0/0和GE 0/0/1
[R2]int g0/0/0 \\int是interface简写,软件可以识别
[R2-GigabitEthernet0/0/0]ip add 10.1.12.2 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 10.1.23.0 24
- 环路接口配置
[R2]int loo0 \\int是interface简写,loo0是loop 0简写
[R2-LoopBack0]ip add 2.2.2.2 0.0.0.0
- OSPF
[R2]ospf 1 \\这里设定OSPF进程ID为1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]network 10.1.24.0 0.0.0.255
[R2]ospf 1 \\这里设定OSPF进程ID为1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.1.23.0 0.0.0.255
- 配置好后(注:这里省去了其它路由器的配置,当其它路由器全部正确配置后路由表如下~)
[R2]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 18 Routes : 18
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 OSPF 10 1 D 10.1.12.1 GigabitEthernet
0/0/0
2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.3/32 OSPF 10 2 D 10.1.12.1 GigabitEthernet
0/0/0
4.4.4.4/32 OSPF 10 1 D 10.1.24.4 GigabitEthernet
0/0/2
10.1.12.0/24 Direct 0 0 D 10.1.12.2 GigabitEthernet
0/0/0
10.1.12.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.1.12.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.1.13.0/24 OSPF 10 2 D 10.1.12.1 GigabitEthernet
0/0/0
10.1.23.0/24 Direct 0 0 D 10.1.23.2 GigabitEthernet
0/0/1
10.1.23.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.1.23.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.1.24.0/24 Direct 0 0 D 10.1.24.2 GigabitEthernet
0/0/2
10.1.24.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
10.1.24.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/2
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
网友评论