|
|
|
Step 1 |
configure terminal
switch# configure terminal switch(config)# |
Enters global configuration mode. |
Step 2 |
interface loopback number
switch(config)# interface Loopback 0 switch(config-if)# |
Enters interface configuration mode and configures a loopback interface.
- The range of the number argument is from 0 to 1023.
|
Step 3 |
ip address ip-address mask
switch(config-if)# ip address 209.165.202.157 255.255.255.224 |
Configures a primary address for this interface. |
Step 4 |
exit
switch(config-if)# exit switch(config)# |
Exits interface configuration mode and returns to global configuration mode. |
Step 5 |
interface tunnel number
switch(config)# interface tunnel 1 switch(config-if)# |
Enters interface configuration mode and configures a tunnel interface.
- The range of the number argument is from 0 to 4095.
- A tunnel should be independent of the endpoint physical interface type, such as TM, Gigabit, Packet over SONET (POS), and TenGigabit.
- Up to 100 GRE tunnels are supported.
|
Step 6 |
tunnel mode gre
switch(config-if)# tunnel mode gre |
Sets the encapsulation mode for the tunnel interface. |
Step 7 |
interface tunnel number
switch(config-if)# interface Tunnel 0 |
Enters interface configuration mode and configures a tunnel interface.
- The range of the number argument is from 0 to 4095.
|
Step 8 |
ip address ip-address mask
switch(config-if)# ip address 209.165.200.225 255.255.255.224 |
Configures a primary address for this interface. |
Step 9 |
tunnel source { ip-address | type / number }
switch(config-if)# tunnel source 192.0.0.2 |
Sets the source address for a tunnel interface.
- The source address is either an explicitly defined IP address or the IP address assigned to the specified interface.
- GRE tunnel encapsulation and decapsulation for multicast packets are handled by the hardware. Each hardware-assisted tunnel must have a unique source. Hardware-assisted tunnels cannot share a source even if the destinations are different. You should use secondary addresses on loopback interfaces or create multiple loopback interfaces to ensure that the hardware-assisted tunnels do not share a source.
|
Step 10 |
tunnel destination { hostname | ip-address ]
switch(config-if)# tunnel destination 192.0.0.3 |
Specifies the destination for the tunnel interface. |
Step 11 |
mpls ip { propagate-ttl | ttl-expiration-pop [ labels ]}
switch(config-if)# mpls ip propagate-ttl |
Controls the generation of the time-to-live (TTL) field in the Multiprotocol Label Switching (MPLS) header.
- The propagate-ttl keyword enables MPLS forwarding along normally routed paths for the interface.
- The ttl-expiration-pop keyword specifies that packets with an expired time-to-live (TTL) value are forwarded through the original label stack.
- The labels argument is the maximum number of labels in the packet necessary for the packet to be forwarded by means of the global IP routing table.
|
Step 12 |
exit
switch(config-if)# exit switch(config)# |
Exits interface configuration mode and returns to global configuration mode. |
Step 13 |
ip route prefix mask interface-type interface-number
switch(config)# ip route 209.165.201.6 255.255.255.224 tunnel 1 |
Creates a static route for routing packets for the designated network to the specified interface. |
Step 14 |
ip route prefix mask interface-type interface-number
switch(config)# ip route 209.165.201.7 255.255.255.224 tunnel 2 |
Creates a static route for routing packets for the designated network to the specified interface. |
Step 15 |
[ no ] l2vpn vfi context context-name
switch(config)# l2vpn vfi context example switch(config-l2vpn-vfi)# |
Establishes a Layer 2 VPN (L2VPN) Virtual Forwarding Interface (VFI) context between two or more separate networks.
- The context-name argument is a unique per-interface identifier for this context. The maximum range is 100 alphanumeric, case-sensitive characters.
Note You can use the no form of this command to delete the context and the associated configuration. |
Step 16 |
description description
switch(config-l2vpn-vfi)# description example |
(Optional) Adds a description to the interface configuration.
- The maximum range for the description argument is 254 alphanumeric characters.
|
Step 17 |
vpn vpn-id
switch(config-l2vpn-vfi)# vpn 100 |
Configures a VPN ID for a VFI context.
- The emulated VCs bound to this Layer 2 VFI use this VPN ID for signaling.
- The range of the vpn-id argument is from 1 to 4294967295.
|
Step 18 |
member peer ip-address [ vc-id ] encapsulation mpls
switch(config-l2vpn-vfi)# member peer 192.0.2.8 encapsulation mpls |
Configures a dynamic pseudowire member under the VFI. |
Step 19 |
vlan configuration vlan-id
switch(config-l2vpn-vfi)# vlan configuration 200 switch(config-vlan-config)# |
Enters VLAN configuration mode and creates a VLAN ID. |
Step 20 |
member vfi context-name
switch(config-vlan-config)# member vfi example |
Adds the specified VFI context as a member of this VLAN.
- The context-name argument is a unique per-interface identifier for this context. The maximum range is 100 alphanumeric, case-sensitive characters.
|
Step 21 |
copy running-config startup-config
switch(config-vlan-config)# copy running-config startup-config |
(Optional) Saves this configuration change. |