There are always cases when we need to have some hosts in testbed networks for verifying the network connectivity during network migration plan tests.
Commercial: Cisco Press - Enterprise Network Testing. :-)
I am a fans of Dynamips/Dynagen. The hosts in the 1st network setup can always be emulated using routers with IP routing disabled, configured with the "ip default-gateway" command instead of "ip route 0.0.0.0 0.0.0.0" command.
The challenge arose when I am involving in many testings and POCs on the Nexus platform switches due to the boom of the 10G data center networking and cloud, which means involving physical switches, and physical hosts.
An inefficient approach would be setting up laptops, routers, switches, etc, assigning the corresponding IP addresses, connecting the necessary power cords and UTP cables...
An efficient approach is relying upon the Virtual Device Context (VDC) concept in the Nexus 7000 Series switches, in which a physical switch can be divided into multiple logical switches, and assigning interfaces to the different logical switches, or what we called context.
This concept can also be implemented using Virtual Routing and Forwarding (VRF), which is able to assign interfaces to different virtual routers, with their own routing tables.
Below shows the configuration for implementing VRF-Lite (VRF without MPLS) on a L3 Catalyst switch to achieve the objective of having multiple hosts to reply to ICMP pings, using a single network equipment and a single power cord. :-)
en conf t ! hostname machines ! ip routing ! ip vrf PC2 ip vrf PC3 ! interface FastEthernet0/1 no switchport ip address 192.168.1.101 255.255.255.0 no shutdown ! interface FastEthernet0/2 no switchport ip vrf forwarding PC2 ip address 192.168.1.102 255.255.255.0 no shutdown ! interface FastEthernet0/3 no switchport ip vrf forwarding PC3 ip address 192.168.1.103 255.255.255.0 no shutdown !
Verification:
machines#sh ip route Codes: 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 Gateway of last resort is not set C 192.168.1.0/24 is directly connected, FastEthernet0/1 machines# machines#sh ip route vrf PC2 Routing Table: PC2 Codes: 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 Gateway of last resort is not set C 192.168.1.0/24 is directly connected, FastEthernet0/2 machines# machines#sh ip route vrf PC3 Routing Table: PC3 Codes: 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 Gateway of last resort is not set C 192.168.1.0/24 is directly connected, FastEthernet0/3 machines# machines#debug ip icmp ICMP packet debugging is on machines# machines#ping 192.168.1.102 rep 1 Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 192.168.1.102, timeout is 2 seconds: ! Success rate is 100 percent (1/1), round-trip min/avg/max = 9/9/9 ms machines# 00:04:46.345: ICMP: echo reply sent, src 192.168.1.102, dst 192.168.1.101 00:04:46.345: ICMP: echo reply rcvd, src 192.168.1.102, dst 192.168.1.101 machines# machines#ping vrf PC2 192.168.1.103 rep 1 Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 192.168.1.103, timeout is 2 seconds: ! Success rate is 100 percent (1/1), round-trip min/avg/max = 9/9/9 ms machines# 00:05:06.268: ICMP: echo reply sent, src 192.168.1.103, dst 192.168.1.102 00:05:06.268: ICMP: echo reply rcvd, src 192.168.1.103, dst 192.168.1.102 machines#
No comments:
Post a Comment