It is currently Thu Jul 18, 2019 12:50 am


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: gns3 vlan routing?
PostPosted: Mon Mar 25, 2013 4:27 am 
Offline

Joined: Fri Dec 09, 2011 1:50 am
Posts: 7
I am using gns3 for my vlan routing. I using the c3640-ik9o3s-mz.124-25c Cisoc IOS for my routers. I also set the router with nm-16ESW to use the switching port.
Can you tell me why R1 cannot ping R3 (192.168.2.3) (see attached)? Is it because of gns3 software?

R1 has a route to R3 subnet via R2. R1 should be able to ping R3 as R2 is directly connected to R2 subnet.

Thanks




Attachments:
File comment: network diagram
tmp2.jpg
tmp2.jpg [ 27.41 KiB | Viewed 8175 times ]
Top
 Profile  
 
 Post subject: Re: gns3 vlan routing?
PostPosted: Mon Mar 25, 2013 6:15 am 
Offline

Joined: Fri Mar 25, 2011 11:09 am
Posts: 40
It's not because of the GNS3 software. It's most likely due to your configs. The image you provided is of little use. This makes the assumption that all your router configs are perfect.

So lets see some configs and show outputs. Those are what will lead troubleshooting efforts.


Top
 Profile  
 
 Post subject: Re: gns3 vlan routing?
PostPosted: Mon Mar 25, 2013 1:13 pm 
Offline

Joined: Fri Dec 09, 2011 1:50 am
Posts: 7
R3 has a default route pointed to R2. So if R4 pings R3, it knows how to get back by relying on the default route pointed to R2. That is my assumption. But apparently it did not work.

Below are the configs.

!
!
version 12.4
!
hostname R1
!
!
interface FastEthernet0/0
description to R2
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
description to R4
switchport mode trunk
!
...
!
interface FastEthernet0/15
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
interface Vlan200
ip address 192.168.19.1 255.255.255.0
!
ip default-gateway 192.168.1.40
no ip http server
no ip http secure-server
...
!
end
--------------------------------------------------------------

version 12.4
!
hostname R2
!
!
interface FastEthernet0/0
description to R1
no switchport
ip address 192.168.1.40 255.255.255.0
!
interface FastEthernet0/1
no switchport
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/2
!
...
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
no ip address
!
no ip http server
no ip http secure-server
!
ip forward-protocol nd
ip route 192.168.19.0 255.255.255.0 192.168.1.1
!
end
----------------------------------------------
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
...
!
interface FastEthernet0/0
!
interface FastEthernet0/1
description to R2
!
interface FastEthernet0/2
...
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
ip address 192.168.2.3 255.255.255.0
!
ip default-gateway 192.168.2.1
no ip http server
no ip http secure-server
!
ip forward-protocol nd
!
end
--------------------------------
version 12.4
!
hostname R4
!
...
!
interface FastEthernet0/0
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
description to R1
switchport mode trunk
!
interface FastEthernet0/4
!
...
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
ip address 192.168.1.18 255.255.255.0
!
ip default-gateway 192.168.1.1
no ip http server
no ip http secure-server
!
ip forward-protocol nd
!
...
!
end


Top
 Profile  
 
 Post subject: Re: gns3 vlan routing?
PostPosted: Mon Mar 25, 2013 2:57 pm 
Offline

Joined: Sun Sep 16, 2012 9:55 pm
Posts: 541
Location: England
Please don't take this the wrong way but did you actaully try and debug this yourself? Let me show you why...

With the command ip default-gateway set (as per your configs), the routing table on R1 is as follows:
Code:
R1#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, Vlan1
C    192.168.19.0/24 is directly connected, Vlan200

You will notice two things - 1. Gateway of lat resort not set 2. No route to the 192.168.2.0/24 network

Now if we refer to the Cisco website, you will see why here.
Quote:
ip default-gateway

The ip default-gateway command differs from the other two commands. It should only be used when ip routing is disabled on the Cisco router.

Hence the lack of a last resort gateway. So you then have two options given to on the Cisco page I linked above.

1. ip default-network
2. ip route

Personally for this exercise, I would use the second command in one of two ways:
1. ip route 0.0.0.0 0.0.0.0 192.168.1.40 (this sets the default route from R1 to all networks)
2. ip route 192.168.2.0 255.255.255.0 192.168.1.40 (this sets a static route to 192.168.2.0/24 via 192.168.1.40 again on R1)

You will also need to use similar commands on R3. Once you sorted your routing tables you will find that you have more luck.

_________________
Daniel
Forum Moderator & Debian Package Maintainer for GNS3, Dynamips & VPCS.
Standalone DEB Packages are available from http://gns3.serverb.co.uk - To be updated!


Top
 Profile  
 
 Post subject: Re: gns3 vlan routing?
PostPosted: Mon Mar 25, 2013 11:19 pm 
Offline

Joined: Fri Dec 09, 2011 1:50 am
Posts: 7
claydon_dan,

In the R1 sh ip ro, I actually added ip route 192.168.2.0 255.255.255.0 192.168.1.40.
R1#sh ip route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Vlan1
C 192.168.19.0/24 is directly connected, Vlan200
S 192.168.2.0/24 (1/0) via 192.168.1.40

But I still cannot ping 192.168.2.3. When I did the debug ip icmp, I see reply sent back to 192.168.1.1 from R3. So the reply is being sent back but the ping does not work. Not sure I understand.

----------------------
On the other hand...

Thank you very much for your explanation. I changed from ip default-gateway to a default static route and it all works.

My confusion came from the fact that on the L3 switch, I can use the ip-default gateway statement with ip routing enable. But on the routers, in this case, I need the default static route to make it work.

I thought that ip default-gateway and default static route (ip route 0.0.0.0 0.0.0.0 next_oh_ip_addr) are the same. But they are not after reading the link that you provided.



Again thanks.




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO