www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / 101 CCNP Labs Solutions / CCNP Lab 055 Solution: Cisco Policy Based Routing Lab

CCNP Lab 055 Solution: Cisco Policy Based Routing Lab

Lab Objective:

The focus of this lab is to understand Cisco Policy Based Routing (PBR) implementation and configuration in Cisco IOS routers. Additional technologies include traffic filtering.

Lab Topology:

The lab network topology is illustrated below:

department655

 

IMPORTANT NOTE

If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no
Switches, you can bring up the LAN interfaces using the following configurations on your routers:

interface fastethernet 0/0
no keepalive
loopback
no shutdown

Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab.

 

Task 1

Configure hostnames, IP addressing on all routers as illustrated in the network topology.

Task 2

Enable EIGRP using AS 254 on all routers as illustrated in the topology. Do NOT enable EIGRP on the link between R2 and R3. EIGRP packets should NOT be sent out of the LAN interfaces of R2 or R3. Verify the configuration using the appropriate commands.

Task 3

Management is concerned about network security and using the default Telnet port of 23. All routers are configured to accept Telnet connections on port 3023 instead as a result. Management would like to ensure that all Telnet traffic received ingressing R1s LAN interface be discarded. However, Telnet traffic using port 3023 should be forwarded via Serial 0/1 with an IP Precedence value of 4. You are NOT allowed to use inbound or bound ACLs to complete this task – you MUST use PBR. Implement the solution required to complete this task on R1 and verify and test your configuration.

Task 4

For security purposes, Management has requested that locally originated Telnet connections from R2 or R3 to R4 only be discarded. However, these routers should be able to Telnet to other devices or subnets. You are NOT allowed to use inbound or outbound ACLs to complete this task – you MUST use PBR. Implement the solution required to complete this task on both R2 and R3 then verify and test your configuration.

Lab Validation

Task 1

Please refer to previous labs for basic IPv4, IPv6 addressing and hostname configuration. This will not be included in this section to avoid being redundant.

Task 2

Please refer to previous labs for basic EIGRP configuration. Following this, verify your EIGRP configuration using the show ip eigrp neighbors andshow ip route commands. Following this configuration, your route tables should show the following path information:

R1#show ip route eigrp
150.2.0.0/24 is subnetted, 1 subnets
D 150.2.2.0 [90/2172416] via 10.0.0.2, 01:38:15, Serial0/0
150.3.0.0/24 is subnetted, 1 subnets
D 150.3.3.0 [90/2172416] via 10.0.0.6, 00:07:58, Serial0/1
R2#show ip route eigrp
10.0.0.0/30 is subnetted, 3 subnets
D 10.0.0.4 [90/2681856] via 10.0.0.1, 00:08:11, Serial0/0
150.1.0.0/24 is subnetted, 1 subnets
D 150.1.1.0 [90/2172416] via 10.0.0.1, 01:38:28, Serial0/0
150.3.0.0/24 is subnetted, 1 subnets
D 150.3.3.0 [90/2684416] via 10.0.0.1, 00:08:11, Serial0/0
R3#show ip route eigrp
10.0.0.0/30 is subnetted, 3 subnets
D 10.0.0.0 [90/21024000] via 10.0.0.5, 00:08:15, Serial1/0
150.1.0.0/24 is subnetted, 1 subnets
D 150.1.1.0 [90/20514560] via 10.0.0.5, 00:08:15, Serial1/0
150.2.0.0/24 is subnetted, 1 subnets
D 150.2.2.0 [90/21026560] via 10.0.0.5, 00:08:15, Serial1/0
R4#show ip route eigrp
10.0.0.0/30 is subnetted, 2 subnets
D 10.0.0.0 [90/2172416] via 150.1.1.1, 01:36:10, FastEthernet0/0
D 10.0.0.4 [90/2172416] via 150.1.1.1, 00:08:19, FastEthernet0/0
150.2.0.0/24 is subnetted, 1 subnets
D 150.2.2.0 [90/2174976] via 150.1.1.1, 01:36:10, FastEthernet0/0
150.3.0.0/24 is subnetted, 1 subnets
D 150.3.3.0 [90/2174976] via 150.1.1.1, 00:08:18, FastEthernet0/0

 

Task 3

The requirements of this task are quite straightforward. First, an ACL is required to match the Telnet traffic (port 23). This should be forwarded to the Null0 interface, which is a bit bucket. All traffic sent to the Null0 interface is discarded.

The second requirement is that Telnet traffic using port 3023 should be forwarded via Serial 0/1 with an IP Precedence value of 4. This task is completed as follows:

R1(config)#access-list 100 permit tcp any any eq telnet
R1(config)#access-list 101 permit tcp any any eq 3023
R1(config)#route-map LAN-PBR permit 10
R1(config-route-map)#match ip address 100
R1(config-route-map)#set interface null0
%Warning:Use P2P interface for routemap set
interface clause

R1(config-route-map)#exit
R1(config)#route-map LAN-PBR permit 20
R1(config-route-map)#match ip address 101
R1(config-route-map)#set ip precedence 4
R1(config-route-map)#set interface serial 0/1
R1(config-route-map)#exit
R1(config)#route-map LAN-PBR deny 30
R1(config-route-map)#exit
R1(config)#interface fastethernet 0/0
R1(config-if)#ip policy route-map LAN-PBR
R1(config-if)#exit

Next, verify your route map configuration using the show route-map <name> command:

R1#show route-map LAN-PBR
route-map LAN-PBR, permit, sequence 10
Match clauses:
ip address (access-lists): 100
Set clauses:
interface Null0
Policy routing matches: 0 packets, 0 bytes

route-map LAN-PBR, permit, sequence 20
Match clauses:
ip address (access-lists): 101
Set clauses:
ip precedence flash-override
interface Serial0/1
Policy routing matches: 0 packets, 0 bytes

route-map LAN-PBR, deny, sequence 30
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes

Following this, test your configuration by attempting to Telnet from R4 to either R2 or R3 using first the default standard port number (23) and then the custom port number (3023). To configure Cisco IOS routers to accept connections on port xx23, e.g. 1023, 2023, 3023, 4023, etc, you simply add the rotary 23 command under the VTY configuration as follows:

R2(config)#line vty 0 4
R2(config-line)#rotary 23
R2(config-line)#exit

You can then use the show line vty <line number> command to verify the configuration:

R2#show line vty 0
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
66 VTY – – 23 – – 0 0 0/0 –

Line 66, Location: “”, Type: “”
Length: 24 lines, Width: 80 columns
Baud rate (TX/RX) is 9600/9600
Status: No Exit Banner
Capabilities: none
Modem state: Idle
Group codes: 0
Special Chars: Escape Hold Stop Start Disconnect Activation
^^x none – – none
Timeouts: Idle EXEC Idle Session Modem Answer Session Dispatch
00:10:00 never none not set
Idle Session Disconnect Warning
never
Login-sequence User Response
00:00:30
Autoselect Initial Wait
not set
Modem type is unknown.
Session limit is not set.
Time since activation: never
Editing is enabled.
History is enabled, history size is 20.
DNS resolution in show commands is enabled
Full user help is disabled
Allowed input transports are lat pad telnet rlogin mop v120 ssh.
Allowed output transports are lat pad telnet rlogin mop v120 ssh.
Preferred transport is lat.
No output characters are padded
No special data dispatching characters

Next, test your configuration by attempting to first Telnet from R4 to either R2 or R3 while you are running PBR debugging:

R4#telnet 10.0.0.6
Trying 10.0.0.6 …
% Connection timed out; remote host not responding

 

R1#debug ip policy
Policy routing debugging is on
R1#
R1#
R1#
*Jun 3 01:49:36.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 44, FIB policy match
*Jun 3 01:49:36.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Null0), len 44, FIB policy routed(drop)
*Jun 3 01:49:38.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 44, FIB policy match
*Jun 3 01:49:38.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Null0), len 44, FIB policy routed(drop)
*Jun 3 01:49:42.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 44, FIB policy match
*Jun 3 01:49:42.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Null0), len 44, FIB policy routed(drop)
*Jun 3 01:49:50.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 44, FIB policy match
*Jun 3 01:49:50.646: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Null0), len 44, FIB policy routed(drop)

Notice that in the output above the traffic is policy routed; however, because it is routed to the Null0 interface, the traffic is essentially dropped, hence the drop in parenthesis (brackets).

Next, initiate a Telnet connection from R4 to R2 or R3, this time using TCP port 3023 instead:

R4#telnet 10.0.0.6 3023
Trying 10.0.0.6, 3023 … Open

 

Password required, but none set

R1#debug ip policy
Policy routing debugging is on
R1#
R1#
R1#
*Jun 3 01:47:44.138: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 44, FIB policy match
*Jun 3 01:47:44.138: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Serial0/1), len 44, FIB policy routed
*Jun 3 01:47:44.150: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 40, FIB policy match
*Jun 3 01:47:44.150: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Serial0/1), len 40, FIB policy routed
*Jun 3 01:47:44.154: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 40, FIB policy match
*Jun 3 01:47:44.154: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Serial0/1), len 40, FIB policy routed
*Jun 3 01:47:44.170: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 43, FIB policy match
*Jun 3 01:47:44.170: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Serial0/1), len 43, FIB policy routed
*Jun 3 01:47:44.170: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6, len 43, FIB policy match
*Jun 3 01:47:44.170: IP: s=150.1.1.4 (FastEthernet0/0), d=10.0.0.6 (Serial0/1), len 43, FIB policy routed

 

Task 4

To complete this task, the PBR configuration must be applied globally using the ip local policy <route-map-name> global configuration command, otherwise it will not match traffic originated by the router. This task is completed as follows:

R2(config)#ip access-list extended NO-TELNET-TO-R4-ONLY
R2(config-ext-nacl)#permit tcp any host 150.1.1.4 eq 23
R2(config-ext-nacl)#exit
R2(config)#route-map LOCAL-PBR-POLICY permit 10
R2(config-route-map)#match ip address NO-TELNET-TO-R4-ONLY
R2(config-route-map)#set interface null 0
%Warning:Use P2P interface for routemap set
interface clause

R2(config-route-map)#exit
R2(config)#route-map LOCAL-PBR-POLICY deny 20
R2(config-route-map)#exit
R2(config)#ip local policy route-map LOCAL-PBR-POLICY
R2(config)#exit

R3(config)#ip access-list extended NO-TELNET-TO-R4-ONLY
R3(config-ext-nacl)#permit tcp any host 150.1.1.4 eq telnet
R3(config-ext-nacl)#exit
R3(config)#route-map LOCAL-PBR-POLICY permit 10
R3(config-route-map)#match ip address NO-TELNET-TO-R4-ONLY
R3(config-route-map)#set interface null 0
%Warning:Use P2P interface for routemap set
interface clause

R3(config-route-map)#exit
R3(config)#route-map LOCAL-PBR-POLICY deny 20
R3(config-route-map)#exit
R3(config)#ip local policy route-map LOCAL-PBR-POLICY
R3(config)#exit

Next, verify your route map configuration using the show route-map <name> command:

R2#show route-map LOCAL-PBR-POLICY
route-map LOCAL-PBR-POLICY, permit, sequence 10
Match clauses:
ip address (access-lists): NO-TELNET-TO-R4-ONLY
Set clauses:
interface Null0
Policy routing matches: 0 packets, 0 bytes

route-map LOCAL-PBR-POLICY, deny, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes

R3#show route-map LOCAL-PBR-POLICY
route-map LOCAL-PBR-POLICY, permit, sequence 10
Match clauses:
ip address (access-lists): NO-TELNET-TO-R4-ONLY
Set clauses:
interface Null0
Policy routing matches: 0 packets, 0 bytes

route-map LOCAL-PBR-POLICY, deny, sequence 20
Match clauses:
Set clauses:
Policy routing matches: 0 packets, 0 bytes

Finally, test your solution by attempting to Telnet from R2 or R3 to R4 using the standard TCP port number (23). Use the debug ip policy command to view PBR operation real-time:

R2#debug ip policy
Policy routing debugging is on
R2#
R2#
R2#
R2#telnet 150.1.1.4
Trying 150.1.1.4 …

*May 17 08:26:14.323: IP: route map LOCAL-PBR-POLICY, item 10, permit
*May 17 08:26:14.327: IP: s=10.0.0.2 (local), d=150.1.1.4 (Null0), len 44, policy routed
*May 17 08:26:14.327: IP: local to Null0 150.1.1.4
*May 17 08:26:16.327: IP: s=10.0.0.2 (local), d=150.1.1.4, len 44, policy match
*May 17 08:26:16.327: IP: route map LOCAL-PBR-POLICY, item 10, permit
*May 17 08:26:16.327: IP: s=10.0.0.2 (local), d=150.1.1.4 (Null0), len 44, policy routed
*May 17 08:26:16.327: IP: local to Null0 150.1.1.4
*May 17 08:26:20.327: IP: s=10.0.0.2 (local), d=150.1.1.4, len 44, policy match
*May 17 08:26:20.327: IP: route map LOCAL-PBR-POLICY, item 10, permit
*May 17 08:26:20.327: IP: s=10.0.0.2 (local), d=150.1.1.4 (Null0), len 44, policy routed
*May 17 08:26:20.327: IP: local to Null0 150.1.1.4
*May 17 08:26:28.327: IP: s=10.0.0.2 (local), d=150.1.1.4, len 44, policy match
*May 17 08:26:28.327: IP: route map LOCAL-PBR-POLICY, item 10, permit
*May 17 08:26:28.327: IP: s=10.0.0.2 (local), d=150.1.1.4 (Null0), len 44, policy routed
*May 17 08:26:28.327: IP: local to Null0 150.1.1.4

% Connection timed out; remote host not responding

Next, attempt to Telnet to R4 using any other port number, for example, using TCP port 3023:

R2#telnet 150.1.1.4 3023
Trying 150.1.1.4, 3023 … Open

 

Password required, but none set

*May 17 08:28:09.635: IP: s=10.0.0.2 (local), d=150.1.1.4, len 44, policy match
*May 17 08:28:09.635: IP: route map LOCAL-PBR-POLICY, item 20, deny
*May 17 08:28:09.635: IP: s=10.0.0.2 (local), d=150.1.1.4, len 44, policy rejected — normal forwarding
*May 17 08:28:09.639: IP: s=10.0.0.2 (local), d=150.1.1.4, len 40, policy match
*May 17 08:28:09.643: IP: route map LOCAL-PBR-POLICY, item 20, deny
*May 17 08:28:09.643: IP: s=10.0.0.2 (local), d=150.1.1.4, len 40, policy rejected — normal forwarding
*May 17 08:28:09.643: IP: s=10.0.0.2 (local), d=150.1.1.4, len 40, policy match
*May 17 08:28:09.647: IP: route map LOCAL-PBR-POLICY, item 20, deny
*May 17 08:28:09.647: IP: s=10.0.0.2 (local), d=150.1.1.4, len 40, policy rejected — normal forwarding
*May 17 08:28:09.651: IP: s=10.0.0.2 (local), d=150.1.1.4, len 43, policy match
*May 17 08:28:09.651: IP: route map LOCAL-PBR-POLICY, item 20, deny
*May 17 08:28:09.651: IP: s=10.0.0.2 (local), d=150.1.1.4, len 43, policy rejected — normal forwarding

[Connection to 150.1.1.4 closed by foreign host]

 

Final Router Configurations

R1

 

R1#term len 0
R1#sh run
Building configuration…

Current configuration : 1320 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
track 1 list boolean and
object 2 not
!
!
!
!
!
interface FastEthernet0/0
ip address 150.1.1.1 255.255.255.0
ip policy route-map LAN-PBR
duplex auto
speed auto
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.252
clock rate 2000000
!
interface Serial0/1
ip address 10.0.0.5 255.255.255.252
!
router eigrp 254
network 10.0.0.1 0.0.0.0
network 10.0.0.5 0.0.0.0
network 150.1.1.1 0.0.0.0
no auto-summary
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 100 permit tcp any any eq telnet
access-list 101 permit tcp any any eq 3023
!
route-map LAN-PBR permit 10
match ip address 100
set interface Null0
!
route-map LAN-PBR permit 20
match ip address 101
set ip precedence flash-override
set interface Serial0/1
!
route-map LAN-PBR deny 30
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
rotary 23
!
!
end

R1#

R2

 

R2#term len 0
R2#sh run
Building configuration…

Current configuration : 1187 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.2.2.2 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.252
!
interface Serial0/1
ip address 10.0.0.9 255.255.255.252
!
router eigrp 254
passive-interface FastEthernet0/0
network 10.0.0.2 0.0.0.0
network 150.2.2.2 0.0.0.0
no auto-summary
!
ip local policy route-map LOCAL-PBR-POLICY
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ip access-list extended NO-TELNET-TO-R4-ONLY
permit tcp any host 150.1.1.4 eq telnet
!
!
route-map LOCAL-PBR-POLICY permit 10
match ip address NO-TELNET-TO-R4-ONLY
set interface Null0
!
route-map LOCAL-PBR-POLICY deny 20
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
rotary 23
!
!
end

R2#

R3

 

R3#term len 0
R3#sh run
Building configuration…

Current configuration : 1546 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.3.3.3 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 10.0.0.6 255.255.255.252
clock rate 128000
!
interface Serial1/1
ip address 10.0.0.10 255.255.255.252
clock rate 128000
!
interface Serial1/2
no ip address
shutdown
clock rate 128000
!
interface Serial1/3
no ip address
shutdown
!
interface Serial1/4
no ip address
shutdown
!
interface Serial1/5
no ip address
shutdown
!
interface Serial1/6
no ip address
shutdown
!
interface Serial1/7
no ip address
shutdown
!
router eigrp 254
passive-interface FastEthernet0/0
network 10.0.0.6 0.0.0.0
network 150.3.3.3 0.0.0.0
no auto-summary
!
ip local policy route-map LOCAL-PBR-POLICY
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ip access-list extended NO-TELNET-TO-R4-ONLY
permit tcp any host 150.1.1.4 eq telnet
!
!
route-map LOCAL-PBR-POLICY permit 10
match ip address NO-TELNET-TO-R4-ONLY
set interface Null0
!
route-map LOCAL-PBR-POLICY deny 20
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
rotary 23
!
!
end

R3#

R4

 

R4#term len 0
R4#sh run
Building configuration…

Current configuration : 854 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R4
!
boot-start-marker
boot-end-marker
!
no logging console
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 150.1.1.4 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
no ip address
shutdown
!
interface Serial0/1
no ip address
shutdown
!
router eigrp 254
network 150.1.1.4 0.0.0.0
no auto-summary
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
rotary 23
!
!
end

R4#

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.