OSPF多区域配置和虚电路
将源兵soul 2011-08-16
实验拓扑:
实验部署环境:
1.R1属于area 0区域内路由器
2.R2属于area 0和area1区域内的ABR路由器
3.R3属于area 1和area2区域内的ABR路由器
4.R4和R5属于area 2 区域内路由器
实验目的:
R1 能够学习到所有路由器的路由
实验测试:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, FastEthernet0/0
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/11] via 192.168.12.2, 00:23:25, FastEthernet0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/21] via 192.168.12.2, 00:23:25, FastEthernet0/0
O IA 192.168.45.0/24 [110/40] via 192.168.12.2, 00:23:25, FastEthernet0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/31] via 192.168.12.2, 00:23:26, FastEthernet0/0
5.0.0.0/32 is subnetted, 1 subnets
O IA 5.5.5.5 [110/41] via 192.168.12.2, 00:23:26, FastEthernet0/0
10.0.0.0/32 is subnetted, 5 subnets
O IA 10.10.1.1 [110/41] via 192.168.12.2, 00:16:02, FastEthernet0/0
O IA 10.10.3.1 [110/41] via 192.168.12.2, 00:16:02, FastEthernet0/0
O IA 10.10.2.1 [110/41] via 192.168.12.2, 00:16:02, FastEthernet0/0
O IA 10.10.5.1 [110/41] via 192.168.12.2, 00:16:02, FastEthernet0/0
O IA 10.10.4.1 [110/41] via 192.168.12.2, 00:16:02, FastEthernet0/0
O IA 192.168.23.0/24 [110/20] via 192.168.12.2, 00:23:26, FastEthernet0/0
O IA 192.168.34.0/24 [110/30] via 192.168.12.2, 00:23:26, FastEthernet0/0
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1914 0x80000003 0x005BC1 2
2.2.2.2 2.2.2.2 1381 0x80000007 0x0088D8 3
3.3.3.3 3.3.3.3 2 (DNA) 0x80000006 0x008BF2 1
4.4.4.4 4.4.4.4 2061 0x80000003 0x008AAD 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.12.2 2.2.2.2 131 0x80000002 0x008D20
192.168.34.4 4.4.4.4 2061 0x80000001 0x00F489
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
3.3.3.3 3.3.3.3 7 (DNA) 0x80000001 0x00AE75
4.4.4.4 3.3.3.3 7 (DNA) 0x80000001 0x00E431
5.5.5.5 3.3.3.3 7 (DNA) 0x80000001 0x001BEC
10.10.1.1 3.3.3.3 2 (DNA) 0x80000001 0x00F114
10.10.2.1 3.3.3.3 2 (DNA) 0x80000001 0x00E61E
10.10.3.1 3.3.3.3 2 (DNA) 0x80000001 0x00DB28
10.10.4.1 3.3.3.3 2 (DNA) 0x80000001 0x00D032
10.10.5.1 3.3.3.3 2 (DNA) 0x80000001 0x00C53C
192.168.23.0 2.2.2.2 132 0x80000002 0x00FFA9
192.168.23.0 3.3.3.3 7 (DNA) 0x80000001 0x00E3C2
192.168.34.0 3.3.3.3 7 (DNA) 0x80000001 0x006A31
192.168.45.0 3.3.3.3 7 (DNA) 0x80000001 0x005531
设备的配置文件
R1#show run
R1#show running-config
Building configuration...
Current configuration : 848 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
no ip address
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 110
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 192.168.12.0 0.0.0.255 area 0
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R2#show run
Building configuration...
Current configuration : 893 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.23.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.12.2 255.255.255.0
duplex auto
speed auto
!
router ospf 110
log-adjacency-changes
area 1 virtual-link 3.3.3.3
network 2.2.2.2 0.0.0.0 area 0
network 192.168.12.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area 1
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R3#show running-config
Building configuration...
Current configuration : 893 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.34.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.23.3 255.255.255.0
duplex auto
speed auto
!
router ospf 110
log-adjacency-changes
area 1 virtual-link 2.2.2.2
network 3.3.3.3 0.0.0.0 area 2
network 192.168.23.0 0.0.0.255 area 1
network 192.168.34.0 0.0.0.255 area 2
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R4#show running-config
Building configuration...
Current configuration : 864 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.45.4 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.34.4 255.255.255.0
duplex auto
speed auto
!
router ospf 110
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 2
network 192.168.34.0 0.0.0.255 area 2
network 192.168.45.0 0.0.0.255 area 2
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R5#show run
Building configuration...
Current configuration : 1139 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Loopback1
ip address 10.10.1.1 255.255.255.0
!
interface Loopback2
ip address 10.10.2.1 255.255.255.0
!
interface Loopback3
ip address 10.10.3.1 255.255.255.0
!
interface Loopback4
ip address 10.10.4.1 255.255.255.0
!
interface Loopback5
ip address 10.10.5.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.45.5 255.255.255.0
duplex auto
speed auto
!
router ospf 110
log-adjacency-changes
network 5.5.5.5 0.0.0.0 area 2
network 10.10.0.0 0.0.255.255 area 2
network 192.168.45.0 0.0.0.255 area 2
!
!
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
转载于:https://blog.51cto.com/liuxianlin/640559