10-30-2019 12:23 PM - edited 10-30-2019 12:28 PM
Hello,
I have started studying networking recently and I have come across a little problem. I have created two VLANs on an L2 switch and I have followed the instruction as shown in here, apart from the hosts' IP addresses. I've created a simulation in VIRL and used Autonetkit to create connections. I'm unable to ping from one VLAN to the other.
Here is my topology:
Where the iosv-1 is the router on a stick, the iosv-2 is on vlan 10, and iosv-3 is on vlan 20.
And here is the output of iosv-1#show ip route:
Gateway of last resort is not set 192.168.0.0/32 is subnetted, 1 subnets C 192.168.0.1 is directly connected, Loopback0 192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.10.0/24 is directly connected, GigabitEthernet0/1.10 L 192.168.10.254/32 is directly connected, GigabitEthernet0/1.10 192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.20.0/24 is directly connected, GigabitEthernet0/1.20 L 192.168.20.254/32 is directly connected, GigabitEthernet0/1.20
Any advice will be appreciated.
Here is the virl configuration file:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?> <topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.95" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.95/virl.xsd"> <extensions> <entry key="management_network" type="String">user</entry> </extensions> <node location="574,177" type="SIMPLE" subtype="IOSv" name="iosv-1" ipv4="192.168.0.1"> <extensions> <entry key="config" type="string">! ! Last configuration change at 17:23:22 UTC Wed Oct 30 2019 by cisco ! version 15.7 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname iosv-1 ! boot-start-marker boot-end-marker ! ! vrf definition Mgmt-intf ! address-family ipv4 exit-address-family ! address-family ipv6 exit-address-family ! enable password cisco ! no aaa new-model ! ! ! mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 ! ! ! ! ! ! ! ! ! ! ! no ip domain lookup ip domain name virl.info ip cef ipv6 unicast-routing ipv6 cef ! multilink bundle-name authenticated ! ! ! ! username cisco privilege 15 secret 5 $1$Guje$2YyAr82Whi1fnJ2YA7mQt/ ! redundancy ! no cdp run ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 description Loopback ip address 192.168.0.1 255.255.255.255 ! interface GigabitEthernet0/0 description OOB Management vrf forwarding Mgmt-intf ip address 10.255.0.52 255.255.0.0 duplex full speed auto media-type rj45 ! interface GigabitEthernet0/1 description to iosvl2-1 no ip address ip ospf cost 1 duplex full speed auto media-type rj45 ! interface GigabitEthernet0/1.10 encapsulation dot1Q 10 ip address 192.168.10.254 255.255.255.0 no cdp enable ! interface GigabitEthernet0/1.20 encapsulation dot1Q 20 ip address 192.168.20.254 255.255.255.0 no cdp enable ! router ospf 1 passive-interface Loopback0 network 10.0.0.0 0.0.255.255 area 0 network 192.168.0.1 0.0.0.0 area 0 ! router bgp 1 bgp router-id 192.168.0.1 bgp log-neighbor-changes neighbor 192.168.0.2 remote-as 1 neighbor 192.168.0.2 description iBGP peer iosv-2 neighbor 192.168.0.2 update-source Loopback0 neighbor 192.168.0.3 remote-as 1 neighbor 192.168.0.3 description iBGP peer iosv-3 neighbor 192.168.0.3 update-source Loopback0 ! address-family ipv4 network 192.168.0.1 mask 255.255.255.255 neighbor 192.168.0.2 activate neighbor 192.168.0.3 activate exit-address-family ! ip forward-protocol nd ! ! no ip http server no ip http secure-server ip ssh server algorithm authentication password ! ipv6 ioam timestamp ! ! ! control-plane ! banner exec ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner incoming ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner login ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` ! line con 0 password cisco line aux 0 line vty 0 4 exec-timeout 720 0 password cisco login local transport input telnet ssh ! no scheduler allocate ! end </entry> <entry key="AutoNetkit.ASN" type="Integer">1</entry> </extensions> <interface name="GigabitEthernet0/1" id="0" ipv4="10.0.0.1" netPrefixLenV4="16"/> </node> <node location="341,295" type="SIMPLE" subtype="IOSv" name="iosv-2" ipv4="192.168.0.2"> <extensions> <entry key="config" type="string">! ! Last configuration change at 03:21:17 UTC Wed Oct 30 2019 ! version 15.7 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname iosv-2 ! boot-start-marker boot-end-marker ! ! vrf definition Mgmt-intf ! address-family ipv4 exit-address-family ! address-family ipv6 exit-address-family ! enable password cisco ! no aaa new-model ! ! ! mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 ! ! ! ! ! ! ! ! ! ! ! no ip domain lookup ip domain name virl.info ip cef ipv6 unicast-routing ipv6 cef ! multilink bundle-name authenticated ! ! ! ! username cisco privilege 15 secret 5 $1$8L3p$7R8TiDN04oqCmvqfC5fQg. ! redundancy ! no cdp run ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 description Loopback ip address 192.168.0.2 255.255.255.255 ! interface GigabitEthernet0/0 description OOB Management vrf forwarding Mgmt-intf ip address 10.255.0.53 255.255.0.0 duplex full speed auto media-type rj45 ! interface GigabitEthernet0/1 description to iosvl2-1 ip address 192.168.10.100 255.255.255.0 ip ospf cost 1 duplex full speed auto media-type rj45 ! router ospf 1 passive-interface Loopback0 network 10.0.0.0 0.0.255.255 area 0 network 192.168.0.2 0.0.0.0 area 0 ! router bgp 1 bgp router-id 192.168.0.2 bgp log-neighbor-changes neighbor 192.168.0.1 remote-as 1 neighbor 192.168.0.1 description iBGP peer iosv-1 neighbor 192.168.0.1 update-source Loopback0 neighbor 192.168.0.3 remote-as 1 neighbor 192.168.0.3 description iBGP peer iosv-3 neighbor 192.168.0.3 update-source Loopback0 ! address-family ipv4 network 192.168.0.2 mask 255.255.255.255 neighbor 192.168.0.1 activate neighbor 192.168.0.3 activate exit-address-family ! ip default-gateway 192.168.10.254 ip forward-protocol nd ! ! no ip http server no ip http secure-server ip ssh server algorithm authentication password ! ipv6 ioam timestamp ! ! ! control-plane ! banner exec ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner incoming ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner login ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` ! line con 0 password cisco line aux 0 line vty 0 4 exec-timeout 720 0 password cisco login local transport input telnet ssh ! no scheduler allocate ! end </entry> <entry key="AutoNetkit.ASN" type="Integer">1</entry> </extensions> <interface name="GigabitEthernet0/1" id="0" ipv4="10.0.0.2" netPrefixLenV4="16"/> </node> <node location="792,295" type="SIMPLE" subtype="IOSv" name="iosv-3" ipv4="192.168.0.3"> <extensions> <entry key="config" type="string">! ! Last configuration change at 03:21:28 UTC Wed Oct 30 2019 by cisco ! version 15.7 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname iosv-3 ! boot-start-marker boot-end-marker ! ! vrf definition Mgmt-intf ! address-family ipv4 exit-address-family ! address-family ipv6 exit-address-family ! enable password cisco ! no aaa new-model ! ! ! mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 ! ! ! ! ! ! ! ! ! ! ! no ip domain lookup ip domain name virl.info ip cef ipv6 unicast-routing ipv6 cef ! multilink bundle-name authenticated ! ! ! ! username cisco privilege 15 secret 5 $1$ZfqT$ddsaKnKcxomWzc28tb4Vs0 ! redundancy ! no cdp run ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 description Loopback ip address 192.168.0.3 255.255.255.255 ! interface GigabitEthernet0/0 description OOB Management vrf forwarding Mgmt-intf ip address 10.255.0.54 255.255.0.0 duplex full speed auto media-type rj45 ! interface GigabitEthernet0/1 description to iosvl2-1 ip address 192.168.20.100 255.255.255.0 ip ospf cost 1 duplex full speed auto media-type rj45 ! router ospf 1 passive-interface Loopback0 network 10.0.0.0 0.0.255.255 area 0 network 192.168.0.3 0.0.0.0 area 0 ! router bgp 1 bgp router-id 192.168.0.3 bgp log-neighbor-changes neighbor 192.168.0.1 remote-as 1 neighbor 192.168.0.1 description iBGP peer iosv-1 neighbor 192.168.0.1 update-source Loopback0 neighbor 192.168.0.2 remote-as 1 neighbor 192.168.0.2 description iBGP peer iosv-2 neighbor 192.168.0.2 update-source Loopback0 ! address-family ipv4 network 192.168.0.3 mask 255.255.255.255 neighbor 192.168.0.1 activate neighbor 192.168.0.2 activate exit-address-family ! ip default-gateway 192.168.20.254 ip forward-protocol nd ! ! no ip http server no ip http secure-server ip ssh server algorithm authentication password ! ipv6 ioam timestamp ! ! ! control-plane ! banner exec ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner incoming ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner login ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` ! line con 0 password cisco line aux 0 line vty 0 4 exec-timeout 720 0 password cisco login local transport input telnet ssh ! no scheduler allocate ! end </entry> <entry key="AutoNetkit.ASN" type="Integer">1</entry> </extensions> <interface name="GigabitEthernet0/1" id="0" ipv4="10.0.0.3" netPrefixLenV4="16"/> </node> <node location="574,295" type="SIMPLE" subtype="IOSvL2" name="iosvl2-1"> <extensions> <entry key="config" type="string">! ! Last configuration change at 03:24:07 UTC Wed Oct 30 2019 by cisco ! version 15.2 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption service compress-config ! hostname iosvl2-1 ! boot-start-marker boot-end-marker ! ! vrf definition Mgmt-intf ! address-family ipv4 exit-address-family ! address-family ipv6 exit-address-family ! enable password cisco ! username cisco privilege 15 secret 5 $1$BABH$V0reLxw5mzQyhoZnxjGxK1 no aaa new-model ! ! ! ! ! vtp domain virl.lab vtp mode transparent ! ! ! no ip domain-lookup ip cef no ipv6 cef ! ! ! spanning-tree mode pvst spanning-tree extend system-id ! ! vlan 2 name ank_vlan2 ! vlan 10 name net10 ! vlan 20 name net20 no cdp run ! ! ! ! ! ! ! ! ! ! ! ! ! ! interface Loopback0 description Loopback no ip address ! interface GigabitEthernet0/0 description OOB management no switchport vrf forwarding Mgmt-intf ip address 10.255.0.55 255.255.0.0 negotiation auto ! interface GigabitEthernet0/1 description to iosv-1 switchport access vlan 2 switchport trunk allowed vlan 10,20 switchport trunk encapsulation dot1q switchport mode trunk negotiation auto ! interface GigabitEthernet0/2 description to iosv-2 switchport access vlan 10 switchport mode access negotiation auto ! interface GigabitEthernet0/3 description to iosv-3 switchport access vlan 20 switchport mode access negotiation auto ! ip forward-protocol nd ! no ip http server ! ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr ! ! ! ! ! ! control-plane ! banner exec ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner incoming ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` banner login ` ************************************************************************** * IOSv is strictly limited to use for evaluation, demonstration and IOS * * education. IOSv is provided as-is and is not supported by Cisco's * * Technical Advisory Center. Any use or disclosure, in whole or in part, * * of the IOSv Software or Documentation to any third party for any * * purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * **************************************************************************` ! line con 0 password cisco line aux 0 line vty 0 4 exec-timeout 720 0 password cisco login local transport input telnet ssh ! ! end </entry> <entry key="AutoNetkit.ASN" type="Integer">1</entry> </extensions> <interface name="GigabitEthernet0/1" id="0"/> <interface name="GigabitEthernet0/2" id="1"/> <interface name="GigabitEthernet0/3" id="2"/> </node> <connection src="/virl:topology/virl:node[4]/virl:interface[2]" dst="/virl:topology/virl:node[2]/virl:interface[1]"/> <connection src="/virl:topology/virl:node[4]/virl:interface[3]" dst="/virl:topology/virl:node[3]/virl:interface[1]"/> <connection src="/virl:topology/virl:node[1]/virl:interface[1]" dst="/virl:topology/virl:node[4]/virl:interface[1]"/> </topology>
Solved! Go to Solution.
10-31-2019 03:14 AM
Hello,
at first glance, it looks like your are not announcing any of the local networks in OSPF. Add the lines in bold to your configs:
iosv-1
router ospf 1
passive-interface Loopback0
network 10.0.0.0 0.0.255.255 area 0
network 192.168.0.1 0.0.0.0 area 0
network 192.168.10.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
iosv-2
router ospf 1
passive-interface Loopback0
network 10.0.0.0 0.0.255.255 area 0
network 192.168.0.2 0.0.0.0 area 0
network 192.168.10.0 0.0.0.255 area 0
iosv-3
router ospf 1
passive-interface Loopback0
network 10.0.0.0 0.0.255.255 area 0
network 192.168.0.3 0.0.0.0 area 0
network 192.168.20.0 0.0.0.255 area 0
10-31-2019 03:14 AM
Hello,
at first glance, it looks like your are not announcing any of the local networks in OSPF. Add the lines in bold to your configs:
iosv-1
router ospf 1
passive-interface Loopback0
network 10.0.0.0 0.0.255.255 area 0
network 192.168.0.1 0.0.0.0 area 0
network 192.168.10.0 0.0.0.255 area 0
network 192.168.20.0 0.0.0.255 area 0
iosv-2
router ospf 1
passive-interface Loopback0
network 10.0.0.0 0.0.255.255 area 0
network 192.168.0.2 0.0.0.0 area 0
network 192.168.10.0 0.0.0.255 area 0
iosv-3
router ospf 1
passive-interface Loopback0
network 10.0.0.0 0.0.255.255 area 0
network 192.168.0.3 0.0.0.0 area 0
network 192.168.20.0 0.0.0.255 area 0
11-05-2019 07:28 PM
Hi George
Finally, I have time to test your solution and it's working.
Based on your quick response I suppose it's something trivial which left me confused because this lab is part of chapter 2 of the book I'm studying from and it doesn't mention anything about the OSPF. The OSPF is part of chapter 11 which is a long way to go. Now I have to search for the command of how to announce the local networks in the OSPF.
Many thanks for your solution.
11-01-2019 05:23 AM
There are some things about the environment here that are not clear to me. Such as what kind of device are iosv-2 and iosv-3. Since they have multiple interfaces with IP addresses and since they are configured to run OSPF and BGP I assume that they are some type of layer 3 router. And in that case the major issue is that both devices are configured with ip default-gateway and do not have any ip route statements. The issue is that ip default-gateway is only used when the device is operating as a layer 2 host and is not used when the device is operating as a layer 3 device. You need routing logic for those networks - either configure static routes or include 192.168.10.0 and 192.168.20.0 in your OSPF.
HTH
Rick
11-05-2019 07:37 PM
Hi Richard
You're right the iosv-2 and iosv-3 are indeed routers. Those host devices suppose to be PCs, but it's much easier and faster to set the simulation with routers instead.
I have been able to ping through with George's solution.
Thanks for your contribution.
11-06-2019 10:01 AM
Thanks for the explanation and the additional information. If you intended these devices to be hosts in the network (rather than routers in the network) then you could achieve that by using the command "no ip routing" in their configuration. And if you had done that then the ip default-gateway command would have worked - and I believe you would have the connectivity you were trying to achieve.
But if they were configured as routers then the suggestion to include the network command in the OSPF config was the correct solution.
HTH
Rick
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide