STATIC=====================================
R12(config)# ip route 0.0.0.0 0.0.0.0 1.4.2.1

R11(config)# ip route 0.0.0.0 0.0.0.0 1.4.1.1
R11(config)# ip route 1.4.3.0 255.255.255.0 1.4.2.2

RC(config)#ip route 1.4.2.0 255.255.255.0 1.4.1.2
RC(config)#ip route 1.4.3.0 255.255.255.0 1.4.1.2


RIPv2 =======================================
R22(config)#router rip
R22(config-router)#version 2
R22(config-router)#no auto-summary
R22(config-router)#network 2.4.3.1
R22(config-router)#network 2.4.2.2
R22(config-router)#passive-interface g0/0

R21(config)#router rip
R21(config-router)#version 2
R21(config-router)#no auto-summary
R21(config-router)#network 2.4.2.1
R21(config-router)#network 2.4.1.2

RC(config)#router rip
RC(config-router)#version 2
RC(config-router)#no auto-summary
RC(config-router)#network 1.4.1.1
RC(config-router)#network 2.4.1.1
RC(config-router)#network 3.4.1.1
RC(config-router)#network 4.4.1.1

+
RC(config)#router rip
RC(config-router)#redistribute static
RC(config-router)#redistribute ospf 1 metric 5
RC(config-router)#redistribute eigrp 100 metric 5


OSPF=======================================
R32(config)#router ospf 1
R32(config-router)#router-id 3.4.3.1
R32(config-router)#network 3.4.3.1 0.0.0.0 area 0
R32(config-router)#network 3.4.2.2 0.0.0.0 area 0
R32(config-router)#passive-interface g0/0

R31(config)#router ospf 1
R31(config-router)#router-id 3.4.2.1
R31(config-router)#network 3.4.2.1 0.0.0.0 area 0
R31(config-router)#network 3.4.1.2 0.0.0.0 area 0

RC(config)#router ospf 1
RC(config-router)#router-id 3.4.1.1
RC(config-router)#network 1.4.1.1 0.0.0.0 area 0
RC(config-router)#network 2.4.1.1 0.0.0.0 area 0
RC(config-router)#network 3.4.1.1 0.0.0.0 area 0
RC(config-router)#network 4.4.1.1 0.0.0.0 area 0

+
RC(config)#router ospf 1
RC(config-router)#redistribute static subnets
RC(config-router)#redistribute rip subnets
RC(config-router)#redistribute eigrp 100 metric 10 subnets


EIGRP======================================
R42(config)#router eigrp 100
R42(config-router)#network 4.4.3.1 0.0.0.0
R42(config-router)#network 4.4.2.2 0.0.0.0
R42(config-router)#passive-interface g0/0

R41(config)#router eigrp 100
R41(config-router)#network 4.4.2.1 0.0.0.0
R41(config-router)#network 4.4.1.2 0.0.0.0

RC(config)#router eigrp 100
RC(config-router)#network 1.4.1.1 0.0.0.0
RC(config-router)#network 2.4.1.1 0.0.0.0
RC(config-router)#network 3.4.1.1 0.0.0.0
RC(config-router)#network 4.4.1.1 0.0.0.0

+
RC(config)#router eigrp 100
RC(config-router)#redistribute static
RC(config-router)#redistribute rip metric 10000 10 255 1 1500
RC(config-router)#redistribute ospf 1 metric 10000 10 255 1 1500

 

RIP - OSPF

OSPF=======================================
Rr2(config)#router ospf 1
Rr2(config-router)#router-id 192.4.23.1
Rr2(config-router)#network 192.4.23.1 0.0.0.0 area 0
Rr2(config-router)#network 192.4.22.2 0.0.0.0 area 0
Rr2(config-router)#passive-interface g0/0

Rr1(config)#router ospf 1
Rr1(config-router)#router-id 192.4.22.1
Rr1(config-router)#network 192.4.22.1 0.0.0.0 area 0
Rr1(config-router)#network 192.4.21.1 0.0.0.0 area 0

Rm(config)#router ospf 1
Rm(config-router)#router-id 192.4.21.10
Rm(config-router)#network 192.4.21.10 0.0.0.0 area 0
Rm(config-router)#network 192.4.11.10 0.0.0.0 area 0
Rm(config-router)#redistribute rip subnets

RIPv2 =======================================
Rs2(config)#router rip
Rs2(config-router)#version 2
Rs2(config-router)#no auto-summary
Rs2(config-router)#network 192.4.13.1
Rs2(config-router)#network 192.4.12.2
Rs2(config-router)#passive-interface g0/0

Rs1(config)#router rip
Rs1(config-router)#version 2
Rs1(config-router)#no auto-summary
Rs1(config-router)#network 192.4.12.1
Rs1(config-router)#network 192.4.11.1

Rm(config)#router rip
Rm(config-router)#version 2
Rm(config-router)#no auto-summary
Rm(config-router)#network 192.4.11.10
Rm(config-router)#network 192.4.21.10
Rm(config-router)#redistribute ospf 1 metric 5

RIP_OSPF세팅.pkt
0.05MB


RIP - EIGRP

RIPv2 =======================================
Rs2(config)#router rip
Rs2(config-router)#version 2
Rs2(config-router)#no auto-summary
Rs2(config-router)#network 192.4.13.1
Rs2(config-router)#network 192.4.12.2
Rs2(config-router)#passive-interface g0/0

Rs1(config)#router rip
Rs1(config-router)#version 2
Rs1(config-router)#no auto-summary
Rs1(config-router)#network 192.4.12.1
Rs1(config-router)#network 192.4.11.1

Rm(config)#router rip
Rm(config-router)#version 2
Rm(config-router)#no auto-summary
Rm(config-router)#network 192.4.11.10
Rm(config-router)#network 192.4.21.10
Rm(config-router)#redistribute eigrp 100 metric 5


EIGRP======================================
Rr2(config)#router eigrp 100
Rr2(config-router)#network 192.4.23.1 0.0.0.0
Rr2(config-router)#network 192.4.22.2 0.0.0.0
Rr2(config-router)#passive-interface g0/0

Rr1(config)#router eigrp 100
Rr1(config-router)#network 192.4.22.1 0.0.0.0
Rr1(config-router)#network 192.4.21.1 0.0.0.0

Rm(config)#router eigrp 100
Rm(config-router)#network 192.4.11.10 0.0.0.0
Rm(config-router)#network 192.4.21.10 0.0.0.0
Rm(config-router)#redistribute rip metric 10000 10 255 1 1500

RIP_EIGRP세팅.pkt
0.05MB


OSPF - EIGRP

OSPF=======================================
Rs2(config)#router ospf 1
Rs2(config-router)#router-id 192.4.13.1
Rs2(config-router)#network 192.4.13.1 0.0.0.0 area 0
Rs2(config-router)#network 192.4.12.2 0.0.0.0 area 0
Rs2(config-router)#passive-interface g0/0

Rs1(config)#router ospf 1
Rs1(config-router)#router-id 192.4.12.1
Rs1(config-router)#network 192.4.12.1 0.0.0.0 area 0
Rs1(config-router)#network 192.4.11.1 0.0.0.0 area 0

Rm(config)#router ospf 1
Rm(config-router)#router-id 192.4.11.10
Rm(config-router)#network 192.4.21.10 0.0.0.0 area 0
Rm(config-router)#network 192.4.11.10 0.0.0.0 area 0
Rm(config-router)#redistribute eigrp 100 metric 10 subnets

EIGRP======================================
Rr2(config)#router eigrp 100
Rr2(config-router)#network 192.4.23.1 0.0.0.0
Rr2(config-router)#network 192.4.22.2 0.0.0.0
Rr2(config-router)#passive-interface g0/0

Rr1(config)#router eigrp 100
Rr1(config-router)#network 192.4.22.1 0.0.0.0
Rr1(config-router)#network 192.4.21.1 0.0.0.0

Rm(config)#router eigrp 100
Rm(config-router)#network 192.4.11.10 0.0.0.0
Rm(config-router)#network 192.4.21.10 0.0.0.0
Rm(config-router)#redistribute ospf 1 metric 10000 10 255 1 1500

OSPF_EIGRP세팅.pkt
0.05MB

 

static ======================================
Rs2(config)# ip route 0.0.0.0 0.0.0.0 192.4.12.1

Rs1(config)# ip route 0.0.0.0 0.0.0.0 192.4.11.10
Rs1(config)# ip route 192.4.13.0 255.255.255.0 192.4.12.2


RIPv2 =======================================
Rr2(config)#router rip
Rr2(config-router)#version 2
Rr2(config-router)#no auto-summary
Rr2(config-router)#network 192.4.23.0
Rr2(config-router)#network 192.4.22.0
Rr2(config-router)#passive-interface g0/0

Rr1(config)#router rip
Rr1(config-router)#version 2
Rr1(config-router)#no auto-summary
Rr1(config-router)#network 192.4.21.0
Rr1(config-router)#network 192.4.22.0


Rm===========================================
Rm(config)#ip route 192.4.12.0 255.255.255.0 192.4.11.1
Rm(config)#ip route 192.4.13.0 255.255.255.0 192.4.11.1

Rm(config)#router rip
Rm(config-router)#version 2
Rm(config-router)#no auto-summary
Rm(config-router)#network 192.4.21.0
Rm(config-router)#network 192.4.11.0
Rm(config-router)#redistribute static

 

* Rm(config-router)#redistribute static

: 정적 라우팅 정보를 rip으로 가져오는 명령

 

TEST

PC1 > PC2

C:\>ping 192.4.23.11

Pinging 192.4.23.11 with 32 bytes of data:

Reply from 192.4.23.11: bytes=32 time=13ms TTL=123
Reply from 192.4.23.11: bytes=32 time=10ms TTL=123
Reply from 192.4.23.11: bytes=32 time=12ms TTL=123
Reply from 192.4.23.11: bytes=32 time=29ms TTL=123

Ping statistics for 192.4.23.11:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 10ms, Maximum = 29ms, Average = 16ms

Static_RIP2.pkt
0.05MB

'네트워크 공부 기록' 카테고리의 다른 글

EIGRP 실습  (0) 2022.01.26
EIGRP (Enhanced Interior Gateway Protocol)  (0) 2022.01.26
신뢰적 Data 전송 : rdt 1.0  (0) 2022.01.18
Transport Layer  (0) 2022.01.18
OSPF 실습  (0) 2022.01.18

1. default route 설정 없이 구성

 - R2 인터넷 연결

R1, R2, R3, PC1, PC2의 ip 세팅은 위와 같이 끝낸다.

 

라우터 인터페이스 설정 확인

R1

R1(config)#int s0/0/0
R1(config-if)#ip address 3.3.3.1 255.255.255.252
R1(config-if)#no shutdown 
R1#show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     1.1.1.1         YES manual up                    up 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            3.3.3.1         YES manual up                    up 
Serial0/0/1            unassigned      YES unset  administratively down down 
Vlan1                  unassigned      YES unset  administratively down down

R2

R2(config)#int s0/0/0
R2(config-if)#ip address 3.3.3.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#int s0/0/1
R2(config-if)#ip address 3.3.3.5 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     unassigned      YES unset  administratively down down 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            3.3.3.2         YES manual up                    up 
Serial0/0/1            3.3.3.5         YES manual up                    up 
Vlan1                  unassigned      YES unset  administratively down down

R3

R3(config)#int s0/0/0
R3(config-if)#ip address 3.3.3.6 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     2.2.2.1         YES manual up                    up 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            3.3.3.6         YES manual up                    up 
Serial0/0/1            unassigned      YES unset  administratively down down 
Vlan1                  unassigned      YES unset  administratively down down

 

라우팅 설정 전 PC1 > PC2 테스트

핑이 되지 않는다.

C:\>ping 2.2.2.11

Pinging 2.2.2.11 with 32 bytes of data:

Reply from 1.1.1.1: Destination host unreachable.
Reply from 1.1.1.1: Destination host unreachable.
Reply from 1.1.1.1: Destination host unreachable.
Reply from 1.1.1.1: Destination host unreachable.

Ping statistics for 2.2.2.11:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

 

라우터 RIP 설정

R1

 

R1(config)#router rip
R1(config-router)#network 1.1.1.0
R1(config-router)#network 3.3.3.0
R1(config-router)#passive-interface g0/0

R2

R2(config)#router rip
R2(config-router)#network 3.3.3.0
R2(config-router)#network 3.3.3.4

R3

R3(config)#router rip
R3(config-router)#network 2.2.2.0
R3(config-router)#network 3.3.3.4
R3(config-router)#passive-interface g0/0

 

저장 필수

R1#copy running-config startup-config 
Destination filename [startup-config]? 
Building configuration...
[OK]

 

라우터 RIP 설정 확인

running-config와 startup-config 를 모두 확인한다.

R1

R1#show running-config
...
router rip
 passive-interface GigabitEthernet0/0
 network 1.0.0.0
 network 3.0.0.0
...

R2

R2#show running-config
...
router rip
 network 3.0.0.0
...

R3

R3#show running-config
...
router rip
 passive-interface GigabitEthernet0/0
 network 2.0.0.0
 network 3.0.0.0
...

 

라우팅 정보 확인

R1

R1#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, E - EGP
       i - IS-IS, 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

     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       1.1.1.0/24 is directly connected, GigabitEthernet0/0
L       1.1.1.1/32 is directly connected, GigabitEthernet0/0
R    2.0.0.0/8 [120/2] via 3.3.3.2, 00:00:12, Serial0/0/0
     3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       3.3.3.0/30 is directly connected, Serial0/0/0
L       3.3.3.1/32 is directly connected, Serial0/0/0
R       3.3.3.4/30 [120/1] via 3.3.3.2, 00:00:12, Serial0/0/0

R2

R2#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, E - EGP
       i - IS-IS, 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

R    1.0.0.0/8 [120/1] via 3.3.3.1, 00:00:20, Serial0/0/0
R    2.0.0.0/8 [120/1] via 3.3.3.6, 00:00:23, Serial0/0/1
     3.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       3.3.3.0/30 is directly connected, Serial0/0/0
L       3.3.3.2/32 is directly connected, Serial0/0/0
C       3.3.3.4/30 is directly connected, Serial0/0/1
L       3.3.3.5/32 is directly connected, Serial0/0/1

R3

R3#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, E - EGP
       i - IS-IS, 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

R    1.0.0.0/8 [120/2] via 3.3.3.5, 00:00:05, Serial0/0/0
     2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       2.2.2.0/24 is directly connected, GigabitEthernet0/0
L       2.2.2.1/32 is directly connected, GigabitEthernet0/0
     3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
R       3.3.3.0/30 [120/1] via 3.3.3.5, 00:00:05, Serial0/0/0
C       3.3.3.4/30 is directly connected, Serial0/0/0
L       3.3.3.6/32 is directly connected, Serial0/0/0

 

PC1 테스트

C:\>ping 2.2.2.11

Pinging 2.2.2.11 with 32 bytes of data:

Request timed out.
Reply from 2.2.2.11: bytes=32 time=7ms TTL=125
Reply from 2.2.2.11: bytes=32 time=9ms TTL=125
Reply from 2.2.2.11: bytes=32 time=9ms TTL=125

Ping statistics for 2.2.2.11:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 7ms, Maximum = 9ms, Average = 8ms
    
C:\>ping 3.3.3.5

Pinging 3.3.3.5 with 32 bytes of data:

Reply from 3.3.3.5: bytes=32 time=6ms TTL=254
Reply from 3.3.3.5: bytes=32 time=6ms TTL=254
Reply from 3.3.3.5: bytes=32 time=6ms TTL=254
Reply from 3.3.3.5: bytes=32 time=4ms TTL=254

Ping statistics for 3.3.3.5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 4ms, Maximum = 6ms, Average = 5ms

 

PC2 테스트

C:\>ping 1.1.1.11

Pinging 1.1.1.11 with 32 bytes of data:

Reply from 1.1.1.11: bytes=32 time=10ms TTL=125
Reply from 1.1.1.11: bytes=32 time=8ms TTL=125
Reply from 1.1.1.11: bytes=32 time=8ms TTL=125
Reply from 1.1.1.11: bytes=32 time=9ms TTL=125

Ping statistics for 1.1.1.11:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 8ms, Maximum = 10ms, Average = 8ms
    
C:\>ping 3.3.3.1

Pinging 3.3.3.1 with 32 bytes of data:

Reply from 3.3.3.1: bytes=32 time=8ms TTL=253
Reply from 3.3.3.1: bytes=32 time=7ms TTL=253
Reply from 3.3.3.1: bytes=32 time=6ms TTL=253
Reply from 3.3.3.1: bytes=32 time=8ms TTL=253

Ping statistics for 3.3.3.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 6ms, Maximum = 8ms, Average = 7ms

실습04_RIP_routing_default_X.pkt
0.05MB


2. default route 설정을 이용

1번 파일에서 설정한다.

loopback 인터페이스를 활성화

R2(config)#int loopback0

R2(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R2(config-if)#ip add 10.10.10.1 255.255.255.0
R2(config-if)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     unassigned      YES unset  administratively down down 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            3.3.3.2         YES manual up                    up 
Serial0/0/1            3.3.3.5         YES manual up                    up 
Loopback0              10.10.10.1      YES manual up                    up 
Vlan1                  unassigned      YES unset  administratively down down

 

default route 인터페이스를 지정하고 이를 rip이 광고하도록 설정

R2(config-if)#ip route 0.0.0.0 0.0.0.0 loopback0
%Default route without gateway, if not a point-to-point interface, may impact performance
R2(config)#router rip
R2(config-router)#default-information originate
R2(config-router)#do 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, E - EGP
       i - IS-IS, 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 0.0.0.0 to network 0.0.0.0

R    1.0.0.0/8 [120/1] via 3.3.3.1, 00:00:18, Serial0/0/0
R    2.0.0.0/8 [120/1] via 3.3.3.6, 00:00:20, Serial0/0/1
     3.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       3.3.3.0/30 is directly connected, Serial0/0/0
L       3.3.3.2/32 is directly connected, Serial0/0/0
C       3.3.3.4/30 is directly connected, Serial0/0/1
L       3.3.3.5/32 is directly connected, Serial0/0/1
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.10.10.0/24 is directly connected, Loopback0
L       10.10.10.1/32 is directly connected, Loopback0
S*   0.0.0.0/0 is directly connected, Loopback0

 

default route 정보가 갱신되었는지 확인

R1

R1#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, E - EGP
       i - IS-IS, 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 3.3.3.2 to network 0.0.0.0

     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       1.1.1.0/24 is directly connected, GigabitEthernet0/0
L       1.1.1.1/32 is directly connected, GigabitEthernet0/0
R    2.0.0.0/8 [120/2] via 3.3.3.2, 00:00:20, Serial0/0/0
     3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C       3.3.3.0/30 is directly connected, Serial0/0/0
L       3.3.3.1/32 is directly connected, Serial0/0/0
R       3.3.3.4/30 [120/1] via 3.3.3.2, 00:00:20, Serial0/0/0
R*   0.0.0.0/0 [120/1] via 3.3.3.2, 00:00:20, Serial0/0/0

R2

R2#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, E - EGP
       i - IS-IS, 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 0.0.0.0 to network 0.0.0.0

R    1.0.0.0/8 [120/1] via 3.3.3.1, 00:00:22, Serial0/0/0
R    2.0.0.0/8 [120/1] via 3.3.3.6, 00:00:18, Serial0/0/1
     3.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       3.3.3.0/30 is directly connected, Serial0/0/0
L       3.3.3.2/32 is directly connected, Serial0/0/0
C       3.3.3.4/30 is directly connected, Serial0/0/1
L       3.3.3.5/32 is directly connected, Serial0/0/1
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.10.10.0/24 is directly connected, Loopback0
L       10.10.10.1/32 is directly connected, Loopback0
S*   0.0.0.0/0 is directly connected, Loopback0

R3

R3#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, E - EGP
       i - IS-IS, 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 3.3.3.5 to network 0.0.0.0

R    1.0.0.0/8 [120/2] via 3.3.3.5, 00:00:11, Serial0/0/0
     2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       2.2.2.0/24 is directly connected, GigabitEthernet0/0
L       2.2.2.1/32 is directly connected, GigabitEthernet0/0
     3.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
R       3.3.3.0/30 [120/1] via 3.3.3.5, 00:00:11, Serial0/0/0
C       3.3.3.4/30 is directly connected, Serial0/0/0
L       3.3.3.6/32 is directly connected, Serial0/0/0
R*   0.0.0.0/0 [120/1] via 3.3.3.5, 00:00:11, Serial0/0/0

 

PC1 테스트

C:\>ping 2.2.2.11

Pinging 2.2.2.11 with 32 bytes of data:

Request timed out.
Reply from 2.2.2.11: bytes=32 time=6ms TTL=125
Reply from 2.2.2.11: bytes=32 time=6ms TTL=125
Reply from 2.2.2.11: bytes=32 time=7ms TTL=125

Ping statistics for 2.2.2.11:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 6ms, Maximum = 7ms, Average = 6ms

C:\>ping 3.3.3.5

Pinging 3.3.3.5 with 32 bytes of data:

Reply from 3.3.3.5: bytes=32 time=10ms TTL=254
Reply from 3.3.3.5: bytes=32 time=5ms TTL=254
Reply from 3.3.3.5: bytes=32 time=5ms TTL=254
Reply from 3.3.3.5: bytes=32 time=7ms TTL=254

Ping statistics for 3.3.3.5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 10ms, Average = 6ms

 

PC2 테스트

C:\>ping 1.1.1.11

Pinging 1.1.1.11 with 32 bytes of data:

Reply from 1.1.1.11: bytes=32 time=9ms TTL=125
Reply from 1.1.1.11: bytes=32 time=8ms TTL=125
Reply from 1.1.1.11: bytes=32 time=7ms TTL=125
Reply from 1.1.1.11: bytes=32 time=9ms TTL=125

Ping statistics for 1.1.1.11:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 7ms, Maximum = 9ms, Average = 8ms
    
C:\>ping 3.3.3.1

Pinging 3.3.3.1 with 32 bytes of data:

Reply from 3.3.3.1: bytes=32 time=6ms TTL=253
Reply from 3.3.3.1: bytes=32 time=9ms TTL=253
Reply from 3.3.3.1: bytes=32 time=13ms TTL=253
Reply from 3.3.3.1: bytes=32 time=6ms TTL=253

Ping statistics for 3.3.3.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 6ms, Maximum = 13ms, Average = 8ms

실습04_RIP_routing_default_O.pkt
0.05MB

 

'네트워크 공부 기록' 카테고리의 다른 글

OSPF 실습  (0) 2022.01.18
OSPF  (0) 2022.01.18
동적 라우팅 및 RIP  (0) 2022.01.17
정적 라우팅 구현 실습 (라우팅 정보 입력 및 Default 라우팅)  (0) 2022.01.14
Router 및 정적 라우팅  (0) 2022.01.14

동적 라우팅

◾ 범위
• IGP(Interior Gateway Protocol) : RIP(v1, v2), IGRP, OSPF
• EGP(Exterior Gateway Protocol) : EGP, BGP


◾ 라우팅 정보
• Distance Vector : RIP(v1, v2), IGRP
• Link State : OSPF


◾ VLSM
• Classful : RIP v1, IGRP
• Classless : RIP v2, OSPF


RIP

◾ Router에 RIP 설정
• 라우터가 알고있는 네트워크 정보를 광고하도록 지정한다.
• Classful 알고리즘이므로 넷마스크를 입력하지 않는다.
• 라우터에 연결된 모든 네트워크 정보를 모두 입력한다.

• 중간에 거쳐가는 라우터가 적은 쪽으로 이동


◾ 명령어
• router [rip | ospf | eigrp | bgp]
 : 각 프로토콜 설정모드로 진입
• network [IP]
 : 광고할 네트워크 주소를 지정
 - 라우터에 연결된 모든 네트워크 주소를 입력한다.
 - rip은 넷마스크를 입력하지 않는다.

 

◾ 라우팅 정보 확인
• show ip route [rip]

 

◾ 불필요한 업데이트 금지
• R1이나 R2, R3의 GigbitEthernet 영역은 라우팅 정보를 수신할 라우터가 없는 곳이므로 해당 인터페이스로 라우팅 정보를 업데이트 할 필요가 없다.
• passive‐interface [interface]
 : 해당 인터페이스로는 라우팅 정보를 업데이트하지 않는다.

R1(config-router)#passive-interface g0/0

 

RIP 실습

토폴로지 구성

R1

R1(config-if)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     1.4.1.1         YES manual up                    up 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            1.4.11.1        YES manual down                  down 
Serial0/0/1            1.4.13.2        YES manual down                  down 
Vlan1                  unassigned      YES unset  administratively down down

 

R2

R2(config-if)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     1.4.2.1         YES manual up                    up 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            1.4.11.2        YES manual up                    up 
Serial0/0/1            1.4.12.1        YES manual down                  down 
Vlan1                  unassigned      YES unset  administratively down down

 

R3

R3#show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     1.4.3.1         YES manual up                    up 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            1.4.13.1        YES manual up                    up 
Serial0/0/1            1.4.12.2        YES manual up                    up 
Vlan1                  unassigned      YES unset  administratively down down

 

라우터 RIP 설정

R1, R2, R3 모두 설정한다.

R1(config)#router rip
R1(config-router)#network 1.4.1.0
R1(config-router)#network 1.4.11.0
R1(config-router)#network 1.4.13.0
R1(config-router)#passive-interface g0/0   < 불필요한 업데이트 금지

 

라우터 RIP 설정 확인

R1#show start
...
router rip
 network 1.0.0.0
...

 

라우팅 정보 확인

R1#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, E - EGP
       i - IS-IS, 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

     1.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C       1.4.1.0/24 is directly connected, GigabitEthernet0/0
L       1.4.1.1/32 is directly connected, GigabitEthernet0/0
R       1.4.2.0/24 [120/1] via 1.4.11.2, 00:00:27, Serial0/0/0
R       1.4.3.0/24 [120/1] via 1.4.13.1, 00:00:08, Serial0/0/1
C       1.4.11.0/24 is directly connected, Serial0/0/0
L       1.4.11.1/32 is directly connected, Serial0/0/0
R       1.4.12.0/24 [120/1] via 1.4.11.2, 00:00:27, Serial0/0/0
                    [120/1] via 1.4.13.1, 00:00:08, Serial0/0/1
C       1.4.13.0/24 is directly connected, Serial0/0/1
L       1.4.13.2/32 is directly connected, Serial0/0/1

 

PC에서 테스트

PC1

C:\>ping 1.4.2.11

Pinging 1.4.2.11 with 32 bytes of data:

Request timed out.
Reply from 1.4.2.11: bytes=32 time=5ms TTL=126
Reply from 1.4.2.11: bytes=32 time=6ms TTL=126
Reply from 1.4.2.11: bytes=32 time=5ms TTL=126

Ping statistics for 1.4.2.11:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 6ms, Average = 5ms
    
C:\>ping 1.4.3.11

Pinging 1.4.3.11 with 32 bytes of data:

Reply from 1.4.3.11: bytes=32 time=8ms TTL=126
Reply from 1.4.3.11: bytes=32 time=6ms TTL=126
Reply from 1.4.3.11: bytes=32 time=7ms TTL=126
Reply from 1.4.3.11: bytes=32 time=6ms TTL=126

Ping statistics for 1.4.3.11:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 6ms, Maximum = 8ms, Average = 6ms

RIP - extra

◾ 변경 정보 전달(Route Poisoning, Poisoning Reverse)
• 라우터에 변경(장애나 수정)이 발생하면 즉시 수정된 라우팅 정보를 전달한다.
• 이때 접근 이 불가능한 16 hops를 전달한다.
• R3의 G0/0을 다운시키고 전달되는 라우팅 정보를 확인한다.

 

R1#debug ip rip
RIP protocol debugging is on
R1#RIP: sending  v1 update to 255.255.255.255 via Serial0/0/0 (1.4.11.1)
RIP: build update entries
      network 1.4.1.0 metric 1
      network 1.4.3.0 metric 2
      network 1.4.13.0 metric 1
RIP: sending  v1 update to 255.255.255.255 via Serial0/0/1 (1.4.13.2)
RIP: build update entries
      network 1.4.1.0 metric 1
      network 1.4.2.0 metric 2
      network 1.4.11.0 metric 1
RIP: received v1 update from 1.4.13.1 on Serial0/0/1
      1.4.2.0 in 2 hops
      1.4.3.0 in 1 hops
      1.4.12.0 in 1 hops
RIP: received v1 update from 1.4.11.2 on Serial0/0/0
      1.4.2.0 in 1 hops
      1.4.3.0 in 2 hops
      1.4.12.0 in 1 hops
RIP: sending  v1 update to 255.255.255.255 via Serial0/0/0 (1.4.11.1)
RIP: build update entries
      network 1.4.1.0 metric 1
      network 1.4.3.0 metric 2
      network 1.4.13.0 metric 1
RIP: sending  v1 update to 255.255.255.255 via Serial0/0/1 (1.4.13.2)
RIP: build update entries
      network 1.4.1.0 metric 1
      network 1.4.2.0 metric 2
      network 1.4.11.0 metric 1
RIP: received v1 update from 1.4.13.1 on Serial0/0/1
      1.4.2.0 in 2 hops
      1.4.3.0 in 1 hops
      1.4.12.0 in 1 hops
RIP: received v1 update from 1.4.11.2 on Serial0/0/0
      1.4.2.0 in 1 hops
      1.4.3.0 in 2 hops
      1.4.12.0 in 1 hops
...
R1#no debug ip rip
RIP protocol debugging is off

 

RIP - extra : default route

◾ RIP을 이용한 default route 정보 전달
• 정적 라우팅 환경에서는 라우터에 직접 default route 정보를 설정했으나 RIP에서는 default route 정보를 RIP를 통해 전달 가능하다.
• 명령
 [ default‐information originate ]
 : RIP을 통해 default route 정보를 전달한다.


◾ Default router 설정
• default route 설정은 정적 라우팅 설정과 동일하다.
• 외부 네트워크로 local loopback 인터페이스를 이용한다. (가짜 인터페이스를 생성)
 - loopback 인터페이스를 인터넷(ISP) 연결로 간주한다. (default route로 지정)

 - no shutdown 으로 활성화를 할 필요가 없다. (가짜 인터페이스라서)

 

◾ loopback 인터페이스를 활성화 한다.

• 가상 인터페이스로 no shutdown 명령이 불필요하다.
• 10.10.10.0/24는 RIP 라우팅에 등록하지 않는다.

R1(config)#int loopback0

R1(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R1(config-if)#ip address 10.10.10.1 255.255.255.0
R1(config-if)#do show ip int brief
Interface              IP-Address      OK? Method Status                Protocol 
GigabitEthernet0/0     1.4.1.1         YES manual up                    up 
GigabitEthernet0/1     unassigned      YES unset  administratively down down 
Serial0/0/0            1.4.11.1        YES manual up                    up 
Serial0/0/1            1.4.13.2        YES manual up                    up 
Loopback0              10.10.10.1      YES manual up                    up 
Vlan1                  unassigned      YES unset  administratively down down

 

◾ default route 인터페이스를 지정하고 이를 rip이 광고하도록 설정

R1(config)#ip route 0.0.0.0 0.0.0.0 loopback0
%Default route without gateway, if not a point-to-point interface, may impact performance
R1(config)#router rip
R1(config-router)#default-information originate 
R1(config-router)#exit
R1(config)#do 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, E - EGP
       i - IS-IS, 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 0.0.0.0 to network 0.0.0.0

     1.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C       1.4.1.0/24 is directly connected, GigabitEthernet0/0
L       1.4.1.1/32 is directly connected, GigabitEthernet0/0
R       1.4.2.0/24 [120/1] via 1.4.11.2, 00:00:20, Serial0/0/0
R       1.4.3.0/24 [120/1] via 1.4.13.1, 00:00:24, Serial0/0/1
C       1.4.11.0/24 is directly connected, Serial0/0/0
L       1.4.11.1/32 is directly connected, Serial0/0/0
R       1.4.12.0/24 [120/1] via 1.4.13.1, 00:00:24, Serial0/0/1
                    [120/1] via 1.4.11.2, 00:00:20, Serial0/0/0
C       1.4.13.0/24 is directly connected, Serial0/0/1
L       1.4.13.2/32 is directly connected, Serial0/0/1
     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       10.10.10.0/24 is directly connected, Loopback0
L       10.10.10.1/32 is directly connected, Loopback0
S*   0.0.0.0/0 is directly connected, Loopback0

 

R2, R3에서도 default route 정보가 갱신되었는지 확인

R2#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, E - EGP
       i - IS-IS, 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 1.4.11.1 to network 0.0.0.0

     1.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
R       1.4.1.0/24 [120/1] via 1.4.11.1, 00:00:08, Serial0/0/0
C       1.4.2.0/24 is directly connected, GigabitEthernet0/0
L       1.4.2.1/32 is directly connected, GigabitEthernet0/0
R       1.4.3.0/24 [120/1] via 1.4.12.2, 00:00:26, Serial0/0/1
C       1.4.11.0/24 is directly connected, Serial0/0/0
L       1.4.11.2/32 is directly connected, Serial0/0/0
C       1.4.12.0/24 is directly connected, Serial0/0/1
L       1.4.12.1/32 is directly connected, Serial0/0/1
R       1.4.13.0/24 [120/1] via 1.4.12.2, 00:00:26, Serial0/0/1
                    [120/1] via 1.4.11.1, 00:00:08, Serial0/0/0
R*   0.0.0.0/0 [120/1] via 1.4.11.1, 00:00:08, Serial0/0/0

 

'네트워크 공부 기록' 카테고리의 다른 글

OSPF  (0) 2022.01.18
RIP 라우팅 구현 실습  (0) 2022.01.17
정적 라우팅 구현 실습 (라우팅 정보 입력 및 Default 라우팅)  (0) 2022.01.14
Router 및 정적 라우팅  (0) 2022.01.14
VLAN 실습  (0) 2022.01.13

+ Recent posts