تست MPLS با روتر Cisco

برای تست سازگار بودن روتر با روتر های سیسکو سناریویی شامل ۳ روتر که یک روتر سیسکو با دو روتر سودار در یک شبکه قرار گرفته اند . پروتکل OSPF برای مسیریابی انتخاب شده است همچنین پروتکل MPLS نیز در شبکه فعال شده است .

soodar-cisco-mpls

تنظیمات اعمال شده در روتر ها را در ادامه می بینیم (نحوه تنظیم OSPF , MPLS را می توانید در اینجا مشاهده کنید تنظیم OSPF , تنظیم MPLS) . سپس در بخش نهایی جداول مسیریابی و جدول mpls در روتر ها را مشاهده کرده و ارتباطات شبکه ها را بررسی می کنیم :

soodar1# sh run

Building configuration...

Current configuration:
log file
system update server-url https://update.soodar.ir
system update update-poll-interval 10
system update inventory-poll-interval 15
no ip forwarding
no ipv6 forwarding
hostname soodar1
enable password s
!
interface loopback0
 no shutdown
 ip address 222.1.1.1/32
! 
interface ge0
 mpls ip
 no shutdown
 ip address 200.1.2.1/24
 ip ospf hello-interval 3
 ip ospf dead-interval 10
!
interface ge1
 mpls ip
 no shutdown
 ip address 1.1.1.1/24
 ip ospf hello-interval 3
 ip ospf dead-interval 10
 !
router ospf
 ospf router-id 222.1.1.1
 redistribute kernel
 redistribute connected
 redistribute static
 network 1.1.1.0/24 area 0
 network 200.1.2.0/24 area 0
 network 222.1.1.1/32 area 0
 !
mpls ldp
 router-id 222.1.1.1
 dual-stack transport-connection prefer ipv4
 dual-stack cisco-interop
 neighbor 222.2.2.2 password testmpls
 neighbor 222.3.3.3 password testmpls
 !
 address-family ipv4
  discovery transport-address 222.1.1.1
  !
  interface ge0
  !
  interface ge1
  !
 exit-address-family
 !
end
soodar2# sh run


Building configuration...

Current configuration:
log file
system update server-url https://update.soodar.ir
system update update-poll-interval 10
system update inventory-poll-interval 15
no ip forwarding
no ipv6 forwarding
hostname soodar2
enable password s
!
interface loopback0
 no shutdown
 ip address 222.2.2.2/32
!
interface ge0
 mpls ip
 no shutdown
 ip address 200.1.2.2/24
 ip ospf hello-interval 3
 ip ospf dead-interval 10
! 
interface ge1
 mpls ip
 no shutdown
 ip address 200.2.3.2/24
 ip ospf hello-interval 3
 ip ospf dead-interval 10
!
interface ge2
 no shutdown
 ip address 2.1.1.1/24
!
router ospf
 ospf router-id 222.2.2.2
 redistribute kernel
 redistribute connected
 redistribute static
 network 2.1.1.0/24 area 0
 network 200.1.2.0/24 area 0
 network 200.2.3.0/24 area 0
 network 222.2.2.2/32 area 0
!
mpls ldp
 router-id 222.2.2.2
 dual-stack transport-connection prefer ipv4
 dual-stack cisco-interop
 neighbor 222.1.1.1 password testmpls
 neighbor 222.3.3.3 password testmpls
 !
 address-family ipv4
  discovery transport-address 222.2.2.2
  !
  interface ge0
  !
  interface ge1
  !
 exit-address-family
 !
end
R3#sh run


Building configuration...

Current configuration : 1449 bytes
upgrade fpd auto
version 15.0
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

ip source-route
no ip icmp rate-limit unreachable
ip cef
                
no ip domain lookup
no ipv6 cef         
multilink bundle-name authenticated
mpls ldp neighbor 222.2.2.2 password testmpls                               
redundancy                  
ip tcp synwait-time 5                                   
interface Loopback0
 ip address 222.3.3.3 255.255.255.0
 !                 
interface Ethernet0/0
 no ip address
 shutdown 
 duplex auto
 !                 
interface GigabitEthernet0/0
 ip address 200.2.3.3 255.255.255.0
 ip ospf hello-interval 3
 ip ospf dead-interval 10
 duplex full
 speed 1000
 media-type gbic
 negotiation auto
 mpls ip  
 !                 
interface GigabitEthernet1/0
 ip address 3.1.1.1 255.255.255.0
 negotiation auto
 !                          
router ospf 1
 router-id 222.3.3.3
 log-adjacency-changes
 network 3.1.1.0 0.0.0.255 area 0
 network 200.2.3.0 0.0.0.255 area 0
 network 222.3.3.0 0.0.0.255 area 0         
ip forward-protocol nd
no ip http server
no ip http secure-server                   
no cdp log mismatch duplex                      
control-plane
 !                          
mgcp fax t38 ecm
mgcp behavior g729-variants static-pt                           
gatekeeper
 shutdown                   
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login             
end  

مشاهده جداول ospf , mpls در روتر ها

soodar1

soodar1# sh ip fib 

Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

C>* 1.1.1.0/24 is directly connected, soo1, 00:29:19
O>* 2.1.1.0/24 [110/20000] via 200.1.2.2, soo0, label implicit-null, 00:44:18
O>* 3.1.1.0/24 [110/20001] via 200.1.2.2, soo0, label 18, 00:20:15
C>* 200.1.2.0/24 is directly connected, soo0, 00:44:33
O>* 200.2.3.0/24 [110/20000] via 200.1.2.2, soo0, label implicit-null, 00:44:18
C>* 222.1.1.1/32 is directly connected, loopback0, 00:44:33
O>* 222.2.2.2/32 [110/20000] via 200.1.2.2, soo0, label implicit-null, 00:44:18
O>* 222.3.3.3/32 [110/20001] via 200.1.2.2, soo0, label 20, 00:20:15
soodar1# sh mpls ldp binding 

---------------------------------------------------
AF   Destination          Nexthop         Local Label Remote Label  In Use
ipv4 1.1.1.0/24           222.2.2.2       imp-null    19                no
ipv4 2.1.1.0/24           222.2.2.2       16          imp-null         yes
ipv4 3.1.1.0/24           222.2.2.2       19          18               yes
ipv4 111.1.1.0/24         222.2.2.2       imp-null    imp-null          no
ipv4 200.1.2.0/24         222.2.2.2       imp-null    imp-null          no
ipv4 200.2.3.0/24         222.2.2.2       17          imp-null         yes
ipv4 222.1.1.1/32         222.2.2.2       imp-null    17                no
ipv4 222.2.2.2/32         222.2.2.2       18          imp-null         yes
ipv4 222.3.3.3/32         222.2.2.2       20          20               yes

soodar2

soodar2# sh ip fib 

Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

O>* 1.1.1.0/24 [110/20000] via 200.1.2.1, soo0, label implicit-null, 00:30:40
C>* 2.1.1.0/24 is directly connected, soo2, 00:45:54
O>* 3.1.1.0/24 [110/10001] via 200.2.3.3, soo1, label implicit-null, 00:21:36
C>* 111.1.1.0/24 is directly connected, ctrl0, 00:45:55
C>* 200.1.2.0/24 is directly connected, soo0, 00:45:54
C>* 200.2.3.0/24 is directly connected, soo1, 00:45:54
O>* 222.1.1.1/32 [110/20000] via 200.1.2.1, soo0, label implicit-null, 00:45:31
C>* 222.2.2.2/32 is directly connected, loopback0, 00:45:54
O>* 222.3.3.3/32 [110/10001] via 200.2.3.3, soo1, 00:21:36
soodar2# sh mpls ldp binding 

AF   Destination          Nexthop         Local Label Remote Label  In Use
ipv4 1.1.1.0/24           222.1.1.1       19          imp-null         yes
ipv4 1.1.1.0/24           222.3.3.3       19          19               yes
ipv4 2.1.1.0/24           222.1.1.1       imp-null    16                no
ipv4 2.1.1.0/24           222.3.3.3       imp-null    18                no
ipv4 3.1.1.0/24           222.1.1.1       18          19               yes
ipv4 3.1.1.0/24           222.3.3.3       18          imp-null         yes
ipv4 111.1.1.0/24         222.1.1.1       imp-null    imp-null          no
ipv4 111.1.1.0/24         222.3.3.3       imp-null    21                no
ipv4 200.1.2.0/24         222.1.1.1       imp-null    imp-null          no
ipv4 200.1.2.0/24         222.3.3.3       imp-null    20                no
ipv4 200.2.3.0/24         222.1.1.1       imp-null    17                no
ipv4 200.2.3.0/24         222.3.3.3       imp-null    imp-null          no
ipv4 222.1.1.1/32         222.1.1.1       17          imp-null         yes
ipv4 222.1.1.1/32         222.3.3.3       17          17               yes
ipv4 222.2.2.2/32         222.1.1.1       imp-null    18                no
ipv4 222.2.2.2/32         222.3.3.3       imp-null    16                no
ipv4 222.3.3.0/24         222.3.3.3       -           imp-null         yes
ipv4 222.3.3.3/32         222.1.1.1       20          20               yes

R3

R3#sh 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, + - replicated route

Gateway of last resort is not set

      1.0.0.0/24 is subnetted, 1 subnets
O        1.1.1.0 [110/20001] via 200.2.3.2, 00:19:07, GigabitEthernet0/0
      2.0.0.0/24 is subnetted, 1 subnets
O        2.1.1.0 [110/10001] via 200.2.3.2, 00:19:07, GigabitEthernet0/0
      3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        3.1.1.0/24 is directly connected, GigabitEthernet1/0
L        3.1.1.1/32 is directly connected, GigabitEthernet1/0
      111.0.0.0/24 is subnetted, 1 subnets
O E2     111.1.1.0 [110/20] via 200.2.3.2, 00:19:07, GigabitEthernet0/0
O     200.1.2.0/24 [110/10001] via 200.2.3.2, 00:19:07, GigabitEthernet0/0
      200.2.3.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.2.3.0/24 is directly connected, GigabitEthernet0/0
L        200.2.3.3/32 is directly connected, GigabitEthernet0/0
      222.1.1.0/32 is subnetted, 1 subnets
O        222.1.1.1 [110/20001] via 200.2.3.2, 00:19:09, GigabitEthernet0/0
      222.2.2.0/32 is subnetted, 1 subnets
O        222.2.2.2 [110/10001] via 200.2.3.2, 00:19:09, GigabitEthernet0/0
      222.3.3.0/24 is variably subnetted, 2 subnets, 2 masks
C        222.3.3.0/24 is directly connected, Loopback0
L        222.3.3.3/32 is directly connected, Loopback0
R3#sh mpls ldp bindings 

  lib entry: 1.1.1.0/24, rev 14
	local binding:  label: 19
	remote binding: lsr: 222.2.2.2:0, label: 19
  lib entry: 2.1.1.0/24, rev 12
	local binding:  label: 18
	remote binding: lsr: 222.2.2.2:0, label: imp-null
  lib entry: 3.1.1.0/24, rev 6
	local binding:  label: imp-null
	remote binding: lsr: 222.2.2.2:0, label: 18
  lib entry: 111.1.1.0/24, rev 18
	local binding:  label: 21
	remote binding: lsr: 222.2.2.2:0, label: imp-null
  lib entry: 200.1.2.0/24, rev 16
	local binding:  label: 20
	remote binding: lsr: 222.2.2.2:0, label: imp-null
  lib entry: 200.2.3.0/24, rev 4
	local binding:  label: imp-null
	remote binding: lsr: 222.2.2.2:0, label: imp-null
  lib entry: 222.1.1.1/32, rev 10
	local binding:  label: 17
	remote binding: lsr: 222.2.2.2:0, label: 17
  lib entry: 222.2.2.2/32, rev 8
	local binding:  label: 16
        remote binding: lsr: 222.2.2.2:0, label: imp-null
  lib entry: 222.3.3.0/24, rev 2
        local binding:  label: imp-null
  lib entry: 222.3.3.3/32, rev 19
        remote binding: lsr: 222.2.2.2:0, label: 20

بررسی عملکرد

  1. ارتباط شبکه های 1.1.1.0 , 2.1.1.0 , 3.1.1.0 برقرار شده است و روتر سودار با روتر سیسکو با پروتکل OSPF ارتباط گرفته است . جدول مسیریابی روتر ها به درستی ایجاد شده است .

  2. ارتباط با روتر سیسکو با استفاده از پروتکل mpls نیز میسر می باشد و بسته ها در مسیر هایی که می باید با label و پروتکل mpls انتقال می یابند . جداول mpls نیز به درستی تشکیل شده اند .