|
Command or Action |
Purpose |
|
enable
Example:
Router> enable
|
Enables privileged EXEC mode.
-
Enter your password if prompted.
|
|
configure terminal
Example:
Router# configure terminal
|
Enters global configuration mode. |
|
interface type number
Example:
Router(config)# interface loopback0
|
Configures an interface type and enters interface configuration mode.
-
In this example, loopback interface 0 is configured.
|
|
ip address ip-address mask [secondary]
Example:
Router(config-if)# ip address 172.16.1.1 255.255.255.255
|
Configures an IP address.
-
In this example, the loopback interface is configured with an IP address of 172.16.1.1.
|
|
exit
Example:
Router(config-if)# exit
|
Exits interface configuration mode and returns to global configuration mode. |
|
interface type number
Example:
Router(config)# interface loopback1
|
Configures an interface type and enters interface configuration mode.
-
In this example, loopback interface 1 is configured.
|
|
ip vrf forwarding vrf-name [downstream vrf-name2]
Example:
Router(config-if)# ip vrf forwarding vrf_trans
|
Associates a VRF with an interface or subinterface.
-
In this example, the VRF named vrf_trans is associated with loopback interface 1.
Note |
Executing this command on an interface removes the IP address. The IP address should be reconfigured. |
|
|
ip address ip-address mask [secondary]
Example:
Router(config-if)# ip address 10.99.1.1 255.255.255.255
|
Configures an IP address.
-
In this example, loopback interface 1 is configured with an IP address of 10.99.1.1.
|
|
Repeat Step 5 through Step 8 for each VRF to be associated with an interface.
|
-- |
|
exit
Example:
Router(config-if)# exit
|
Exits interface configuration mode and returns to global configuration mode. |
|
router bgp autonomous-system-number
Example:
Router(config)# router bgp 45000
|
Enters router configuration mode for the specified routing process. |
|
bgp router-id {ip-address| vrf auto-assign}
Example:
Router(config-router)# bgp router-id vrf auto-assign
|
Configures a fixed router ID for the local BGP routing process.
-
In this example, a BGP router ID is automatically assigned for each VRF instance.
|
|
no bgp default ipv4-unicast
Example:
Router(config-router)# no bgp default ipv4-unicast
|
Disables the IPv4 unicast address family for the BGP routing process.
Note |
Routing information for the IPv4 unicast address family is advertised by default for each BGP routing session configured with the neighbor remote-as router configuration command unless you configure the no bgp default ipv4-unicastrouter configuration command before configuring the neighbor remote-as command. Existing neighbor configurations are not affected. |
|
|
bgp log-neighbor-changes
Example:
Router(config-router)# bgp log-neighbor-changes
|
Enables logging of BGP neighbor resets. |
|
neighbor {ip-address| peer-group-name} remote-as autonomous-system-number
Example:
Router(config-router)# neighbor 192.168.1.1 remote-as 45000
|
Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router.
-
If the autonomous-system-number argument matches the autonomous system number specified in the router bgp command, the neighbor is an internal neighbor.
-
If the autonomous-system-number argument does not match the autonomous system number specified in the router bgp command, the neighbor is an external neighbor.
-
In this example, the neighbor is an internal neighbor.
|
|
neighbor {ip-address| peer-group-name} update-source interface-type interface-number
Example:
Router(config-router)# neighbor 192.168.1.1 update-source loopback0
|
Allows BGP sessions to use any operational interface for TCP connections.
-
In this example, BGP TCP connections for the specified neighbor are sourced with the IP address of the loopback interface rather than the best local address.
|
|
address-family {ipv4 [mdt | multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]}
Example:
Router(config-router)# address-family vpnv4
|
Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations.
-
The example creates a VPNv4 address family session.
|
|
neighbor {ip-address| peer-group-name} activate
Example:
Router(config-router-af)# neighbor 172.16.1.1 activate
|
Activates the neighbor under the VPNv4 address family.
-
In this example, the neighbor 172.16.1.1 is activated.
|
|
neighbor {ip-address| peer-group-name} send-community{both| standard| extended}
Example:
Router(config-router-af)# neighbor 172.16.1.1 send-community extended
|
Specifies that a communities attribute should be sent to a BGP neighbor.
-
In this example, an extended communities attribute is sent to the neighbor at 172.16.1.1.
|
|
exit-address-family
Example:
Router(config-router-af)# exit-address-family
|
Exits address family configuration mode and returns to router configuration mode. |
|
address-family {ipv4 [mdt | multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]}
Example:
Router(config-router)# address-family ipv4 vrf vrf_trans
|
Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations.
-
The example specifies that the VRF instance named vrf_trans is to be associated with subsequent IPv4 address family configuration mode commands.
|
|
redistribute connected
Example:
Router(config-router-af)# redistribute connected
|
Redistributes from one routing domain into another routing domain.
-
In this example, the connected keyword is used to represent routes that are established automatically when IP is enabled on an interface.
-
Only the syntax applicable to this step is displayed. For more details, see the Cisco IOS IP Routing: BGP Command Reference.
|
|
neighbor {ip-address| peer-group-name} remote-as autonomous-system-number
Example:
Router(config-router-af)# neighbor 192.168.1.1 remote-as 40000
|
Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router.
-
If the autonomous-system-number argument matches the autonomous system number specified in the router bgp command, the neighbor is an internal neighbor.
-
If the autonomous-system-number argument does not match the autonomous system number specified in the router bgp command, the neighbor is an external neighbor.
-
In this example, the neighbor at 192.168.1.1 is an external neighbor.
|
|
neighbor ip-address local-as autonomous-system-number [no-prepend [replace-as [dual-as]]]
Example:
Router(config-router-af)# neighbor 192.168.1.1 local-as 50000 no-prepend
|
Customizes the AS_PATH attribute for routes received from an eBGP neighbor.
-
The autonomous system number from the local BGP routing process is prepended to all external routes by default.
-
Use the no-prepend keyword to not prepend the local autonomous system number to any routes received from the eBGP neighbor.
-
In this example, routes from the neighbor at 192.168.1.1 will not contain the local autonomous system number.
|
|
neighbor {ip-address| peer-group-name} ebgp-multihop[ttl]
Example:
Router(config-router-af)# neighbor 192.168.1.1 ebgp-multihop 2
|
Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.
-
In this example, BGP is configured to allow connections to or from neighbor 192.168.1.1, which resides on a network that is not directly connected.
|
|
neighbor {ip-address| peer-group-name} activate
Example:
Router(config-router-af)# neighbor 192.168.1.1 activate
|
Activates the neighbor under the IPV4 address family.
-
In this example, the neighbor 192.168.1.1 is activated.
|
|
neighbor ip-address allowas-in [number]
Example:
Router(config-router-af)# neighbor 192.168.1.1 allowas-in 1
|
Configures provider edge (PE) routers to allow the readvertisement of all prefixes that contain duplicate autonomous system numbers.
-
In the example, the PE router with autonomous system number 45000 is configured to allow prefixes from the VRF vrf-trans. The neighboring PE router with the IP address 192.168.1.1 is set to be readvertised once to other PE routers with the same autonomous system number.
|
|
no auto-summary
Example:
Router(config-router-af)# no auto-summary
|
Disables automatic summarization and sends subprefix routing information across classful network boundaries. |
|
no synchronization
Example:
Router(config-router-af)# no synchronization
|
Enables the Cisco IOS software to advertise a network route without waiting for synchronization with an Internal Gateway Protocol (IGP). |
|
Repeat Step 20 to Step 29 to configure another VRF instance.
|
-- |
|
end
Example:
Router(config-router-af)# end
|
Exits address family configuration mode and returns to privileged EXEC mode. |
|
show ip bgp vpnv4 {all| rd route-distinguisher| vrf vrf-name}
Example:
Router# show ip bgp vpnv4 all
|
(Optional) Displays VPN address information from the BGP table.
-
In this example, the complete VPNv4 database is displayed.
Note |
Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS Multiprotocol Label Switching Command Reference. |
|