Inter VLAN Routing

ManglianManglian Member Posts: 58 ■■□□□□□□□□
Hi everyone

Long time ! Hope your doing well

I am preparing CCNA and have tried Inter VLAN Routing on routersim and netsim simulations but when i ping it seems there is a problem. It been driving me mad now icon_mad.gif please could you help me rectify the problem. I would appreciate your help.

Here is the cut and paste work

Cisco Router 2811

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z
Router(config)#int fa0/1.1
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 192.168.2.254 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#int fa0/1.2
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 192.168.3.254 255.255.255.0
Router(config-subif)#no shut
Router(config-subif)#int fa0/1
Router(config-if)#no shut
05:23:50 %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
05:23:50 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Cisco switch 2950

switch>en
switch#sh vlan

VLAN Name Status Ports
----


1 default active Fa0/1, Fa0/2, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

switch(config)#int fa0/2
switch(config-if)#switchport access vlan 10
switch(config-if)#no shut
switch(config-if)#int fa0/5
switch(config-if)#switchport access vlan 20
switch(config-if)#no shut
switch(config-if)#int fa0/3
switch(config-if)#switchport mode trunk
switch(config-if)#no shut
switch(config-if)#exit
switch(config)#int vlan 10
switch(config-if)#ip address 192.168.2.200 255.255.255.0
switch(config-if)#no shut
switch(config-if)#int vlan 20
switch(config-if)#ip address 192.168.3.200 255.255.255.0
switch(config-if)#no shut
switch(config-if)#exit
switch(config)#exit
switch#ping 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5), round-trip min/avg/max = 0/0/0 ms
switch#ping 192.168.2.254

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.254, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5), round-trip min/avg/max = 0/0/0 ms
switch#

PC 1
IP Address 192.168.2.1/24
DG 192.168.2.254

PC 2
IP Address 192.168.3.1/24
DG 192.168.3.254


I am anxiously waiting for your reply. Many thanks

Comments

  • kpjunglekpjungle Member Posts: 426
    Hi,

    I just did the same scenario. I can ping from PC1 to PC2 without problems.. I think the problem starts when you want to ping from the switch and defines the vlan with an IP address. I cant really explain exactly what happens, but no matter what, the inter-vlan routing for the clients still seem to happen. My first thought, would be something with the administrative vlan.
    Studying for CCNP (All done)
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    A layer 2 switch (like the 2950 you're simulating) has an administrative interface defined using the interface VLAN command -- and you can only have 1 active. So you usually only create one.

    Without seeing the output of a show ip interface brief command from the switch, we don't know which Administrative Interface was active, but if Interface VLAN 20 was active, then Interface VLAN 10 would shut down.

    If Interface VLAN 10 was down, then you'd need a default gateway defined on the switch that Interface VLAN 20 could reach. You do need a default gateway on the switch if you plan on trying to ping all your networks from the switch.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • kpjunglekpjungle Member Posts: 426
    Hi,

    Yes, i just tried it out, the first Vlan interface thats active, is the one that "wins".. if you do a shutdown on the first vlan interface, it takes the second one.

    In this scenario, it only uses Vlan10
    Vlan10 192.168.2.200 YES manual up up
    Vlan20 192.168.3.200 YES manual up up

    In that case you can only ping stuff on the Vlan 10.
    Studying for CCNP (All done)
  • marlon23marlon23 Member Posts: 164 ■■□□□□□□□□
    Why to use SVI anyway, when inter-vlan routing is performed by router...

    Also check if the router & switch are using same trunk encapsulation as routers doesnt support DTP.
    LAB: 7609-S, 7606-S, 10008, 2x 7301, 7204, 7201 + bunch of ISRs & CAT switches
  • mike3mike3 Member Posts: 136
    First thing I noticed.

    1.) en
    2.) config t
    3.) interface fastethernet 0/1
    4.) no ip address
    5.) no shutdown
    6.) int f0/1.1
    7.) encapsulation dot1q 10
    8.) ip address 192.168.2.254 255.255.255.0
    9.) int f0/1.2
    10.) go on from here

    Manglian wrote:
    Hi everyone

    Long time ! Hope your doing well

    I am preparing CCNA and have tried Inter VLAN Routing on routersim and netsim simulations but when i ping it seems there is a problem. It been driving me mad now icon_mad.gif please could you help me rectify the problem. I would appreciate your help.

    Here is the cut and paste work

    Cisco Router 2811

    Router>en
    Router#conf t
    Enter configuration commands, one per line. End with CNTL/Z
    Router(config)#int fa0/1.1
    Router(config-subif)#encapsulation dot1q 10
    Router(config-subif)#ip address 192.168.2.254 255.255.255.0
    Router(config-subif)#no shut
    Router(config-subif)#int fa0/1.2
    Router(config-subif)#encapsulation dot1q 20
    Router(config-subif)#ip address 192.168.3.254 255.255.255.0
    Router(config-subif)#no shut
    Router(config-subif)#int fa0/1
    Router(config-if)#no shut
    05:23:50 %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
    05:23:50 %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

    Cisco switch 2950

    switch>en
    switch#sh vlan

    VLAN Name Status Ports
    ----


    1 default active Fa0/1, Fa0/2, Fa0/4, Fa0/5
    Fa0/6, Fa0/7, Fa0/8, Fa0/9
    Fa0/10, Fa0/11, Fa0/12
    1002 fddi-default active
    1003 token-ring-default active
    1004 fddinet-default active
    1005 trnet-default active

    switch(config)#int fa0/2
    switch(config-if)#switchport access vlan 10
    switch(config-if)#no shut
    switch(config-if)#int fa0/5
    switch(config-if)#switchport access vlan 20
    switch(config-if)#no shut
    switch(config-if)#int fa0/3
    switch(config-if)#switchport mode trunk
    switch(config-if)#no shut
    switch(config-if)#exit
    switch(config)#int vlan 10
    switch(config-if)#ip address 192.168.2.200 255.255.255.0
    switch(config-if)#no shut
    switch(config-if)#int vlan 20
    switch(config-if)#ip address 192.168.3.200 255.255.255.0
    switch(config-if)#no shut
    switch(config-if)#exit
    switch(config)#exit
    switch#ping 192.168.2.1

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
    .....
    Success rate is 0 percent (0/5), round-trip min/avg/max = 0/0/0 ms
    switch#ping 192.168.2.254

    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.2.254, timeout is 2 seconds:
    .....
    Success rate is 0 percent (0/5), round-trip min/avg/max = 0/0/0 ms
    switch#

    PC 1
    IP Address 192.168.2.1/24
    DG 192.168.2.254

    PC 2
    IP Address 192.168.3.1/24
    DG 192.168.3.254


    I am anxiously waiting for your reply. Many thanks
  • lildeezullildeezul Member Posts: 404
    looks to me like your vlans werent created.

    even though switchport access vlan x would dynamically create the vlans, try to static add vlans.

    because looking at your vlan database you only have vlans 1 1002-1005

    i dont see 10 or 20
    NHSCA National All-American Wrestler 135lb
  • BakriBakri Member Posts: 3 ■□□□□□□□□□
    Dear,

    You should greate VLAN 10 & 20 in your switch. As you see they aren't present in your VLAN database.

    Secondly, 2950 is L2 switch. Thus, you can't assign for it two IPs.
    Regards,
    Bakri
  • BakriBakri Member Posts: 3 ■□□□□□□□□□
    Bakri wrote:
    Dear,

    You should greate VLAN 10 & 20 in your switch. As you see they aren't present in your VLAN database.

    Secondly, 2950 is L2 switch. Thus, you can't assign for it two IPs.
    Regards,
    Bakri
Sign In or Register to comment.