Friday, April 13, 2012

Easy Virtual Network

Scenario: In this scenario there are 3 routers interconnected, with 3 VRFs namely Android, IOS and WP7 created.  VNET trunk is configured in order to reduce the complexity and administration effort in configuring the routers in between.

Reference:  http://www.cisco.com/en/US/docs/ios/ios_xe/evn/configuration/guide/evn_confg_xe.html#wp1060221

Topology

VRF android (eth1/0), iOS (eth1/1) and wp7 (eth1/2) -- R4 (eth1/3 vnet trunk) -- (eth1/3 vnet trunk) R5 (eth1/0 vnet trunk) -- (eth1/3 vnet trunk) R6 -- VRF android (eth1/0), iOS (eth1/1) and wp7 (eth1/2)  

Image(14)

R4 Config

Current configuration : 2285 bytes

!

! Last configuration change at 01:38:17 HKT Sat Mar 24 2012

!

version 15.2

service timestamps debug datetime msec

service timestamps log datetime msec

!

hostname R4

!

boot-start-marker

boot-end-marker

!

!

vrf definition android

vnet tag 1001

!

address-family ipv4

exit-address-family

!

vrf definition ios

vnet tag 1002

!      

address-family ipv4

exit-address-family

!

vrf definition wp7

vnet tag 1003

!

address-family ipv4

exit-address-family

!

!

no aaa new-model

!

!

!

clock timezone HKT 8 0

ip cef

!

!

!

!

!

!

no ipv6 cef

!

!

multilink bundle-name authenticated

!

!

!

!

!

!

!

!

!

!

!

!

!

interface Ethernet0/0

no ip address

shutdown

!

interface Ethernet0/1

no ip address

shutdown

!

interface Ethernet0/2

no ip address

shutdown

!

interface Ethernet0/3

no ip address

shutdown

!

interface Ethernet1/0

 vrf forwarding android

ip address 10.1.1.1 255.255.255.0

!

interface Ethernet1/1

 vrf forwarding ios

ip address 10.2.2.1 255.255.255.0

!

interface Ethernet1/2

 vrf forwarding wp7

ip address 10.3.3.1 255.255.255.0

!

interface Ethernet1/3

 vnet trunk

ip address 192.168.1.1 255.255.255.0

 ip ospf vnet area 0

vnet name android

  ip ospf 2 area 0

!

vnet name ios

  ip ospf 3 area 0

!

vnet name wp7

  ip ospf 4 area 0

!

!

interface Serial2/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/3

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/3

no ip address

shutdown

serial restart-delay 0

!

router ospf 2 vrf android

router-id 1.1.1.2

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 3 vrf ios

router-id 1.1.1.3

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 4 vrf wp7

router-id 1.1.1.4

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 1

router-id 1.1.1.1

network 0.0.0.0 255.255.255.255 area 0

!

ip forward-protocol nd

!

!

no ip http server

!

!

!

!

control-plane

!

!

line con 0

logging synchronous

line aux 0

line vty 0 4

login

!

!

end

R5 Config

Building configuration...

Current configuration : 2290 bytes

!

version 15.2

service timestamps debug datetime msec

service timestamps log datetime msec

!

hostname R5

!

boot-start-marker

boot-end-marker

!

!

vrf definition android

vnet tag 1001

!

address-family ipv4

exit-address-family

!

vrf definition ios

vnet tag 1002

!

address-family ipv4

exit-address-family

!

vrf definition wp7

vnet tag 1003

!

address-family ipv4

exit-address-family

!

!

no aaa new-model

!

!

!

clock timezone HKT 8 0

ip cef

!

!

!

!

!

!

no ipv6 cef

!

!        

multilink bundle-name authenticated

!

!

!

!

!

!

!

!

!

!

!

!

!

interface Ethernet0/0

no ip address

shutdown

!

interface Ethernet0/1

no ip address

shutdown

!

interface Ethernet0/2

no ip address

shutdown

!

interface Ethernet0/3

no ip address

shutdown

!

interface Ethernet1/0

 vnet trunk

ip address 192.168.2.1 255.255.255.0

ip ospf vnet area 0

vnet name android

  ip ospf 2 area 0

!

vnet name ios

  ip ospf 3 area 0

!

vnet name wp7

  ip ospf 4 area 0

!

!

interface Ethernet1/1

no ip address

shutdown

!

interface Ethernet1/2

no ip address

shutdown

!

interface Ethernet1/3

vnet trunk

ip address 192.168.1.2 255.255.255.0

 ip ospf vnet area 0

vnet name android

  ip ospf 2 area 0

!

vnet name ios

  ip ospf 3 area 0

!

vnet name wp7

  ip ospf 4 area 0

!

!

interface Serial2/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/3

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/3

no ip address

shutdown

serial restart-delay 0

!

router ospf 2 vrf android

router-id 2.2.2.2

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 3 vrf ios

router-id 2.2.2.3

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 4 vrf wp7

router-id 2.2.2.4

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 1

router-id 2.2.2.1

network 0.0.0.0 255.255.255.255 area 0

!

ip forward-protocol nd

!

!

no ip http server

!

!

!

!

control-plane

!

!

line con 0

logging synchronous

line aux 0

line vty 0 4

login   

!

!

end

R6 Config

Building configuration...

Current configuration : 2285 bytes

!

! Last configuration change at 01:39:03 HKT Sat Mar 24 2012

!

version 15.2

service timestamps debug datetime msec

service timestamps log datetime msec

!

hostname R6

!

boot-start-marker

boot-end-marker

!

!

vrf definition android

vnet tag 1001

!

address-family ipv4

exit-address-family

!

vrf definition ios

vnet tag 1002

!      

address-family ipv4

exit-address-family

!

vrf definition wp7

vnet tag 1003

!

address-family ipv4

exit-address-family

!

!

no aaa new-model

!

!

!

clock timezone HKT 8 0

ip cef

!

!

!

!

!

!

no ipv6 cef

!

!

multilink bundle-name authenticated

!

!

!

!

!

!

!

!

!

!

!

!

!

interface Ethernet0/0

no ip address

shutdown

!

interface Ethernet0/1

no ip address

shutdown

!

interface Ethernet0/2

no ip address

shutdown

!

interface Ethernet0/3

no ip address

shutdown

!

interface Ethernet1/0

vrf forwarding android

ip address 10.4.4.1 255.255.255.0

!

interface Ethernet1/1

 vrf forwarding ios

ip address 10.5.5.1 255.255.255.0

!

interface Ethernet1/2

 vrf forwarding wp7

ip address 10.6.6.1 255.255.255.0

!

interface Ethernet1/3

 vnet trunk

ip address 192.168.2.2 255.255.255.0

ip ospf vnet area 0

vnet name android

  ip ospf 2 area 0

!

vnet name ios

  ip ospf 3 area 0

!

vnet name wp7

  ip ospf 4 area 0

!

!

interface Serial2/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial2/3

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial3/3

no ip address

shutdown

serial restart-delay 0

!

router ospf 2 vrf android

router-id 3.3.3.2

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 3 vrf ios

router-id 3.3.3.3

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 4 vrf wp7

router-id 3.3.3.4

network 0.0.0.0 255.255.255.255 area 0

!

router ospf 1

router-id 3.3.3.1

network 0.0.0.0 255.255.255.255 area 0

!

ip forward-protocol nd

!

!

no ip http server

!

!

!

!

control-plane

!

!

line con 0

logging synchronous

line aux 0

line vty 0 4

login

!

!

end

Show command

R5#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface

1.1.1.1           1   FULL/DR         00:00:33    192.168.1.1     Ethernet1/3

3.3.3.1           1   FULL/BDR        00:00:37    192.168.2.2     Ethernet1/0

1.1.1.4           1   FULL/DR         00:00:36    192.168.1.1     Ethernet1/3.1003

3.3.3.4           1   FULL/BDR        00:00:31    192.168.2.2     Ethernet1/0.1003

1.1.1.3           1   FULL/DR         00:00:38    192.168.1.1     Ethernet1/3.1002

3.3.3.3           1   FULL/BDR        00:00:31    192.168.2.2     Ethernet1/0.1002

1.1.1.2           1   FULL/DR         00:00:32    192.168.1.1     Ethernet1/3.1001

3.3.3.2           1   FULL/BDR        00:00:30    192.168.2.2     Ethernet1/0.1001

R5#sh ip int brie

Interface              IP-Address      OK? Method Status                Protocol

Ethernet0/0            unassigned      YES NVRAM  administratively down down   

Ethernet0/1            unassigned      YES NVRAM  administratively down down   

Ethernet0/2            unassigned      YES NVRAM  administratively down down   

Ethernet0/3            unassigned      YES NVRAM  administratively down down   

Ethernet1/0            192.168.2.1     YES NVRAM  up                    up     

Ethernet1/0.1001       192.168.2.1     YES NVRAM  up                    up    

Ethernet1/0.1002       192.168.2.1     YES NVRAM  up                    up    

Ethernet1/0.1003       192.168.2.1     YES NVRAM  up                    up    

Ethernet1/1            unassigned      YES NVRAM  administratively down down   

Ethernet1/2            unassigned      YES NVRAM  administratively down down   

Ethernet1/3            192.168.1.2     YES NVRAM  up                    up     

Ethernet1/3.1001       192.168.1.2     YES NVRAM  up                    up    

Ethernet1/3.1002       192.168.1.2     YES NVRAM  up                    up    

Ethernet1/3.1003       192.168.1.2     YES NVRAM  up                    up     

Serial2/0              unassigned      YES NVRAM  administratively down down   

Serial2/1              unassigned      YES NVRAM  administratively down down   

Serial2/2              unassigned      YES NVRAM  administratively down down   

Serial2/3              unassigned      YES NVRAM  administratively down down   

Serial3/0              unassigned      YES NVRAM  administratively down down   

Serial3/1              unassigned      YES NVRAM  administratively down down   

Serial3/2              unassigned      YES NVRAM  administratively down down   

Serial3/3              unassigned      YES NVRAM  administratively down down    

R5#sh ip route vrf android

Routing Table: android

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/24 is subnetted, 2 subnets

O        10.1.1.0 [110/20] via 192.168.1.1, 00:08:53, Ethernet1/3.1001

O        10.4.4.0 [110/20] via 192.168.2.2, 00:08:24, Ethernet1/0.1001

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Ethernet1/3.1001

L        192.168.1.2/32 is directly connected, Ethernet1/3.1001

      192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.2.0/24 is directly connected, Ethernet1/0.1001

L        192.168.2.1/32 is directly connected, Ethernet1/0.1001

R5#show derived-config int eth1/3.1001

Building configuration...

Derived configuration : 183 bytes

!

interface Ethernet1/3.1001

description Subinterface for VNET android

encapsulation dot1Q 1001

vrf forwarding android

ip address 192.168.1.2 255.255.255.0

ip ospf 2 area 0

end

No comments: