how to pratice routing protocol between 2 router and switch

convenientstoreconvenientstore Member Posts: 53 ■■□□□□□□□□
Unfortunately, I don' t have serial ports on two of my 2620 at my work.. so I am thinking of hooking them into 2912 switch in the middle to pratice routing protocols(rip and igrp)

so I erase switch's nvram to make things into default and wipe out my previous vlans.

I make router1 with 192.168.2.1(fa0/0)
I make router2 with 192.168.3.1(fa0/0)
each router is configured with
ip route 0.0.0.0 0.0.0.0 fa 0/0

and then I put switch's vlan ip to 192.168.10.1

two questions here
1)why does ip route shows 192.168.5.2 for default route?

resort is 192.168.5.2 to network 0.0.0.0

C 192.168.5.0/24 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 192.168.5.2
is directly connected, FastEthernet0/0

router1#sh ip int b
Interface IP-Address OK? Method Status Prol
FastEthernet0/0 192.168.5.1 YES manual up up


Switch#sh ip
00:07:04: %SYS-5-CONFIG_I: Configured from console by console int b
Interface IP-Address OK? Method Status Protocol
VLAN1 192.168.10.1 YES manual up up


2)from router1, when I ping router2, shoudln't it go out to fa0/0 which is hook up to the switch and then switch, since it's unknown mac address(wait.. does arp happen here? or does switch do nothing since it's ip? bit confused here), shouldn't it flush out all ports and hit the rite target??

Comments

  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    Check the running config on the switch -- you may not have totally cleared the switch's configuration.

    The IP on the switch is just for administrative purposes (so you can telnet in to configure it, rather than using the console port). When its just being a switch, it's Layer 2.... so the Routers are directly connected (if you want them to talk). You can do a show arp or show ip arp to see what the routers know and a you can check the mac-address-table on the switch.... or try a debug to watch the arp process on the routers. You can use the show cdp command (and variations) to see what each Cisco device knows about its directly connected neighbor.

    To practice routing, you can create loopback interfaces on the routers (and use them as the gateways to pretend networks) and use them with your routing protocols.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • david_rdavid_r Member Posts: 112
    C 192.168.5.0/24 is directly connected, FastEthernet0/0

    router1#sh ip int b
    Interface IP-Address OK? Method Status Prol
    FastEthernet0/0 192.168.5.1 YES manual up up

    Looks like you typoed your ip address on that router.

    Why did you put your routers in different subnets? Put both of your routers in the same subnet and as mentioned, use loopbacks as networks to advertise with your routing protocols.
  • convenientstoreconvenientstore Member Posts: 53 ■■□□□□□□□□
    interesting.. i will try the loopback and report u guys how it goes..

    thank you!!
  • convenientstoreconvenientstore Member Posts: 53 ■■□□□□□□□□
    I did and it's working(partially).. trying to see why router2 is NOT getting the rip... I thought it was due to split horizon so I added another interface.. but it didn't help.. any idea?
    192.168.5.2 is the switch

    router2#sh ip int b
    Interface IP-Address OK? Method Status Prol
    FastEthernet0/0 unassigned YES manual up up
    FastEthernet0/0.1 192.168.5.5 YES manual up up
    FastEthernet0/0.2 192.168.6.8 YES manual up up
    Serial0/0 192.168.4.1 YES manual down dow
    Serial0/1 unassigned YES NVRAM administratively down dow
    Loopback0 192.168.20.1 YES manual up up
    Loopback1 192.168.40.1 YES manual up up
    router2#sh ip route
    Codes: C - connected, S - static, I - IGRP, 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, E - EGP
    i - IS-IS, 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 192.168.5.2 to network 0.0.0.0

    C 192.168.40.0/24 is directly connected, Loopback1
    C 192.168.20.0/24 is directly connected, Loopback0
    C 192.168.5.0/24 is directly connected, FastEthernet0/0.1
    C 192.168.6.0/24 is directly connected, FastEthernet0/0.2
    S* 0.0.0.0/0 [1/0] via 192.168.5.2



    router1#sh ip int b
    Interface IP-Address OK? Method Status Protocol
    FastEthernet0/0 unassigned YES manual up up
    FastEthernet0/0.1 192.168.5.1 YES manual up up
    FastEthernet0/0.2 192.168.6.9 YES manual up up
    FastEthernet0/1 unassigned YES manual up down
    FastEthernet0/1.1 unassigned YES unset up down
    Loopback10 192.168.10.1 YES manual up up
    Loopback11 192.168.30.1 YES manual up up
    router1#sh ip route
    Codes: C - connected, S - static, I - IGRP, 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, E - EGP
    i - IS-IS, 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 192.168.5.2 to network 0.0.0.0

    C 192.168.30.0/24 is directly connected, Loopback11
    C 192.168.10.0/24 is directly connected, Loopback10
    R 192.168.40.0/24 [120/1] via 192.168.5.5, 00:00:11, FastEthernet0/0.1
    [120/1] via 192.168.6.8, 00:00:11, FastEthernet0/0.2
    R 192.168.20.0/24 [120/1] via 192.168.5.5, 00:00:11, FastEthernet0/0.1
    [120/1] via 192.168.6.8, 00:00:11, FastEthernet0/0.2
    C 192.168.5.0/24 is directly connected, FastEthernet0/0.1
    C 192.168.6.0/24 is directly connected, FastEthernet0/0.2
    S* 0.0.0.0/0 [1/0] via 192.168.5.2
  • convenientstoreconvenientstore Member Posts: 53 ■■□□□□□□□□
    why isn't router2 adding 192.168.10.0 and 30.0 to it's routing table??
    both are connected to same switch in vlan 1

    router2#sh ip int b
    Interface IP-Address OK? Method Status Prol
    FastEthernet0/0 unassigned YES NVRAM up up
    FastEthernet0/0.1 192.168.5.5 YES manual up up
    Serial0/0 unassigned YES NVRAM administratively down dow
    Serial0/1 unassigned YES NVRAM administratively down dow
    router2#sh ip route
    Codes: C - connected, S - static, I - IGRP, 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, E - EGP
    i - IS-IS, 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.5.0/24 is directly connected, FastEthernet0/0.1
    R 192.168.6.0/24 [120/1] via 192.168.5.1, 00:00:01, FastEthernet0/0.1



    router1#show ip int b
    Interface IP-Address OK? Method Status Prol
    FastEthernet0/0 unassigned YES manual up up
    FastEthernet0/0.1 192.168.5.1 YES manual up up
    FastEthernet0/0.2 192.168.6.9 YES manual up up
    FastEthernet0/1 unassigned YES manual up dow
    FastEthernet0/1.1 unassigned YES unset up dow
    Loopback10 192.168.10.1 YES manual up up
    Loopback11 192.168.30.1 YES manual up up
    router1#sh ip route
    Codes: C - connected, S - static, I - IGRP, 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, E - EGP
    i - IS-IS, 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 192.168.5.2 to network 0.0.0.0

    C 192.168.30.0/24 is directly connected, Loopback11
    C 192.168.10.0/24 is directly connected, Loopback10
    C 192.168.5.0/24 is directly connected, FastEthernet0/0.1
    C 192.168.6.0/24 is directly connected, FastEthernet0/0.2
    S* 0.0.0.0/0 [1/0] via 192.168.5.2
  • david_rdavid_r Member Posts: 112
    convenient,
    Can you show the details underneath "router rip" in your running configs? You need to add all networks that you want advertised and the interfaces where you want the advertisements sent.

    on router1 you should have
    router rip
    network 192.168.5.0
    network 192.168.6.0
    network 192.168.10.0
    network 192.168.30.0

    on router2 you need
    router rip
    network 192.168.5.0
    at a minimum.

    Why are you running sub-interfaces? You must walk before you can run, grasshopper. I think you should erase all of your configs, reload your routers and switch. Then enable your interfaces, add your loopbacks, enable rip and add the networks to it. You don't need to do anything to your switch's configuration.
  • convenientstoreconvenientstore Member Posts: 53 ■■□□□□□□□□
    I put the correct stuff under network and it's working.

    Question: I wasn't trying to get fancy .. I put ip under fa 0/0 and it didn't work for some reason. I had to specify the encap under subinterface and that's the only way it will work. I also had to configure the ports on switch that's connecting to each router as trunk... perhaps that's why? maybe it would work if I put nothing on the switch(I will have to wait till tomorrow to do that as I don't have console access to the switch right now(and it rebooted and i didn't enable the password on the enable side and it's not letting me get to exec privilege mode..

    anyway.. I am gonna now move onto IGRP config
  • Danman32Danman32 Member Posts: 1,243
    I was wondering why the subinterfaces also.
    Be aware that deleting the config on the switch doesn't clear the VLAN database.
Sign In or Register to comment.