Network(rip ospf) - shima-jun/mywiki GitHub Wiki
Network
要件
- OSPF
- RIP
- OSPF認証
- static、default root
R1設定
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.1.254 255.255.255.0
!
interface Ethernet0/1
ip address 192.168.2.1 255.255.255.252
!
interface Ethernet0/2
ip address 192.168.3.1 255.255.255.252
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 1.1.1.1
passive-interface Ethernet0/0
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.3 area 0
network 192.168.3.0 0.0.0.3 area 0
R2設定
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.2.2 255.255.255.252
!
interface Ethernet0/1
ip address 192.168.5.1 255.255.255.252
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 2.2.2.2
network 192.168.2.0 0.0.0.3 area 0
network 192.168.5.0 0.0.0.3 area 0
R3設定
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.3.2 255.255.255.252
!
interface Ethernet0/1
ip address 192.168.4.1 255.255.255.252
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 3.3.3.3
network 192.168.3.0 0.0.0.3 area 0
network 192.168.4.0 0.0.0.3 area 0
R4設定
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.4.2 255.255.255.252
!
interface Ethernet0/1
ip address 192.168.6.1 255.255.255.252
!
interface Ethernet0/2
ip address 192.168.8.1 255.255.255.248
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 Password
ip ospf 1 area 0
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 4.4.4.4
redistribute rip metric 5 subnets
network 192.168.4.0 0.0.0.3 area 0
network 192.168.6.0 0.0.0.3 area 0
!
router rip
version 2
redistribute ospf 1 metric 1
network 192.168.8.0
no auto-summary
R5設定
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.5.2 255.255.255.252
!
interface Ethernet0/1
ip address 192.168.6.2 255.255.255.252
!
interface Ethernet0/2
ip address 192.168.7.253 255.255.255.0
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 5.5.5.5
passive-interface Ethernet0/2
network 192.168.5.0 0.0.0.3 area 0
network 192.168.6.0 0.0.0.3 area 0
network 192.168.7.0 0.0.0.255 area 0
R6設定
interface Ethernet0/0
ip address 192.168.8.2 255.255.255.248
!
interface Ethernet0/1
ip address 172.16.10.1 255.255.255.0
!
interface Ethernet0/2
ip address 172.16.9.1 255.255.255.0
shutdown
!
interface Ethernet0/3
no ip address
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.8.3 255.255.255.248
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 Password
!
interface Ethernet0/1
ip address 192.168.8.129 255.255.255.252
!
interface Ethernet0/2
ip address 172.16.11.1 255.255.255.0
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 7.7.7.7
redistribute static subnets
passive-interface Ethernet0/1
network 172.16.11.0 0.0.0.255 area 0
network 192.168.8.0 0.0.0.7 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 172.16.12.2 255.255.255.255 192.168.8.130
shutdown
!
router rip
version 2
network 172.16.0.0
network 192.168.8.0
no auto-summary
R7設定
interface Loopback0
ip address 7.7.7.7 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.8.3 255.255.255.248
ip ospf authentication message-digest
ip ospf message-digest-key 1 md5 Password
!
interface Ethernet0/1
ip address 192.168.8.129 255.255.255.252
!
interface Ethernet0/2
ip address 172.16.11.1 255.255.255.0
!
interface Ethernet0/3
no ip address
shutdown
!
router ospf 1
router-id 7.7.7.7
redistribute static subnets
passive-interface Ethernet0/1
network 172.16.11.0 0.0.0.255 area 0
network 192.168.8.0 0.0.0.7 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 172.16.12.2 255.255.255.255 192.168.8.130
R8設定
interface Ethernet0/0
ip address 192.168.8.130 255.255.255.252
!
interface Ethernet0/1
ip address 172.16.12.1 255.255.255.0
!
interface Ethernet0/2
no ip address
shutdown
!
interface Ethernet0/3
no ip address
shutdown
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.8.129
ルート情報
R1ルート情報
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
O E2 172.16.10.0/24 [110/5] via 192.168.3.2, 00:08:13, Ethernet0/2
O 172.16.11.0/24 [110/40] via 192.168.3.2, 00:08:13, Ethernet0/2
O E2 172.16.12.2/32 [110/20] via 192.168.3.2, 00:08:13, Ethernet0/2
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Ethernet0/0
L 192.168.1.254/32 is directly connected, Ethernet0/0
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.2.0/30 is directly connected, Ethernet0/1
L 192.168.2.1/32 is directly connected, Ethernet0/1
192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.3.0/30 is directly connected, Ethernet0/2
L 192.168.3.1/32 is directly connected, Ethernet0/2
192.168.4.0/30 is subnetted, 1 subnets
O 192.168.4.0 [110/20] via 192.168.3.2, 00:08:13, Ethernet0/2
192.168.5.0/30 is subnetted, 1 subnets
O 192.168.5.0 [110/20] via 192.168.2.2, 00:08:13, Ethernet0/1
192.168.6.0/30 is subnetted, 1 subnets
O 192.168.6.0 [110/30] via 192.168.3.2, 00:08:13, Ethernet0/2
[110/30] via 192.168.2.2, 00:08:13, Ethernet0/1
O 192.168.7.0/24 [110/30] via 192.168.2.2, 00:08:13, Ethernet0/1
192.168.8.0/29 is subnetted, 1 subnets
O 192.168.8.0 [110/30] via 192.168.3.2, 00:08:13, Ethernet0/2
R4ルート情報
4.0.0.0/32 is subnetted, 1 subnets
C 4.4.4.4 is directly connected, Loopback0
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
R 172.16.10.0/24 [120/1] via 192.168.8.2, 00:00:07, Ethernet0/2
O 172.16.11.0/24 [110/20] via 192.168.8.3, 01:30:56, Ethernet0/2
O E2 172.16.12.2/32 [110/20] via 192.168.8.3, 01:30:56, Ethernet0/2
O 192.168.1.0/24 [110/30] via 192.168.4.1, 00:09:01, Ethernet0/0
192.168.2.0/30 is subnetted, 1 subnets
O 192.168.2.0 [110/30] via 192.168.6.2, 00:09:01, Ethernet0/1
[110/30] via 192.168.4.1, 00:09:01, Ethernet0/0
192.168.3.0/30 is subnetted, 1 subnets
O 192.168.3.0 [110/20] via 192.168.4.1, 01:41:15, Ethernet0/0
192.168.4.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.4.0/30 is directly connected, Ethernet0/0
L 192.168.4.2/32 is directly connected, Ethernet0/0
192.168.5.0/30 is subnetted, 1 subnets
O 192.168.5.0 [110/20] via 192.168.6.2, 00:09:01, Ethernet0/1
192.168.6.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.6.0/30 is directly connected, Ethernet0/1
L 192.168.6.1/32 is directly connected, Ethernet0/1
O 192.168.7.0/24 [110/20] via 192.168.6.2, 00:09:01, Ethernet0/1
192.168.8.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.8.0/29 is directly connected, Ethernet0/2
L 192.168.8.1/32 is directly connected, Ethernet0/2
R6ルート情報
172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C 172.16.10.0/24 is directly connected, Ethernet0/1
L 172.16.10.1/32 is directly connected, Ethernet0/1
R 172.16.11.0/24 [120/1] via 192.168.8.3, 00:00:03, Ethernet0/0
R 172.16.12.2/32 [120/1] via 192.168.8.3, 00:00:03, Ethernet0/0
R 192.168.1.0/24 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
192.168.2.0/30 is subnetted, 1 subnets
R 192.168.2.0 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
192.168.3.0/30 is subnetted, 1 subnets
R 192.168.3.0 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
192.168.4.0/30 is subnetted, 1 subnets
R 192.168.4.0 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
192.168.5.0/30 is subnetted, 1 subnets
R 192.168.5.0 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
192.168.6.0/30 is subnetted, 1 subnets
R 192.168.6.0 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
R 192.168.7.0/24 [120/1] via 192.168.8.1, 00:00:03, Ethernet0/0
192.168.8.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.8.0/29 is directly connected, Ethernet0/0
L 192.168.8.2/32 is directly connected, Ethernet0/0
R7ルート情報
7.0.0.0/32 is subnetted, 1 subnets
C 7.7.7.7 is directly connected, Loopback0
172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
O E2 172.16.10.0/24 [110/5] via 192.168.8.2, 01:38:17, Ethernet0/0
C 172.16.11.0/24 is directly connected, Ethernet0/2
L 172.16.11.1/32 is directly connected, Ethernet0/2
S 172.16.12.2/32 [1/0] via 192.168.8.130
O 192.168.1.0/24 [110/40] via 192.168.8.1, 00:10:28, Ethernet0/0
192.168.2.0/30 is subnetted, 1 subnets
O 192.168.2.0 [110/40] via 192.168.8.1, 00:10:28, Ethernet0/0
192.168.3.0/30 is subnetted, 1 subnets
O 192.168.3.0 [110/30] via 192.168.8.1, 01:42:06, Ethernet0/0
192.168.4.0/30 is subnetted, 1 subnets
O 192.168.4.0 [110/20] via 192.168.8.1, 01:42:06, Ethernet0/0
192.168.5.0/30 is subnetted, 1 subnets
O 192.168.5.0 [110/30] via 192.168.8.1, 00:10:28, Ethernet0/0
192.168.6.0/30 is subnetted, 1 subnets
O 192.168.6.0 [110/20] via 192.168.8.1, 00:10:28, Ethernet0/0
O 192.168.7.0/24 [110/30] via 192.168.8.1, 00:10:28, Ethernet0/0
192.168.8.0/24 is variably subnetted, 4 subnets, 3 masks
C 192.168.8.0/29 is directly connected, Ethernet0/0
L 192.168.8.3/32 is directly connected, Ethernet0/0
C 192.168.8.128/30 is directly connected, Ethernet0/1
L 192.168.8.129/32 is directly connected, Ethernet0/1
疎通確認
- PC1-PC2
- PC1-PC3
- PC1-PC4
- PC1-PC5
- PC5-PC1
- PC5-PC3
追加
スタティックルートの再配布
redistribute static
デフォルトルートの再配布
default-information originate