در این بخش قصد داریم ارتباط روتر سودار با روتر cisco با پروتکل های مسیریابی RIP,OSPF,ISIS و BGP بررسی کنیم . فرض کنید سناریوی زیر را داریم که روتر n1 سودار و بقیه روتر ها cisco هستند سودار با هر کدام از روترهای cisco با یک پروتکل مسیریابی کار می کند :

soodar-cisco-protocols

همسایگی RIP بین سودار و cisco

تنظیمات RIP در روتر سودار

router rip
 network 200.1.2.0/24
 redistribute connected

تنظیمات RIP در روتر cisco

router rip
 redistribute connected
 network 200.1.2.0

بررسی همسایگی در سودار و در سیسکو

سودار :

n1# sh ip rip status 
Routing Protocol is "rip"
  Sending updates every 30 seconds with +/-50%, next due in 28 seconds
  Timeout after 180 seconds, garbage collect after 120 seconds
  Outgoing update filter list for all interface is not set
  Incoming update filter list for all interface is not set
  Default redistribution metric is 1
  Redistributing: connected
  Default version control: send version 2, receive any version 
    Interface        Send  Recv   Key-chain
    ge0              2     1 2    
  Routing for Networks:
    200.1.2.0/24
  Routing Information Sources:
    Gateway          BadPackets BadRoutes  Distance Last Update
    200.1.2.2                1         0       120   00:00:12
  Distance: (default is 120)
n1# 

n1# 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, W - WG,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 1.1.1.0/24 is directly connected, ge2, 01:23:01
R>* 2.0.0.0/8 [120/2] via 200.1.2.2, ge0, weight 1, 00:10:04
C>* 200.1.2.0/24 is directly connected, ge0, 01:23:01
C>* 200.1.3.0/24 is directly connected, ge1, 01:23:01
C>* 200.1.7.0/24 is directly connected, ge3, 01:23:01
C>* 200.1.9.0/24 is directly connected, ge4, 01:23:01
C>* 222.1.1.1/32 is directly connected, loopback100, 01:23:07
n1# 

cisco:

n2#sh ip rip database 
1.0.0.0/8    auto-summary
1.1.1.0/24
    [1] via 200.1.2.1, 00:00:03, GigabitEthernet0/0
2.0.0.0/8    auto-summary
2.1.1.0/24    redistributed
    [1] via 0.0.0.0, 
200.1.2.0/24    auto-summary
200.1.2.0/24    directly connected, GigabitEthernet0/0
n2#sh ip route rip
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
R        1.1.1.0 [120/1] via 200.1.2.1, 00:00:19, GigabitEthernet0/0
R     200.1.3.0/24 [120/1] via 200.1.2.1, 00:00:19, GigabitEthernet0/0
R     200.1.7.0/24 [120/1] via 200.1.2.1, 00:00:19, GigabitEthernet0/0
R     200.1.9.0/24 [120/1] via 200.1.2.1, 00:00:19, GigabitEthernet0/0
      222.1.1.0/32 is subnetted, 1 subnets
R        222.1.1.1 [120/1] via 200.1.2.1, 00:00:19, GigabitEthernet0/0
n2#

همسایگی OSPF بین سودار و cisco

تنظیمات OSPF در روتر سودار

interface ge1
 no shutdown
 ip address 200.1.3.1/24
 ip ospf area 0
exit
!
interface ge2
 no shutdown
 ip address 1.1.1.1/24
 ip ospf area 0
 ip ospf passive
exit
!


router ospf
 ospf router-id 222.1.1.1
 auto-cost reference-bandwidth 100
!

تنظیمات OSPF در روتر cisco

interface GigabitEthernet0/0
 ip address 200.1.3.3 255.255.255.0
 ip ospf 1 area 0
 duplex full
 speed 1000
 media-type gbic
 negotiation auto
 !
!
interface GigabitEthernet1/0
 ip address 3.1.1.1 255.255.255.0
 ip ospf 1 area 0
 negotiation auto
 !
!
router ospf 1
 router-id 222.3.3.3
 log-adjacency-changes
 passive-interface GigabitEthernet1/0
!

بررسی همسایگی در سودار و در سیسکو

سودار :

n1# sh ip ospf neighbor 

Neighbor ID     Pri State           Dead Time Address         Interface         
               RXmtL RqstL DBsmL
222.3.3.3         1 Full/DR           39.188s 200.1.3.3       ge1:200.1.3.1     
                   0     0     0

n1# 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, W - WG,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 1.1.1.0/24 is directly connected, ge2, 01:43:44
R>* 2.0.0.0/8 [120/2] via 200.1.2.2, ge0, weight 1, 00:30:47
O>* 3.1.1.0/24 [110/101] via 200.1.3.3, ge1, weight 1, 00:03:15
C>* 200.1.2.0/24 is directly connected, ge0, 01:43:44
C>* 200.1.3.0/24 is directly connected, ge1, 01:43:44
C>* 200.1.7.0/24 is directly connected, ge3, 01:43:44
C>* 200.1.9.0/24 is directly connected, ge4, 01:43:44
C>* 222.1.1.1/32 is directly connected, loopback100, 01:43:50

سیسکو:

n3#sh ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
222.1.1.1         1   FULL/BDR        00:00:34    200.1.3.1       GigabitEthernet0/0
n3#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/101] via 200.1.3.1, 00:04:45, GigabitEthernet0/0
O E2  2.0.0.0/8 [110/20] via 200.1.3.1, 00:04:45, 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
O E2  200.1.2.0/24 [110/20] via 200.1.3.1, 00:04:45, GigabitEthernet0/0
      200.1.3.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.1.3.0/24 is directly connected, GigabitEthernet0/0
L        200.1.3.3/32 is directly connected, GigabitEthernet0/0
O E2  200.1.7.0/24 [110/20] via 200.1.3.1, 00:04:45, GigabitEthernet0/0
O E2  200.1.9.0/24 [110/20] via 200.1.3.1, 00:04:45, GigabitEthernet0/0
      222.1.1.0/32 is subnetted, 1 subnets
O E2     222.1.1.1 [110/20] via 200.1.3.1, 00:04:47, GigabitEthernet0/0
n3#

همسایگی ISIS بین سودار و cisco

تنظیمات ISIS در روتر سودار

!
debug isis events
!
interface lo
 no ip address
exit
!
interface ge0
 no shutdown
 ip address 200.1.2.1/24
exit
!
interface ge1
 no shutdown
 ip address 200.1.3.1/24
exit
!
interface ge2
 no shutdown
 ip address 1.1.1.1/24
exit
!
interface ge3
 no shutdown
 ip address 200.1.7.1/24
 ip router isis test
exit
!
interface loopback100
 no shutdown
 ip address 222.1.1.1/32
exit
!
router isis test
 net 47.0023.1111.1111.00
 metric-style transition
 redistribute ipv4 connected level-1
 redistribute ipv4 connected level-2
 redistribute ipv4 ospf level-1
 redistribute ipv4 ospf level-2
 redistribute ipv4 rip level-1
 redistribute ipv4 rip level-2
exit
!
end

تنظیمات ISIS در روتر cisco

interface Loopback100
 ip address 222.7.7.7 255.255.255.255
 !
!
interface Ethernet0/0
 no ip address
 shutdown
 duplex auto
 !
!
interface GigabitEthernet0/0
 ip address 200.1.7.7 255.255.255.0
 ip router isis test
 duplex full
 speed 1000
 media-type gbic
 negotiation auto
 !
!         
interface GigabitEthernet1/0
 ip address 7.1.1.1 255.255.255.0
 negotiation auto
 !        
!               
!         
!         
router isis test
 net 47.0023.7777.7777.00
 lsp-mtu 1000
 redistribute connected
!   

نکته

در تنظیم isis یک گزینه به نام metric-style وجود دارد که برای محاسبه متریک لینک ها استفاده می شود که سه حالت برای آن وجود دارد narrow , transition و wide . در soodar به صورت پیش فرض در حالت wide قرار دارد اما در سیسکو در حالت narrow . باید این تنظیم در دو طرف یکسان باشد یا در یک طرف transition باشد تا route ها تبادل گردد .

بررسی همسایگی در سودار و در سیسکو

سودار :

n1# sh isis neighbor 
Area test:
  System Id           Interface   L  State        Holdtime SNPA
 n7                  ge3         1  Up            8        ca03.c2db.0008
 n7                  ge3         2  Up            7        ca03.c2db.0008
n1# 

n1# 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, W - WG,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 1.1.1.0/24 is directly connected, ge2, 01:55:21
R>* 2.0.0.0/8 [120/2] via 200.1.2.2, ge0, weight 1, 00:42:24
O>* 3.1.1.0/24 [110/101] via 200.1.3.3, ge1, weight 1, 00:14:52
I>* 7.1.1.0/24 [115/10] via 200.1.7.7, ge3, weight 1, 01:54:56
B>* 9.1.1.0/24 [20/0] via 200.1.9.9, ge4, weight 1, 01:28:21
C>* 200.1.2.0/24 is directly connected, ge0, 01:55:21
C>* 200.1.3.0/24 is directly connected, ge1, 01:55:21
C>* 200.1.7.0/24 is directly connected, ge3, 01:55:21
C>* 200.1.9.0/24 is directly connected, ge4, 01:55:21
C>* 222.1.1.1/32 is directly connected, loopback100, 01:55:27
I>* 222.7.7.7/32 [115/10] via 200.1.7.7, ge3, weight 1, 01:54:56
B>* 222.9.9.9/32 [20/0] via 200.1.9.9, ge4, weight 1, 01:28:21
n1# 

سیسکو:

n7#sh isis neighbors 

System Id      Type Interface   IP Address      State Holdtime Circuit Id
n1             L1   Gi0/0       200.1.7.1       UP    29       n7.01              
n1             L2   Gi0/0       200.1.7.1       UP    28       n7.01              
n7#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 200.1.7.1 to network 0.0.0.0

i*L1  0.0.0.0/0 [115/10] via 200.1.7.1, GigabitEthernet0/0
      1.0.0.0/24 is subnetted, 1 subnets
i L1     1.1.1.0 [115/10] via 200.1.7.1, GigabitEthernet0/0
i L1  2.0.0.0/8 [115/10] via 200.1.7.1, GigabitEthernet0/0
      3.0.0.0/24 is subnetted, 1 subnets
i L1     3.1.1.0 [115/10] via 200.1.7.1, GigabitEthernet0/0
      7.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        7.1.1.0/24 is directly connected, GigabitEthernet1/0
L        7.1.1.1/32 is directly connected, GigabitEthernet1/0
i L1  200.1.2.0/24 [115/10] via 200.1.7.1, GigabitEthernet0/0
i L1  200.1.3.0/24 [115/10] via 200.1.7.1, GigabitEthernet0/0
      200.1.7.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.1.7.0/24 is directly connected, GigabitEthernet0/0
L        200.1.7.7/32 is directly connected, GigabitEthernet0/0
i L1  200.1.9.0/24 [115/10] via 200.1.7.1, GigabitEthernet0/0
      222.1.1.0/32 is subnetted, 1 subnets
i L1     222.1.1.1 [115/10] via 200.1.7.1, GigabitEthernet0/0
      222.7.7.0/32 is subnetted, 1 subnets
C        222.7.7.7 is directly connected, Loopback100
n7#

همسایگی BGP بین سودار و cisco

تنظیمات BGP در روتر سودار

interface ge4
 no shutdown
 ip address 200.1.9.1/24
exit
!
router bgp 65001
 no bgp ebgp-requires-policy
 neighbor 200.1.9.9 remote-as 65002
 !
 address-family ipv4 unicast
  redistribute connected
  redistribute rip
  redistribute ospf
  redistribute isis
 exit-address-family
exit
!

تنظیمات BGP در روتر cisco

interface GigabitEthernet0/0
 ip address 200.1.9.9 255.255.255.0
 duplex full
 speed 1000
 media-type gbic
 negotiation auto
 !        
!
interface GigabitEthernet1/0
 ip address 9.1.1.1 255.255.255.0
 negotiation auto
 !
!
!
router bgp 65002
 bgp log-neighbor-changes
 neighbor 200.1.9.1 remote-as 65001
 !
 address-family ipv4
  no synchronization
  redistribute connected
  neighbor 200.1.9.1 activate
  no auto-summary
 exit-address-family
!

بررسی همسایگی در سودار و در سیسکو

سودار:

n1# sh ip bgp summary 

IPv4 Unicast Summary (VRF default):
BGP router identifier 222.1.1.1, local AS number 65001 vrf-id 0
BGP table version 37
RIB entries 23, using 4232 bytes of memory
Peers 1, using 723 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down Sta
te/PfxRcd   PfxSnt Desc
200.1.9.9       4      65002       155       171        0    0    0 00:05:54    
        3       12 N/A

Total number of neighbors 1
n1# 
n1# 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, W - WG,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 1.1.1.0/24 is directly connected, ge2, 02:09:13
R>* 2.0.0.0/8 [120/2] via 200.1.2.2, ge0, weight 1, 00:56:16
O>* 3.1.1.0/24 [110/101] via 200.1.3.3, ge1, weight 1, 00:28:44
I>* 7.1.1.0/24 [115/10] via 200.1.7.7, ge3, weight 1, 02:08:48
B>* 9.1.1.0/24 [20/0] via 200.1.9.9, ge4, weight 1, 00:07:15
C>* 200.1.2.0/24 is directly connected, ge0, 02:09:13
C>* 200.1.3.0/24 is directly connected, ge1, 02:09:13
C>* 200.1.7.0/24 is directly connected, ge3, 02:09:13
C>* 200.1.9.0/24 is directly connected, ge4, 02:09:13
C>* 222.1.1.1/32 is directly connected, loopback100, 02:09:19
I>* 222.7.7.7/32 [115/10] via 200.1.7.7, ge3, weight 1, 02:08:48
B>* 222.9.9.9/32 [20/0] via 200.1.9.9, ge4, weight 1, 00:07:15
n1# 

‍‍‍ سیسکو:


n9# sh ip bgp summary 
BGP router identifier 222.9.9.9, local AS number 65002
BGP table version is 59, main routing table version 59
12 network entries using 1440 bytes of memory
13 path entries using 676 bytes of memory
5/5 BGP path/bestpath attribute entries using 620 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2760 total bytes of memory
BGP activity 30/18 prefixes, 37/24 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
200.1.9.1       4        65001      18      11       59    0    0 00:06:16       10
n9#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
B        1.1.1.0 [20/0] via 200.1.9.1, 00:07:49
B     2.0.0.0/8 [20/2] via 200.1.9.1, 00:07:49
      3.0.0.0/24 is subnetted, 1 subnets
B        3.1.1.0 [20/101] via 200.1.9.1, 00:07:49
      7.0.0.0/24 is subnetted, 1 subnets
B        7.1.1.0 [20/10] via 200.1.9.1, 00:07:49
      9.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        9.1.1.0/24 is directly connected, GigabitEthernet1/0
L        9.1.1.1/32 is directly connected, GigabitEthernet1/0
B     200.1.2.0/24 [20/0] via 200.1.9.1, 00:07:49
B     200.1.3.0/24 [20/0] via 200.1.9.1, 00:07:49
B     200.1.7.0/24 [20/0] via 200.1.9.1, 00:07:49
      200.1.9.0/24 is variably subnetted, 2 subnets, 2 masks
C        200.1.9.0/24 is directly connected, GigabitEthernet0/0
L        200.1.9.9/32 is directly connected, GigabitEthernet0/0
      222.1.1.0/32 is subnetted, 1 subnets
B        222.1.1.1 [20/0] via 200.1.9.1, 00:07:51
      222.7.7.0/32 is subnetted, 1 subnets
B        222.7.7.7 [20/10] via 200.1.9.1, 00:07:51
      222.9.9.0/32 is subnetted, 1 subnets
C        222.9.9.9 is directly connected, Loopback100
n9#