PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:network:cisco:routing:route-map:route-map

Cisco: route-map

My Learning topics result may not be accurate because of my misunderstanding!!!!

I STRONGLY RECOMMENDED to read the Official Documents(cisco.com a.k.a. CCO) and RFCs, any other books, sites.

And learn foundation, create lab yourself, configure, and verify any topics.

TODO

  1. lab 1 route-map redistribute: essential
  2. lab 1 filter by ACL redistribute:
  3. lab 2 complex route-map redistribute lab 2
  4. lab 3 route-map distribute-list: OSPF inbound filtering with route tag
  5. lab 4 route-map distribute-list: EIGRP with route tag
  6. lab 5 route-map distribute-list: EIGRP with route tag
  7. Capture Packet and observe tag

Topology route-map redistribute lab 638a2c73-65de-42bd-a227-45db1ac87e53

Lab Specification

  1. Environment: CML-P 2.0
  2. Route Redistribution
  3. IGP: EIGRP, OSPF

Base Configuration

Common Configuration Snippet

R1

R2

R3

Lab1 Configuring route-map redistribute 4883eb2e-6155-41d2-a97d-c52ef3c47516

  • R2
configure terminal
!
access-list 1 deny 10.0.4.0 0.0.3.255
access-list 1 permit any
!
route-map RMAP_EIGRP_TO_OSPF permit 10
 match ip address 1
!
router eigrp 1
 ! redistribute from ospf to eigrp
 redistribute ospf 1
router ospf 1
 redistribute eigrp 1 subnets route-map RMAP_EIGRP_TO_OSPF
!
end

following distribute-list gets same route filtering result.

  • R2
configure terminal
!
access-list 1 deny 10.0.4.0 0.0.3.255
access-list 1 permit any
!
router eigrp 1
 ! redistribute from ospf to eigrp
 redistribute ospf 1
router ospf 1
 redistribute eigrp 1 subnets
 distribute-list 1 out eigrp 1
!
end

R1 Console Log

R2 Console Log

R3 Console Log

Lab2 Configuring route-map redistribute 2 3e4760cb-d198-456f-9387-42587c12ca95

Requirements

  1. 10.0.3.0/24 OSPF Metric Type 1 (E1)
  2. 10.0.5.0/24 OSPF Metric 100
  3. Rest of routes default redistribution.

Configuration

  • R2
configure terminal
!
ip prefix-list PRE_METRIC_TYPE permit 10.0.3.0/24
ip prefix-list PRE_METRIC permit 10.0.5.0/24
!
route-map RMAP_EIGRP_TO_OSPF permit 10
 match ip address prefix-list PRE_METRIC_TYPE
 set metric-type type-1
route-map RMAP_EIGRP_TO_OSPF permit 20
 match ip address prefix-list PRE_METRIC
 set metric 100
route-map RMAP_EIGRP_TO_OSPF permit 30
!
router eigrp 1
 ! redistribute from ospf to eigrp
 redistribute ospf 1
router ospf 1
 redistribute eigrp 1 subnets route-map RMAP_EIGRP_TO_OSPF
!
end

Verification

Topology route-map distribute-list route tag lab 4667c313-09ff-4150-a705-e283d90d93f0

Lab Specification

  1. Environment: CML-P 2.0
  2. route-map, Route Redistribution, distribute-list
  3. Routing Protocol
    1. EIGRP
    2. OSPF
  4. 5 routers

Base Configuration

Common Configuration Snippet

R1

R2

R3

R4

R5

Configure route-map tag route filtering OSPF

  • R3
configure terminal
!
ip prefix-list PRE_REDISTRIBUTE_EIGRP_TO_OSPF permit 10.0.3.0/24
ip prefix-list PRE_REDISTRIBUTE_EIGRP_TO_OSPF permit 10.128.5.0/24
!
route-map RMAP_OSPF_REDISTRIBUTE_TAG permit 10
 match ip address prefix-list PRE_REDISTRIBUTE_EIGRP_TO_OSPF
 set tag 1010
route-map RMAP_OSPF_REDISTRIBUTE_TAG permit 20
!
router ospf 1
 redistribute eigrp 1 subnets route-map RMAP_OSPF_REDISTRIBUTE_TAG
!
end
  • R5
configure terminal
!
route-map RMAP_OSPF_INBOUND_TAG deny 10
 match tag 1010
route-map RMAP_OSPF_INBOUND_TAG permit 20
!
router ospf 1
 distribute-list route-map RMAP_OSPF_INBOUND_TAG in
!
end

Verification

show ip prefix-list
show route-map
show ip route ospf
show ip route 10.0.1.0
show ip route 10.0.3.0
show ip route 10.128.5.0
show ip route 10.128.4.0
show ip ospf database
show ip ospf database external
ping 10.0.1.1
ping 10.0.3.1
ping 10.128.4.2
ping 10.128.5.2

Configure route-map tag route filtering EIGRP

  • R1
configure terminal
!
ip prefix-list PRE_DISTRIBUTE_EIGRP permit 10.0.2.0/24
ip prefix-list PRE_DISTRIBUTE_EIGRP permit 10.0.4.0/24
!
route-map RMAP_EIGRP_DISTRIBUTE_TAG permit 10
 match ip address prefix-list PRE_DISTRIBUTE_EIGRP
 set tag 1212
route-map RMAP_EIGRP_DISTRIBUTE_TAG permit 20
!
router eigrp 1
 distribute-list route-map RMAP_EIGRP_DISTRIBUTE_TAG out
!
end
  • R2
configure terminal
!
route-map RMAP_EIGRP_DISTRIBUTE_TAG deny 10
 match tag 1212
route-map RMAP_EIGRP_DISTRIBUTE_TAG permit 20
!
router eigrp 1
 distribute-list route-map RMAP_EIGRP_DISTRIBUTE_TAG out
!
end

Verification

show ip prefix-list
show route-map
show ip route eigrp
show ip route 10.0.1.0
show ip route 10.0.2.0
show ip route 10.0.3.0
show ip route 10.0.4.0
show ip route 10.128.1.0
show ip route 10.128.2.0
show ip eigrp topology
ping 10.0.1.1
ping 10.0.2.1

Overall Console Log

R1 Console Log

R2 Console Log

R3 Console Log

R4 Console Log

R5 Console Log

Now define lab state id 084ed28b-403f-44ec-a883-235b3273ef49.

Capture Packets

hmm…. this default behavior not acceptable…

CML-P Packet Capture Log

start capture

Login to cockpit.

https://cml-controller.pg1x.net:9090/

start openssh service. It listen on port 1122/tcp.

Logout cockpit terminal

I want to login CML over SSH because copy and paste commands, password for convenience.

SSH to CML 2.0 port 1122/tcp.

[lasthope@cml-controller ~]$ sudo -E -s
[sudo] password for lasthope:
[root@cml-controller lasthope]# ls -l /var/tmp/
total 4
drwx------. 3 root  root    17 Jul 21 22:04 systemd-private-e0d2806cf62a4aec843a079c99ca68f5-chronyd.service-LZkreZ
drwx------. 3 root  root    17 Jul 21 22:04 systemd-private-e0d2806cf62a4aec843a079c99ca68f5-nginx.service-d0x1cV
drwx------. 3 root  root    17 Jul 21 22:17 systemd-private-e0d2806cf62a4aec843a079c99ca68f5-timedatex.service-Gc74sK
-rw-------. 1 virl2 virl2 1268 Jul 23 08:18 wireshark_-_20200723081835_uxIfL5.pcapng

on Windows

cmd

then

"%PROGRAMFILES(x86)%\Nmap\ncat.exe" -l 20000 | "%PROGRAMFILES%\Wireshark\Wireshark.exe" -ki -

open port 20000/tcp

on CML 2.0

sudo tail -f /var/tmp/wireshark_-_20200723081835_uxIfL5.pcapng -n +1 | nc 10.0.255.8 20000

hmm… not working… stop try to live capture, then, I manually copy pcapng file and download by SCP…

Wireshark display filter expression

ospf.lsa.asext

Wireshark Packet Capture Result on R4 Ge0/0 - R5 Ge0/1

eigrp

Wireshark Packet Capture Result on R1 Ge0/0 - R2 Ge0/1

References

tech/network/cisco/routing/route-map/route-map.txt · Last modified: 2020/08/11 11:25 by wnoguchi