Cisco Router Configuration: Routing (Static, RIPv2, OSPF, BGP, EIGRP, MPLS)

Here we will show the different static and dynamic routing commands on cisco router.

To know the ip routes we have to use the following IP route command.

Router# show ip route


Static Route Configuration

Static default route

Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.2 <gateway>
or
Router(config)#ip route 0.0.0.0 0.0.0.0 null 0



RIPv2 Configuration

Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#network 12.0.0.0  <loopback network>
Router(config-router)#network 192.168.1.0

RIP Routing Verification Commands:

Router#show ip protocols
Router#show ip route
Router#show ip interface brief
Router#show ip rip database
Router#debug ip rip



OSPF Configuration

Router(config)#router ospf 1 <any router id no>
Router(config-router)#network 1.0.0.0 0.0.0.3 <wildcard mask>area 10
Router(config-router)#network 2.0.0.0 0.0.0.3 <wildcard mask> area 20
Router(config-router)#default-information originate <originate default route to all>
Router(config-router)#default-information originate always<default route to all, even if there is no default route in the router’s routing table">
Router(config-router)#end

Router# show ip ospf neighbor 
Router# sh ip ospf database
Router# sh ip protocols
Router# sh ip ospf summary-address
Router# sh ip ospf interface brief
Router# sh run | s router ospf


BGP Configuration

Router(config)#router bgp 200 <ASN>
Router(config-router)#neighbor 172.16.201.2 remote-as 1000
Router(config-router)#network 10.101.101.100 mask 255.255.255.0
Router(config)#


BGP Default route

Router(config-router)#default-information originate <originate default route to all>
Router(config-router)#neighbor 172.16.201.2 default-originate <originate default route to specific neighbor>
Router(config-router)#redistribute static <to redistribute all static route>


If we want to delete all the bgp configuration from the router then we should use below command.

Router(config)#clear ip bgp * 



EIGRP Configuration

Router(config)#router eigrp 100 <ASN>
Router(config-router)#network 1.1.1.0         0.0.0.255 <wildcard mask>
Router(config-router)#network 192.168.1.0     0.0.7.255 <wildcard mask>
Router(config-router)#no auto-summary




MPLS Configuration


MPLS Router Description

Before going to configure the MPLS we have to know the routers' description which are in use and commonly known with different names in MPLS server configuration. Lets have a look on it.


PR=Provider Router
PER=Provider Edge Router
RR=Router Reflector
CER=Customer Edge Router
LER=Label Edge Router
LSR=Label Switching Router
LSP=Label Switch Path
LDP=Label Distribution Protocol


Commands

Router(config)#ip cef
Router(config)#interface serial 1/0
Router(config-if)#mpls label protocol ldp
Router(config-if)#mpls ip
Router(config-if)#mpls mtu 1500
Router(config-if)#ip route-cache cef
Router(config)#mpls label range 101-200


Checking the MPLS configuration

Router#show mpls ldp neighbor
Router#show mpls forwarding-table
Router#show ip cef
Router#show mpls interfaces
Router#show mpls ldp discovery
Router#show mpls label range





































*****

0 Comments