cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
220
Views
0
Helpful
9
Replies
Highlighted
Beginner

VIRL Routing ISsue

My work purchased Cisco VIRL for me the other day and I've been having issues getting networking to function.

 

My topology:

Switch 2 int 1 --> Int 1 Switch 1 int 2 --> Int 1 Router Int 2  --> int 1 Switch 3 int 2 --> int 1 Switch 4

 

1 Router (Config)

 

int gig 0/0/1

no shut

 

int 0/0/1.1

encaps dot1q 10

ip add 10.1.1.254 255.255.255.0

 

int 0/0/2

no shut

 

int 0/0/2.20

encaps dot1q 20

ip add 10.2.1.254 255.255.255.0

 

ip routing

 

router eigrp 100

network 10.1.1.0 255.255.255.0

network 10.2.1.0 255.255.255.0

 

4 Switches

 

Switch 1 and 2 are in the same network (10.1.1.0)

 

Switch 3 and 4 are in the same network (10.2.1.0)

 

Switch 1 (config)

 

interface GigabitEthernet0/1
switchport access vlan 10
switchport trunk encapsulation dot1q
switchport mode trunk
negotiation auto

interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
negotiation auto

interface Vlan10
ip address 10.1.1.253 255.255.255.0

ip default-gateway 10.1.1.254

 

Switch 2 (config)

 

interface GigabitEthernet0/1
switchport access vlan 10
switchport trunk encapsulation dot1q
switchport mode trunk
no negotiation auto

interface GigabitEthernet0/2
negotiation auto

interface Vlan10
ip address 10.1.1.252 255.255.255.0

ip default-gateway 10.1.1.254

 

Switch 3 (config)

 

interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
negotiation auto

interface GigabitEthernet0/2

switchport trunk encapsulation dot1q
switchport mode trunk
negotiation auto

interface Vlan20
ip address 10.2.1.253 255.255.255.0

ip default-gateway 10.2.1.254

 

Switch 4 (config)

 

interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
negotiation auto

interface GigabitEthernet0/2
negotiation auto

interface Vlan20
ip address 10.2.1.252 255.255.255.0

ip default-gateway 10.2.1.254

 

 

I think there may be an issue with the ISO's in VIRL or I am doing something wrong with them. But in PacketTracer with the same configuration I have ZERO issues. I'm going mad here.

 

Thank you for any help!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Hall of Fame Master

Re: VIRL Routing Issue

Tyler

 

Thanks for the additional information which I believe does help us identify the problem. The outputs are consistent with having ip routing enabled. And significantly there is this message

Gateway of last resort is not set

You may be thinking that you did configure the gateway using this command which is in the partial config that you posted

ip default-gateway 10.1.1.254

 

So if the config does have the default-gateway configured why is it not working? The answer is that default-gateway is intended for switches operating as layer 2 switches. When you configure "ip routing" then the switch operates as a layer 3 switch and will ignore the default-gateway command.

 

So there are 2 ways to fix this problem. You can leave ip routing enabled and configure a static default route with the router interface address as the next hop (ip route 0.0.0.0 0.0.0.0 <routerIP>) or you can remove ip routing and let the configured default-gateway work. Either solution should work. I would agree with your comment that it seems to make more sense to have the switches be layer 2 and to have the routing done on the router.

HTH

Rick

View solution in original post

Highlighted
Beginner

Re: VIRL Routing Issue

Rick,

 

Thank you for all of your help. Your explanation definitely makes sense and got us to the solution but I think it did require one very specific detail that should be mentioned for anyone who may have issues in the future.

 

IP route was the issue but it was because in VIRL you MUST explicitly tell the switch "no ip routing" otherwise, even if it is not configured with "ip routing" it seems to still cause the issues you helped work out.

 

Thank you again for all of your help and I will mark your post as the solution!

 

-Tyler

View solution in original post

9 REPLIES 9
Highlighted
Hall of Fame Master

Re: VIRL Routing ISsue

The main thing I notice so far is that on both of the edge switches the G0/2 is an access port and no vlan is specified. The result is that both of these interfaces are in vlan 1. Your switch configs and your trunks do not do anything with vlan 1. Your first step should be to configure the G0/2 interfaces to assign them to the appropriate vlans (10 and 20).

HTH

Rick
Highlighted
Beginner

Re: VIRL Routing Issue

Hi Richard,

 

I see you a lot on the forums, I appreciate you getting back so soon.

 

So, Int G0/2 on the edge switches don't actually have any thing connected to those ports. I also should have been clear on what I was trying to do, so let me fix that.

 

I set up the network with Switches 1 and 2 as the VLAN 10 network and 3 and 4 as the VLAN 20 network. All I want to do is have a simple lab where I have routing between the two networks. As you can see in the configs I posted I have the router performing routing using EIGRP with the two networks set. I just want to be able to ping between the "Core" Switches (Sw 1, and Sw 3). With this same design on PacketTracer, I have no issue. For some reason I cannot, for the life of me, get this to work on VIRL (But I digress). So, that is all I am really trying to do. The switches should be able to communicate between themselves without an edge device (I can't exactly through in a host machine without it being a server from my understanding).

Highlighted
Hall of Fame Master

Re: VIRL Routing Issue

Thanks for the additional information. For the moment I believe that we can concentrate on switch 1 and 3 and the router. If we figure out the issue with them then most likely we will have solved the issue for switch 2 and 4. 

 

Would you post the output of these commands on the router

show cdp neighbor

show ip interface brief

show arp

Would you post the output of these commands on switches 1 and 3

show cdp neighbor

show interface trunk

show interface status

show ip interface brief

show arp

HTH

Rick
Highlighted
Beginner

Re: VIRL Routing Issue

Rick, sorry for the delay. Work got busy.

I believe you're correct about figuring out switch 1 and 3 and the router. I've posted the output of the requested screens below:

 

 

Router

iosv-1#show cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch_1 Gig 0/1 137 R S I Gig 0/2
Switch_3 Gig 0/2 153 R S I Gig 0/1

 


iosv-1#show ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 10.255.0.150 YES TFTP administratively down down
GigabitEthernet0/1 unassigned YES manual up up
GigabitEthernet0/1.10 10.1.1.254 YES manual up up
GigabitEthernet0/2 unassigned YES manual up up
GigabitEthernet0/2.20 10.2.1.254 YES manual up up
Loopback0 192.168.0.1 YES TFTP up up

 


iosv-1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.1.1.253 6 5e00.4000.800a ARPA GigabitEthernet0/1.10
Internet 10.1.1.254 - fa16.3ea7.d99f ARPA GigabitEthernet0/1.10
Internet 10.2.1.253 5 5e00.4001.8014 ARPA GigabitEthernet0/2.20
Internet 10.2.1.254 - fa16.3e54.70f8 ARPA GigabitEthernet0/2.20

 

Switch 1

Switch_1#show cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID Local Intrfce Holdtme Capability Platform Port ID
iosv-1.virl.info Gig 0/2 132 R B Gig 0/1
Switch_2 Gig 0/1 142 R S I Gig 0/1

Total cdp entries displayed : 2

 


Switch_1#show int trunk

Port Mode Encapsulation Status Native vlan
Gi0/1 on 802.1q trunking 1
Gi0/2 on 802.1q trunking 1

Port Vlans allowed on trunk
Gi0/1 1-4094
Gi0/2 1-4094

Port Vlans allowed and active in management domain
Gi0/1 1,10
Gi0/2 1,10

Port Vlans in spanning tree forwarding state and not pruned
Gi0/1 1,10
Gi0/2 1,10

 


Switch_1#show int trunk

Port Mode Encapsulation Status Native vlan
Gi0/1 on 802.1q trunking 1
Gi0/2 on 802.1q trunking 1

Port Vlans allowed on trunk
Gi0/1 1-4094
Gi0/2 1-4094

Port Vlans allowed and active in management domain
Gi0/1 1,10
Gi0/2 1,10

Port Vlans in spanning tree forwarding state and not pruned
Gi0/1 1,10
Gi0/2 1,10

 


Switch_1#show ip int bri
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 unassigned YES unset up up
GigabitEthernet0/2 unassigned YES unset up up
Vlan10 10.1.1.253 YES TFTP up up

 


Switch_1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.1.1.253 - 5e00.4000.800a ARPA Vlan10
Internet 10.1.1.254 12 fa16.3ea7.d99f ARPA Vlan10

 

 

Switch 3

Switch_3#show cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID Local Intrfce Holdtme Capability Platform Port ID
iosv-1.virl.info Gig 0/1 149 R B Gig 0/2
switch_4 Gig 0/2 145 R S I Gig 0/1

Total cdp entries displayed : 2

 


Port Mode Encapsulation Status Native vlan
Gi0/1 on 802.1q trunking 1
Gi0/2 auto n-802.1q trunking 1

Port Vlans allowed on trunk
Gi0/1 1-4094
Gi0/2 1-4094

Port Vlans allowed and active in management domain
Gi0/1 1,20
Gi0/2 1,20

Port Vlans in spanning tree forwarding state and not pruned
Gi0/1 1,20
Gi0/2 1,20

 

 

Switch_3#show int status

Port Name Status Vlan Duplex Speed Type
Gi0/0 disabled 1 auto auto RJ45
Gi0/1 connected trunk a-full auto RJ45
Gi0/2 connected trunk a-full auto RJ45

 

 

Switch_3#show ip int bri
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 unassigned YES unset up up
GigabitEthernet0/2 unassigned YES unset up up
Vlan20 10.2.1.253 YES TFTP up up

 

 

Switch_3#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.2.1.253 - 5e00.4001.8014 ARPA Vlan20
Internet 10.2.1.254 15 fa16.3e54.70f8 ARPA Vlan20

 

-Tyler

Highlighted
Hall of Fame Master

Re: VIRL Routing Issue

Tyler

 

Thank you for the outputs. What I am seeing in them is pretty much what I expected to see. The router sees both switches as neighbors (and on the correct interface - I have seen situations where the cables were not connected on correct interface and that does create problems - but not the case here). The arp table on the router shows entries for both switches. The router interfaces are up/up. The switches see the router as a neighbor and their arp table shows entries for the router. Based on that I would expect that both switches should be able to communicate with the router and that both switches should be able to communicate with each other. If that is not happening then I believe that there must be something in the parts of the configs that we have not seen that is creating the problem.

 

Can you clarify for me what is the problem? Can each switch ping the connected interface of the router? Can each switch ping the router interface connecting to the other switch? Can each switch ping the vlan interface of the other switch?

 

In thinking about what might be the issue I wonder if ip routing is enabled on the switches? Can you post the output of show ip route for both switches?

HTH

Rick
Highlighted
Beginner

Re: VIRL Routing Issue

Rick,

 

Yes the problem is that neither side of the network can ping or communicate with the other even with the router configured. Switch one cannot ping the interface of the router going to the opposite network or any switch in that network. This is also true for Switch 3 (excluding switch 2 and 4 from this for the time being but all statements are also true for these).  Each switch can ping the router interface of their respective network.

 

Wouldn't IP routing only be needed if the switches were not going to be layer 2 switches? shouldn't the router be doing all of the routing with the switches passing their traffic using the ip default-gateway x.x.x.x command. Maybe I have something wrong here?

 

Here are the outputs:

 

Switch_1#show ip route

 

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Vlan10
L 10.1.1.253/32 is directly connected, Vlan10

 

 

Switch_3#show ip route
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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

Switch_3#

 

 

I believe I enabled ip route on Switch 1, however it still cannot ping the router interface with 10.2.1.254 (opposite network).

 

-Tyler

Highlighted
Hall of Fame Master

Re: VIRL Routing Issue

Tyler

 

Thanks for the additional information which I believe does help us identify the problem. The outputs are consistent with having ip routing enabled. And significantly there is this message

Gateway of last resort is not set

You may be thinking that you did configure the gateway using this command which is in the partial config that you posted

ip default-gateway 10.1.1.254

 

So if the config does have the default-gateway configured why is it not working? The answer is that default-gateway is intended for switches operating as layer 2 switches. When you configure "ip routing" then the switch operates as a layer 3 switch and will ignore the default-gateway command.

 

So there are 2 ways to fix this problem. You can leave ip routing enabled and configure a static default route with the router interface address as the next hop (ip route 0.0.0.0 0.0.0.0 <routerIP>) or you can remove ip routing and let the configured default-gateway work. Either solution should work. I would agree with your comment that it seems to make more sense to have the switches be layer 2 and to have the routing done on the router.

HTH

Rick

View solution in original post

Highlighted
Beginner

Re: VIRL Routing Issue

Rick,

 

Thank you for all of your help. Your explanation definitely makes sense and got us to the solution but I think it did require one very specific detail that should be mentioned for anyone who may have issues in the future.

 

IP route was the issue but it was because in VIRL you MUST explicitly tell the switch "no ip routing" otherwise, even if it is not configured with "ip routing" it seems to still cause the issues you helped work out.

 

Thank you again for all of your help and I will mark your post as the solution!

 

-Tyler

View solution in original post

Highlighted
Hall of Fame Master

Re: VIRL Routing Issue

Tyler

 

Thanks for the update. Glad you got it worked out. It is very interesting that this is a behavior of VIRL and I suspect quite a few in the community were not aware of this. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick