실험 요구사항
R1, R2, R3, R4 사이에서 IGP 프로토콜이 실행되고 있으며, IP 레벨의 상호 연결이 이미 구현되어 있습니다.
요구사항: MPLS 및 LDP를 구성하여 192.168.10.0/24 네트워크와 192.168.20.0/24 네트워크가 레이블 스위칭을 통해 통신할 수 있도록 합니다.
실험 구성도
(그림 생략)
실험 접근방식
- 기본 링크 통신 및 IGP 프로토콜 구성
- MPLS LDP 구성
- 정적 LSP 설정
- 결과 확인
기본 링크 통신 및 IGP 프로토콜 구성
R1 라우터
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]ip address 10.1.12.1 255.255.255.0
[R1-GigabitEthernet0/0/0]interface LoopBack0
[R1-LoopBack0]ip address 192.168.10.1 255.255.255.0
[R1-LoopBack0]quit
[R1]ospf 1 router-id 192.168.10.1
[R1-ospf-1]area 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 10.1.12.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]quit
[R1-ospf-1]quit
R2 라우터
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]ip address 10.1.12.2 255.255.255.0
[R2-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 10.1.23.1 255.255.255.0
[R2-GigabitEthernet0/0/1]interface LoopBack0
[R2-LoopBack0]ip address 22.1.1.1 255.255.255.0
[R2-LoopBack0]quit
[R2]ospf 1 router-id 22.1.1.1
[R2-ospf-1]area 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.12.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 22.1.1.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.23.1 0.0.0.0
[R2-ospf-1-area-0.0.0.0]quit
[R2-ospf-1]quit
R3 라우터
[R3]interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.1.23.2 255.255.255.0
[R3-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.1.34.1 255.255.255.0
[R3-GigabitEthernet0/0/1]interface LoopBack0
[R3-LoopBack0]ip address 33.1.1.1 255.255.255.0
[R3-LoopBack0]quit
[R3]ospf 1 router-id 33.1.1.1
[R3-ospf-1]area 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.1.23.2 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 33.1.1.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 10.1.34.1 0.0.0.0
[R3-ospf-1-area-0.0.0.0]quit
[R3-ospf-1]quit
R4 라우터
[R4]interface GigabitEthernet0/0/0
[R4-GigabitEthernet0/0/0]ip address 10.1.34.2 255.255.255.0
[R4-GigabitEthernet0/0/0]interface LoopBack0
[R4-LoopBack0]ip address 192.168.20.1 255.255.255.0
[R4-LoopBack0]quit
[R4]ospf 1 router-id 192.168.20.1
[R4-ospf-1]area 0.0.0.0
[R4-ospf-1-area-0.0.0.0]network 10.1.34.2 0.0.0.0
[R4-ospf-1-area-0.0.0.0]network 192.168.20.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]quit
[R4-ospf-1]quit
MPLS LDP 구성
R1 라우터
[R1]mpls lsr-id 192.168.10.1
[R1]mpls
Info: Mpls starting, please wait... OK!
[R1-mpls]quit
[R1]mpls ldp
[R1-mpls-ldp]quit
[R1]interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0]mpls
[R1-GigabitEthernet0/0/0]mpls ldp
[R1-GigabitEthernet0/0/0]quit
[R1]mpls ldp remote-peer R4_TARGET
[R1-mpls-ldp-remote-R4_TARGET]remote-ip 192.168.20.1
[R1-mpls-ldp-remote-R4_TARGET]display this
[V200R003C00]
#
mpls ldp remote-peer R4_TARGET
remote-ip 192.168.20.1
#
return
[R1-mpls-ldp-remote-R4_TARGET]quit
R4 라우터
[R4]mpls lsr-id 192.168.20.1
[R4]mpls
Info: Mpls starting, please wait... OK!
[R4-mpls]quit
[R4]mpls ldp
[R4-mpls-ldp]quit
[R4]interface GigabitEthernet0/0/0
[R4-GigabitEthernet0/0/0]mpls
[R4-GigabitEthernet0/0/0]mpls ldp
[R4-GigabitEthernet0/0/0]quit
[R4]mpls ldp remote-peer R1_TARGET
[R4-mpls-ldp-remote-R1_TARGET]remote-ip 192.168.10.1
[R4-mpls-ldp-remote-R1_TARGET]display this
[V200R003C00]
#
mpls ldp remote-peer R1_TARGET
remote-ip 192.168.10.1
#
return
[R4-mpls-ldp-remote-R1_TARGET]quit
[R4]display mpls ldp peer
LDP Peer Information in Public network
A '*' before a peer means the peer is being deleted.
------------------------------------------------------------------------------
PeerID TransportAddress DiscoverySource
------------------------------------------------------------------------------
192.168.10.1:0 192.168.10.1 Remote Peer : R1_TARGET
------------------------------------------------------------------------------
TOTAL: 1 Peer(s) Found.
[R4]
정적 LSP 구성
R1 라우터 (Ingress)
[R1]static-lsp entry R1_TO_R4 destination 192.168.20.0 255.255.255.0 nexthop 10.1.12.2 outgoing-interface GigabitEthernet0/0/0 out-label 100
R2 라우터 (Transit)
[R2]mpls lsr-id 22.1.1.1
[R2]mpls
Info: Mpls starting, please wait... OK!
[R2-mpls]quit
[R2]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]mpls
[R2-GigabitEthernet0/0/1]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]mpls
[R2-GigabitEthernet0/0/0]quit
[R2]static-lsp transit R1_TO_R4 incoming-interface GigabitEthernet0/0/0 in-label 100 nexthop 10.1.23.2 outgoing-interface GigabitEthernet0/0/1 out-label 200
R3 라우터 (Transit)
[R3]mpls lsr-id 33.1.1.1
[R3]mpls
Info: Mpls starting, please wait... OK!
[R3-mpls]quit
[R3]interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0]mpls
[R3-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]mpls
[R3-GigabitEthernet0/0/1]quit
[R3]static-lsp transit R1_TO_R4 incoming-interface GigabitEthernet0/0/0 in-label 200 nexthop 10.1.34.2 outgoing-interface GigabitEthernet0/0/1 out-label 300
R4 라우터 (Egress)
[R4]static-lsp exit R1_TO_R4 incoming-interface GigabitEthernet0/0/0 in-label 300
결과 확인
패킷 캡처를 통해 레이블 스위칭이 정상적으로 동작하는지 확인합니다.
실험이 성공적으로 완료되었습니다.