ネットワーク

Q1_Static route

問題

RT1 の Loopback0 (1.1.1.1) と RT2 の Loopback0 (2.2.2.2) が通信できるように Static route を設定しなさい。

 

構成図

物理構成図:

 

論理構成図:

 

 

初期Config

RT1
conf t
!
interface Ethernet 0/0
 ip address 192.168.12.1 255.255.255.0
 no shutdown
!
interface loopback 0
 ip address 1.1.1.1 255.255.255.255
!
end

RT2
conf t
!
interface Ethernet 0/0
 ip address 192.168.12.2 255.255.255.0
 no shutdown
!
interface loopback 0
 ip address 2.2.2.2 255.255.255.255
!
end

 

回答

回答
RT1 :
conf t
!
ip route 2.2.2.2 255.255.255.255 Ethernet 0/0 192.168.12.2
!
end
----------------------------------------------------------------------------------------------------
RT2 :
conf t
!
ip route 1.1.1.1 255.255.255.255 tEthernet 0/0 192.168.12.1
!
end

 

解説

Loopback I/F 間で疎通性を持たせるため、RT1,2 のどちらにも Static route を設定する必要がある。

設定することで RIB に該当経路が登録され、これに従い通信が可能となる。

RT1#ping 2.2.2.2 source 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/186/243 ms
!
RT2#ping 1.1.1.1 source 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 212/222/239 ms

 

RT1#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      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
S        2.2.2.2  via 192.168.12.2, tEthernet0/0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.1/32 is directly connected, Ethernet0/0
----------------------------------------------------------------------------------------------------
RT2#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
S        1.1.1.1  via 192.168.12.1, Ethernet0/0
      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.2/32 is directly connected, Ethernet0/0