cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1251
Views
5
Helpful
8
Replies

Network's Default Route

firemonte
Level 1
Level 1

I have a rack with routers and switches that I am using for my CCNA studies. I HAVE ATTACHED a JPEG picture of my Visio diagram. I would like to connect a router (R1) to have internet connectivity and supply the rest of my lab rack with internet connectivity.  I am using a Linksys home router that I bought at Best Buy for my home's internet.  Can I connect a cable (straight or cross??) from my R1 to one of the 4 ports of the Linksys router and use that?  I would of course set the static default route of R1 to reflect the IP of the Linksys router (192.168.1.1) and then redistribute the static default route to the rest of the lab routers.  Would this work?  I am thinking it should but HOW would the Linksys router know (by its own routing protocol?) to toss packets back to R1?

Thought I would get some feeleres about this before I just did this idea.

Thanks in advance.

Monte

1 Accepted Solution

Accepted Solutions

Hey that's great Monte, I think it's a really good plan to start from RIP and progress onwards like that. That's how I did things too.
It's a really good learning experience for us, once I was in your position too, but that's the best way of learning ;-)

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

View solution in original post

8 Replies 8

Bilal Nawaz
VIP Alumni
VIP Alumni

Hello, since the linksys will be configured to give out IP addresses on the LAN (via DHCP) there will be no need for you to put an address on the router attached, you also won't need a default route since the linksys router will be giving that information out by the dhcp parameters.

On the routers interface connecting to your linksys you will need to configure it so it picks up an IP via dhcp from your linksys (you can create a static entry in the linksys by setting up a DHCP reservation)

So on the router you will have:
E.g.
Interface fa0/1
Description ## connects to linksys ##
IP address dhcp

Once you have done this you will be able to see the default gateway once the lease has been given out.

So now you have an IP and a default route you can now decide whether you want to create static default routes or use a routing protocol to propagate the default route.

If you was to set up OSPF between your Cisco equipment then on the router connected to the linksys you could do this;

Conf t
Router OSPF 1
Router-Id x.x.x.x
Network y.y.y.y z.z.z.z area 0
Default-information originate

This will advertise out to the rest of the OSPF network of a default route towards itself.

The linksys router will know to send packets back to R1 because it does NAT-PAT but the requirement is for you to be on a totally Flat network for all your devices which you do not have. I.e. in the 192.168.1.0/24 range the same as your linksys.

If you wanted to change IPs around within your network which you have depicted you would have to NAT on R1 so that return traffic gets sent to R1 and then R1 can relay the packets back to the original destination.

Remember, R1 will need to know how to get back to the rest of your network depending on which options you take.

Hope this helps

Sent from Cisco Technical Support iPhone App

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

"

The linksys router will know to send packets back to R1 because it does NAT-PAT but the requirement is for you to be on a totally Flat network for all your devices which you do not have. I.e. in the 192.168.1.0/24 range the same as your linksys.


If you wanted to change IPs around within your network which you have depicted you would have to NAT on R1 so that return traffic gets sent to R1 and then R1 can relay the packets back to the original destination.


Remember, R1 will need to know how to get back to the rest of your network depending on which options you take.

"

SO... I would need for the rest of my devices to be in the 192.168.1.0/24 network for this the packets to make it back from the internet to the lab devices?

If I set up NAT on R1 that would fix that issue?  Then there would be double NAT-ing to and from the internet and it works?  That's very cool!

Correct, you got it spot on! - I can give you an example if it helps...?

rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Examples would be very cool!!! Please and Thank You!  I'll redrawn my diagram with a 192.168.1.0/24 subnetting schema to see if I do it correctly.

monte

Hello Monte,

I have just done the layer 3 - i wasnt sure what you wanted to do with the switches at the bottom. But its really easy and quick to get connectivity with all yoru different subnets!

I have done this:

All the router's interfaces have been configured and I have enabled the OSPF process too.

On every router I have done this:

conf t

!

router ospf 1

network 192.168.0.0 0.0.255.255 area 0

This will advertise all networks beginning with 192.168.X.X so there can be full connectivity.

I am doing NAT on R1 so the return traffic will be smooth.

This is R1's config, and the rest will be attached.

R1#show run

Building configuration...

Current configuration : 925 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname R1

!

!

spanning-tree mode pvst

!

interface FastEthernet0/0

description ## Uplink to SW 1 ##

no ip address

duplex auto

speed auto

!

interface FastEthernet0/1

description ## Uplink to Linksys ##

ip address dhcp

ip nat outside

duplex auto

speed auto

!

interface Serial0/0/0

description ## Routed to R2 ##

ip address 192.168.100.1 255.255.255.252

ip nat inside

clock rate 2000000

!

interface Serial0/0/1

description ## Routed to R3 ##

ip address 192.168.100.9 255.255.255.252

ip nat inside

!

router ospf 1

log-adjacency-changes

network 192.168.0.0 0.0.255.255 area 0

default-information originate

!

ip nat inside source list MY_LAN interface FastEthernet0/1 overload

ip classless

!

ip access-list standard MY_LAN

permit 192.168.0.0 0.0.255.255

!

line con 0

line vty 0 4

login

!

!

end

The default-information originate command has propagated the default route out to the rest of the network.

Also have my NAT in place so everything that is going out, can come back in to your networks. There is full connectivity everywhere.

Example of a show ip route on R1:

R1#show 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.1.1 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, FastEthernet0/1

     192.168.100.0/30 is subnetted, 6 subnets

C       192.168.100.0 is directly connected, Serial0/0/0

O       192.168.100.4 [110/128] via 192.168.100.10, 00:13:16, Serial0/0/1

                      [110/128] via 192.168.100.2, 00:13:16, Serial0/0/0

C       192.168.100.8 is directly connected, Serial0/0/1

O       192.168.100.12 [110/129] via 192.168.100.10, 00:09:35, Serial0/0/1

                       [110/129] via 192.168.100.2, 00:09:35, Serial0/0/0

O       192.168.100.16 [110/65] via 192.168.100.2, 00:11:38, Serial0/0/0

O       192.168.100.20 [110/65] via 192.168.100.10, 00:10:45, Serial0/0/1

S*   0.0.0.0/0 [254/0] via 192.168.1.1

This static entry in bold above was automatically inserted because of the DHCP lease that was given out by the linksys router.

Here is a show ip route on R5:

R5#show 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.100.22 to network 0.0.0.0

O    192.168.1.0/24 [110/66] via 192.168.100.22, 00:10:44, FastEthernet0/0

     192.168.100.0/30 is subnetted, 6 subnets

O       192.168.100.0 [110/129] via 192.168.100.22, 00:10:44, FastEthernet0/0

                      [110/129] via 192.168.100.13, 00:10:44, Serial0/0/0

O       192.168.100.4 [110/65] via 192.168.100.22, 00:10:44, FastEthernet0/0

O       192.168.100.8 [110/65] via 192.168.100.22, 00:10:44, FastEthernet0/0

C       192.168.100.12 is directly connected, Serial0/0/0

O       192.168.100.16 [110/65] via 192.168.100.13, 00:11:18, Serial0/0/0

C       192.168.100.20 is directly connected, FastEthernet0/0

O*E2 0.0.0.0/0 [110/1] via 192.168.100.22, 00:10:44, FastEthernet0/0

R5 is pointing towards R3 for its default route... So lets go to R3 and see what it says about its default route.

R3:

R3#show 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.100.9 to network 0.0.0.0

O    192.168.1.0/24 [110/65] via 192.168.100.9, 00:21:38, Serial0/0/0

     192.168.100.0/30 is subnetted, 6 subnets

O       192.168.100.0 [110/128] via 192.168.100.9, 00:15:41, Serial0/0/0

                      [110/128] via 192.168.100.5, 00:15:41, Serial0/0/1

C       192.168.100.4 is directly connected, Serial0/0/1

C       192.168.100.8 is directly connected, Serial0/0/0

O       192.168.100.12 [110/65] via 192.168.100.21, 00:12:00, FastEthernet0/0

O       192.168.100.16 [110/65] via 192.168.100.5, 00:14:08, Serial0/0/1

C       192.168.100.20 is directly connected, FastEthernet0/0

O*E2 0.0.0.0/0 [110/1] via 192.168.100.9, 00:21:38, Serial0/0/0

R3 says its default route is to R1 which is correct, so all traffic that is not known will flow through R1 towards the linksys.

Hope this helps.

Please rate useful posts and remember to mark any solved questions as answered. Thank you.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Bilal,

Using my topology I now have all of my devices running and pinging beautifully.  My next step is to turn on NAT on R1 and connect the linksys router and see if I can ping 4.4.4.2 or something. I used RIP for now... I want to phase into EIGRP and then OSPF.  RIP is all I need for CCENT but I am thinking I may bypass that and take the full CCNA exam.  I guess I better do it before September, eh?

Again, thanks for your help!

Just because... i'll lay out my devices.  SW1 = 3550, SW2 & SW3 & SW4 all are 2950, R1 is a 2611XM and R2 & R3 are 2610XM.  R4 & R5 are 1710 with T1 CSU/DSU's.  All ping nicely!! Woot! ... now that my FA issue was fixed... Why did I think it needed clocking?  Let alone a crossover cable. <-- newbie mistake!

Thanks Again!

Hey that's great Monte, I think it's a really good plan to start from RIP and progress onwards like that. That's how I did things too.
It's a really good learning experience for us, once I was in your position too, but that's the best way of learning ;-)

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card