cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

hardware:cisco:vrf.html



Cisco VRF Configuration Examples

About VRF


VRFs are like VLANs for routers, instead of using a single global routing table we can use multiple virtual routing tables.
Each interface of the router is assigned to a different VRF.
VRFs are commonly used for MPLS deployments, when we use VRFs without MPLS then we call it VRF lite.

VRF Lite Configuration on Cisco IOS


Cisco VRF Image

Cisco VRF Image


Cisco VRF Commands

Operation Commands
Check vrf
(Name, Default RD, Interfaces)
Router# sh vrf
Router# show vrf
Router# show vrf detail
Check vrf
(Name, Default RD, Protocols, Interfaces)
Router# sh ip vrf
Router# show ip vrf
Check VRF Protocol is up/down Router# show ip vrf interfaces VRFNAME
Check ip routing Router# show ip route vrf VRFNAME
Check Ping Router# ping vrf VRFNAME DESTINATION
Router# ping vrf VRFNAME 192.168.10.5
Router# ping vrf VRFNAME 192.168.10.5 source vlan 10
Check Traceroute Router#traceroute vrf VRFNAME DESTINATION
Router#traceroute vrf VRFNAME 192.168.0.100
telnet with vrf telnet x.x.x.x /vrf VRFNAME
ssh with vrf ssh -l USER -v 2 -vrf VRFNAME x.x.x.x
ssh -l root -v 2 -vrf VRF-test 192.168.0.100
Check BGP with VRF Router# show ip protocols vrf VRFNAME
router# show bgp vrf XXX all summary
Multicast Router# show ip mroute vrf XXXX
Router# show ip igmp vrf XXXX membership
Router# show ip pim vrf XXXX rp


Setting

Definition of VRF Interface

RD(Route Distinguisher) is VRF identifier.

xx:yy. In xx, AS number is often used. Sometimes there is an IP address.

Router(config)# ip vrf CustomerA
Router(config-vrf)# rd 1:100

Router(config-vrf)# exit
Router#show ip vrf


Apply VRF to Interface

Router(config)# interface GigabitEthernet 0/0
Router(config-if)# ip vrf forwarding CustomerA
Router(config-if)# ip address 192.168.1.254
Router(config)# interface Vlan100
Router(config-if)# ip vrf forwarding CustomerA
Router(config-if)# ip address 192.168.1.254


Apply Routing to VRF

Static Route

Router(config)# ip route vrf CustomerA 10.1.1.0 255.255.255.0 192.168.1.1


BGP

Router(config)#router bgp <local_as>
Router(config-router)#address-family ipv4 vrf <vrf_name>
Router(config-router-af)# neighbor <remote_addr> remote <remote_as>
Example
router bgp 10000
 address-family ipv4 vrf VRF-1
 neighbor 10.10.0.2 remote-as 10002
 neighbor 10.10.0.2 activate
 no auto-summary
 no synchronization
 network 2.2.2.2 mask 255.255.255.255
 exit-address-family


EIGRP

Router(config)# router eigrp <ASNUMBER>
Router(config)# address-family ipv4 vrf <VRFNAME>
Router(config)# network <IPADDRESS> <WILDCARD>
Router(config)# autonomous-system <ASNUMBER>


OSPF




hardware/cisco/vrf.html.txt ยท Last modified: 2021/09/22 by admin

Page Tools